You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by rv...@apache.org on 2015/01/14 11:31:03 UTC

[01/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Repository: jena
Updated Branches:
  refs/heads/hadoop-rdf 7ca24c068 -> e89032be1
  refs/heads/master 4ee8d9e37 -> 72d29e631


http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_R.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_R.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_R.java
deleted file mode 100644
index ca25b06..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_R.java
+++ /dev/null
@@ -1,99 +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.jena.fuseki.servlets ;
-
-import static java.lang.String.format ;
-
-import java.io.IOException ;
-
-import javax.servlet.ServletOutputStream ;
-
-import org.apache.jena.atlas.web.MediaType ;
-import org.apache.jena.atlas.web.TypedOutputStream ;
-import org.apache.jena.riot.web.HttpNames ;
-import org.apache.jena.riot.* ;
-
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-
-/**
- * Servlet for operations directly on a dataset - REST(ish) behaviour on the
- * dataset URI.
- */
-
-public class REST_Quads_R extends REST_Quads {
-    public REST_Quads_R() {
-        super() ;
-    }
-
-    @Override
-    protected void validate(HttpAction action) { }
-
-    @Override
-    protected void doGet(HttpAction action) {
-        MediaType mediaType = ActionLib.contentNegotationQuads(action) ;
-        ServletOutputStream output ;
-        try {
-            output = action.response.getOutputStream() ;
-        } catch (IOException ex) {
-            ServletOps.errorOccurred(ex) ;
-            output = null ;
-        }
-
-        TypedOutputStream out = new TypedOutputStream(output, mediaType) ;
-        Lang lang = RDFLanguages.contentTypeToLang(mediaType.getContentType()) ;
-        if ( lang == null )
-            lang = RDFLanguages.TRIG ;
-
-        if ( action.verbose )
-            action.log.info(format("[%d]   Get: Content-Type=%s, Charset=%s => %s", action.id,
-                                   mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ;
-        if ( !RDFLanguages.isQuads(lang) )
-            ServletOps.errorBadRequest("Not a quads format: " + mediaType) ;
-
-        action.beginRead() ;
-        try {
-            DatasetGraph dsg = action.getActiveDSG() ;
-            action.response.setHeader("Content-type", lang.getContentType().toHeaderString());
-            RDFFormat fmt =
-                ( lang == Lang.RDFXML ) ? RDFFormat.RDFXML_PLAIN : RDFWriterRegistry.defaultSerialization(lang) ; 
-            RDFDataMgr.write(out, dsg, fmt) ;
-            ServletOps.success(action) ;
-        } finally {
-            action.endRead() ;
-        }
-    }
-
-    @Override
-    protected void doOptions(HttpAction action) {
-        action.response.setHeader(HttpNames.hAllow, "GET, HEAD, OPTIONS") ;
-        action.response.setHeader(HttpNames.hContentLengh, "0") ;
-        ServletOps.success(action) ;
-    }
-
-    @Override
-    protected void doHead(HttpAction action) {
-        action.beginRead() ;
-        try {
-            MediaType mediaType = ActionLib.contentNegotationQuads(action) ;
-            ServletOps.success(action) ;
-        } finally {
-            action.endRead() ;
-        }
-    }
-}


[47/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/async/AsyncTask.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/async/AsyncTask.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/async/AsyncTask.java
new file mode 100644
index 0000000..0b73f7e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/async/AsyncTask.java
@@ -0,0 +1,114 @@
+/**
+ * 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.jena.fuseki.async;
+
+import static java.lang.String.format ;
+
+import java.util.concurrent.Callable ;
+
+import com.hp.hpl.jena.sparql.util.Utils ;
+
+import org.apache.jena.atlas.lib.InternalErrorException ;
+import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.server.DataService ;
+import org.slf4j.Logger ;
+
+/** An asynchronous task */ 
+public class AsyncTask implements Callable<Object>  
+{
+    private static Logger log = Fuseki.serverLog ; 
+    
+    private final Callable<Object> callable ;
+    private final AsyncPool pool ;
+
+    private final String displayName ;
+    private final DataService dataService ;
+
+    private String startPoint = null ;
+    private String finishPoint = null ;
+
+    private final String taskId ;
+
+    /*package*/ AsyncTask(Callable<Object> callable, 
+                          AsyncPool pool,
+                          String taskId,
+                          String displayName,
+                          DataService dataService ) {
+        this.callable = callable ;
+        this.pool = pool ;
+        this.taskId = taskId ; 
+        this.displayName = displayName ;
+        this.dataService = dataService ;
+    }
+
+    /** Unique task id */
+    public String getTaskId() { return taskId ; }
+    
+    /** Display name - no newlines */
+    public String displayName() { return displayName ; }
+    
+    public DataService getDataService() { return dataService ; }
+
+    private void start() {
+        if ( startPoint != null ) {
+            String msg = format("[Task %s] Async task has already been started", taskId) ;
+            Log.warn(Fuseki.serverLog, msg) ;
+            throw new InternalErrorException("Finish has already been called ["+getTaskId()+"]") ; 
+        }
+            
+        Fuseki.serverLog.info(format("[Task %s] starts : %s",taskId, displayName)) ;
+        startPoint = Utils.nowAsXSDDateTimeString() ;
+    }
+    
+    public void finish() {
+        if ( finishPoint != null ) {
+            String msg = format("[Task %s] Async task has already been finished", taskId) ;
+            Log.warn(Fuseki.serverLog, msg) ;
+            throw new InternalErrorException("Finish has already been called ["+getTaskId()+"]") ; 
+        }
+        finishPoint = Utils.nowAsXSDDateTimeString() ;
+        Fuseki.serverLog.info(format("[Task %s] finishes : %s",taskId, displayName)) ;
+    }
+    
+    @Override
+    public Object call() {
+        try {
+            start() ;
+            return callable.call() ;
+        }
+        catch (Exception ex) {
+            log.error("Async task threw an expection", ex) ;
+            return null ;
+        }
+        finally {
+            finish() ;
+            pool.finished(this) ;
+        }
+    }
+
+    public String getStartPoint() {
+        return startPoint ;
+    }
+
+    public String getFinishPoint() {
+        return finishPoint ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java
new file mode 100644
index 0000000..ca4cd2e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java
@@ -0,0 +1,59 @@
+/**
+ * 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.jena.fuseki.authz;
+
+import java.io.IOException ;
+
+import javax.servlet.ServletRequest ;
+import javax.servlet.ServletResponse ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.web.HttpSC ;
+import org.apache.shiro.web.filter.authz.AuthorizationFilter ;
+import org.apache.shiro.web.util.WebUtils ;
+
+/** Specialise AuthorizationFilter to yield HTTP 403 on access denied */ 
+public abstract class AuthorizationFilter403 extends AuthorizationFilter
+{    
+    private String message ;
+
+    protected AuthorizationFilter403(String text)   { setMessage(text) ; }
+    protected AuthorizationFilter403()              { this(null) ; }
+    
+    /** Set the message used in HTTP 403 responses */
+    public void setMessage(String msg) { message = msg ; }
+    
+    public String getMessage() { return message ; }
+
+    @Override
+    protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
+        HttpServletResponse httpResponse ;
+        try { httpResponse = WebUtils.toHttp(response); }
+        catch (ClassCastException ex) { 
+            // Not a HTTP Servlet operation
+            return super.onAccessDenied(request, response) ;
+        }
+        if ( message == null )
+            httpResponse.sendError(HttpSC.FORBIDDEN_403) ;
+        else
+            httpResponse.sendError(HttpSC.FORBIDDEN_403, message) ;
+        return false ;  // No further processing.
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java
new file mode 100644
index 0000000..aac7ecd
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java
@@ -0,0 +1,33 @@
+/**
+ * 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.jena.fuseki.authz;
+
+import javax.servlet.ServletRequest ;
+import javax.servlet.ServletResponse ;
+
+/** An authorization filter that always denies access and sends back HTTP 403 */
+public class DenyFilter extends AuthorizationFilter403 {
+
+    public DenyFilter() { super("Access denied") ; }
+
+    @Override
+    protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
+        return false ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
new file mode 100644
index 0000000..71de761
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
@@ -0,0 +1,62 @@
+/**
+ * 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.jena.fuseki.authz;
+
+import javax.servlet.ServletRequest ;
+import javax.servlet.ServletResponse ;
+
+import org.apache.shiro.web.filter.authz.PortFilter ;
+
+/**
+ * A Filter that can allow or deny access based on whether the
+ * the host that sent the request is the loopback address (AKA localhost).
+ * Use of the external IP address of the local machine does not permit access,
+ * only the loopback interface is authorized.
+ * Responds with HTTP 403 on any denied request.
+ * 
+ * Example:
+ * <pre>
+ * [main]
+ * localhost=org.apache.jena.fuseki.authz.LocalhostFilter
+ * ...
+ * [urls]
+ * /LocalFilesForLocalPeople/** = localhost
+ * </pre>
+ * @see PortFilter
+ */
+
+public class LocalhostFilter extends AuthorizationFilter403 {
+    
+    private static final String message = "Access denied : only localhost access allowed" ;   
+    
+    public LocalhostFilter() { super(message); } 
+
+    private static String LOCALHOST_IpV6 =  "0:0:0:0:0:0:0:1" ;
+    private static String LOCALHOST_IpV4 =  "127.0.0.1" ;   // Strictly, 127.*.*.*
+    
+    @Override
+    protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception {
+        String remoteAddr = request.getRemoteAddr() ;
+        if ( LOCALHOST_IpV6.equals(remoteAddr) || LOCALHOST_IpV4.equals(remoteAddr) )
+            return true ;
+        return false ;
+    }
+}
+
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Builder.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Builder.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Builder.java
new file mode 100644
index 0000000..f8ec3cc
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Builder.java
@@ -0,0 +1,149 @@
+/**
+ * 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.jena.fuseki.build;
+
+import static java.lang.String.format ;
+import static org.apache.jena.fuseki.FusekiLib.nodeLabel ;
+import static org.apache.jena.fuseki.FusekiLib.query ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.FusekiConfigException ;
+import org.apache.jena.fuseki.FusekiLib ;
+import org.apache.jena.fuseki.server.DataAccessPoint ;
+import org.apache.jena.fuseki.server.DataService ;
+import org.apache.jena.fuseki.server.Endpoint ;
+import org.apache.jena.fuseki.server.OperationName ;
+import org.slf4j.Logger ;
+
+import com.hp.hpl.jena.assembler.Assembler ;
+import com.hp.hpl.jena.datatypes.xsd.XSDDatatype ;
+import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.query.QuerySolution ;
+import com.hp.hpl.jena.query.ResultSet ;
+import com.hp.hpl.jena.rdf.model.Literal ;
+import com.hp.hpl.jena.rdf.model.RDFNode ;
+import com.hp.hpl.jena.rdf.model.Resource ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.util.FmtUtils ;
+import com.hp.hpl.jena.tdb.TDB ;
+import com.hp.hpl.jena.vocabulary.RDF ;
+public class Builder
+{
+    private static Logger log = Fuseki.builderLog ;
+    
+    /** Build a DataAccessPoint, including DataServiceat Resource svc */
+    public static DataAccessPoint buildDataAccessPoint(Resource svc) {
+        RDFNode n = FusekiLib.getOne(svc, "fu:name") ;
+        if ( ! n.isLiteral() )
+            throw new FusekiConfigException("Not a literal for access point name: "+FmtUtils.stringForRDFNode(n));
+        Literal object = n.asLiteral() ;
+
+        if ( object.getDatatype() != null && ! object.getDatatype().equals(XSDDatatype.XSDstring) )
+            Fuseki.configLog.error(format("Service name '%s' is not a string", FmtUtils.stringForRDFNode(object)));
+        String name = object.getLexicalForm() ;
+        name = DataAccessPoint.canonical(name) ;
+
+        DataService dataService = Builder.buildDataService(svc) ;
+        DataAccessPoint dataAccess = new DataAccessPoint(name) ;
+        dataAccess.setDataService(dataService) ;
+        return dataAccess ;
+    }
+
+    /** Build a DatasetRef starting at Resource svc */
+    public static DataService buildDataService(Resource svc) {
+        log.info("Service: " + nodeLabel(svc)) ;
+        // DO REAL WORK
+        Resource datasetDesc = ((Resource)getOne(svc, "fu:dataset")) ;
+        
+        // Check if it is in the model.
+        if ( !datasetDesc.hasProperty(RDF.type) )
+            throw new FusekiConfigException("No rdf:type for dataset " + nodeLabel(datasetDesc)) ;
+        Dataset ds = (Dataset)Assembler.general.open(datasetDesc) ;
+        // In case the assembler included ja:contents
+        TDB.sync(ds) ;
+        DataService dataService = new DataService(null, ds.asDatasetGraph()) ;
+        addServiceEP(dataService, OperationName.Query,  svc,    "fu:serviceQuery") ;
+        addServiceEP(dataService, OperationName.Update, svc,    "fu:serviceUpdate") ;
+        addServiceEP(dataService, OperationName.Upload, svc,    "fu:serviceUpload") ;
+        addServiceEP(dataService, OperationName.GSP_R,  svc,    "fu:serviceReadGraphStore") ;
+        addServiceEP(dataService, OperationName.GSP,    svc,    "fu:serviceReadWriteGraphStore") ;
+        
+        if ( ! dataService.getOperation(OperationName.GSP).isEmpty() )
+            dataService.addEndpoint(OperationName.Quads, "") ;
+        else if ( ! dataService.getOperation(OperationName.GSP_R).isEmpty() )
+            dataService.addEndpoint(OperationName.Quads, "") ;
+        
+        // XXX 
+//        // Extract timeout overriding configuration if present.
+//        if ( svc.hasProperty(FusekiVocab.pAllowTimeoutOverride) ) {
+//            sDesc.allowTimeoutOverride = svc.getProperty(FusekiVocab.pAllowTimeoutOverride).getObject().asLiteral().getBoolean() ;
+//            if ( svc.hasProperty(FusekiVocab.pMaximumTimeoutOverride) ) {
+//                sDesc.maximumTimeoutOverride = (int)(svc.getProperty(FusekiVocab.pMaximumTimeoutOverride).getObject().asLiteral().getFloat() * 1000) ;
+//            }
+//        }
+
+        return dataService ;
+    }
+    
+    /** Build a DataService starting at Resource svc */
+    public static DataService buildDataService(DatasetGraph dsg, boolean allowUpdate) {
+        DataService dataService = new DataService(null, dsg) ;
+        addServiceEP(dataService, OperationName.Query, "query") ;
+        addServiceEP(dataService, OperationName.Query, "sparql") ;
+        if ( ! allowUpdate ) {
+            addServiceEP(dataService, OperationName.Quads, "quads") ;
+            addServiceEP(dataService, OperationName.GSP_R, "data") ;
+            return dataService ;
+        }
+        addServiceEP(dataService, OperationName.GSP,    "data") ;
+        addServiceEP(dataService, OperationName.Update, "update") ;
+        addServiceEP(dataService, OperationName.Upload, "upload") ;
+        addServiceEP(dataService, OperationName.Quads,  "") ;
+        return dataService ;
+    }
+
+    private static void addServiceEP(DataService dataService, OperationName opName, String epName) {
+        dataService.addEndpoint(opName, epName) ; 
+    }
+
+    public static RDFNode getOne(Resource svc, String property) {
+        String ln = property.substring(property.indexOf(':') + 1) ;
+        ResultSet rs = FusekiLib.query("SELECT * { ?svc " + property + " ?x}", svc.getModel(), "svc", svc) ;
+        if ( !rs.hasNext() )
+            throw new FusekiConfigException("No " + ln + " for service " + FusekiLib.nodeLabel(svc)) ;
+        RDFNode x = rs.next().get("x") ;
+        if ( rs.hasNext() )
+            throw new FusekiConfigException("Multiple " + ln + " for service " + FusekiLib.nodeLabel(svc)) ;
+        return x ;
+    }
+    
+
+    private static void addServiceEP(DataService dataService, OperationName opName, Resource svc, String property) {
+        ResultSet rs = query("SELECT * { ?svc " + property + " ?ep}", svc.getModel(), "svc", svc) ;
+        for ( ; rs.hasNext() ; ) {
+            QuerySolution soln = rs.next() ;
+            String epName = soln.getLiteral("ep").getLexicalForm() ;
+            Endpoint operation = new Endpoint(opName, epName) ;
+            addServiceEP(dataService, opName, epName); 
+            //log.info("  " + opName.name + " = " + dataAccessPoint.getName() + "/" + epName) ;
+        }
+    }
+
+
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
new file mode 100644
index 0000000..2b85c99
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
@@ -0,0 +1,107 @@
+/**
+ * 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.jena.fuseki.build;
+
+import java.io.StringReader ;
+import java.util.HashMap ;
+import java.util.Map ;
+
+import org.apache.jena.fuseki.FusekiConfigException ;
+import org.apache.jena.fuseki.server.DataService ;
+import org.apache.jena.fuseki.server.FusekiServer ;
+import org.apache.jena.fuseki.server.FusekiVocab ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.RDFLanguages ;
+
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.ModelFactory ;
+import com.hp.hpl.jena.rdf.model.Resource ;
+import com.hp.hpl.jena.sparql.util.FmtUtils ;
+import com.hp.hpl.jena.sparql.util.TypeNotUniqueException ;
+import com.hp.hpl.jena.sparql.util.graph.GraphUtils ;
+
+// Check whether this is used or needed
+public abstract class DataServiceDesc
+{
+    public static DataServiceDesc createFromTemplate(String templateFile, String dbName) {
+        Map<String, String> params = new HashMap<>() ;
+        params.put(Template.NAME, dbName) ;
+        FusekiServer.addGlobals(params); 
+        String template = TemplateFunctions.templateFile(templateFile, params) ;
+        Lang lang = RDFLanguages.filenameToLang(templateFile, Lang.TTL) ;
+        StringReader sr = new StringReader(template) ;
+        return create(sr, lang) ;
+    }
+    
+    public static DataServiceDesc create(StringReader strReader, Lang lang ) {
+        Model model = ModelFactory.createDefaultModel() ;
+        RDFDataMgr.read(model, strReader, "http://base/", lang) ;
+        Resource root ;
+        try {
+            root = GraphUtils.findRootByType(model, FusekiVocab.fusekiService) ;
+            if ( root == null )
+                throw new FusekiConfigException("No root of type "
+                    + FmtUtils.stringForResource(FusekiVocab.fusekiService) + "found") ;
+        } catch (TypeNotUniqueException ex) {
+            throw new FusekiConfigException("Multiple items of type: " + FusekiVocab.fusekiService) ;
+        }
+        return new DataServiceDescResource(root) ;
+    }
+
+    public static DataServiceDesc create(DataService dataService) {
+        return new DataServiceDescPrebuilt(dataService) ;
+    }
+    
+    //public abstract Resource getResource() ;
+
+    public abstract DataService build() ;
+//    public abstract void unbuild() ;
+
+
+    private static class DataServiceDescResource extends DataServiceDesc {
+        protected Resource resource ; 
+
+        protected DataServiceDescResource(Resource resource) {
+            this.resource = resource ;
+        }
+
+        public Resource getResource() { return resource ; }
+
+        @Override
+        public DataService build() {
+            return Builder.buildDataService(resource) ;
+        }
+    }
+    
+    private static class DataServiceDescPrebuilt extends DataServiceDesc {
+
+        private DataService dataService ;
+
+        protected DataServiceDescPrebuilt(DataService dataService) {
+            this.dataService = dataService ;
+        }
+
+        @Override
+        public DataService build() {
+            return dataService ;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
new file mode 100644
index 0000000..10319a4
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
@@ -0,0 +1,261 @@
+/*
+ * 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.jena.fuseki.build ;
+
+import java.io.File ;
+import java.io.FilenameFilter ;
+import java.lang.reflect.Method ;
+import java.util.ArrayList ;
+import java.util.Collections ;
+import java.util.List ;
+
+import org.apache.jena.atlas.iterator.Iter ;
+import org.apache.jena.atlas.lib.StrUtils ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.FusekiConfigException ;
+import org.apache.jena.fuseki.FusekiLib ;
+import org.apache.jena.fuseki.server.DataAccessPoint ;
+import org.apache.jena.fuseki.server.DatasetStatus ;
+import org.apache.jena.fuseki.server.FusekiVocab ;
+import org.apache.jena.fuseki.server.SystemState ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.slf4j.Logger ;
+
+import com.hp.hpl.jena.assembler.JA ;
+import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.query.QuerySolution ;
+import com.hp.hpl.jena.query.ResultSet ;
+import com.hp.hpl.jena.rdf.model.* ;
+import com.hp.hpl.jena.sparql.core.assembler.AssemblerUtils ;
+import com.hp.hpl.jena.update.UpdateAction ;
+import com.hp.hpl.jena.update.UpdateFactory ;
+import com.hp.hpl.jena.update.UpdateRequest ;
+import com.hp.hpl.jena.vocabulary.RDF ;
+
+public class FusekiConfig {
+    static { Fuseki.init() ; }
+    
+    private static Logger log = Fuseki.configLog ;
+    
+    private static FilenameFilter visibleFiles = 
+        new FilenameFilter() {
+        @Override
+        public boolean accept(File dir, String name) {
+            if ( name.startsWith(".") )
+                return false ;
+            File f = new File(dir, name) ;
+            return f.isFile() ;
+        }
+    } ;
+    
+    /** Has side effects in server setup */
+    public static List<DataAccessPoint> readConfigFile(String filename) {
+        // Old-style config file.
+        Model model = RDFDataMgr.loadModel(filename) ;
+        if ( model.size() == 0 )
+            return Collections.emptyList() ;
+        additionalRDF(model) ;
+        server(model) ;
+        return servicesAndDatasets(model) ;
+    }
+
+    private static void server(Model model) {
+        // Find one server.
+        List<Resource> servers = getByType(FusekiVocab.tServer, model) ;
+        if ( servers.size() == 0 )
+            return ; 
+        if ( servers.size() > 1 )
+            throw new FusekiConfigException(servers.size()
+                                            + " servers found (must be exactly one in a configuration file)") ;
+        // ---- Server
+        Resource server = servers.get(0) ;
+        processServer(server) ;
+    }
+
+    private static void processServer(Resource server) {
+        // Global, currently.
+        AssemblerUtils.setContext(server, Fuseki.getContext()) ;
+
+        StmtIterator sIter = server.listProperties(JA.loadClass) ;
+        for ( ; sIter.hasNext() ; ) {
+            Statement s = sIter.nextStatement() ;
+            RDFNode rn = s.getObject() ;
+            String className = null ;
+            if ( rn instanceof Resource ) {
+                String uri = ((Resource)rn).getURI() ;
+                if ( uri == null ) {
+                    log.warn("Blank node for class to load") ;
+                    continue ;
+                }
+                String javaScheme = "java:" ;
+                if ( !uri.startsWith(javaScheme) ) {
+                    log.warn("Class to load is not 'java:': " + uri) ;
+                    continue ;
+                }
+                className = uri.substring(javaScheme.length()) ;
+            }
+            if ( rn instanceof Literal )
+                className = ((Literal)rn).getLexicalForm() ;
+            /* Loader. */loadAndInit(className) ;
+        }
+    }
+    
+    private static List<DataAccessPoint> servicesAndDatasets(Model model) {
+        // Old style configuration file : server to services.
+        // ---- Services
+        ResultSet rs = FusekiLib.query("SELECT * { ?s fu:services [ list:member ?member ] }", model) ;
+        // If the old config.ttl file becomes just the server configuration file,
+        // then don't warn here.
+//        if ( !rs.hasNext() )
+//            log.warn("No services found") ;
+
+        List<DataAccessPoint> accessPoints = new ArrayList<>() ;
+
+        for ( ; rs.hasNext() ; ) {
+            QuerySolution soln = rs.next() ;
+            Resource svc = soln.getResource("member") ;
+            DataAccessPoint acc = Builder.buildDataAccessPoint(svc) ;
+            accessPoints.add(acc) ;
+        }
+        return accessPoints ;
+    }
+    
+    private static void loadAndInit(String className) {
+        try {
+            Class<? > classObj = Class.forName(className) ;
+            log.info("Loaded " + className) ;
+            Method initMethod = classObj.getMethod("init") ;
+            initMethod.invoke(null) ;
+        }
+        catch (ClassNotFoundException ex) {
+            log.warn("Class not found: " + className) ;
+        }
+        catch (Exception e) {
+            throw new FusekiConfigException(e) ;
+        }
+    }
+    
+    // XXX Move to utils
+    private static Model additionalRDF(Model m) {
+        SystemState.init$();        // Why? mvn jetty:run-war
+        String x1 = StrUtils.strjoinNL
+            ( SystemState.PREFIXES, 
+              "INSERT                    { [] ja:loadClass 'com.hp.hpl.jena.tdb.TDB' }",
+              "WHERE { FILTER NOT EXISTS { [] ja:loadClass 'com.hp.hpl.jena.tdb.TDB' } }"
+             ) ;
+        String x2 = StrUtils.strjoinNL
+            (SystemState.PREFIXES,
+             "INSERT DATA {",
+             "   tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .",
+             "   tdb:GraphTDB    rdfs:subClassOf  ja:Model .",
+             "}" 
+             ) ;
+        execute(m, x1) ;
+        execute(m, x2) ;
+        return m ;
+    }
+
+    private static void execute(Model m, String x) {
+        UpdateRequest req = UpdateFactory.create(x) ;
+        UpdateAction.execute(req, m);
+    }
+
+    // XXX Move to a library
+    private static List<Resource> getByType(Resource type, Model m) {
+        ResIterator rIter = m.listSubjectsWithProperty(RDF.type, type) ;
+        return Iter.toList(rIter) ;
+    }
+    
+    // ---- Directory of assemblers
+    
+    /** Read service descriptions in the given directory */ 
+    public static List<DataAccessPoint> readConfigurationDirectory(String dir) {
+        List<DataAccessPoint> dataServiceRef = new ArrayList<>() ;
+        File d = new File(dir) ;
+        String[] aFiles = d.list(visibleFiles) ;
+        if ( aFiles == null ) {
+            log.warn("Not found: directory for assembler files for services: '"+dir+"'") ;
+            return Collections.emptyList() ;
+        }
+        for ( String assemFile : aFiles ) {
+            Model m = RDFDataMgr.loadModel(assemFile) ;
+            DataAccessPoint acc = readConfiguration(m) ; 
+            dataServiceRef.add(acc) ;
+        }
+
+        return dataServiceRef ;
+    }
+
+    private static DataAccessPoint readConfiguration(Model m) {
+        additionalRDF(m) ;
+        List<Resource> services = getByType(FusekiVocab.fusekiService, m) ; 
+
+        if ( services.size() == 0 ) {
+            log.error("No services found") ;
+            throw new FusekiConfigException() ;
+        }
+
+        // Remove?
+        if ( services.size() > 1 ) {
+            log.error("Multiple services found") ;
+            throw new FusekiConfigException() ;
+        }
+
+        Resource service = services.get(0) ;
+        DataAccessPoint acc = Builder.buildDataAccessPoint(service) ; 
+        return acc ;
+    }
+
+    // ---- System database
+    /** Read the system database */
+    public static List<DataAccessPoint> readSystemDatabase(Dataset ds) {
+        String qs = StrUtils.strjoinNL
+            (SystemState.PREFIXES ,
+             "SELECT * {" ,
+             "  GRAPH ?g {",
+             "     ?s fu:name ?name ;" ,
+             "        fu:status ?status ." ,
+             "  }",
+             "}"
+             ) ;
+        
+        List<DataAccessPoint> refs = new ArrayList<>() ;
+        
+        ResultSet rs = FusekiLib.query(qs, ds) ;
+        
+//        ResultSetFormatter.out(rs); 
+//        ((ResultSetRewindable)rs).reset();
+        
+        for ( ; rs.hasNext() ; ) {
+            QuerySolution row = rs.next() ;
+            Resource s = row.getResource("s") ;
+            Resource g = row.getResource("g") ;
+            Resource rStatus = row.getResource("status") ;
+            //String name = row.getLiteral("name").getLexicalForm() ;
+            DatasetStatus status = DatasetStatus.status(rStatus) ;
+            
+            Model m = ds.getNamedModel(g.getURI()) ;
+            // Rebase the resoure of the service description to the containing graph.
+            Resource svc = m.wrapAsResource(s.asNode()) ;
+            DataAccessPoint ref = Builder.buildDataAccessPoint(svc) ;
+            refs.add(ref) ;
+        }
+        return refs ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java
new file mode 100644
index 0000000..55a449e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java
@@ -0,0 +1,52 @@
+/**
+ * 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.jena.fuseki.build;
+
+import java.nio.file.Path ;
+
+import org.apache.jena.fuseki.server.FusekiEnv ;
+
+public class Template
+{
+    public static Path getPath(String templateName) {
+        return FusekiEnv.FUSEKI_BASE.resolve(templateName) ;
+    }
+    
+    public static final String templateDir          = "templates" ;
+    public static final String templateMemFN        = templateDir+"/config-mem" ;
+    public static final String templateTDBFN        = templateDir+"/config-tdb" ;
+    public static final String templateTDBMemFN     = templateDir+"/config-tdb-mem" ; 
+    public static final String templateTDBDirFN     = templateDir+"/config-tdb-dir" ;
+    public static final String templateServiceFN    = templateDir+"/config-service" ;       // Dummy used by dataset-less service.
+    
+    // Template may be in a resources area of a jar file so you can't do a directory listing.
+    public static final String[] templateNames = {
+        templateMemFN ,
+        templateTDBFN ,
+        templateTDBMemFN ,
+        templateTDBDirFN ,
+        templateServiceFN
+    } ;
+    
+    public static final String NAME = "NAME" ;
+    public static final String DATA = "DATA" ;
+    public static final String DIR =  "DIR" ;
+    
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
new file mode 100644
index 0000000..41c21c5
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
@@ -0,0 +1,68 @@
+/**
+ * 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.jena.fuseki.build;
+
+import java.io.IOException ;
+import java.io.InputStream ;
+import java.util.Map ;
+import java.util.Map.Entry ;
+
+import org.apache.jena.atlas.io.IO ;
+import org.apache.jena.fuseki.Fuseki ;
+
+import com.hp.hpl.jena.util.FileUtils ;
+
+public class TemplateFunctions
+{
+    /** Read in a template from a file, substitute for {NAME} and return the string. */
+    public static String templateFile(String templateName, Map<String, String> params) {
+        String templateFilename = Template.getPath(templateName).toString() ;
+        String template ;
+        try { template = FileUtils.readWholeFileAsUTF8(templateFilename) ; }
+        catch (IOException ex) { 
+            Fuseki.serverLog.error("File not found: "+templateFilename);
+            IO.exception(ex); return null ;
+        }
+        return templateString(template, params) ;
+    }
+    
+    /** Read a template file, substitute for {NAME} and return the model. */
+    public static String templateResource(String resourceName, Map<String, String> params) {
+        String template ;
+        try {
+            InputStream in = TemplateFunctions.class.getClassLoader().getResourceAsStream(resourceName) ;
+            if ( in == null )
+                Fuseki.serverLog.error("Resource not found: "+resourceName);
+            template = FileUtils.readWholeFileAsUTF8(in) ;
+        }
+        catch (IOException ex) { 
+            Fuseki.serverLog.error("Error reading resource: "+resourceName);
+            IO.exception(ex); return null ;
+        }
+        return templateString(template, params) ;
+    }
+
+    /** Create a template from a String */ 
+    public static String templateString(String template, Map<String, String> params) {
+        for ( Entry<String, String> e : params.entrySet() ) {
+            template = template.replaceAll("\\{"+e.getKey()+"\\}", e.getValue()) ;
+        }
+        return template ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
new file mode 100644
index 0000000..a7cb0d4
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
@@ -0,0 +1,339 @@
+/*
+ * 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.jena.fuseki.cmd ;
+
+import java.util.List ;
+
+import org.apache.jena.atlas.lib.FileOps ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.FusekiLogging ;
+import org.apache.jena.fuseki.build.Template ;
+import org.apache.jena.fuseki.jetty.JettyServerConfig ;
+import org.apache.jena.fuseki.jetty.JettyFuseki ;
+import org.apache.jena.fuseki.server.FusekiServerListener ;
+import org.apache.jena.fuseki.server.ServerInitialConfig ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.RDFLanguages ;
+import org.slf4j.Logger ;
+import arq.cmd.CmdException ;
+import arq.cmdline.ArgDecl ;
+import arq.cmdline.CmdARQ ;
+import arq.cmdline.ModDatasetAssembler ;
+
+import com.hp.hpl.jena.query.ARQ ;
+import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
+import com.hp.hpl.jena.tdb.TDB ;
+import com.hp.hpl.jena.tdb.sys.Names ;
+import com.hp.hpl.jena.tdb.transaction.TransactionManager ;
+
+public class FusekiCmd {
+    // This allows us to set logging before calling FusekiCmdInner
+    // FusekiCmdInner inherits from CmdMain which statically sets logging.
+    // By java classloading, super class statics run before the 
+    // statics of a class are run.
+
+    static {
+        FusekiLogging.setLogging() ;
+    }
+
+    static public void main(String... argv) {
+        FusekiCmdInner.innerMain(argv);
+    }
+    
+    static class FusekiCmdInner extends CmdARQ {
+        // --mgt. --mgtPort  :: Legacy.
+        private static ArgDecl  argMgt          = new ArgDecl(ArgDecl.NoValue, "mgt") ;
+        private static ArgDecl  argMgtPort      = new ArgDecl(ArgDecl.HasValue, "mgtPort", "mgtport") ;
+        
+        // --home :: Legacy - do not use.
+        private static ArgDecl  argHome         = new ArgDecl(ArgDecl.HasValue, "home") ;
+        private static ArgDecl  argPages        = new ArgDecl(ArgDecl.HasValue, "pages") ;
+
+        private static ArgDecl  argMem          = new ArgDecl(ArgDecl.NoValue, "mem") ;
+        private static ArgDecl  argAllowUpdate  = new ArgDecl(ArgDecl.NoValue, "update", "allowUpdate") ;
+        private static ArgDecl  argFile         = new ArgDecl(ArgDecl.HasValue, "file") ;
+        private static ArgDecl  argMemTDB       = new ArgDecl(ArgDecl.NoValue, "memtdb", "memTDB") ;
+        private static ArgDecl  argTDB          = new ArgDecl(ArgDecl.HasValue, "loc", "location") ;
+        private static ArgDecl  argPort         = new ArgDecl(ArgDecl.HasValue, "port") ;
+        private static ArgDecl  argLocalhost    = new ArgDecl(ArgDecl.NoValue, "localhost", "local") ;
+        private static ArgDecl  argTimeout      = new ArgDecl(ArgDecl.HasValue, "timeout") ;
+        private static ArgDecl  argFusekiConfig = new ArgDecl(ArgDecl.HasValue, "config", "conf") ;
+        private static ArgDecl  argJettyConfig  = new ArgDecl(ArgDecl.HasValue, "jetty-config") ;
+        private static ArgDecl  argGZip         = new ArgDecl(ArgDecl.HasValue, "gzip") ;
+
+        // Deprecated.  Use shiro.
+        private static ArgDecl  argBasicAuth    = new ArgDecl(ArgDecl.HasValue, "basic-auth") ;
+
+        // private static ModLocation modLocation = new ModLocation() ;
+        private static ModDatasetAssembler modDataset      = new ModDatasetAssembler() ;
+
+        // fuseki [--mem|--desc assembler.ttl] [--port PORT] **** /datasetURI
+
+        static public void innerMain(String... argv) {
+            // Just to make sure ...
+            ARQ.init() ;
+            TDB.init() ;
+            Fuseki.init() ;
+            new FusekiCmdInner(argv).mainRun() ;
+        }
+
+        private JettyServerConfig   jettyServerConfig = new JettyServerConfig() ;
+        {
+            jettyServerConfig.port = 3030 ;
+            jettyServerConfig.contextPath = "/" ;
+            jettyServerConfig.jettyConfigFile = null ;
+            jettyServerConfig.pages = Fuseki.PagesStatic ;
+            jettyServerConfig.enableCompression = true ;
+            jettyServerConfig.verboseLogging = false ;
+        }
+
+        private ServerInitialConfig cmdLineDataset  = new ServerInitialConfig() ;
+
+        public FusekiCmdInner(String... argv) {
+            super(argv) ;
+
+            if ( false )
+                // Consider ...
+                TransactionManager.QueueBatchSize = TransactionManager.QueueBatchSize / 2 ;
+
+            getUsage().startCategory("Fuseki") ;
+            addModule(modDataset) ;
+            add(argMem, "--mem", "Create an in-memory, non-persistent dataset for the server") ;
+            add(argFile, "--file=FILE",
+                "Create an in-memory, non-persistent dataset for the server, initialised with the contents of the file") ;
+            add(argTDB, "--loc=DIR", "Use an existing TDB database (or create if does not exist)") ;
+            add(argMemTDB, "--memTDB", "Create an in-memory, non-persistent dataset using TDB (testing only)") ;
+            add(argPort, "--port", "Listen on this port number") ;
+            add(argPages, "--pages=DIR", "Set of pages to serve as static content") ;
+            // Set via jetty config file.
+            add(argLocalhost, "--localhost", "Listen only on the localhost interface") ;
+            add(argTimeout, "--timeout=", "Global timeout applied to queries (value in ms) -- format is X[,Y] ") ;
+            add(argAllowUpdate, "--update", "Allow updates (via SPARQL Update and SPARQL HTTP Update)") ;
+            add(argFusekiConfig, "--config=", "Use a configuration file to determine the services") ;
+            add(argJettyConfig, "--jetty-config=FILE", "Set up the server (not services) with a Jetty XML file") ;
+            add(argBasicAuth) ;
+            //add(argMgt,     "--mgt",          "Enable the management commands") ;
+            add(argMgt) ; // Legacy
+            add(argMgtPort) ; // Legacy
+            //add(argMgtPort, "--mgtPort=port", "Port for management optations") ;
+            //add(argHome, "--home=DIR", "Root of Fuseki installation (overrides environment variable FUSEKI_HOME)") ;
+            add(argGZip, "--gzip=on|off", "Enable GZip compression (HTTP Accept-Encoding) if request header set") ;
+
+            //add(argUber) ;
+            // add(argGSP) ;
+
+            super.modVersion.addClass(TDB.class) ;
+            super.modVersion.addClass(Fuseki.class) ;
+        }
+
+        static String argUsage = "[--config=FILE] [--mem|--desc=AssemblerFile|--file=FILE] [--port PORT] /DatasetPathName" ;
+
+        @Override
+        protected String getSummary() {
+            return getCommandName() + " " + argUsage ;
+        }
+
+        @Override
+        protected void processModulesAndArgs() {
+            int x = 0 ;
+
+            Logger log = Fuseki.serverLog ;
+
+            if ( contains(argFusekiConfig) )
+                cmdLineDataset.fusekiConfigFile = getValue(argFusekiConfig) ;
+
+            ArgDecl assemblerDescDecl = new ArgDecl(ArgDecl.HasValue, "desc", "dataset") ;
+
+            // ---- Datasets
+
+            if ( contains(argMem) )             
+                x++ ;
+            if ( contains(argFile) )
+                x++ ;
+            if ( contains(assemblerDescDecl) )
+                x++ ;
+            if ( contains(argTDB) )
+                x++ ;
+            if ( contains(argMemTDB) )
+                x++ ;
+
+            if ( cmdLineDataset.fusekiConfigFile != null ) {
+                if ( x >= 1 )
+                    throw new CmdException("Dataset specified on the command line but a configuration file also given.") ;
+            } else {
+                // No configuration file.  0 or 1 legal.
+                if ( x > 1 )
+                    throw new CmdException("Multiple ways providing a dataset. Only one of --mem, --file, --loc or --desc") ;
+            }
+
+            if ( contains(argMem) ) {
+                log.info("Dataset: in-memory") ;
+                cmdLineDataset = new ServerInitialConfig() ;
+                cmdLineDataset.templateFile = Template.templateMemFN ; 
+            }
+
+            if ( contains(argFile) ) {
+                String filename = getValue(argFile) ;
+                log.info("Dataset: in-memory: load file: " + filename) ;
+                if ( !FileOps.exists(filename) )
+                    throw new CmdException("File not found: " + filename) ;
+
+                // Directly populate the dataset.
+                cmdLineDataset = new ServerInitialConfig() ;
+                cmdLineDataset.dsg = DatasetGraphFactory.createMem() ;
+
+                // INITIAL DATA.
+                Lang language = RDFLanguages.filenameToLang(filename) ;
+                if ( language == null )
+                    throw new CmdException("Can't guess language for file: " + filename) ;
+                RDFDataMgr.read(cmdLineDataset.dsg, filename) ;
+            }
+
+            if ( contains(argMemTDB) ) {
+                //log.info("TDB dataset: in-memory") ;
+                cmdLineDataset = new ServerInitialConfig() ;
+                cmdLineDataset.templateFile = Template.templateTDBMemFN ;
+                cmdLineDataset.params.put(Template.DIR, Names.memName) ;
+            }
+
+            if ( contains(argTDB) ) {
+                cmdLineDataset = new ServerInitialConfig() ;
+                cmdLineDataset.templateFile = Template.templateTDBDirFN ;
+
+                String dir = getValue(argTDB) ;
+                cmdLineDataset.params.put(Template.DIR, dir) ;
+            }
+
+            // Otherwise
+            if ( contains(assemblerDescDecl) ) {
+                log.info("Dataset from assembler") ;
+                // Need to add service details.
+                Dataset ds = modDataset.createDataset() ;
+                //cmdLineDataset.dsg = ds.asDatasetGraph() ;
+            }
+
+            if ( cmdLineDataset != null ) {
+                if ( getPositional().size() > 1 )
+                    throw new CmdException("Multiple dataset path names given") ;
+                if ( getPositional().size() != 0 ) {
+                    cmdLineDataset.datasetPath = getPositionalArg(0) ;
+                    if ( cmdLineDataset.datasetPath.length() > 0 && !cmdLineDataset.datasetPath.startsWith("/") )
+                        throw new CmdException("Dataset path name must begin with a /: " + cmdLineDataset.datasetPath) ;
+                    cmdLineDataset.allowUpdate = contains(argAllowUpdate) ;
+                    if ( ! cmdLineDataset.allowUpdate )
+                        Fuseki.serverLog.info("Running in read-only mode for "+cmdLineDataset.datasetPath) ;
+                    // Include the dataset name as NAME for any templates.
+                    cmdLineDataset.params.put(Template.NAME,  cmdLineDataset.datasetPath) ;
+                }
+            }
+
+            // ---- Jetty server
+            if ( contains(argBasicAuth) )
+                Fuseki.configLog.warn("--basic-auth ignored: Use Apache Shiro security - see shiro.ini") ;
+
+            if ( contains(argPort) ) {
+                String portStr = getValue(argPort) ;
+                try {
+                    jettyServerConfig.port = Integer.parseInt(portStr) ;
+                } catch (NumberFormatException ex) {
+                    throw new CmdException(argPort.getKeyName() + " : bad port number: " + portStr) ;
+                }
+            }
+
+            if ( contains(argMgt) )
+                Fuseki.configLog.warn("Fuseki v2: Management functions are always enabled.  --mgt not needed.") ; 
+            
+            if ( contains(argMgtPort) )
+                Fuseki.configLog.warn("Fuseki v2: Management functions are always on the same port as the server.  --mgtPort ignored.") ; 
+
+//            if ( contains(argMgt) ) {
+//                jettyServerConfig.mgtPort = 0 ;
+//                if (  contains(argMgtPort) ) {
+//                    String mgtPortStr = getValue(argMgtPort) ;
+//                    try {
+//                        jettyServerConfig.mgtPort = Integer.parseInt(mgtPortStr) ;
+//                    } catch (NumberFormatException ex) {
+//                        throw new CmdException("--"+argMgtPort.getKeyName() + " : bad port number: " + mgtPortStr) ;
+//                    }
+//                }
+//            }
+
+            if ( contains(argLocalhost) )
+                jettyServerConfig.loopback = true ;
+
+            if ( contains(argTimeout) ) {
+                String str = getValue(argTimeout) ;
+                ARQ.getContext().set(ARQ.queryTimeout, str) ;
+            }
+
+            if ( contains(argJettyConfig) ) {
+                jettyServerConfig.jettyConfigFile = getValue(argJettyConfig) ;
+                if ( !FileOps.exists(jettyServerConfig.jettyConfigFile) )
+                    throw new CmdException("No such file: " + jettyServerConfig.jettyConfigFile) ;
+            }
+
+            if ( contains(argBasicAuth) ) {
+                jettyServerConfig.authConfigFile = getValue(argBasicAuth) ;
+                if ( !FileOps.exists(jettyServerConfig.authConfigFile) )
+                    throw new CmdException("No such file: " + jettyServerConfig.authConfigFile) ;
+            }
+
+            if ( contains(argHome) ) {
+                Fuseki.configLog.warn("--home ignored (use enviroment variables $FUSEKI_HOME and $FUSEKI_BASE)") ;
+//                List<String> args = super.getValues(argHome) ;
+//                homeDir = args.get(args.size() - 1) ;
+            }
+
+            if ( contains(argPages) ) {
+                List<String> args = super.getValues(argPages) ;
+                jettyServerConfig.pages = args.get(args.size() - 1) ;
+            }
+
+            if ( contains(argGZip) ) {
+                if ( !hasValueOfTrue(argGZip) && !hasValueOfFalse(argGZip) )
+                    throw new CmdException(argGZip.getNames().get(0) + ": Not understood: " + getValue(argGZip)) ;
+                jettyServerConfig.enableCompression = super.hasValueOfTrue(argGZip) ;
+            }
+        }
+
+        private static String sort_out_dir(String path) {
+            path.replace('\\', '/') ;
+            if ( !path.endsWith("/") )
+                path = path + "/" ;
+            return path ;
+        }
+
+        @Override
+        protected void exec() {
+            FusekiServerListener.initialSetup = cmdLineDataset ;
+            // For standalone, command line use ...
+            JettyFuseki.initializeServer(jettyServerConfig) ;
+            JettyFuseki.instance.start() ;
+            JettyFuseki.instance.join() ;
+            System.exit(0) ;
+        }
+
+        @Override
+        protected String getCommandName() {
+            return "fuseki" ;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/conneg/ConNeg.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/conneg/ConNeg.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/conneg/ConNeg.java
new file mode 100644
index 0000000..672d2b9
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/conneg/ConNeg.java
@@ -0,0 +1,206 @@
+/*
+ * 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.jena.fuseki.conneg;
+
+import static org.apache.jena.riot.web.HttpNames.hAcceptCharset ;
+
+import javax.servlet.http.HttpServletRequest ;
+
+import org.apache.jena.atlas.web.AcceptList ;
+import org.apache.jena.atlas.web.MediaRange ;
+import org.apache.jena.atlas.web.MediaType ;
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
+
+/**
+ * <p>Content negotiation is a mechanism defined in the HTTP specification
+ * that makes it possible to serve different versions of a document
+ * (or more generally, a resource representation) at the same URI, so that
+ * user agents can specify which version fit their capabilities the best.</p>
+ *
+ * <p>ConNeg is used in Fuseki to help matching the content media type requested
+ * by the user, against the list of offered media types.</p>
+ *
+ * @see <a href="http://en.wikipedia.org/wiki/Content_negotiation">http://en.wikipedia.org/wiki/Content_negotiation</a>
+ * @see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1</a>
+ */
+public class ConNeg
+{
+    // Logger
+    private static Logger log = LoggerFactory.getLogger(ConNeg.class) ;
+    // See riot.ContentNeg (client side).
+    // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
+
+    /**
+     * Parses the content type. It splits the string by semi-colon and finds the
+     * other features such as the "q" quality factor.  For a complete documentation
+     * on how the parsing happens, see
+     * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1</a>.
+     *
+     * @param contentType content type string
+     * @return parsed media type
+     */
+    static public MediaType parse(String contentType)
+    {
+        try {
+            return MediaType.create(contentType) ;
+        } catch (RuntimeException ex) { return null ; }
+    }
+
+    /**
+     * <p>Creates a {@link AcceptList} with the given HTTP header string and
+     * uses the {@link AcceptList#match(MediaType)} method to decide which
+     * media type matches the HTTP header string.</p>
+     *
+     * <p>The <em>q</em> quality factor is used to decide which choice is the best
+     * match.</p>
+     *
+     * @param headerString HTTP header string
+     * @param offerList accept list
+     * @return matched media type
+     */
+    static public MediaType match(String headerString, AcceptList offerList)
+    {
+        AcceptList l = new AcceptList(headerString) ;
+        return AcceptList.match(l, offerList) ;
+    }
+
+    /**
+     * Match a single media type against a header string.
+     *
+     * @param headerString HTTP header string
+     * @param mediaRangeStr Semi-colon separated list of media types
+     * @return the matched media type or <code>null</code> if there was no match
+     */
+    public static String match(String headerString, String mediaRangeStr)
+    {
+        AcceptList l = new AcceptList(headerString) ;
+        MediaRange aItem = new MediaRange(mediaRangeStr) ;  // MediaType
+        MediaType m = l.match(aItem) ;
+        if ( m == null )
+            return null ;
+        return m.toHeaderString() ;
+    }
+
+    /**
+     * Split and trims a string using a given regex.
+     *
+     * @param s string
+     * @param splitStr given regex
+     * @return an array with the trimmed strings found
+     */
+    /*package*/ static String[] split(String s, String splitStr)
+    {
+        String[] x = s.split(splitStr,2) ;
+        for ( int i = 0 ; i < x.length ; i++ )
+        {
+            x[i] = x[i].trim() ;
+        }
+        return x ;
+    }
+
+    /**
+     * <p>Chooses the charset by using the Accept-Charset HTTP header.</p>
+     *
+     * <p>See {@link ConNeg#choose(String, AcceptList, MediaType)}.</p>
+     *
+     * @param httpRequest HTTP request
+     * @param myPrefs accept list
+     * @param defaultMediaType default media type
+     * @return media type chosen
+     */
+    public static MediaType chooseCharset(HttpServletRequest httpRequest,
+                                          AcceptList myPrefs,
+                                          MediaType defaultMediaType)
+    {
+        String a = httpRequest.getHeader(hAcceptCharset) ;
+        if ( log.isDebugEnabled() )
+            log.debug("Accept-Charset request: "+a) ;
+        
+        MediaType item = choose(a, myPrefs, defaultMediaType) ;
+        
+        if ( log.isDebugEnabled() )
+            log.debug("Charset chosen: "+item) ;
+    
+        return item ;
+    }
+
+    /**
+     * <p>Choose the content media type by extracting the Accept HTTP header from
+     * the HTTP request and choosing
+     * (see {@link ConNeg#choose(String, AcceptList, MediaType)}) a content media
+     * type that matches the header.</p>
+     *
+     * @param httpRequest HTTP request
+     * @param myPrefs accept list
+     * @param defaultMediaType default media type
+     * @return media type chosen
+     */
+    public static MediaType chooseContentType(HttpServletRequest httpRequest,
+                                              AcceptList myPrefs,
+                                              MediaType defaultMediaType)
+    {
+        String a = WebLib.getAccept(httpRequest) ;
+        if ( log.isDebugEnabled() )
+            log.debug("Accept request: "+a) ;
+        
+        MediaType item = choose(a, myPrefs, defaultMediaType) ;
+    
+        if ( log.isDebugEnabled() )
+            log.debug("Content type chosen: "+item) ;
+    
+        return item ;
+    }
+
+    /**
+     * <p>This method receives a HTTP header string, an {@link AcceptList} and a
+     * default {@link MediaType}.</p>
+     *
+     * <p>If the header string is null, it returns the given default MediaType.</p>
+     *
+     * <p>Otherwise it builds an {@link AcceptList} object with the header string
+     * and uses it to match against the given MediaType.</p>
+     *
+     * @param headerString HTTP header string
+     * @param myPrefs accept list
+     * @param defaultMediaType default media type
+     * @return a media type or <code>null</code> if none matched or if the
+     *          HTTP header string and the default media type are <code>null</code>.
+     */
+    private static MediaType choose(String headerString, AcceptList myPrefs,
+                                    MediaType defaultMediaType)
+    {
+        if ( headerString == null )
+            return defaultMediaType ;
+        
+        AcceptList headerList = new AcceptList(headerString) ;
+        
+        if ( myPrefs == null )
+        {
+            MediaType i = headerList.first() ;
+            if ( i == null ) return defaultMediaType ;
+            return i ;
+        }
+    
+        MediaType i = AcceptList.match(headerList, myPrefs) ;
+        if ( i == null )
+            return defaultMediaType ;
+        return i ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/conneg/WebLib.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/conneg/WebLib.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/conneg/WebLib.java
new file mode 100644
index 0000000..38dc265
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/conneg/WebLib.java
@@ -0,0 +1,60 @@
+/*
+ * 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.jena.fuseki.conneg;
+
+import java.util.Enumeration ;
+
+import javax.servlet.http.HttpServletRequest ;
+
+import org.apache.jena.riot.web.HttpNames ;
+
+public class WebLib
+{
+    /** Split a string, removing whitespace around the split string.
+     * e.g. Use in splitting HTTP accept/content-type headers.  
+     */
+    public static String[] split(String s, String splitStr)
+    {
+        String[] x = s.split(splitStr,2) ;
+        for ( int i = 0 ; i < x.length ; i++ )
+        {
+            x[i] = x[i].trim() ;
+        }
+        return x ;
+    }
+
+    /** Migrate to WebLib */
+    public static String getAccept(HttpServletRequest httpRequest)
+    {
+        // There can be multiple accept headers -- note many tools don't allow these to be this way (e.g. wget, curl)
+        Enumeration<String> en = httpRequest.getHeaders(HttpNames.hAccept) ;
+        if ( ! en.hasMoreElements() )
+            return null ;
+        StringBuilder sb = new StringBuilder() ;
+        String sep = "" ;
+        for ( ; en.hasMoreElements() ; )
+        {
+            String x = en.nextElement() ;
+            sb.append(sep) ;
+            sep = ", " ;
+            sb.append(x) ;
+        }
+        return sb.toString() ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/FusekiErrorHandler.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/FusekiErrorHandler.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/FusekiErrorHandler.java
new file mode 100644
index 0000000..40361de
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/FusekiErrorHandler.java
@@ -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.
+ */
+
+package org.apache.jena.fuseki.jetty;
+
+import static java.lang.String.format ;
+
+import java.io.* ;
+
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.io.IO ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+import org.apache.jena.web.HttpSC ;
+import org.eclipse.jetty.http.HttpMethod ;
+import org.eclipse.jetty.http.MimeTypes ;
+import org.eclipse.jetty.server.Request ;
+import org.eclipse.jetty.server.Response ;
+import org.eclipse.jetty.server.handler.ErrorHandler ;
+
+public class FusekiErrorHandler extends ErrorHandler
+{
+    public FusekiErrorHandler() {}
+    
+    @Override
+    public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
+    {
+        String method = request.getMethod();
+     
+        if ( !method.equals(HttpMethod.GET.asString())
+             && !method.equals(HttpMethod.POST.asString())
+             && !method.equals(HttpMethod.HEAD.asString()) )
+            return ;
+        
+        response.setContentType(MimeTypes.Type.TEXT_PLAIN_UTF_8.asString()) ;
+        ServletOps.setNoCache(response) ;
+        
+        ByteArrayOutputStream bytes = new ByteArrayOutputStream(1024) ;
+        try ( Writer writer = IO.asUTF8(bytes) ) {
+            String reason=(response instanceof Response)?((Response)response).getReason():null;
+            handleErrorPage(request, writer, response.getStatus(), reason) ;
+
+            if ( ! Fuseki.VERSION.equalsIgnoreCase("development") &&
+                ! Fuseki.VERSION.equals("${project.version}") )
+            {
+                writer.write("\n") ;
+                writer.write("\n") ;
+                writer.write(format("Fuseki - version %s (Build date: %s)\n", Fuseki.VERSION, Fuseki.BUILD_DATE)) ;
+            }
+            writer.flush();
+            response.setContentLength(bytes.size()) ;
+            // Copy :-(
+            response.getOutputStream().write(bytes.toByteArray()) ;
+        }
+    }
+    
+    @Override
+    protected void handleErrorPage(HttpServletRequest request, Writer writer, int code, String message)
+        throws IOException
+    {
+        if ( message == null )
+            message = HttpSC.getMessage(code) ;
+        writer.write(format("Error %d: %s\n", code, message)) ;
+        
+        Throwable th = (Throwable)request.getAttribute("javax.servlet.error.exception");
+        while(th!=null)
+        {
+            writer.write("\n");
+            StringWriter sw = new StringWriter();
+            PrintWriter pw = new PrintWriter(sw);
+            th.printStackTrace(pw);
+            pw.flush();
+            writer.write(sw.getBuffer().toString());
+            writer.write("\n");
+            th = th.getCause();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
new file mode 100644
index 0000000..8d9046c
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
@@ -0,0 +1,305 @@
+/*
+ * 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.jena.fuseki.jetty ;
+
+import static java.lang.String.format ;
+import static org.apache.jena.fuseki.Fuseki.serverLog ;
+
+import java.io.FileInputStream ;
+
+import org.apache.jena.atlas.lib.FileOps ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.FusekiException ;
+import org.apache.jena.fuseki.mgt.MgtJMX ;
+import org.apache.jena.fuseki.server.FusekiEnv ;
+import org.eclipse.jetty.security.* ;
+import org.eclipse.jetty.security.authentication.BasicAuthenticator ;
+import org.eclipse.jetty.server.* ;
+import org.eclipse.jetty.servlet.ServletContextHandler ;
+import org.eclipse.jetty.util.security.Constraint ;
+import org.eclipse.jetty.webapp.WebAppContext ;
+import org.eclipse.jetty.xml.XmlConfiguration ;
+
+import com.hp.hpl.jena.sparql.util.Utils ;
+
+/** Standalone server, not run as a WAR file.
+ * Used in testing and development.
+ * 
+ * SPARQLServer is the Jena server instance which wraps/utilizes 
+ * {@link org.eclipse.jetty.server.Server}. This class provides
+ * immediate access to the {@link org.eclipse.jetty.server.Server#start()} and 
+ * {@link org.eclipse.jetty.server.Server#stop()} commands as well as obtaining
+ * instances of the server and server configuration. Finally we can obtain 
+ * instances of {@link org.apache.jena.fuseki.jetty.JettyServerConfig}.
+ */
+public class JettyFuseki {
+    // Jetty specific.
+    // This class is becoming less important - it now sets up a Jetty server for in-process use
+    // either for the command line in development  
+    // and in testing but not direct webapp deployments. 
+    static { Fuseki.init() ; }
+
+    public static JettyFuseki  instance    = null ;
+
+    private ServerConnector serverConnector = null ;
+    // If a separate ...
+    private ServerConnector mgtConnector    = null ;
+    
+    private JettyServerConfig serverConfig ;
+
+    // The jetty server.
+    private Server              server         = null ;
+    
+    // webapp setup - standard maven layout
+    public static       String contextpath     = "/" ;
+    // Standalone jar
+    public static final String resourceBase1   = "webapp" ;
+    // Development
+    public static final String resourceBase2   = "src/main/webapp" ;
+    
+
+    /**
+     * Default setup which requires a {@link org.apache.jena.fuseki.jetty.JettyServerConfig}
+     * object as input.  We use this config to pass in the command line arguments for dataset, 
+     * name etc. 
+     * @param config
+     */
+    
+    public static void initializeServer(JettyServerConfig config) {
+        // Currently server-wide.
+        Fuseki.verboseLogging = config.verboseLogging ;
+        instance = new JettyFuseki(config) ;
+    }
+    
+    /** Build a Jetty server using the development files for the webapp
+     *  No command line configuration. 
+     */
+    public static Server create(int port) {
+        return create("/", port) ;
+    }
+
+    public static Server create(String contextPath, int port) {
+        Server server = new Server(port) ;
+        WebAppContext webapp = createWebApp(contextPath) ;
+        server.setHandler(webapp) ;
+        return server ;
+    }
+
+    private JettyFuseki(JettyServerConfig config) {
+        this.serverConfig = config ;
+        
+        buildServerWebapp(serverConfig.contextPath, serverConfig.jettyConfigFile, config.enableCompression) ;
+        
+        if ( mgtConnector == null )
+            mgtConnector = serverConnector ;
+    }
+
+    /**
+     * Initialize the {@link JettyFuseki} instance.
+     */
+    public void start() {
+        
+        String version = Fuseki.VERSION ;
+        String buildDate = Fuseki.BUILD_DATE ;
+        
+        if ( version != null && version.equals("${project.version}") )
+            version = null ;
+        if ( buildDate != null && buildDate.equals("${build.time.xsd}") )
+            buildDate = Utils.nowAsXSDDateTimeString() ;
+        
+        if ( version != null && buildDate != null )
+            serverLog.info(format("%s %s %s", Fuseki.NAME, version, buildDate)) ;
+        // This does not get set usefully for Jetty as we use it.
+        // String jettyVersion = org.eclipse.jetty.server.Server.getVersion() ;
+        // serverLog.info(format("Jetty %s",jettyVersion)) ;
+        
+        String host = serverConnector.getHost() ;
+        if ( host != null )
+            serverLog.info("Incoming connections limited to " + host) ;
+
+        try {
+            server.start() ;
+        } catch (java.net.BindException ex) {
+            serverLog.error("SPARQLServer (port="+serverConnector.getPort()+"): Failed to start server: " + ex.getMessage()) ;
+            System.exit(1) ;
+        } catch (Exception ex) {
+            serverLog.error("SPARQLServer: Failed to start server: " + ex.getMessage(), ex) ;
+            System.exit(1) ;
+        }
+        String now = Utils.nowAsString() ;
+        serverLog.info(format("Started %s on port %d", now, serverConnector.getPort())) ;
+    }
+
+    /**
+     * Sync with the {@link JettyFuseki} instance.
+     * Returns only if the server exits cleanly 
+     */
+    public void join() {
+        try {
+            server.join() ;
+        } catch (InterruptedException ex) { }
+    }
+
+        /**
+     * Stop the {@link JettyFuseki} instance.
+     */
+    public void stop() {
+        String now = Utils.nowAsString() ;
+        serverLog.info(format("Stopped %s on port %d", now, serverConnector.getPort())) ;
+        try {
+            server.stop() ;
+        } catch (Exception ex) {
+            Fuseki.serverLog.warn("SPARQLServer: Exception while stopping server: " + ex.getMessage(), ex) ;
+        }
+        MgtJMX.removeJMX() ;
+    }
+
+    public static WebAppContext createWebApp(String contextPath) {
+        FusekiEnv.setEnvironment();
+        WebAppContext webapp = new WebAppContext();
+        webapp.getServletContext().getContextHandler().setMaxFormContentSize(10 * 1000 * 1000) ;
+
+        // Hunt for the webapp for the standalone jar (or development system). 
+        // Note that Path FUSEKI_HOME is not initialized until the webapp starts
+        // so it is not available here.
+
+        String resourceBase3 = null ;
+        String resourceBase4 = null ;
+        if ( FusekiEnv.FUSEKI_HOME != null ) {
+            String HOME = FusekiEnv.FUSEKI_HOME.toString() ;
+            resourceBase3 = HOME+"/"+resourceBase1 ;
+            resourceBase4 = HOME+"/"+resourceBase2 ;
+        }
+
+        String resourceBase = tryResourceBase(resourceBase1, null) ;
+        resourceBase = tryResourceBase(resourceBase2, resourceBase) ;
+        resourceBase = tryResourceBase(resourceBase3, resourceBase) ;
+        resourceBase = tryResourceBase(resourceBase4, resourceBase) ;
+
+        if ( resourceBase == null ) {
+            if ( resourceBase3 == null )
+                Fuseki.serverLog.error("Can't find resourceBase (tried "+resourceBase1+" and "+resourceBase2+")") ;
+            else
+                Fuseki.serverLog.error("Can't find resourceBase (tried "+resourceBase1+", "+resourceBase2+", "+resourceBase3+" and "+resourceBase4+")") ;
+            Fuseki.serverLog.error("Failed to start") ;
+            throw new FusekiException("Failed to start") ;
+        }
+
+        webapp.setDescriptor(resourceBase+"/WEB-INF/web.xml");
+        webapp.setResourceBase(resourceBase);
+        webapp.setContextPath(contextPath);
+
+        //-- Jetty setup for the ServletContext logger.
+        // The name of the Jetty-allocated slf4j/log4j logger is
+        // the display name or, if null, the context path name.   
+        // It is set, without checking for a previous call of setLogger in "doStart"
+        // which happens during server startup. 
+        // This the name of the ServletContext logger as well
+        webapp.setDisplayName(Fuseki.servletRequestLogName);  
+        webapp.setParentLoaderPriority(true);  // Normal Java classloader behaviour.
+        webapp.setErrorHandler(new FusekiErrorHandler()) ;
+        return webapp ;
+    }
+    
+
+    public static String getenv(String name) {
+        String x = System.getenv(name) ;
+        if ( x == null )
+            x = System.getProperty(name) ;
+        return x ;
+    }
+
+    private static String tryResourceBase(String maybeResourceBase, String currentResourceBase) {
+        if ( currentResourceBase != null )
+            return currentResourceBase ;
+        if ( maybeResourceBase != null && FileOps.exists(maybeResourceBase) )
+            return maybeResourceBase ;
+        return currentResourceBase ;
+    }
+    
+    private void buildServerWebapp(String contextPath, String jettyConfig, boolean enableCompression) {
+        if ( jettyConfig != null )
+            // --jetty-config=jetty-fuseki.xml
+            // for detailed configuration of the server using Jetty features.
+            configServer(jettyConfig) ;
+        else
+            defaultServerConfig(serverConfig.port, serverConfig.loopback) ;
+
+        WebAppContext webapp = createWebApp(contextPath) ;
+        server.setHandler(webapp) ;
+        // Replaced by Shiro.
+        if ( jettyConfig == null && serverConfig.authConfigFile != null )
+            security(webapp, serverConfig.authConfigFile) ;
+    }
+    
+    private static void security(ServletContextHandler context, String authfile) {
+        Constraint constraint = new Constraint() ;
+        constraint.setName(Constraint.__BASIC_AUTH) ;
+        constraint.setRoles(new String[]{"fuseki"}) ;
+        constraint.setAuthenticate(true) ;
+
+        ConstraintMapping mapping = new ConstraintMapping() ;
+        mapping.setConstraint(constraint) ;
+        mapping.setPathSpec("/*") ;
+
+        IdentityService identService = new DefaultIdentityService() ;
+
+        ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler() ;
+        securityHandler.addConstraintMapping(mapping) ;
+        securityHandler.setIdentityService(identService) ;
+
+        HashLoginService loginService = new HashLoginService("Fuseki Authentication", authfile) ;
+        loginService.setIdentityService(identService) ;
+
+        securityHandler.setLoginService(loginService) ;
+        securityHandler.setAuthenticator(new BasicAuthenticator()) ;
+
+        context.setSecurityHandler(securityHandler) ;
+
+        serverLog.debug("Basic Auth Configuration = " + authfile) ;
+    }
+
+    private void configServer(String jettyConfig) {
+        try {
+            serverLog.info("Jetty server config file = " + jettyConfig) ;
+            server = new Server() ;
+            XmlConfiguration configuration = new XmlConfiguration(new FileInputStream(jettyConfig)) ;
+            configuration.configure(server) ;
+            serverConnector = (ServerConnector)server.getConnectors()[0] ;
+        } catch (Exception ex) {
+            serverLog.error("SPARQLServer: Failed to configure server: " + ex.getMessage(), ex) ;
+            throw new FusekiException("Failed to configure a server using configuration file '" + jettyConfig + "'") ;
+        }
+    }
+
+    private void defaultServerConfig(int port, boolean loopback) {
+        server = new Server() ;
+        ConnectionFactory f1 = new HttpConnectionFactory() ;
+        ConnectionFactory f2 = new SslConnectionFactory() ;
+        
+        ServerConnector connector = new ServerConnector(server, f1) ; //, f2) ;
+        connector.setPort(port);
+        server.addConnector(connector);
+        
+        if ( loopback )
+            connector.setHost("localhost");
+        connector.setPort(port) ;
+        serverConnector = connector ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyServerConfig.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyServerConfig.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyServerConfig.java
new file mode 100644
index 0000000..71012ef
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyServerConfig.java
@@ -0,0 +1,51 @@
+/**
+ * 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.jena.fuseki.jetty;
+
+
+/** Configuration of the Jetty server when run from the command line directly,
+ *  not as a webapp/war file.
+ */
+
+public class JettyServerConfig
+{
+    public JettyServerConfig() {}
+    
+    /** Port to run the server service on */
+    public int port ;
+    /** Port to run the server service on */
+    public String contextPath ;
+    /** Jetty config file - if null, use the built-in configuration of Jetty */
+    public String jettyConfigFile = null ;
+    /** Listen only on the loopback (localhost) interface */
+    public boolean loopback = false ;
+    /** The local directory for serving the static pages */ 
+    public String pages ;
+    /** Enable Accept-Encoding compression. Set to false by default.*/
+    public boolean enableCompression = false ;
+    
+    /** Enable additional logging */
+    public boolean verboseLogging = false ;
+    /**
+     * Authentication config file used to setup Jetty Basic auth, if a Jetty config file was set this is ignored since Jetty config allows much more complex auth methods to be implemented
+     */
+    public String authConfigFile ;
+
+}
+


[28/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-1.10.2.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-1.10.2.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-1.10.2.js
new file mode 100644
index 0000000..c5c6482
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-1.10.2.js
@@ -0,0 +1,9789 @@
+/*!
+ * jQuery JavaScript Library v1.10.2
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03T13:48Z
+ */
+(function( window, undefined ) {
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//"use strict";
+var
+	// The deferred used on DOM ready
+	readyList,
+
+	// A central reference to the root jQuery(document)
+	rootjQuery,
+
+	// Support: IE<10
+	// For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
+	core_strundefined = typeof undefined,
+
+	// Use the correct document accordingly with window argument (sandbox)
+	location = window.location,
+	document = window.document,
+	docElem = document.documentElement,
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$,
+
+	// [[Class]] -> type pairs
+	class2type = {},
+
+	// List of deleted data cache ids, so we can reuse them
+	core_deletedIds = [],
+
+	core_version = "1.10.2",
+
+	// Save a reference to some core methods
+	core_concat = core_deletedIds.concat,
+	core_push = core_deletedIds.push,
+	core_slice = core_deletedIds.slice,
+	core_indexOf = core_deletedIds.indexOf,
+	core_toString = class2type.toString,
+	core_hasOwn = class2type.hasOwnProperty,
+	core_trim = core_version.trim,
+
+	// Define a local copy of jQuery
+	jQuery = function( selector, context ) {
+		// The jQuery object is actually just the init constructor 'enhanced'
+		return new jQuery.fn.init( selector, context, rootjQuery );
+	},
+
+	// Used for matching numbers
+	core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
+
+	// Used for splitting on whitespace
+	core_rnotwhite = /\S+/g,
+
+	// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+	// A simple way to check for HTML strings
+	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+	// Strict HTML recognition (#11290: must start with <)
+	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
+
+	// Matches dashed string for camelizing
+	rmsPrefix = /^-ms-/,
+	rdashAlpha = /-([\da-z])/gi,
+
+	// Used by jQuery.camelCase as callback to replace()
+	fcamelCase = function( all, letter ) {
+		return letter.toUpperCase();
+	},
+
+	// The ready event handler
+	completed = function( event ) {
+
+		// readyState === "complete" is good enough for us to call the dom ready in oldIE
+		if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
+			detach();
+			jQuery.ready();
+		}
+	},
+	// Clean-up method for dom ready events
+	detach = function() {
+		if ( document.addEventListener ) {
+			document.removeEventListener( "DOMContentLoaded", completed, false );
+			window.removeEventListener( "load", completed, false );
+
+		} else {
+			document.detachEvent( "onreadystatechange", completed );
+			window.detachEvent( "onload", completed );
+		}
+	};
+
+jQuery.fn = jQuery.prototype = {
+	// The current version of jQuery being used
+	jquery: core_version,
+
+	constructor: jQuery,
+	init: function( selector, context, rootjQuery ) {
+		var match, elem;
+
+		// HANDLE: $(""), $(null), $(undefined), $(false)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+				// Assume that strings that start and end with <> are HTML and skip the regex check
+				match = [ null, selector, null ];
+
+			} else {
+				match = rquickExpr.exec( selector );
+			}
+
+			// Match html or make sure no context is specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] ) {
+					context = context instanceof jQuery ? context[0] : context;
+
+					// scripts is true for back-compat
+					jQuery.merge( this, jQuery.parseHTML(
+						match[1],
+						context && context.nodeType ? context.ownerDocument || context : document,
+						true
+					) );
+
+					// HANDLE: $(html, props)
+					if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+						for ( match in context ) {
+							// Properties of context are called as methods if possible
+							if ( jQuery.isFunction( this[ match ] ) ) {
+								this[ match ]( context[ match ] );
+
+							// ...and otherwise set as attributes
+							} else {
+								this.attr( match, context[ match ] );
+							}
+						}
+					}
+
+					return this;
+
+				// HANDLE: $(#id)
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id !== match[2] ) {
+							return rootjQuery.find( selector );
+						}
+
+						// Otherwise, we inject the element directly into the jQuery object
+						this.length = 1;
+						this[0] = elem;
+					}
+
+					this.context = document;
+					this.selector = selector;
+					return this;
+				}
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return ( context || rootjQuery ).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( context ).find( selector );
+			}
+
+		// HANDLE: $(DOMElement)
+		} else if ( selector.nodeType ) {
+			this.context = this[0] = selector;
+			this.length = 1;
+			return this;
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return rootjQuery.ready( selector );
+		}
+
+		if ( selector.selector !== undefined ) {
+			this.selector = selector.selector;
+			this.context = selector.context;
+		}
+
+		return jQuery.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	toArray: function() {
+		return core_slice.call( this );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num == null ?
+
+			// Return a 'clean' array
+			this.toArray() :
+
+			// Return just the object
+			( num < 0 ? this[ this.length + num ] : this[ num ] );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems ) {
+
+		// Build a new jQuery matched element set
+		var ret = jQuery.merge( this.constructor(), elems );
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+		ret.context = this.context;
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+
+	ready: function( fn ) {
+		// Add the callback
+		jQuery.ready.promise().done( fn );
+
+		return this;
+	},
+
+	slice: function() {
+		return this.pushStack( core_slice.apply( this, arguments ) );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	eq: function( i ) {
+		var len = this.length,
+			j = +i + ( i < 0 ? len : 0 );
+		return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		}));
+	},
+
+	end: function() {
+		return this.prevObject || this.constructor(null);
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: core_push,
+	sort: [].sort,
+	splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+	var src, copyIsArray, copy, name, options, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+		target = {};
+	}
+
+	// extend jQuery itself if only one argument is passed
+	if ( length === i ) {
+		target = this;
+		--i;
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend({
+	// Unique for each copy of jQuery on the page
+	// Non-digits removed to match rinlinejQuery
+	expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
+
+	noConflict: function( deep ) {
+		if ( window.$ === jQuery ) {
+			window.$ = _$;
+		}
+
+		if ( deep && window.jQuery === jQuery ) {
+			window.jQuery = _jQuery;
+		}
+
+		return jQuery;
+	},
+
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+
+	// Hold (or release) the ready event
+	holdReady: function( hold ) {
+		if ( hold ) {
+			jQuery.readyWait++;
+		} else {
+			jQuery.ready( true );
+		}
+	},
+
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+
+		// Abort if there are pending holds or we're already ready
+		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+			return;
+		}
+
+		// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+		if ( !document.body ) {
+			return setTimeout( jQuery.ready );
+		}
+
+		// Remember that the DOM is ready
+		jQuery.isReady = true;
+
+		// If a normal DOM Ready event fired, decrement, and wait if need be
+		if ( wait !== true && --jQuery.readyWait > 0 ) {
+			return;
+		}
+
+		// If there are functions bound, to execute
+		readyList.resolveWith( document, [ jQuery ] );
+
+		// Trigger any bound ready events
+		if ( jQuery.fn.trigger ) {
+			jQuery( document ).trigger("ready").off("ready");
+		}
+	},
+
+	// See test/unit/core.js for details concerning isFunction.
+	// Since version 1.3, DOM methods and functions like alert
+	// aren't supported. They return false on IE (#2968).
+	isFunction: function( obj ) {
+		return jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	isWindow: function( obj ) {
+		/* jshint eqeqeq: false */
+		return obj != null && obj == obj.window;
+	},
+
+	isNumeric: function( obj ) {
+		return !isNaN( parseFloat(obj) ) && isFinite( obj );
+	},
+
+	type: function( obj ) {
+		if ( obj == null ) {
+			return String( obj );
+		}
+		return typeof obj === "object" || typeof obj === "function" ?
+			class2type[ core_toString.call(obj) ] || "object" :
+			typeof obj;
+	},
+
+	isPlainObject: function( obj ) {
+		var key;
+
+		// Must be an Object.
+		// Because of IE, we also have to check the presence of the constructor property.
+		// Make sure that DOM nodes and window objects don't pass through, as well
+		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+
+		try {
+			// Not own constructor property must be Object
+			if ( obj.constructor &&
+				!core_hasOwn.call(obj, "constructor") &&
+				!core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+				return false;
+			}
+		} catch ( e ) {
+			// IE8,9 Will throw exceptions on certain host objects #9897
+			return false;
+		}
+
+		// Support: IE<9
+		// Handle iteration over inherited properties before own properties.
+		if ( jQuery.support.ownLast ) {
+			for ( key in obj ) {
+				return core_hasOwn.call( obj, key );
+			}
+		}
+
+		// Own properties are enumerated firstly, so to speed up,
+		// if last one is own, then all properties are own.
+		for ( key in obj ) {}
+
+		return key === undefined || core_hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		var name;
+		for ( name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	error: function( msg ) {
+		throw new Error( msg );
+	},
+
+	// data: string of html
+	// context (optional): If specified, the fragment will be created in this context, defaults to document
+	// keepScripts (optional): If true, will include scripts passed in the html string
+	parseHTML: function( data, context, keepScripts ) {
+		if ( !data || typeof data !== "string" ) {
+			return null;
+		}
+		if ( typeof context === "boolean" ) {
+			keepScripts = context;
+			context = false;
+		}
+		context = context || document;
+
+		var parsed = rsingleTag.exec( data ),
+			scripts = !keepScripts && [];
+
+		// Single tag
+		if ( parsed ) {
+			return [ context.createElement( parsed[1] ) ];
+		}
+
+		parsed = jQuery.buildFragment( [ data ], context, scripts );
+		if ( scripts ) {
+			jQuery( scripts ).remove();
+		}
+		return jQuery.merge( [], parsed.childNodes );
+	},
+
+	parseJSON: function( data ) {
+		// Attempt to parse using the native JSON parser first
+		if ( window.JSON && window.JSON.parse ) {
+			return window.JSON.parse( data );
+		}
+
+		if ( data === null ) {
+			return data;
+		}
+
+		if ( typeof data === "string" ) {
+
+			// Make sure leading/trailing whitespace is removed (IE can't handle it)
+			data = jQuery.trim( data );
+
+			if ( data ) {
+				// Make sure the incoming data is actual JSON
+				// Logic borrowed from http://json.org/json2.js
+				if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+					.replace( rvalidtokens, "]" )
+					.replace( rvalidbraces, "")) ) {
+
+					return ( new Function( "return " + data ) )();
+				}
+			}
+		}
+
+		jQuery.error( "Invalid JSON: " + data );
+	},
+
+	// Cross-browser xml parsing
+	parseXML: function( data ) {
+		var xml, tmp;
+		if ( !data || typeof data !== "string" ) {
+			return null;
+		}
+		try {
+			if ( window.DOMParser ) { // Standard
+				tmp = new DOMParser();
+				xml = tmp.parseFromString( data , "text/xml" );
+			} else { // IE
+				xml = new ActiveXObject( "Microsoft.XMLDOM" );
+				xml.async = "false";
+				xml.loadXML( data );
+			}
+		} catch( e ) {
+			xml = undefined;
+		}
+		if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+			jQuery.error( "Invalid XML: " + data );
+		}
+		return xml;
+	},
+
+	noop: function() {},
+
+	// Evaluates a script in a global context
+	// Workarounds based on findings by Jim Driscoll
+	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+	globalEval: function( data ) {
+		if ( data && jQuery.trim( data ) ) {
+			// We use execScript on Internet Explorer
+			// We use an anonymous function so that context is window
+			// rather than jQuery in Firefox
+			( window.execScript || function( data ) {
+				window[ "eval" ].call( window, data );
+			} )( data );
+		}
+	},
+
+	// Convert dashed to camelCase; used by the css and data modules
+	// Microsoft forgot to hump their vendor prefix (#9572)
+	camelCase: function( string ) {
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+	},
+
+	// args is for internal usage only
+	each: function( obj, callback, args ) {
+		var value,
+			i = 0,
+			length = obj.length,
+			isArray = isArraylike( obj );
+
+		if ( args ) {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return obj;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+		function( text ) {
+			return text == null ?
+				"" :
+				core_trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				( text + "" ).replace( rtrim, "" );
+		},
+
+	// results is for internal usage only
+	makeArray: function( arr, results ) {
+		var ret = results || [];
+
+		if ( arr != null ) {
+			if ( isArraylike( Object(arr) ) ) {
+				jQuery.merge( ret,
+					typeof arr === "string" ?
+					[ arr ] : arr
+				);
+			} else {
+				core_push.call( ret, arr );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, arr, i ) {
+		var len;
+
+		if ( arr ) {
+			if ( core_indexOf ) {
+				return core_indexOf.call( arr, elem, i );
+			}
+
+			len = arr.length;
+			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+			for ( ; i < len; i++ ) {
+				// Skip accessing in sparse arrays
+				if ( i in arr && arr[ i ] === elem ) {
+					return i;
+				}
+			}
+		}
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		var l = second.length,
+			i = first.length,
+			j = 0;
+
+		if ( typeof l === "number" ) {
+			for ( ; j < l; j++ ) {
+				first[ i++ ] = second[ j ];
+			}
+		} else {
+			while ( second[j] !== undefined ) {
+				first[ i++ ] = second[ j++ ];
+			}
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, inv ) {
+		var retVal,
+			ret = [],
+			i = 0,
+			length = elems.length;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( ; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				ret.push( elems[ i ] );
+			}
+		}
+
+		return ret;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var value,
+			i = 0,
+			length = elems.length,
+			isArray = isArraylike( elems ),
+			ret = [];
+
+		// Go through the array, translating each of the items to their
+		if ( isArray ) {
+			for ( ; i < length; i++ ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+
+		// Go through every key on the object,
+		} else {
+			for ( i in elems ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+		}
+
+		// Flatten any nested arrays
+		return core_concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	// Bind a function to a context, optionally partially applying any
+	// arguments.
+	proxy: function( fn, context ) {
+		var args, proxy, tmp;
+
+		if ( typeof context === "string" ) {
+			tmp = fn[ context ];
+			context = fn;
+			fn = tmp;
+		}
+
+		// Quick check to determine if target is callable, in the spec
+		// this throws a TypeError, but we will just return undefined.
+		if ( !jQuery.isFunction( fn ) ) {
+			return undefined;
+		}
+
+		// Simulated bind
+		args = core_slice.call( arguments, 2 );
+		proxy = function() {
+			return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
+		};
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+		return proxy;
+	},
+
+	// Multifunctional method to get and set values of a collection
+	// The value/s can optionally be executed if it's a function
+	access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
+		var i = 0,
+			length = elems.length,
+			bulk = key == null;
+
+		// Sets many values
+		if ( jQuery.type( key ) === "object" ) {
+			chainable = true;
+			for ( i in key ) {
+				jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+			}
+
+		// Sets one value
+		} else if ( value !== undefined ) {
+			chainable = true;
+
+			if ( !jQuery.isFunction( value ) ) {
+				raw = true;
+			}
+
+			if ( bulk ) {
+				// Bulk operations run against the entire set
+				if ( raw ) {
+					fn.call( elems, value );
+					fn = null;
+
+				// ...except when executing function values
+				} else {
+					bulk = fn;
+					fn = function( elem, key, value ) {
+						return bulk.call( jQuery( elem ), value );
+					};
+				}
+			}
+
+			if ( fn ) {
+				for ( ; i < length; i++ ) {
+					fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+				}
+			}
+		}
+
+		return chainable ?
+			elems :
+
+			// Gets
+			bulk ?
+				fn.call( elems ) :
+				length ? fn( elems[0], key ) : emptyGet;
+	},
+
+	now: function() {
+		return ( new Date() ).getTime();
+	},
+
+	// A method for quickly swapping in/out CSS properties to get correct calculations.
+	// Note: this method belongs to the css module but it's needed here for the support module.
+	// If support gets modularized, this method should be moved back to the css module.
+	swap: function( elem, options, callback, args ) {
+		var ret, name,
+			old = {};
+
+		// Remember the old values, and insert the new ones
+		for ( name in options ) {
+			old[ name ] = elem.style[ name ];
+			elem.style[ name ] = options[ name ];
+		}
+
+		ret = callback.apply( elem, args || [] );
+
+		// Revert the old values
+		for ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+
+		return ret;
+	}
+});
+
+jQuery.ready.promise = function( obj ) {
+	if ( !readyList ) {
+
+		readyList = jQuery.Deferred();
+
+		// Catch cases where $(document).ready() is called after the browser event has already occurred.
+		// we once tried to use readyState "interactive" here, but it caused issues like the one
+		// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+		if ( document.readyState === "complete" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			setTimeout( jQuery.ready );
+
+		// Standards-based browsers support DOMContentLoaded
+		} else if ( document.addEventListener ) {
+			// Use the handy event callback
+			document.addEventListener( "DOMContentLoaded", completed, false );
+
+			// A fallback to window.onload, that will always work
+			window.addEventListener( "load", completed, false );
+
+		// If IE event model is used
+		} else {
+			// Ensure firing before onload, maybe late but safe also for iframes
+			document.attachEvent( "onreadystatechange", completed );
+
+			// A fallback to window.onload, that will always work
+			window.attachEvent( "onload", completed );
+
+			// If IE and not a frame
+			// continually check to see if the document is ready
+			var top = false;
+
+			try {
+				top = window.frameElement == null && document.documentElement;
+			} catch(e) {}
+
+			if ( top && top.doScroll ) {
+				(function doScrollCheck() {
+					if ( !jQuery.isReady ) {
+
+						try {
+							// Use the trick by Diego Perini
+							// http://javascript.nwbox.com/IEContentLoaded/
+							top.doScroll("left");
+						} catch(e) {
+							return setTimeout( doScrollCheck, 50 );
+						}
+
+						// detach all dom ready events
+						detach();
+
+						// and execute any waiting functions
+						jQuery.ready();
+					}
+				})();
+			}
+		}
+	}
+	return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+	var length = obj.length,
+		type = jQuery.type( obj );
+
+	if ( jQuery.isWindow( obj ) ) {
+		return false;
+	}
+
+	if ( obj.nodeType === 1 && length ) {
+		return true;
+	}
+
+	return type === "array" || type !== "function" &&
+		( length === 0 ||
+		typeof length === "number" && length > 0 && ( length - 1 ) in obj );
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+/*!
+ * Sizzle CSS Selector Engine v1.10.2
+ * http://sizzlejs.com/
+ *
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03
+ */
+(function( window, undefined ) {
+
+var i,
+	support,
+	cachedruns,
+	Expr,
+	getText,
+	isXML,
+	compile,
+	outermostContext,
+	sortInput,
+
+	// Local document vars
+	setDocument,
+	document,
+	docElem,
+	documentIsHTML,
+	rbuggyQSA,
+	rbuggyMatches,
+	matches,
+	contains,
+
+	// Instance-specific data
+	expando = "sizzle" + -(new Date()),
+	preferredDoc = window.document,
+	dirruns = 0,
+	done = 0,
+	classCache = createCache(),
+	tokenCache = createCache(),
+	compilerCache = createCache(),
+	hasDuplicate = false,
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+		return 0;
+	},
+
+	// General-purpose constants
+	strundefined = typeof undefined,
+	MAX_NEGATIVE = 1 << 31,
+
+	// Instance methods
+	hasOwn = ({}).hasOwnProperty,
+	arr = [],
+	pop = arr.pop,
+	push_native = arr.push,
+	push = arr.push,
+	slice = arr.slice,
+	// Use a stripped-down indexOf if we can't use a native one
+	indexOf = arr.indexOf || function( elem ) {
+		var i = 0,
+			len = this.length;
+		for ( ; i < len; i++ ) {
+			if ( this[i] === elem ) {
+				return i;
+			}
+		}
+		return -1;
+	},
+
+	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+	// Regular expressions
+
+	// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+	whitespace = "[\\x20\\t\\r\\n\\f]",
+	// http://www.w3.org/TR/css3-syntax/#characters
+	characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+	// Loosely modeled on CSS identifier characters
+	// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+	// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+	identifier = characterEncoding.replace( "w", "w#" ),
+
+	// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+	attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+		"*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+	// Prefer arguments quoted,
+	//   then not containing pseudos/brackets,
+	//   then attribute selectors/non-parenthetical expressions,
+	//   then anything else
+	// These preferences are here to reduce the number of selectors
+	//   needing tokenize in the PSEUDO preFilter
+	pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
+
+	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+	rsibling = new RegExp( whitespace + "*[+~]" ),
+	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
+
+	rpseudo = new RegExp( pseudos ),
+	ridentifier = new RegExp( "^" + identifier + "$" ),
+
+	matchExpr = {
+		"ID": new RegExp( "^#(" + characterEncoding + ")" ),
+		"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+		"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+		"ATTR": new RegExp( "^" + attributes ),
+		"PSEUDO": new RegExp( "^" + pseudos ),
+		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+		// For use in libraries implementing .is()
+		// We use this for POS matching in `select`
+		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+	},
+
+	rnative = /^[^{]+\{\s*\[native \w/,
+
+	// Easily-parseable/retrievable ID or TAG or CLASS selectors
+	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+	rinputs = /^(?:input|select|textarea|button)$/i,
+	rheader = /^h\d$/i,
+
+	rescape = /'|\\/g,
+
+	// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+	funescape = function( _, escaped, escapedWhitespace ) {
+		var high = "0x" + escaped - 0x10000;
+		// NaN means non-codepoint
+		// Support: Firefox
+		// Workaround erroneous numeric interpretation of +"0x"
+		return high !== high || escapedWhitespace ?
+			escaped :
+			// BMP codepoint
+			high < 0 ?
+				String.fromCharCode( high + 0x10000 ) :
+				// Supplemental Plane codepoint (surrogate pair)
+				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+	};
+
+// Optimize for push.apply( _, NodeList )
+try {
+	push.apply(
+		(arr = slice.call( preferredDoc.childNodes )),
+		preferredDoc.childNodes
+	);
+	// Support: Android<4.0
+	// Detect silently failing push.apply
+	arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+	push = { apply: arr.length ?
+
+		// Leverage slice if possible
+		function( target, els ) {
+			push_native.apply( target, slice.call(els) );
+		} :
+
+		// Support: IE<9
+		// Otherwise append directly
+		function( target, els ) {
+			var j = target.length,
+				i = 0;
+			// Can't trust NodeList.length
+			while ( (target[j++] = els[i++]) ) {}
+			target.length = j - 1;
+		}
+	};
+}
+
+function Sizzle( selector, context, results, seed ) {
+	var match, elem, m, nodeType,
+		// QSA vars
+		i, groups, old, nid, newContext, newSelector;
+
+	if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+		setDocument( context );
+	}
+
+	context = context || document;
+	results = results || [];
+
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+		return [];
+	}
+
+	if ( documentIsHTML && !seed ) {
+
+		// Shortcuts
+		if ( (match = rquickExpr.exec( selector )) ) {
+			// Speed-up: Sizzle("#ID")
+			if ( (m = match[1]) ) {
+				if ( nodeType === 9 ) {
+					elem = context.getElementById( m );
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE, Opera, and Webkit return items
+						// by name instead of ID
+						if ( elem.id === m ) {
+							results.push( elem );
+							return results;
+						}
+					} else {
+						return results;
+					}
+				} else {
+					// Context is not a document
+					if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+						contains( context, elem ) && elem.id === m ) {
+						results.push( elem );
+						return results;
+					}
+				}
+
+			// Speed-up: Sizzle("TAG")
+			} else if ( match[2] ) {
+				push.apply( results, context.getElementsByTagName( selector ) );
+				return results;
+
+			// Speed-up: Sizzle(".CLASS")
+			} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
+				push.apply( results, context.getElementsByClassName( m ) );
+				return results;
+			}
+		}
+
+		// QSA path
+		if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+			nid = old = expando;
+			newContext = context;
+			newSelector = nodeType === 9 && selector;
+
+			// qSA works strangely on Element-rooted queries
+			// We can work around this by specifying an extra ID on the root
+			// and working up from there (Thanks to Andrew Dupont for the technique)
+			// IE 8 doesn't work on object elements
+			if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+				groups = tokenize( selector );
+
+				if ( (old = context.getAttribute("id")) ) {
+					nid = old.replace( rescape, "\\$&" );
+				} else {
+					context.setAttribute( "id", nid );
+				}
+				nid = "[id='" + nid + "'] ";
+
+				i = groups.length;
+				while ( i-- ) {
+					groups[i] = nid + toSelector( groups[i] );
+				}
+				newContext = rsibling.test( selector ) && context.parentNode || context;
+				newSelector = groups.join(",");
+			}
+
+			if ( newSelector ) {
+				try {
+					push.apply( results,
+						newContext.querySelectorAll( newSelector )
+					);
+					return results;
+				} catch(qsaError) {
+				} finally {
+					if ( !old ) {
+						context.removeAttribute("id");
+					}
+				}
+			}
+		}
+	}
+
+	// All others
+	return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ *	deleting the oldest entry
+ */
+function createCache() {
+	var keys = [];
+
+	function cache( key, value ) {
+		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+		if ( keys.push( key += " " ) > Expr.cacheLength ) {
+			// Only keep the most recent entries
+			delete cache[ keys.shift() ];
+		}
+		return (cache[ key ] = value);
+	}
+	return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+	fn[ expando ] = true;
+	return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+	var div = document.createElement("div");
+
+	try {
+		return !!fn( div );
+	} catch (e) {
+		return false;
+	} finally {
+		// Remove from its parent by default
+		if ( div.parentNode ) {
+			div.parentNode.removeChild( div );
+		}
+		// release memory in IE
+		div = null;
+	}
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+	var arr = attrs.split("|"),
+		i = attrs.length;
+
+	while ( i-- ) {
+		Expr.attrHandle[ arr[i] ] = handler;
+	}
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+	var cur = b && a,
+		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+			( ~b.sourceIndex || MAX_NEGATIVE ) -
+			( ~a.sourceIndex || MAX_NEGATIVE );
+
+	// Use IE sourceIndex if available on both nodes
+	if ( diff ) {
+		return diff;
+	}
+
+	// Check if b follows a
+	if ( cur ) {
+		while ( (cur = cur.nextSibling) ) {
+			if ( cur === b ) {
+				return -1;
+			}
+		}
+	}
+
+	return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return name === "input" && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return (name === "input" || name === "button") && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+	return markFunction(function( argument ) {
+		argument = +argument;
+		return markFunction(function( seed, matches ) {
+			var j,
+				matchIndexes = fn( [], seed.length, argument ),
+				i = matchIndexes.length;
+
+			// Match elements found at the specified indexes
+			while ( i-- ) {
+				if ( seed[ (j = matchIndexes[i]) ] ) {
+					seed[j] = !(matches[j] = seed[j]);
+				}
+			}
+		});
+	});
+}
+
+/**
+ * Detect xml
+ * @param {Element|Object} elem An element or a document
+ */
+isXML = Sizzle.isXML = function( elem ) {
+	// documentElement is verified for cases where it doesn't yet exist
+	// (such as loading iframes in IE - #4833)
+	var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+	return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+	var doc = node ? node.ownerDocument || node : preferredDoc,
+		parent = doc.defaultView;
+
+	// If no document and documentElement is available, return
+	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+		return document;
+	}
+
+	// Set our document
+	document = doc;
+	docElem = doc.documentElement;
+
+	// Support tests
+	documentIsHTML = !isXML( doc );
+
+	// Support: IE>8
+	// If iframe document is assigned to "document" variable and if iframe has been reloaded,
+	// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+	// IE6-8 do not support the defaultView property so parent will be undefined
+	if ( parent && parent.attachEvent && parent !== parent.top ) {
+		parent.attachEvent( "onbeforeunload", function() {
+			setDocument();
+		});
+	}
+
+	/* Attributes
+	---------------------------------------------------------------------- */
+
+	// Support: IE<8
+	// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
+	support.attributes = assert(function( div ) {
+		div.className = "i";
+		return !div.getAttribute("className");
+	});
+
+	/* getElement(s)By*
+	---------------------------------------------------------------------- */
+
+	// Check if getElementsByTagName("*") returns only elements
+	support.getElementsByTagName = assert(function( div ) {
+		div.appendChild( doc.createComment("") );
+		return !div.getElementsByTagName("*").length;
+	});
+
+	// Check if getElementsByClassName can be trusted
+	support.getElementsByClassName = assert(function( div ) {
+		div.innerHTML = "<div class='a'></div><div class='a i'></div>";
+
+		// Support: Safari<4
+		// Catch class over-caching
+		div.firstChild.className = "i";
+		// Support: Opera<10
+		// Catch gEBCN failure to find non-leading classes
+		return div.getElementsByClassName("i").length === 2;
+	});
+
+	// Support: IE<10
+	// Check if getElementById returns elements by name
+	// The broken getElementById methods don't pick up programatically-set names,
+	// so use a roundabout getElementsByName test
+	support.getById = assert(function( div ) {
+		docElem.appendChild( div ).id = expando;
+		return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+	});
+
+	// ID find and filter
+	if ( support.getById ) {
+		Expr.find["ID"] = function( id, context ) {
+			if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
+				var m = context.getElementById( id );
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [m] : [];
+			}
+		};
+		Expr.filter["ID"] = function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				return elem.getAttribute("id") === attrId;
+			};
+		};
+	} else {
+		// Support: IE6/7
+		// getElementById is not reliable as a find shortcut
+		delete Expr.find["ID"];
+
+		Expr.filter["ID"] =  function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+				return node && node.value === attrId;
+			};
+		};
+	}
+
+	// Tag
+	Expr.find["TAG"] = support.getElementsByTagName ?
+		function( tag, context ) {
+			if ( typeof context.getElementsByTagName !== strundefined ) {
+				return context.getElementsByTagName( tag );
+			}
+		} :
+		function( tag, context ) {
+			var elem,
+				tmp = [],
+				i = 0,
+				results = context.getElementsByTagName( tag );
+
+			// Filter out possible comments
+			if ( tag === "*" ) {
+				while ( (elem = results[i++]) ) {
+					if ( elem.nodeType === 1 ) {
+						tmp.push( elem );
+					}
+				}
+
+				return tmp;
+			}
+			return results;
+		};
+
+	// Class
+	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+		if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
+			return context.getElementsByClassName( className );
+		}
+	};
+
+	/* QSA/matchesSelector
+	---------------------------------------------------------------------- */
+
+	// QSA and matchesSelector support
+
+	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+	rbuggyMatches = [];
+
+	// qSa(:focus) reports false when true (Chrome 21)
+	// We allow this because of a bug in IE8/9 that throws an error
+	// whenever `document.activeElement` is accessed on an iframe
+	// So, we allow :focus to pass through QSA all the time to avoid the IE error
+	// See http://bugs.jquery.com/ticket/13378
+	rbuggyQSA = [];
+
+	if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+		// Build QSA regex
+		// Regex strategy adopted from Diego Perini
+		assert(function( div ) {
+			// Select is set to empty string on purpose
+			// This is to test IE's treatment of not explicitly
+			// setting a boolean content attribute,
+			// since its presence should be enough
+			// http://bugs.jquery.com/ticket/12359
+			div.innerHTML = "<select><option selected=''></option></select>";
+
+			// Support: IE8
+			// Boolean attributes and "value" are not treated correctly
+			if ( !div.querySelectorAll("[selected]").length ) {
+				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+			}
+
+			// Webkit/Opera - :checked should return selected option elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":checked").length ) {
+				rbuggyQSA.push(":checked");
+			}
+		});
+
+		assert(function( div ) {
+
+			// Support: Opera 10-12/IE8
+			// ^= $= *= and empty values
+			// Should not select anything
+			// Support: Windows 8 Native Apps
+			// The type attribute is restricted during .innerHTML assignment
+			var input = doc.createElement("input");
+			input.setAttribute( "type", "hidden" );
+			div.appendChild( input ).setAttribute( "t", "" );
+
+			if ( div.querySelectorAll("[t^='']").length ) {
+				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+			}
+
+			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":enabled").length ) {
+				rbuggyQSA.push( ":enabled", ":disabled" );
+			}
+
+			// Opera 10-11 does not throw on post-comma invalid pseudos
+			div.querySelectorAll("*,:x");
+			rbuggyQSA.push(",.*:");
+		});
+	}
+
+	if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
+		docElem.mozMatchesSelector ||
+		docElem.oMatchesSelector ||
+		docElem.msMatchesSelector) )) ) {
+
+		assert(function( div ) {
+			// Check to see if it's possible to do matchesSelector
+			// on a disconnected node (IE 9)
+			support.disconnectedMatch = matches.call( div, "div" );
+
+			// This should fail with an exception
+			// Gecko does not error, returns false instead
+			matches.call( div, "[s!='']:x" );
+			rbuggyMatches.push( "!=", pseudos );
+		});
+	}
+
+	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+	/* Contains
+	---------------------------------------------------------------------- */
+
+	// Element contains another
+	// Purposefully does not implement inclusive descendent
+	// As in, an element does not contain itself
+	contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
+		function( a, b ) {
+			var adown = a.nodeType === 9 ? a.documentElement : a,
+				bup = b && b.parentNode;
+			return a === bup || !!( bup && bup.nodeType === 1 && (
+				adown.contains ?
+					adown.contains( bup ) :
+					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+			));
+		} :
+		function( a, b ) {
+			if ( b ) {
+				while ( (b = b.parentNode) ) {
+					if ( b === a ) {
+						return true;
+					}
+				}
+			}
+			return false;
+		};
+
+	/* Sorting
+	---------------------------------------------------------------------- */
+
+	// Document order sorting
+	sortOrder = docElem.compareDocumentPosition ?
+	function( a, b ) {
+
+		// Flag for duplicate removal
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
+
+		if ( compare ) {
+			// Disconnected nodes
+			if ( compare & 1 ||
+				(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+				// Choose the first element that is related to our preferred document
+				if ( a === doc || contains(preferredDoc, a) ) {
+					return -1;
+				}
+				if ( b === doc || contains(preferredDoc, b) ) {
+					return 1;
+				}
+
+				// Maintain original order
+				return sortInput ?
+					( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+					0;
+			}
+
+			return compare & 4 ? -1 : 1;
+		}
+
+		// Not directly comparable, sort on existence of method
+		return a.compareDocumentPosition ? -1 : 1;
+	} :
+	function( a, b ) {
+		var cur,
+			i = 0,
+			aup = a.parentNode,
+			bup = b.parentNode,
+			ap = [ a ],
+			bp = [ b ];
+
+		// Exit early if the nodes are identical
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// Parentless nodes are either documents or disconnected
+		} else if ( !aup || !bup ) {
+			return a === doc ? -1 :
+				b === doc ? 1 :
+				aup ? -1 :
+				bup ? 1 :
+				sortInput ?
+				( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+				0;
+
+		// If the nodes are siblings, we can do a quick check
+		} else if ( aup === bup ) {
+			return siblingCheck( a, b );
+		}
+
+		// Otherwise we need full lists of their ancestors for comparison
+		cur = a;
+		while ( (cur = cur.parentNode) ) {
+			ap.unshift( cur );
+		}
+		cur = b;
+		while ( (cur = cur.parentNode) ) {
+			bp.unshift( cur );
+		}
+
+		// Walk down the tree looking for a discrepancy
+		while ( ap[i] === bp[i] ) {
+			i++;
+		}
+
+		return i ?
+			// Do a sibling check if the nodes have a common ancestor
+			siblingCheck( ap[i], bp[i] ) :
+
+			// Otherwise nodes in our document sort first
+			ap[i] === preferredDoc ? -1 :
+			bp[i] === preferredDoc ? 1 :
+			0;
+	};
+
+	return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+	return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	// Make sure that attribute selectors are quoted
+	expr = expr.replace( rattributeQuotes, "='$1']" );
+
+	if ( support.matchesSelector && documentIsHTML &&
+		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
+
+		try {
+			var ret = matches.call( elem, expr );
+
+			// IE 9's matchesSelector returns false on disconnected nodes
+			if ( ret || support.disconnectedMatch ||
+					// As well, disconnected nodes are said to be in a document
+					// fragment in IE 9
+					elem.document && elem.document.nodeType !== 11 ) {
+				return ret;
+			}
+		} catch(e) {}
+	}
+
+	return Sizzle( expr, document, null, [elem] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+	// Set document vars if needed
+	if ( ( context.ownerDocument || context ) !== document ) {
+		setDocument( context );
+	}
+	return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	var fn = Expr.attrHandle[ name.toLowerCase() ],
+		// Don't get fooled by Object.prototype properties (jQuery #13807)
+		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+			fn( elem, name, !documentIsHTML ) :
+			undefined;
+
+	return val === undefined ?
+		support.attributes || !documentIsHTML ?
+			elem.getAttribute( name ) :
+			(val = elem.getAttributeNode(name)) && val.specified ?
+				val.value :
+				null :
+		val;
+};
+
+Sizzle.error = function( msg ) {
+	throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+	var elem,
+		duplicates = [],
+		j = 0,
+		i = 0;
+
+	// Unless we *know* we can detect duplicates, assume their presence
+	hasDuplicate = !support.detectDuplicates;
+	sortInput = !support.sortStable && results.slice( 0 );
+	results.sort( sortOrder );
+
+	if ( hasDuplicate ) {
+		while ( (elem = results[i++]) ) {
+			if ( elem === results[ i ] ) {
+				j = duplicates.push( i );
+			}
+		}
+		while ( j-- ) {
+			results.splice( duplicates[ j ], 1 );
+		}
+	}
+
+	return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+	var node,
+		ret = "",
+		i = 0,
+		nodeType = elem.nodeType;
+
+	if ( !nodeType ) {
+		// If no nodeType, this is expected to be an array
+		for ( ; (node = elem[i]); i++ ) {
+			// Do not traverse comment nodes
+			ret += getText( node );
+		}
+	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+		// Use textContent for elements
+		// innerText usage removed for consistency of new lines (see #11153)
+		if ( typeof elem.textContent === "string" ) {
+			return elem.textContent;
+		} else {
+			// Traverse its children
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				ret += getText( elem );
+			}
+		}
+	} else if ( nodeType === 3 || nodeType === 4 ) {
+		return elem.nodeValue;
+	}
+	// Do not include comment or processing instruction nodes
+
+	return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+	// Can be adjusted by the user
+	cacheLength: 50,
+
+	createPseudo: markFunction,
+
+	match: matchExpr,
+
+	attrHandle: {},
+
+	find: {},
+
+	relative: {
+		">": { dir: "parentNode", first: true },
+		" ": { dir: "parentNode" },
+		"+": { dir: "previousSibling", first: true },
+		"~": { dir: "previousSibling" }
+	},
+
+	preFilter: {
+		"ATTR": function( match ) {
+			match[1] = match[1].replace( runescape, funescape );
+
+			// Move the given value to match[3] whether quoted or unquoted
+			match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
+
+			if ( match[2] === "~=" ) {
+				match[3] = " " + match[3] + " ";
+			}
+
+			return match.slice( 0, 4 );
+		},
+
+		"CHILD": function( match ) {
+			/* matches from matchExpr["CHILD"]
+				1 type (only|nth|...)
+				2 what (child|of-type)
+				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+				4 xn-component of xn+y argument ([+-]?\d*n|)
+				5 sign of xn-component
+				6 x of xn-component
+				7 sign of y-component
+				8 y of y-component
+			*/
+			match[1] = match[1].toLowerCase();
+
+			if ( match[1].slice( 0, 3 ) === "nth" ) {
+				// nth-* requires argument
+				if ( !match[3] ) {
+					Sizzle.error( match[0] );
+				}
+
+				// numeric x and y parameters for Expr.filter.CHILD
+				// remember that false/true cast respectively to 0/1
+				match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+				match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+			// other types prohibit arguments
+			} else if ( match[3] ) {
+				Sizzle.error( match[0] );
+			}
+
+			return match;
+		},
+
+		"PSEUDO": function( match ) {
+			var excess,
+				unquoted = !match[5] && match[2];
+
+			if ( matchExpr["CHILD"].test( match[0] ) ) {
+				return null;
+			}
+
+			// Accept quoted arguments as-is
+			if ( match[3] && match[4] !== undefined ) {
+				match[2] = match[4];
+
+			// Strip excess characters from unquoted arguments
+			} else if ( unquoted && rpseudo.test( unquoted ) &&
+				// Get excess from tokenize (recursively)
+				(excess = tokenize( unquoted, true )) &&
+				// advance to the next closing parenthesis
+				(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+				// excess is a negative index
+				match[0] = match[0].slice( 0, excess );
+				match[2] = unquoted.slice( 0, excess );
+			}
+
+			// Return only captures needed by the pseudo filter method (type and argument)
+			return match.slice( 0, 3 );
+		}
+	},
+
+	filter: {
+
+		"TAG": function( nodeNameSelector ) {
+			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+			return nodeNameSelector === "*" ?
+				function() { return true; } :
+				function( elem ) {
+					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+				};
+		},
+
+		"CLASS": function( className ) {
+			var pattern = classCache[ className + " " ];
+
+			return pattern ||
+				(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+				classCache( className, function( elem ) {
+					return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
+				});
+		},
+
+		"ATTR": function( name, operator, check ) {
+			return function( elem ) {
+				var result = Sizzle.attr( elem, name );
+
+				if ( result == null ) {
+					return operator === "!=";
+				}
+				if ( !operator ) {
+					return true;
+				}
+
+				result += "";
+
+				return operator === "=" ? result === check :
+					operator === "!=" ? result !== check :
+					operator === "^=" ? check && result.indexOf( check ) === 0 :
+					operator === "*=" ? check && result.indexOf( check ) > -1 :
+					operator === "$=" ? check && result.slice( -check.length ) === check :
+					operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+					false;
+			};
+		},
+
+		"CHILD": function( type, what, argument, first, last ) {
+			var simple = type.slice( 0, 3 ) !== "nth",
+				forward = type.slice( -4 ) !== "last",
+				ofType = what === "of-type";
+
+			return first === 1 && last === 0 ?
+
+				// Shortcut for :nth-*(n)
+				function( elem ) {
+					return !!elem.parentNode;
+				} :
+
+				function( elem, context, xml ) {
+					var cache, outerCache, node, diff, nodeIndex, start,
+						dir = simple !== forward ? "nextSibling" : "previousSibling",
+						parent = elem.parentNode,
+						name = ofType && elem.nodeName.toLowerCase(),
+						useCache = !xml && !ofType;
+
+					if ( parent ) {
+
+						// :(first|last|only)-(child|of-type)
+						if ( simple ) {
+							while ( dir ) {
+								node = elem;
+								while ( (node = node[ dir ]) ) {
+									if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+										return false;
+									}
+								}
+								// Reverse direction for :only-* (if we haven't yet done so)
+								start = dir = type === "only" && !start && "nextSibling";
+							}
+							return true;
+						}
+
+						start = [ forward ? parent.firstChild : parent.lastChild ];
+
+						// non-xml :nth-child(...) stores cache data on `parent`
+						if ( forward && useCache ) {
+							// Seek `elem` from a previously-cached index
+							outerCache = parent[ expando ] || (parent[ expando ] = {});
+							cache = outerCache[ type ] || [];
+							nodeIndex = cache[0] === dirruns && cache[1];
+							diff = cache[0] === dirruns && cache[2];
+							node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+								// Fallback to seeking `elem` from the start
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								// When found, cache indexes on `parent` and break
+								if ( node.nodeType === 1 && ++diff && node === elem ) {
+									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+									break;
+								}
+							}
+
+						// Use previously-cached element index if available
+						} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+							diff = cache[1];
+
+						// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+						} else {
+							// Use the same loop as above to seek `elem` from the start
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+									// Cache the index of each encountered element
+									if ( useCache ) {
+										(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+									}
+
+									if ( node === elem ) {
+										break;
+									}
+								}
+							}
+						}
+
+						// Incorporate the offset, then check against cycle size
+						diff -= last;
+						return diff === first || ( diff % first === 0 && diff / first >= 0 );
+					}
+				};
+		},
+
+		"PSEUDO": function( pseudo, argument ) {
+			// pseudo-class names are case-insensitive
+			// http://www.w3.org/TR/selectors/#pseudo-classes
+			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+			// Remember that setFilters inherits from pseudos
+			var args,
+				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+					Sizzle.error( "unsupported pseudo: " + pseudo );
+
+			// The user may use createPseudo to indicate that
+			// arguments are needed to create the filter function
+			// just as Sizzle does
+			if ( fn[ expando ] ) {
+				return fn( argument );
+			}
+
+			// But maintain support for old signatures
+			if ( fn.length > 1 ) {
+				args = [ pseudo, pseudo, "", argument ];
+				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+					markFunction(function( seed, matches ) {
+						var idx,
+							matched = fn( seed, argument ),
+							i = matched.length;
+						while ( i-- ) {
+							idx = indexOf.call( seed, matched[i] );
+							seed[ idx ] = !( matches[ idx ] = matched[i] );
+						}
+					}) :
+					function( elem ) {
+						return fn( elem, 0, args );
+					};
+			}
+
+			return fn;
+		}
+	},
+
+	pseudos: {
+		// Potentially complex pseudos
+		"not": markFunction(function( selector ) {
+			// Trim the selector passed to compile
+			// to avoid treating leading and trailing
+			// spaces as combinators
+			var input = [],
+				results = [],
+				matcher = compile( selector.replace( rtrim, "$1" ) );
+
+			return matcher[ expando ] ?
+				markFunction(function( seed, matches, context, xml ) {
+					var elem,
+						unmatched = matcher( seed, null, xml, [] ),
+						i = seed.length;
+
+					// Match elements unmatched by `matcher`
+					while ( i-- ) {
+						if ( (elem = unmatched[i]) ) {
+							seed[i] = !(matches[i] = elem);
+						}
+					}
+				}) :
+				function( elem, context, xml ) {
+					input[0] = elem;
+					matcher( input, null, xml, results );
+					return !results.pop();
+				};
+		}),
+
+		"has": markFunction(function( selector ) {
+			return function( elem ) {
+				return Sizzle( selector, elem ).length > 0;
+			};
+		}),
+
+		"contains": markFunction(function( text ) {
+			return function( elem ) {
+				return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+			};
+		}),
+
+		// "Whether an element is represented by a :lang() selector
+		// is based solely on the element's language value
+		// being equal to the identifier C,
+		// or beginning with the identifier C immediately followed by "-".
+		// The matching of C against the element's language value is performed case-insensitively.
+		// The identifier C does not have to be a valid language name."
+		// http://www.w3.org/TR/selectors/#lang-pseudo
+		"lang": markFunction( function( lang ) {
+			// lang value must be a valid identifier
+			if ( !ridentifier.test(lang || "") ) {
+				Sizzle.error( "unsupported lang: " + lang );
+			}
+			lang = lang.replace( runescape, funescape ).toLowerCase();
+			return function( elem ) {
+				var elemLang;
+				do {
+					if ( (elemLang = documentIsHTML ?
+						elem.lang :
+						elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+						elemLang = elemLang.toLowerCase();
+						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+					}
+				} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+				return false;
+			};
+		}),
+
+		// Miscellaneous
+		"target": function( elem ) {
+			var hash = window.location && window.location.hash;
+			return hash && hash.slice( 1 ) === elem.id;
+		},
+
+		"root": function( elem ) {
+			return elem === docElem;
+		},
+
+		"focus": function( elem ) {
+			return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+		},
+
+		// Boolean properties
+		"enabled": function( elem ) {
+			return elem.disabled === false;
+		},
+
+		"disabled": function( elem ) {
+			return elem.disabled === true;
+		},
+
+		"checked": function( elem ) {
+			// In CSS3, :checked should return both checked and selected elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			var nodeName = elem.nodeName.toLowerCase();
+			return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+		},
+
+		"selected": function( elem ) {
+			// Accessing this property makes selected-by-default
+			// options in Safari work properly
+			if ( elem.parentNode ) {
+				elem.parentNode.selectedIndex;
+			}
+
+			return elem.selected === true;
+		},
+
+		// Contents
+		"empty": function( elem ) {
+			// http://www.w3.org/TR/selectors/#empty-pseudo
+			// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+			//   not comment, processing instructions, or others
+			// Thanks to Diego Perini for the nodeName shortcut
+			//   Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
+					return false;
+				}
+			}
+			return true;
+		},
+
+		"parent": function( elem ) {
+			return !Expr.pseudos["empty"]( elem );
+		},
+
+		// Element/input types
+		"header": function( elem ) {
+			return rheader.test( elem.nodeName );
+		},
+
+		"input": function( elem ) {
+			return rinputs.test( elem.nodeName );
+		},
+
+		"button": function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return name === "input" && elem.type === "button" || name === "button";
+		},
+
+		"text": function( elem ) {
+			var attr;
+			// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+			// use getAttribute instead to test this case
+			return elem.nodeName.toLowerCase() === "input" &&
+				elem.type === "text" &&
+				( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
+		},
+
+		// Position-in-collection
+		"first": createPositionalPseudo(function() {
+			return [ 0 ];
+		}),
+
+		"last": createPositionalPseudo(function( matchIndexes, length ) {
+			return [ length - 1 ];
+		}),
+
+		"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			return [ argument < 0 ? argument + length : argument ];
+		}),
+
+		"even": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 0;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"odd": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 1;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; --i >= 0; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; ++i < length; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		})
+	}
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+	Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+	Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+function tokenize( selector, parseOnly ) {
+	var matched, match, tokens, type,
+		soFar, groups, preFilters,
+		cached = tokenCache[ selector + " " ];
+
+	if ( cached ) {
+		return parseOnly ? 0 : cached.slice( 0 );
+	}
+
+	soFar = selector;
+	groups = [];
+	preFilters = Expr.preFilter;
+
+	while ( soFar ) {
+
+		// Comma and first run
+		if ( !matched || (match = rcomma.exec( soFar )) ) {
+			if ( match ) {
+				// Don't consume trailing commas as valid
+				soFar = soFar.slice( match[0].length ) || soFar;
+			}
+			groups.push( tokens = [] );
+		}
+
+		matched = false;
+
+		// Combinators
+		if ( (match = rcombinators.exec( soFar )) ) {
+			matched = match.shift();
+			tokens.push({
+				value: matched,
+				// Cast descendant combinators to space
+				type: match[0].replace( rtrim, " " )
+			});
+			soFar = soFar.slice( matched.length );
+		}
+
+		// Filters
+		for ( type in Expr.filter ) {
+			if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+				(match = preFilters[ type ]( match ))) ) {
+				matched = match.shift();
+				tokens.push({
+					value: matched,
+					type: type,
+					matches: match
+				});
+				soFar = soFar.slice( matched.length );
+			}
+		}
+
+		if ( !matched ) {
+			break;
+		}
+	}
+
+	// Return the length of the invalid excess
+	// if we're just parsing
+	// Otherwise, throw an error or return tokens
+	return parseOnly ?
+		soFar.length :
+		soFar ?
+			Sizzle.error( selector ) :
+			// Cache the tokens
+			tokenCache( selector, groups ).slice( 0 );
+}
+
+function toSelector( tokens ) {
+	var i = 0,
+		len = tokens.length,
+		selector = "";
+	for ( ; i < len; i++ ) {
+		selector += tokens[i].value;
+	}
+	return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+	var dir = combinator.dir,
+		checkNonElements = base && dir === "parentNode",
+		doneName = done++;
+
+	return combinator.first ?
+		// Check against closest ancestor/preceding element
+		function( elem, context, xml ) {
+			while ( (elem = elem[ dir ]) ) {
+				if ( elem.nodeType === 1 || checkNonElements ) {
+					return matcher( elem, context, xml );
+				}
+			}
+		} :
+
+		// Check against all ancestor/preceding elements
+		function( elem, context, xml ) {
+			var data, cache, outerCache,
+				dirkey = dirruns + " " + doneName;
+
+			// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+			if ( xml ) {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						if ( matcher( elem, context, xml ) ) {
+							return true;
+						}
+					}
+				}
+			} else {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						outerCache = elem[ expando ] || (elem[ expando ] = {});
+						if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
+							if ( (data = cache[1]) === true || data === cachedruns ) {
+								return data === true;
+							}
+						} else {
+							cache = outerCache[ dir ] = [ dirkey ];
+							cache[1] = matcher( elem, context, xml ) || cachedruns;
+							if ( cache[1] === true ) {
+								return true;
+							}
+						}
+					}
+				}
+			}
+		};
+}
+
+function elementMatcher( matchers ) {
+	return matchers.length > 1 ?
+		function( elem, context, xml ) {
+			var i = matchers.length;
+			while ( i-- ) {
+				if ( !matchers[i]( elem, context, xml ) ) {
+					return false;
+				}
+			}
+			return true;
+		} :
+		matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+	var elem,
+		newUnmatched = [],
+		i = 0,
+		len = unmatched.length,
+		mapped = map != null;
+
+	for ( ; i < len; i++ ) {
+		if ( (elem = unmatched[i]) ) {
+			if ( !filter || filter( elem, context, xml ) ) {
+				newUnmatched.push( elem );
+				if ( mapped ) {
+					map.push( i );
+				}
+			}
+		}
+	}
+
+	return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+	if ( postFilter && !postFilter[ expando ] ) {
+		postFilter = setMatcher( postFilter );
+	}
+	if ( postFinder && !postFinder[ expando ] ) {
+		postFinder = setMatcher( postFinder, postSelector );
+	}
+	return markFunction(function( seed, results, context, xml ) {
+		var temp, i, elem,
+			preMap = [],
+			postMap = [],
+			preexisting = results.length,
+
+			// Get initial elements from seed or context
+			elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+			// Prefilter to get matcher input, preserving a map for seed-results synchronization
+			matcherIn = preFilter && ( seed || !selector ) ?
+				condense( elems, preMap, preFilter, context, xml ) :
+				elems,
+
+			matcherOut = matcher ?
+				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+					// ...intermediate processing is necessary
+					[] :
+
+					// ...otherwise use results directly
+					results :
+				matcherIn;
+
+		// Find primary matches
+		if ( matcher ) {
+			matcher( matcherIn, matcherOut, context, xml );
+		}
+
+		// Apply postFilter
+		if ( postFilter ) {
+			temp = condense( matcherOut, postMap );
+			postFilter( temp, [], context, xml );
+
+			// Un-match failing elements by moving them back to matcherIn
+			i = temp.length;
+			while ( i-- ) {
+				if ( (elem = temp[i]) ) {
+					matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+				}
+			}
+		}
+
+		if ( seed ) {
+			if ( postFinder || preFilter ) {
+				if ( postFinder ) {
+					// Get the final matcherOut by condensing this intermediate into postFinder contexts
+					temp = [];
+					i = matcherOut.length;
+					while ( i-- ) {
+						if ( (elem = matcherOut[i]) ) {
+							// Restore matcherIn since elem is not yet a final match
+							temp.push( (matcherIn[i] = elem) );
+						}
+					}
+					postFinder( null, (matcherOut = []), temp, xml );
+				}
+
+				// Move matched elements from seed to results to keep them synchronized
+				i = matcherOut.length;
+				while ( i-- ) {
+					if ( (elem = matcherOut[i]) &&
+						(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+						seed[temp] = !(results[temp] = elem);
+					}
+				}
+			}
+
+		// Add elements to results, through postFinder if defined
+		} else {
+			matcherOut = condense(
+				matcherOut === results ?
+					matcherOut.splice( preexisting, matcherOut.length ) :
+					matcherOut
+			);
+			if ( postFinder ) {
+				postFinder( null, results, matcherOut, xml );
+			} else {
+				push.apply( results, matcherOut );
+			}
+		}
+	});
+}
+
+function matcherFromTokens( tokens ) {
+	var checkContext, matcher, j,
+		len = tokens.length,
+		leadingRelative = Expr.relative[ tokens[0].type ],
+		implicitRelative = leadingRelative || Expr.relative[" "],
+		i = leadingRelative ? 1 : 0,
+
+		// The foundational matcher ensures that elements are reachable from top-level context(s)
+		matchContext = addCombinator( function( elem ) {
+			return elem === checkContext;
+		}, implicitRelative, true ),
+		matchAnyContext = addCombinator( function( elem ) {
+			return indexOf.call( checkContext, elem ) > -1;
+		}, implicitRelative, true ),
+		matchers = [ function( elem, context, xml ) {
+			return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+				(checkContext = context).nodeType ?
+					matchContext( elem, context, xml ) :
+					matchAnyContext( elem, context, xml ) );
+		} ];
+
+	for ( ; i < len; i++ ) {
+		if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+			matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+		} else {
+			matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+			// Return special upon seeing a positional matcher
+			if ( matcher[ expando ] ) {
+				// Find the next relative operator (if any) for proper handling
+				j = ++i;
+				for ( ; j < len; j++ ) {
+					if ( Expr.relative[ tokens[j].type ] ) {
+						break;
+					}
+				}
+				return setMatcher(
+					i > 1 && elementMatcher( matchers ),
+					i > 1 && toSelector(
+						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
+						tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+					).replace( rtrim, "$1" ),
+					matcher,
+					i < j && matcherFromTokens( tokens.slice( i, j ) ),
+					j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+					j < len && toSelector( tokens )
+				);
+			}
+			matchers.push( matcher );
+		}
+	}
+
+	return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+	// A counter to specify which element is currently being matched
+	var matcherCachedRuns = 0,
+		bySet = setMatchers.length > 0,
+		byElement = elementMatchers.length > 0,
+		superMatcher = function( seed, context, xml, results, expandContext ) {
+			var elem, j, matcher,
+				setMatched = [],
+				matchedCount = 0,
+				i = "0",
+				unmatched = seed && [],
+				outermost = expandContext != null,
+				contextBackup = outermostContext,
+				// We must always have either seed elements or context
+				elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+				// Use integer dirruns iff this is the outermost matcher
+				dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
+
+			if ( outermost ) {
+				outermostContext = context !== document && context;
+				cachedruns = matcherCachedRuns;
+			}
+
+			// Add elements passing elementMatchers directly to results
+			// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+			for ( ; (elem = elems[i]) != null; i++ ) {
+				if ( byElement && elem ) {
+					j = 0;
+					while ( (matcher = elementMatchers[j++]) ) {
+						if ( matcher( elem, context, xml ) ) {
+							results.push( elem );
+							break;
+						}
+					}
+					if ( outermost ) {
+						dirruns = dirrunsUnique;
+						cachedruns = ++matcherCachedRuns;
+					}
+				}
+
+				// Track unmatched elements for set filters
+				if ( bySet ) {
+					// They will have gone through all possible matchers
+					if ( (elem = !matcher && elem) ) {
+						matchedCount--;
+					}
+
+					// Lengthen the array for every element, matched or not
+					if ( seed ) {
+						unmatched.push( elem );
+					}
+				}
+			}
+
+			// Apply set filters to unmatched elements
+			matchedCount += i;
+			if ( bySet && i !== matchedCount ) {
+				j = 0;
+				while ( (matcher = setMatchers[j++]) ) {
+					matcher( unmatched, setMatched, context, xml );
+				}
+
+				if ( seed ) {
+					// Reintegrate element matches to eliminate the need for sorting
+					if ( matchedCount > 0 ) {
+						while ( i-- ) {
+							if ( !(unmatched[i] || setMatched[i]) ) {
+								setMatched[i] = pop.call( results );
+							}
+						}
+					}
+
+					// Discard index placeholder values to get only actual matches
+					setMatched = condense( setMatched );
+				}
+
+				// Add matches to results
+				push.apply( results, setMatched );
+
+				// Seedless set matches succeeding multiple successful matchers stipulate sorting
+				if ( outermost && !seed && setMatched.length > 0 &&
+					( matchedCount + setMatchers.length ) > 1 ) {
+
+					Sizzle.uniqueSort( results );
+				}
+			}
+
+			// Override manipulation of globals by nested matchers
+			if ( outermost ) {
+				dirruns = dirrunsUnique;
+				outermostContext = contextBackup;
+			}
+
+			return unmatched;
+		};
+
+	return bySet ?
+		markFunction( superMatcher ) :
+		superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+	var i,
+		setMatchers = [],
+		elementMatchers = [],
+		cached = compilerCache[ selector + " " ];
+
+	if ( !cached ) {
+		// Generate a function of recursive functions that can be used to check each element
+		if ( !group ) {
+			group = tokenize( selector );
+		}
+		i = group.length;
+		while ( i-- ) {
+			cached = matcherFromTokens( group[i] );
+			if ( cached[ expando ] ) {
+				setMatchers.push( cached );
+			} else {
+				elementMatchers.push( cached );
+			}
+		}
+
+		// Cache the compiled function
+		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+	}
+	return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+	var i = 0,
+		len = contexts.length;
+	for ( ; i < len; i++ ) {
+		Sizzle( selector, contexts[i], results );
+	}
+	return results;
+}
+
+function select( selector, context, results, seed ) {
+	var i, tokens, token, type, find,
+		match = tokenize( selector );
+
+	if ( !seed ) {
+		// Try to minimize operations if there is only one group
+		if ( match.length === 1 ) {
+
+			// Take a shortcut and set the context if the root selector is an ID
+			tokens = match[0] = match[0].slice( 0 );
+			if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+					support.getById && context.nodeType === 9 && documentIsHTML &&
+					Expr.relative[ tokens[1].type ] ) {
+
+				context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+				if ( !context ) {
+					return results;
+				}
+				selector = selector.slice( tokens.shift().value.length );
+			}
+
+			// Fetch a seed set for right-to-left matching
+			i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+			while ( i-- ) {
+				token = tokens[i];
+
+				// Abort if we hit a combinator
+				if ( Expr.relative[ (type = token.type) ] ) {
+					break;
+				}
+				if ( (find = Expr.find[ type ]) ) {
+					// Search, expanding context for leading sibling combinators
+					if ( (seed = find(
+						token.matches[0].replace( runescape, funescape ),
+						rsibling.test( tokens[0].type ) && context.parentNode || context
+					)) ) {
+
+						// If seed is empty or no tokens remain, we can return early
+						tokens.splice( i, 1 );
+						selector = seed.length && toSelector( tokens );
+						if ( !selector ) {
+							push.apply( results, seed );
+							return results;
+						}
+
+						break;
+					}
+				}
+			}
+		}
+	}
+
+	// Compile and execute a filtering function
+	// Provide `match` to avoid retokenization if we modified the selector above
+	compile( selector, match )(
+		seed,
+		context,
+		!documentIsHTML,
+		results,
+		rsibling.test( selector )
+	);
+	return results;
+}
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome<14
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+	// Should return 1, but returns 4 (following)
+	return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+	div.innerHTML = "<a href='#'></a>";
+	return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+	addHandle( "type|href|height|width", function( elem, name, isXML ) {
+		if ( !isXML ) {
+			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+		}
+	});
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+	div.innerHTML = "<input/>";
+	div.firstChild.setAttribute( "value", "" );
+	return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+	addHandle( "value", function( elem, name, isXML ) {
+		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+			return elem.defaultValue;
+		}
+	});
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+	return div.getAttribute("disabled") == null;
+}) ) {
+	addHandle( booleans, function( elem, name, isXML ) {
+		var val;
+		if ( !isXML ) {
+			return (val = elem.getAttributeNode( name )) && val.specified ?
+				val.value :
+				elem[ name ] === true ? name.toLowerCase() : null;
+		}
+	});
+}
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+	var object = optionsCache[ options ] = {};
+	jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
+		object[ flag ] = true;
+	});
+	return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *	options: an optional list of space-separated options that will change how
+ *			the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ *	once:			will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *	memory:			will keep track of previous values and will call any callback added
+ *					after the list has been fired right away with the latest "memorized"
+ *					values (like a Deferred)
+ *
+ *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *	stopOnFalse:	interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+	// Convert options from String-formatted to Object-formatted if needed
+	// (we check in cache first)
+	options = typeof options === "string" ?
+		( optionsCache[ options ] || createOptions( options ) ) :
+		jQuery.extend( {}, options );
+
+	var // Flag to know if list is currently firing
+		firing,
+		// Last fire value (for non-forgettable lists)
+		memory,
+		// Flag to know if list was already fired
+		fired,
+		// End of the loop when firing
+		firingLength,
+		// Index of currently firing callback (modified by remove if needed)
+		firingIndex,
+		// First callback to fire (used internally by add and fireWith)
+		firingStart,
+		// Actual callback list
+		list = [],
+		// Stack of fire calls for repeatable lists
+		stack = !options.once && [],
+		// Fire callbacks
+		fire = function( data ) {
+			memory = options.memory && data;
+			fired = true;
+			firingIndex = firingStart || 0;
+			firingStart = 0;
+			firingLength = list.length;
+			firing = true;
+			for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+				if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+					memory = false; // To prevent further calls using add
+					break;
+				}
+			}
+			firing = false;
+			if ( list ) {
+				if ( stack ) {
+					if ( stack.length ) {
+						fire( stack.shift() );
+					}
+				} else if ( memory ) {
+					list = [];
+				} else {
+					self.disable();
+				}
+			}
+		},
+		// Actual Callbacks object
+		self = {
+			// Add a callback or a collection of callbacks to the list
+			add: function() {
+				if ( list ) {
+					// First, we save the current length
+					var start = list.length;
+					(function add( args ) {
+						jQuery.each( args, function( _, arg ) {
+							var type = jQuery.type( arg );
+							if ( type === "function" ) {
+								if ( !options.unique || !self.has( arg ) ) {
+									list.push( arg );
+								}
+							} else if ( arg && arg.length && type !== "string" ) {
+								// Inspect recursively
+								add( arg );
+							}
+						});
+					})( arguments );
+					// Do we need to add the callbacks to the
+					// current firing batch?
+					if ( firing ) {
+						firingLength = list.length;
+					// With memory, if we're not firing then
+					// we should call right away
+					} else if ( memory ) {
+						firingStart = start;
+						fire( memory );
+					}
+				}
+				return this;
+			},
+			// Remove a callback from the list
+			remove: function() {
+				if ( list ) {
+					jQuery.each( arguments, function( _, arg ) {
+						var index;
+						while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+							list.splice( index, 1 );
+							// Handle firing indexes
+							if ( firing ) {
+								if ( index <= firingLength ) {
+									firingLength--;
+								}
+								if ( index <= firingIndex ) {
+									firingIndex--;
+								}
+							}
+						}
+					});
+				}
+				return this;
+			},
+			// Check if a given callback is in the list.
+			// If no argument is given, return whether or not list has callbacks attached.
+			has: function( fn ) {
+				return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+			},
+			// Remove all callbacks from the list
+			empty: function() {
+				list = [];
+				firingLength = 0;
+				return this;
+			},
+			// Have the list do nothing anymore
+			disable: function() {
+				list = stack = memory = undefined;
+				return this;
+			},
+			// Is it disabled?
+			disabled: function() {
+				return !list;
+			},
+			// Lock the list in its current state
+			lock: function() {
+				stack = undefined;
+

<TRUNCATED>

[22/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.form.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.form.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.form.js
new file mode 100644
index 0000000..82a19cd
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.form.js
@@ -0,0 +1,1278 @@
+/*!
+ * jQuery Form Plugin
+ * version: 3.48.0-2013.12.28
+ * Requires jQuery v1.5 or later
+ * Copyright (c) 2013 M. Alsup
+ * Examples and documentation at: http://malsup.com/jquery/form/
+ * Project repository: https://github.com/malsup/form
+ * Dual licensed under the MIT and GPL licenses.
+ * https://github.com/malsup/form#copyright-and-license
+ */
+/*global ActiveXObject */
+
+// AMD support
+(function (factory) {
+    "use strict";
+    if (typeof define === 'function' && define.amd) {
+        // using AMD; register as anon module
+        define(['jquery'], factory);
+    } else {
+        // no AMD; invoke directly
+        factory( (typeof(jQuery) != 'undefined') ? jQuery : window.Zepto );
+    }
+}
+
+(function($) {
+"use strict";
+
+/*
+    Usage Note:
+    -----------
+    Do not use both ajaxSubmit and ajaxForm on the same form.  These
+    functions are mutually exclusive.  Use ajaxSubmit if you want
+    to bind your own submit handler to the form.  For example,
+
+    $(document).ready(function() {
+        $('#myForm').on('submit', function(e) {
+            e.preventDefault(); // <-- important
+            $(this).ajaxSubmit({
+                target: '#output'
+            });
+        });
+    });
+
+    Use ajaxForm when you want the plugin to manage all the event binding
+    for you.  For example,
+
+    $(document).ready(function() {
+        $('#myForm').ajaxForm({
+            target: '#output'
+        });
+    });
+
+    You can also use ajaxForm with delegation (requires jQuery v1.7+), so the
+    form does not have to exist when you invoke ajaxForm:
+
+    $('#myForm').ajaxForm({
+        delegation: true,
+        target: '#output'
+    });
+
+    When using ajaxForm, the ajaxSubmit function will be invoked for you
+    at the appropriate time.
+*/
+
+/**
+ * Feature detection
+ */
+var feature = {};
+feature.fileapi = $("<input type='file'/>").get(0).files !== undefined;
+feature.formdata = window.FormData !== undefined;
+
+var hasProp = !!$.fn.prop;
+
+// attr2 uses prop when it can but checks the return type for
+// an expected string.  this accounts for the case where a form 
+// contains inputs with names like "action" or "method"; in those
+// cases "prop" returns the element
+$.fn.attr2 = function() {
+    if ( ! hasProp ) {
+        return this.attr.apply(this, arguments);
+    }
+    var val = this.prop.apply(this, arguments);
+    if ( ( val && val.jquery ) || typeof val === 'string' ) {
+        return val;
+    }
+    return this.attr.apply(this, arguments);
+};
+
+/**
+ * ajaxSubmit() provides a mechanism for immediately submitting
+ * an HTML form using AJAX.
+ */
+$.fn.ajaxSubmit = function(options) {
+    /*jshint scripturl:true */
+
+    // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
+    if (!this.length) {
+        log('ajaxSubmit: skipping submit process - no element selected');
+        return this;
+    }
+
+    var method, action, url, $form = this;
+
+    if (typeof options == 'function') {
+        options = { success: options };
+    }
+    else if ( options === undefined ) {
+        options = {};
+    }
+
+    method = options.type || this.attr2('method');
+    action = options.url  || this.attr2('action');
+
+    url = (typeof action === 'string') ? $.trim(action) : '';
+    url = url || window.location.href || '';
+    if (url) {
+        // clean url (don't include hash vaue)
+        url = (url.match(/^([^#]+)/)||[])[1];
+    }
+
+    options = $.extend(true, {
+        url:  url,
+        success: $.ajaxSettings.success,
+        type: method || $.ajaxSettings.type,
+        iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank'
+    }, options);
+
+    // hook for manipulating the form data before it is extracted;
+    // convenient for use with rich editors like tinyMCE or FCKEditor
+    var veto = {};
+    this.trigger('form-pre-serialize', [this, options, veto]);
+    if (veto.veto) {
+        log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
+        return this;
+    }
+
+    // provide opportunity to alter form data before it is serialized
+    if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
+        log('ajaxSubmit: submit aborted via beforeSerialize callback');
+        return this;
+    }
+
+    var traditional = options.traditional;
+    if ( traditional === undefined ) {
+        traditional = $.ajaxSettings.traditional;
+    }
+
+    var elements = [];
+    var qx, a = this.formToArray(options.semantic, elements);
+    if (options.data) {
+        options.extraData = options.data;
+        qx = $.param(options.data, traditional);
+    }
+
+    // give pre-submit callback an opportunity to abort the submit
+    if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
+        log('ajaxSubmit: submit aborted via beforeSubmit callback');
+        return this;
+    }
+
+    // fire vetoable 'validate' event
+    this.trigger('form-submit-validate', [a, this, options, veto]);
+    if (veto.veto) {
+        log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
+        return this;
+    }
+
+    var q = $.param(a, traditional);
+    if (qx) {
+        q = ( q ? (q + '&' + qx) : qx );
+    }
+    if (options.type.toUpperCase() == 'GET') {
+        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
+        options.data = null;  // data is null for 'get'
+    }
+    else {
+        options.data = q; // data is the query string for 'post'
+    }
+
+    var callbacks = [];
+    if (options.resetForm) {
+        callbacks.push(function() { $form.resetForm(); });
+    }
+    if (options.clearForm) {
+        callbacks.push(function() { $form.clearForm(options.includeHidden); });
+    }
+
+    // perform a load on the target only if dataType is not provided
+    if (!options.dataType && options.target) {
+        var oldSuccess = options.success || function(){};
+        callbacks.push(function(data) {
+            var fn = options.replaceTarget ? 'replaceWith' : 'html';
+            $(options.target)[fn](data).each(oldSuccess, arguments);
+        });
+    }
+    else if (options.success) {
+        callbacks.push(options.success);
+    }
+
+    options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
+        var context = options.context || this ;    // jQuery 1.4+ supports scope context
+        for (var i=0, max=callbacks.length; i < max; i++) {
+            callbacks[i].apply(context, [data, status, xhr || $form, $form]);
+        }
+    };
+
+    if (options.error) {
+        var oldError = options.error;
+        options.error = function(xhr, status, error) {
+            var context = options.context || this;
+            oldError.apply(context, [xhr, status, error, $form]);
+        };
+    }
+
+     if (options.complete) {
+        var oldComplete = options.complete;
+        options.complete = function(xhr, status) {
+            var context = options.context || this;
+            oldComplete.apply(context, [xhr, status, $form]);
+        };
+    }
+
+    // are there files to upload?
+
+    // [value] (issue #113), also see comment:
+    // https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219
+    var fileInputs = $('input[type=file]:enabled', this).filter(function() { return $(this).val() !== ''; });
+
+    var hasFileInputs = fileInputs.length > 0;
+    var mp = 'multipart/form-data';
+    var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
+
+    var fileAPI = feature.fileapi && feature.formdata;
+    log("fileAPI :" + fileAPI);
+    var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI;
+
+    var jqxhr;
+
+    // options.iframe allows user to force iframe mode
+    // 06-NOV-09: now defaulting to iframe mode if file input is detected
+    if (options.iframe !== false && (options.iframe || shouldUseFrame)) {
+        // hack to fix Safari hang (thanks to Tim Molendijk for this)
+        // see:  http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
+        if (options.closeKeepAlive) {
+            $.get(options.closeKeepAlive, function() {
+                jqxhr = fileUploadIframe(a);
+            });
+        }
+        else {
+            jqxhr = fileUploadIframe(a);
+        }
+    }
+    else if ((hasFileInputs || multipart) && fileAPI) {
+        jqxhr = fileUploadXhr(a);
+    }
+    else {
+        jqxhr = $.ajax(options);
+    }
+
+    $form.removeData('jqxhr').data('jqxhr', jqxhr);
+
+    // clear element array
+    for (var k=0; k < elements.length; k++) {
+        elements[k] = null;
+    }
+
+    // fire 'notify' event
+    this.trigger('form-submit-notify', [this, options]);
+    return this;
+
+    // utility fn for deep serialization
+    function deepSerialize(extraData){
+        var serialized = $.param(extraData, options.traditional).split('&');
+        var len = serialized.length;
+        var result = [];
+        var i, part;
+        for (i=0; i < len; i++) {
+            // #252; undo param space replacement
+            serialized[i] = serialized[i].replace(/\+/g,' ');
+            part = serialized[i].split('=');
+            // #278; use array instead of object storage, favoring array serializations
+            result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]);
+        }
+        return result;
+    }
+
+     // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz)
+    function fileUploadXhr(a) {
+        var formdata = new FormData();
+
+        for (var i=0; i < a.length; i++) {
+            formdata.append(a[i].name, a[i].value);
+        }
+
+        if (options.extraData) {
+            var serializedData = deepSerialize(options.extraData);
+            for (i=0; i < serializedData.length; i++) {
+                if (serializedData[i]) {
+                    formdata.append(serializedData[i][0], serializedData[i][1]);
+                }
+            }
+        }
+
+        options.data = null;
+
+        var s = $.extend(true, {}, $.ajaxSettings, options, {
+            contentType: false,
+            processData: false,
+            cache: false,
+            type: method || 'POST'
+        });
+
+        if (options.uploadProgress) {
+            // workaround because jqXHR does not expose upload property
+            s.xhr = function() {
+                var xhr = $.ajaxSettings.xhr();
+                if (xhr.upload) {
+                    xhr.upload.addEventListener('progress', function(event) {
+                        var percent = 0;
+                        var position = event.loaded || event.position; /*event.position is deprecated*/
+                        var total = event.total;
+                        if (event.lengthComputable) {
+                            percent = Math.ceil(position / total * 100);
+                        }
+                        options.uploadProgress(event, position, total, percent);
+                    }, false);
+                }
+                return xhr;
+            };
+        }
+
+        s.data = null;
+        var beforeSend = s.beforeSend;
+        s.beforeSend = function(xhr, o) {
+            //Send FormData() provided by user
+            if (options.formData) {
+                o.data = options.formData;
+            }
+            else {
+                o.data = formdata;
+            }
+            if(beforeSend) {
+                beforeSend.call(this, xhr, o);
+            }
+        };
+        return $.ajax(s);
+    }
+
+    // private function for handling file uploads (hat tip to YAHOO!)
+    function fileUploadIframe(a) {
+        var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
+        var deferred = $.Deferred();
+
+        // #341
+        deferred.abort = function(status) {
+            xhr.abort(status);
+        };
+
+        if (a) {
+            // ensure that every serialized input is still enabled
+            for (i=0; i < elements.length; i++) {
+                el = $(elements[i]);
+                if ( hasProp ) {
+                    el.prop('disabled', false);
+                }
+                else {
+                    el.removeAttr('disabled');
+                }
+            }
+        }
+
+        s = $.extend(true, {}, $.ajaxSettings, options);
+        s.context = s.context || s;
+        id = 'jqFormIO' + (new Date().getTime());
+        if (s.iframeTarget) {
+            $io = $(s.iframeTarget);
+            n = $io.attr2('name');
+            if (!n) {
+                $io.attr2('name', id);
+            }
+            else {
+                id = n;
+            }
+        }
+        else {
+            $io = $('<iframe name="' + id + '" src="'+ s.iframeSrc +'" />');
+            $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
+        }
+        io = $io[0];
+
+
+        xhr = { // mock object
+            aborted: 0,
+            responseText: null,
+            responseXML: null,
+            status: 0,
+            statusText: 'n/a',
+            getAllResponseHeaders: function() {},
+            getResponseHeader: function() {},
+            setRequestHeader: function() {},
+            abort: function(status) {
+                var e = (status === 'timeout' ? 'timeout' : 'aborted');
+                log('aborting upload... ' + e);
+                this.aborted = 1;
+
+                try { // #214, #257
+                    if (io.contentWindow.document.execCommand) {
+                        io.contentWindow.document.execCommand('Stop');
+                    }
+                }
+                catch(ignore) {}
+
+                $io.attr('src', s.iframeSrc); // abort op in progress
+                xhr.error = e;
+                if (s.error) {
+                    s.error.call(s.context, xhr, e, status);
+                }
+                if (g) {
+                    $.event.trigger("ajaxError", [xhr, s, e]);
+                }
+                if (s.complete) {
+                    s.complete.call(s.context, xhr, e);
+                }
+            }
+        };
+
+        g = s.global;
+        // trigger ajax global events so that activity/block indicators work like normal
+        if (g && 0 === $.active++) {
+            $.event.trigger("ajaxStart");
+        }
+        if (g) {
+            $.event.trigger("ajaxSend", [xhr, s]);
+        }
+
+        if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
+            if (s.global) {
+                $.active--;
+            }
+            deferred.reject();
+            return deferred;
+        }
+        if (xhr.aborted) {
+            deferred.reject();
+            return deferred;
+        }
+
+        // add submitting element to data if we know it
+        sub = form.clk;
+        if (sub) {
+            n = sub.name;
+            if (n && !sub.disabled) {
+                s.extraData = s.extraData || {};
+                s.extraData[n] = sub.value;
+                if (sub.type == "image") {
+                    s.extraData[n+'.x'] = form.clk_x;
+                    s.extraData[n+'.y'] = form.clk_y;
+                }
+            }
+        }
+
+        var CLIENT_TIMEOUT_ABORT = 1;
+        var SERVER_ABORT = 2;
+                
+        function getDoc(frame) {
+            /* it looks like contentWindow or contentDocument do not
+             * carry the protocol property in ie8, when running under ssl
+             * frame.document is the only valid response document, since
+             * the protocol is know but not on the other two objects. strange?
+             * "Same origin policy" http://en.wikipedia.org/wiki/Same_origin_policy
+             */
+            
+            var doc = null;
+            
+            // IE8 cascading access check
+            try {
+                if (frame.contentWindow) {
+                    doc = frame.contentWindow.document;
+                }
+            } catch(err) {
+                // IE8 access denied under ssl & missing protocol
+                log('cannot get iframe.contentWindow document: ' + err);
+            }
+
+            if (doc) { // successful getting content
+                return doc;
+            }
+
+            try { // simply checking may throw in ie8 under ssl or mismatched protocol
+                doc = frame.contentDocument ? frame.contentDocument : frame.document;
+            } catch(err) {
+                // last attempt
+                log('cannot get iframe.contentDocument: ' + err);
+                doc = frame.document;
+            }
+            return doc;
+        }
+
+        // Rails CSRF hack (thanks to Yvan Barthelemy)
+        var csrf_token = $('meta[name=csrf-token]').attr('content');
+        var csrf_param = $('meta[name=csrf-param]').attr('content');
+        if (csrf_param && csrf_token) {
+            s.extraData = s.extraData || {};
+            s.extraData[csrf_param] = csrf_token;
+        }
+
+        // take a breath so that pending repaints get some cpu time before the upload starts
+        function doSubmit() {
+            // make sure form attrs are set
+            var t = $form.attr2('target'), 
+                a = $form.attr2('action'), 
+                mp = 'multipart/form-data',
+                et = $form.attr('enctype') || $form.attr('encoding') || mp;
+
+            // update form attrs in IE friendly way
+            form.setAttribute('target',id);
+            if (!method || /post/i.test(method) ) {
+                form.setAttribute('method', 'POST');
+            }
+            if (a != s.url) {
+                form.setAttribute('action', s.url);
+            }
+
+            // ie borks in some cases when setting encoding
+            if (! s.skipEncodingOverride && (!method || /post/i.test(method))) {
+                $form.attr({
+                    encoding: 'multipart/form-data',
+                    enctype:  'multipart/form-data'
+                });
+            }
+
+            // support timout
+            if (s.timeout) {
+                timeoutHandle = setTimeout(function() { timedOut = true; cb(CLIENT_TIMEOUT_ABORT); }, s.timeout);
+            }
+
+            // look for server aborts
+            function checkState() {
+                try {
+                    var state = getDoc(io).readyState;
+                    log('state = ' + state);
+                    if (state && state.toLowerCase() == 'uninitialized') {
+                        setTimeout(checkState,50);
+                    }
+                }
+                catch(e) {
+                    log('Server abort: ' , e, ' (', e.name, ')');
+                    cb(SERVER_ABORT);
+                    if (timeoutHandle) {
+                        clearTimeout(timeoutHandle);
+                    }
+                    timeoutHandle = undefined;
+                }
+            }
+
+            // add "extra" data to form if provided in options
+            var extraInputs = [];
+            try {
+                if (s.extraData) {
+                    for (var n in s.extraData) {
+                        if (s.extraData.hasOwnProperty(n)) {
+                           // if using the $.param format that allows for multiple values with the same name
+                           if($.isPlainObject(s.extraData[n]) && s.extraData[n].hasOwnProperty('name') && s.extraData[n].hasOwnProperty('value')) {
+                               extraInputs.push(
+                               $('<input type="hidden" name="'+s.extraData[n].name+'">').val(s.extraData[n].value)
+                                   .appendTo(form)[0]);
+                           } else {
+                               extraInputs.push(
+                               $('<input type="hidden" name="'+n+'">').val(s.extraData[n])
+                                   .appendTo(form)[0]);
+                           }
+                        }
+                    }
+                }
+
+                if (!s.iframeTarget) {
+                    // add iframe to doc and submit the form
+                    $io.appendTo('body');
+                }
+                if (io.attachEvent) {
+                    io.attachEvent('onload', cb);
+                }
+                else {
+                    io.addEventListener('load', cb, false);
+                }
+                setTimeout(checkState,15);
+
+                try {
+                    form.submit();
+                } catch(err) {
+                    // just in case form has element with name/id of 'submit'
+                    var submitFn = document.createElement('form').submit;
+                    submitFn.apply(form);
+                }
+            }
+            finally {
+                // reset attrs and remove "extra" input elements
+                form.setAttribute('action',a);
+                form.setAttribute('enctype', et); // #380
+                if(t) {
+                    form.setAttribute('target', t);
+                } else {
+                    $form.removeAttr('target');
+                }
+                $(extraInputs).remove();
+            }
+        }
+
+        if (s.forceSync) {
+            doSubmit();
+        }
+        else {
+            setTimeout(doSubmit, 10); // this lets dom updates render
+        }
+
+        var data, doc, domCheckCount = 50, callbackProcessed;
+
+        function cb(e) {
+            if (xhr.aborted || callbackProcessed) {
+                return;
+            }
+            
+            doc = getDoc(io);
+            if(!doc) {
+                log('cannot access response document');
+                e = SERVER_ABORT;
+            }
+            if (e === CLIENT_TIMEOUT_ABORT && xhr) {
+                xhr.abort('timeout');
+                deferred.reject(xhr, 'timeout');
+                return;
+            }
+            else if (e == SERVER_ABORT && xhr) {
+                xhr.abort('server abort');
+                deferred.reject(xhr, 'error', 'server abort');
+                return;
+            }
+
+            if (!doc || doc.location.href == s.iframeSrc) {
+                // response not received yet
+                if (!timedOut) {
+                    return;
+                }
+            }
+            if (io.detachEvent) {
+                io.detachEvent('onload', cb);
+            }
+            else {
+                io.removeEventListener('load', cb, false);
+            }
+
+            var status = 'success', errMsg;
+            try {
+                if (timedOut) {
+                    throw 'timeout';
+                }
+
+                var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
+                log('isXml='+isXml);
+                if (!isXml && window.opera && (doc.body === null || !doc.body.innerHTML)) {
+                    if (--domCheckCount) {
+                        // in some browsers (Opera) the iframe DOM is not always traversable when
+                        // the onload callback fires, so we loop a bit to accommodate
+                        log('requeing onLoad callback, DOM not available');
+                        setTimeout(cb, 250);
+                        return;
+                    }
+                    // let this fall through because server response could be an empty document
+                    //log('Could not access iframe DOM after mutiple tries.');
+                    //throw 'DOMException: not available';
+                }
+
+                //log('response detected');
+                var docRoot = doc.body ? doc.body : doc.documentElement;
+                xhr.responseText = docRoot ? docRoot.innerHTML : null;
+                xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
+                if (isXml) {
+                    s.dataType = 'xml';
+                }
+                xhr.getResponseHeader = function(header){
+                    var headers = {'content-type': s.dataType};
+                    return headers[header.toLowerCase()];
+                };
+                // support for XHR 'status' & 'statusText' emulation :
+                if (docRoot) {
+                    xhr.status = Number( docRoot.getAttribute('status') ) || xhr.status;
+                    xhr.statusText = docRoot.getAttribute('statusText') || xhr.statusText;
+                }
+
+                var dt = (s.dataType || '').toLowerCase();
+                var scr = /(json|script|text)/.test(dt);
+                if (scr || s.textarea) {
+                    // see if user embedded response in textarea
+                    var ta = doc.getElementsByTagName('textarea')[0];
+                    if (ta) {
+                        xhr.responseText = ta.value;
+                        // support for XHR 'status' & 'statusText' emulation :
+                        xhr.status = Number( ta.getAttribute('status') ) || xhr.status;
+                        xhr.statusText = ta.getAttribute('statusText') || xhr.statusText;
+                    }
+                    else if (scr) {
+                        // account for browsers injecting pre around json response
+                        var pre = doc.getElementsByTagName('pre')[0];
+                        var b = doc.getElementsByTagName('body')[0];
+                        if (pre) {
+                            xhr.responseText = pre.textContent ? pre.textContent : pre.innerText;
+                        }
+                        else if (b) {
+                            xhr.responseText = b.textContent ? b.textContent : b.innerText;
+                        }
+                    }
+                }
+                else if (dt == 'xml' && !xhr.responseXML && xhr.responseText) {
+                    xhr.responseXML = toXml(xhr.responseText);
+                }
+
+                try {
+                    data = httpData(xhr, dt, s);
+                }
+                catch (err) {
+                    status = 'parsererror';
+                    xhr.error = errMsg = (err || status);
+                }
+            }
+            catch (err) {
+                log('error caught: ',err);
+                status = 'error';
+                xhr.error = errMsg = (err || status);
+            }
+
+            if (xhr.aborted) {
+                log('upload aborted');
+                status = null;
+            }
+
+            if (xhr.status) { // we've set xhr.status
+                status = (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) ? 'success' : 'error';
+            }
+
+            // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
+            if (status === 'success') {
+                if (s.success) {
+                    s.success.call(s.context, data, 'success', xhr);
+                }
+                deferred.resolve(xhr.responseText, 'success', xhr);
+                if (g) {
+                    $.event.trigger("ajaxSuccess", [xhr, s]);
+                }
+            }
+            else if (status) {
+                if (errMsg === undefined) {
+                    errMsg = xhr.statusText;
+                }
+                if (s.error) {
+                    s.error.call(s.context, xhr, status, errMsg);
+                }
+                deferred.reject(xhr, 'error', errMsg);
+                if (g) {
+                    $.event.trigger("ajaxError", [xhr, s, errMsg]);
+                }
+            }
+
+            if (g) {
+                $.event.trigger("ajaxComplete", [xhr, s]);
+            }
+
+            if (g && ! --$.active) {
+                $.event.trigger("ajaxStop");
+            }
+
+            if (s.complete) {
+                s.complete.call(s.context, xhr, status);
+            }
+
+            callbackProcessed = true;
+            if (s.timeout) {
+                clearTimeout(timeoutHandle);
+            }
+
+            // clean up
+            setTimeout(function() {
+                if (!s.iframeTarget) {
+                    $io.remove();
+                }
+                else { //adding else to clean up existing iframe response.
+                    $io.attr('src', s.iframeSrc);
+                }
+                xhr.responseXML = null;
+            }, 100);
+        }
+
+        var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+)
+            if (window.ActiveXObject) {
+                doc = new ActiveXObject('Microsoft.XMLDOM');
+                doc.async = 'false';
+                doc.loadXML(s);
+            }
+            else {
+                doc = (new DOMParser()).parseFromString(s, 'text/xml');
+            }
+            return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null;
+        };
+        var parseJSON = $.parseJSON || function(s) {
+            /*jslint evil:true */
+            return window['eval']('(' + s + ')');
+        };
+
+        var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4
+
+            var ct = xhr.getResponseHeader('content-type') || '',
+                xml = type === 'xml' || !type && ct.indexOf('xml') >= 0,
+                data = xml ? xhr.responseXML : xhr.responseText;
+
+            if (xml && data.documentElement.nodeName === 'parsererror') {
+                if ($.error) {
+                    $.error('parsererror');
+                }
+            }
+            if (s && s.dataFilter) {
+                data = s.dataFilter(data, type);
+            }
+            if (typeof data === 'string') {
+                if (type === 'json' || !type && ct.indexOf('json') >= 0) {
+                    data = parseJSON(data);
+                } else if (type === "script" || !type && ct.indexOf("javascript") >= 0) {
+                    $.globalEval(data);
+                }
+            }
+            return data;
+        };
+
+        return deferred;
+    }
+};
+
+/**
+ * ajaxForm() provides a mechanism for fully automating form submission.
+ *
+ * The advantages of using this method instead of ajaxSubmit() are:
+ *
+ * 1: This method will include coordinates for <input type="image" /> elements (if the element
+ *    is used to submit the form).
+ * 2. This method will include the submit element's name/value data (for the element that was
+ *    used to submit the form).
+ * 3. This method binds the submit() method to the form for you.
+ *
+ * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
+ * passes the options argument along after properly binding events for submit elements and
+ * the form itself.
+ */
+$.fn.ajaxForm = function(options) {
+    options = options || {};
+    options.delegation = options.delegation && $.isFunction($.fn.on);
+
+    // in jQuery 1.3+ we can fix mistakes with the ready state
+    if (!options.delegation && this.length === 0) {
+        var o = { s: this.selector, c: this.context };
+        if (!$.isReady && o.s) {
+            log('DOM not ready, queuing ajaxForm');
+            $(function() {
+                $(o.s,o.c).ajaxForm(options);
+            });
+            return this;
+        }
+        // is your DOM ready?  http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
+        log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
+        return this;
+    }
+
+    if ( options.delegation ) {
+        $(document)
+            .off('submit.form-plugin', this.selector, doAjaxSubmit)
+            .off('click.form-plugin', this.selector, captureSubmittingElement)
+            .on('submit.form-plugin', this.selector, options, doAjaxSubmit)
+            .on('click.form-plugin', this.selector, options, captureSubmittingElement);
+        return this;
+    }
+
+    return this.ajaxFormUnbind()
+        .bind('submit.form-plugin', options, doAjaxSubmit)
+        .bind('click.form-plugin', options, captureSubmittingElement);
+};
+
+// private event handlers
+function doAjaxSubmit(e) {
+    /*jshint validthis:true */
+    var options = e.data;
+    if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
+        e.preventDefault();
+        $(e.target).ajaxSubmit(options); // #365
+    }
+}
+
+function captureSubmittingElement(e) {
+    /*jshint validthis:true */
+    var target = e.target;
+    var $el = $(target);
+    if (!($el.is("[type=submit],[type=image]"))) {
+        // is this a child element of the submit el?  (ex: a span within a button)
+        var t = $el.closest('[type=submit]');
+        if (t.length === 0) {
+            return;
+        }
+        target = t[0];
+    }
+    var form = this;
+    form.clk = target;
+    if (target.type == 'image') {
+        if (e.offsetX !== undefined) {
+            form.clk_x = e.offsetX;
+            form.clk_y = e.offsetY;
+        } else if (typeof $.fn.offset == 'function') {
+            var offset = $el.offset();
+            form.clk_x = e.pageX - offset.left;
+            form.clk_y = e.pageY - offset.top;
+        } else {
+            form.clk_x = e.pageX - target.offsetLeft;
+            form.clk_y = e.pageY - target.offsetTop;
+        }
+    }
+    // clear form vars
+    setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100);
+}
+
+
+// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
+$.fn.ajaxFormUnbind = function() {
+    return this.unbind('submit.form-plugin click.form-plugin');
+};
+
+/**
+ * formToArray() gathers form element data into an array of objects that can
+ * be passed to any of the following ajax functions: $.get, $.post, or load.
+ * Each object in the array has both a 'name' and 'value' property.  An example of
+ * an array for a simple login form might be:
+ *
+ * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
+ *
+ * It is this array that is passed to pre-submit callback functions provided to the
+ * ajaxSubmit() and ajaxForm() methods.
+ */
+$.fn.formToArray = function(semantic, elements) {
+    var a = [];
+    if (this.length === 0) {
+        return a;
+    }
+
+    var form = this[0];
+    var formId = this.attr('id');
+    var els = semantic ? form.getElementsByTagName('*') : form.elements;
+    var els2;
+
+    if ( els ) {
+        els = $(els).get();  // convert to standard array
+    }
+
+    // #386; account for inputs outside the form which use the 'form' attribute
+    if ( formId ) {
+        els2 = $(':input[form=' + formId + ']').get();
+        if ( els2.length ) {
+            els = (els || []).concat(els2);
+        }
+    }
+
+    if (!els || !els.length) {
+        return a;
+    }
+
+    var i,j,n,v,el,max,jmax;
+    for(i=0, max=els.length; i < max; i++) {
+        el = els[i];
+        n = el.name;
+        if (!n || el.disabled) {
+            continue;
+        }
+
+        if (semantic && form.clk && el.type == "image") {
+            // handle image inputs on the fly when semantic == true
+            if(form.clk == el) {
+                a.push({name: n, value: $(el).val(), type: el.type });
+                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
+            }
+            continue;
+        }
+
+        v = $.fieldValue(el, true);
+        if (v && v.constructor == Array) {
+            if (elements) {
+                elements.push(el);
+            }
+            for(j=0, jmax=v.length; j < jmax; j++) {
+                a.push({name: n, value: v[j]});
+            }
+        }
+        else if (feature.fileapi && el.type == 'file') {
+            if (elements) {
+                elements.push(el);
+            }
+            var files = el.files;
+            if (files.length) {
+                for (j=0; j < files.length; j++) {
+                    a.push({name: n, value: files[j], type: el.type});
+                }
+            }
+            else {
+                // #180
+                a.push({ name: n, value: '', type: el.type });
+            }
+        }
+        else if (v !== null && typeof v != 'undefined') {
+            if (elements) {
+                elements.push(el);
+            }
+            a.push({name: n, value: v, type: el.type, required: el.required});
+        }
+    }
+
+    if (!semantic && form.clk) {
+        // input type=='image' are not found in elements array! handle it here
+        var $input = $(form.clk), input = $input[0];
+        n = input.name;
+        if (n && !input.disabled && input.type == 'image') {
+            a.push({name: n, value: $input.val()});
+            a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
+        }
+    }
+    return a;
+};
+
+/**
+ * Serializes form data into a 'submittable' string. This method will return a string
+ * in the format: name1=value1&amp;name2=value2
+ */
+$.fn.formSerialize = function(semantic) {
+    //hand off to jQuery.param for proper encoding
+    return $.param(this.formToArray(semantic));
+};
+
+/**
+ * Serializes all field elements in the jQuery object into a query string.
+ * This method will return a string in the format: name1=value1&amp;name2=value2
+ */
+$.fn.fieldSerialize = function(successful) {
+    var a = [];
+    this.each(function() {
+        var n = this.name;
+        if (!n) {
+            return;
+        }
+        var v = $.fieldValue(this, successful);
+        if (v && v.constructor == Array) {
+            for (var i=0,max=v.length; i < max; i++) {
+                a.push({name: n, value: v[i]});
+            }
+        }
+        else if (v !== null && typeof v != 'undefined') {
+            a.push({name: this.name, value: v});
+        }
+    });
+    //hand off to jQuery.param for proper encoding
+    return $.param(a);
+};
+
+/**
+ * Returns the value(s) of the element in the matched set.  For example, consider the following form:
+ *
+ *  <form><fieldset>
+ *      <input name="A" type="text" />
+ *      <input name="A" type="text" />
+ *      <input name="B" type="checkbox" value="B1" />
+ *      <input name="B" type="checkbox" value="B2"/>
+ *      <input name="C" type="radio" value="C1" />
+ *      <input name="C" type="radio" value="C2" />
+ *  </fieldset></form>
+ *
+ *  var v = $('input[type=text]').fieldValue();
+ *  // if no values are entered into the text inputs
+ *  v == ['','']
+ *  // if values entered into the text inputs are 'foo' and 'bar'
+ *  v == ['foo','bar']
+ *
+ *  var v = $('input[type=checkbox]').fieldValue();
+ *  // if neither checkbox is checked
+ *  v === undefined
+ *  // if both checkboxes are checked
+ *  v == ['B1', 'B2']
+ *
+ *  var v = $('input[type=radio]').fieldValue();
+ *  // if neither radio is checked
+ *  v === undefined
+ *  // if first radio is checked
+ *  v == ['C1']
+ *
+ * The successful argument controls whether or not the field element must be 'successful'
+ * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
+ * The default value of the successful argument is true.  If this value is false the value(s)
+ * for each element is returned.
+ *
+ * Note: This method *always* returns an array.  If no valid value can be determined the
+ *    array will be empty, otherwise it will contain one or more values.
+ */
+$.fn.fieldValue = function(successful) {
+    for (var val=[], i=0, max=this.length; i < max; i++) {
+        var el = this[i];
+        var v = $.fieldValue(el, successful);
+        if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {
+            continue;
+        }
+        if (v.constructor == Array) {
+            $.merge(val, v);
+        }
+        else {
+            val.push(v);
+        }
+    }
+    return val;
+};
+
+/**
+ * Returns the value of the field element.
+ */
+$.fieldValue = function(el, successful) {
+    var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
+    if (successful === undefined) {
+        successful = true;
+    }
+
+    if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
+        (t == 'checkbox' || t == 'radio') && !el.checked ||
+        (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
+        tag == 'select' && el.selectedIndex == -1)) {
+            return null;
+    }
+
+    if (tag == 'select') {
+        var index = el.selectedIndex;
+        if (index < 0) {
+            return null;
+        }
+        var a = [], ops = el.options;
+        var one = (t == 'select-one');
+        var max = (one ? index+1 : ops.length);
+        for(var i=(one ? index : 0); i < max; i++) {
+            var op = ops[i];
+            if (op.selected) {
+                var v = op.value;
+                if (!v) { // extra pain for IE...
+                    v = (op.attributes && op.attributes.value && !(op.attributes.value.specified)) ? op.text : op.value;
+                }
+                if (one) {
+                    return v;
+                }
+                a.push(v);
+            }
+        }
+        return a;
+    }
+    return $(el).val();
+};
+
+/**
+ * Clears the form data.  Takes the following actions on the form's input fields:
+ *  - input text fields will have their 'value' property set to the empty string
+ *  - select elements will have their 'selectedIndex' property set to -1
+ *  - checkbox and radio inputs will have their 'checked' property set to false
+ *  - inputs of type submit, button, reset, and hidden will *not* be effected
+ *  - button elements will *not* be effected
+ */
+$.fn.clearForm = function(includeHidden) {
+    return this.each(function() {
+        $('input,select,textarea', this).clearFields(includeHidden);
+    });
+};
+
+/**
+ * Clears the selected form elements.
+ */
+$.fn.clearFields = $.fn.clearInputs = function(includeHidden) {
+    var re = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; // 'hidden' is not in this list
+    return this.each(function() {
+        var t = this.type, tag = this.tagName.toLowerCase();
+        if (re.test(t) || tag == 'textarea') {
+            this.value = '';
+        }
+        else if (t == 'checkbox' || t == 'radio') {
+            this.checked = false;
+        }
+        else if (tag == 'select') {
+            this.selectedIndex = -1;
+        }
+		else if (t == "file") {
+			if (/MSIE/.test(navigator.userAgent)) {
+				$(this).replaceWith($(this).clone(true));
+			} else {
+				$(this).val('');
+			}
+		}
+        else if (includeHidden) {
+            // includeHidden can be the value true, or it can be a selector string
+            // indicating a special test; for example:
+            //  $('#myForm').clearForm('.special:hidden')
+            // the above would clean hidden inputs that have the class of 'special'
+            if ( (includeHidden === true && /hidden/.test(t)) ||
+                 (typeof includeHidden == 'string' && $(this).is(includeHidden)) ) {
+                this.value = '';
+            }
+        }
+    });
+};
+
+/**
+ * Resets the form data.  Causes all form elements to be reset to their original value.
+ */
+$.fn.resetForm = function() {
+    return this.each(function() {
+        // guard against an input with the name of 'reset'
+        // note that IE reports the reset function as an 'object'
+        if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) {
+            this.reset();
+        }
+    });
+};
+
+/**
+ * Enables or disables any matching elements.
+ */
+$.fn.enable = function(b) {
+    if (b === undefined) {
+        b = true;
+    }
+    return this.each(function() {
+        this.disabled = !b;
+    });
+};
+
+/**
+ * Checks/unchecks any matching checkboxes or radio buttons and
+ * selects/deselects and matching option elements.
+ */
+$.fn.selected = function(select) {
+    if (select === undefined) {
+        select = true;
+    }
+    return this.each(function() {
+        var t = this.type;
+        if (t == 'checkbox' || t == 'radio') {
+            this.checked = select;
+        }
+        else if (this.tagName.toLowerCase() == 'option') {
+            var $sel = $(this).parent('select');
+            if (select && $sel[0] && $sel[0].type == 'select-one') {
+                // deselect all other options
+                $sel.find('option').selected(false);
+            }
+            this.selected = select;
+        }
+    });
+};
+
+// expose debug var
+$.fn.ajaxSubmit.debug = false;
+
+// helper fn for console logging
+function log() {
+    if (!$.fn.ajaxSubmit.debug) {
+        return;
+    }
+    var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,'');
+    if (window.console && window.console.log) {
+        window.console.log(msg);
+    }
+    else if (window.opera && window.opera.postError) {
+        window.opera.postError(msg);
+    }
+}
+
+}));
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.iframe-transport.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.iframe-transport.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.iframe-transport.js
new file mode 100644
index 0000000..8d64b59
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.iframe-transport.js
@@ -0,0 +1,214 @@
+/*
+ * jQuery Iframe Transport Plugin 1.8.2
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2011, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ */
+
+/* global define, window, document */
+
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        // Register as an anonymous AMD module:
+        define(['jquery'], factory);
+    } else {
+        // Browser globals:
+        factory(window.jQuery);
+    }
+}(function ($) {
+    'use strict';
+
+    // Helper variable to create unique names for the transport iframes:
+    var counter = 0;
+
+    // The iframe transport accepts four additional options:
+    // options.fileInput: a jQuery collection of file input fields
+    // options.paramName: the parameter name for the file form data,
+    //  overrides the name property of the file input field(s),
+    //  can be a string or an array of strings.
+    // options.formData: an array of objects with name and value properties,
+    //  equivalent to the return data of .serializeArray(), e.g.:
+    //  [{name: 'a', value: 1}, {name: 'b', value: 2}]
+    // options.initialIframeSrc: the URL of the initial iframe src,
+    //  by default set to "javascript:false;"
+    $.ajaxTransport('iframe', function (options) {
+        if (options.async) {
+            // javascript:false as initial iframe src
+            // prevents warning popups on HTTPS in IE6:
+            /*jshint scripturl: true */
+            var initialIframeSrc = options.initialIframeSrc || 'javascript:false;',
+            /*jshint scripturl: false */
+                form,
+                iframe,
+                addParamChar;
+            return {
+                send: function (_, completeCallback) {
+                    form = $('<form style="display:none;"></form>');
+                    form.attr('accept-charset', options.formAcceptCharset);
+                    addParamChar = /\?/.test(options.url) ? '&' : '?';
+                    // XDomainRequest only supports GET and POST:
+                    if (options.type === 'DELETE') {
+                        options.url = options.url + addParamChar + '_method=DELETE';
+                        options.type = 'POST';
+                    } else if (options.type === 'PUT') {
+                        options.url = options.url + addParamChar + '_method=PUT';
+                        options.type = 'POST';
+                    } else if (options.type === 'PATCH') {
+                        options.url = options.url + addParamChar + '_method=PATCH';
+                        options.type = 'POST';
+                    }
+                    // IE versions below IE8 cannot set the name property of
+                    // elements that have already been added to the DOM,
+                    // so we set the name along with the iframe HTML markup:
+                    counter += 1;
+                    iframe = $(
+                        '<iframe src="' + initialIframeSrc +
+                            '" name="iframe-transport-' + counter + '"></iframe>'
+                    ).bind('load', function () {
+                        var fileInputClones,
+                            paramNames = $.isArray(options.paramName) ?
+                                    options.paramName : [options.paramName];
+                        iframe
+                            .unbind('load')
+                            .bind('load', function () {
+                                var response;
+                                // Wrap in a try/catch block to catch exceptions thrown
+                                // when trying to access cross-domain iframe contents:
+                                try {
+                                    response = iframe.contents();
+                                    // Google Chrome and Firefox do not throw an
+                                    // exception when calling iframe.contents() on
+                                    // cross-domain requests, so we unify the response:
+                                    if (!response.length || !response[0].firstChild) {
+                                        throw new Error();
+                                    }
+                                } catch (e) {
+                                    response = undefined;
+                                }
+                                // The complete callback returns the
+                                // iframe content document as response object:
+                                completeCallback(
+                                    200,
+                                    'success',
+                                    {'iframe': response}
+                                );
+                                // Fix for IE endless progress bar activity bug
+                                // (happens on form submits to iframe targets):
+                                $('<iframe src="' + initialIframeSrc + '"></iframe>')
+                                    .appendTo(form);
+                                window.setTimeout(function () {
+                                    // Removing the form in a setTimeout call
+                                    // allows Chrome's developer tools to display
+                                    // the response result
+                                    form.remove();
+                                }, 0);
+                            });
+                        form
+                            .prop('target', iframe.prop('name'))
+                            .prop('action', options.url)
+                            .prop('method', options.type);
+                        if (options.formData) {
+                            $.each(options.formData, function (index, field) {
+                                $('<input type="hidden"/>')
+                                    .prop('name', field.name)
+                                    .val(field.value)
+                                    .appendTo(form);
+                            });
+                        }
+                        if (options.fileInput && options.fileInput.length &&
+                                options.type === 'POST') {
+                            fileInputClones = options.fileInput.clone();
+                            // Insert a clone for each file input field:
+                            options.fileInput.after(function (index) {
+                                return fileInputClones[index];
+                            });
+                            if (options.paramName) {
+                                options.fileInput.each(function (index) {
+                                    $(this).prop(
+                                        'name',
+                                        paramNames[index] || options.paramName
+                                    );
+                                });
+                            }
+                            // Appending the file input fields to the hidden form
+                            // removes them from their original location:
+                            form
+                                .append(options.fileInput)
+                                .prop('enctype', 'multipart/form-data')
+                                // enctype must be set as encoding for IE:
+                                .prop('encoding', 'multipart/form-data');
+                            // Remove the HTML5 form attribute from the input(s):
+                            options.fileInput.removeAttr('form');
+                        }
+                        form.submit();
+                        // Insert the file input fields at their original location
+                        // by replacing the clones with the originals:
+                        if (fileInputClones && fileInputClones.length) {
+                            options.fileInput.each(function (index, input) {
+                                var clone = $(fileInputClones[index]);
+                                // Restore the original name and form properties:
+                                $(input)
+                                    .prop('name', clone.prop('name'))
+                                    .attr('form', clone.attr('form'));
+                                clone.replaceWith(input);
+                            });
+                        }
+                    });
+                    form.append(iframe).appendTo(document.body);
+                },
+                abort: function () {
+                    if (iframe) {
+                        // javascript:false as iframe src aborts the request
+                        // and prevents warning popups on HTTPS in IE6.
+                        // concat is used to avoid the "Script URL" JSLint error:
+                        iframe
+                            .unbind('load')
+                            .prop('src', initialIframeSrc);
+                    }
+                    if (form) {
+                        form.remove();
+                    }
+                }
+            };
+        }
+    });
+
+    // The iframe transport returns the iframe content document as response.
+    // The following adds converters from iframe to text, json, html, xml
+    // and script.
+    // Please note that the Content-Type for JSON responses has to be text/plain
+    // or text/html, if the browser doesn't include application/json in the
+    // Accept header, else IE will show a download dialog.
+    // The Content-Type for XML responses on the other hand has to be always
+    // application/xml or text/xml, so IE properly parses the XML response.
+    // See also
+    // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation
+    $.ajaxSetup({
+        converters: {
+            'iframe text': function (iframe) {
+                return iframe && $(iframe[0].body).text();
+            },
+            'iframe json': function (iframe) {
+                return iframe && $.parseJSON($(iframe[0].body).text());
+            },
+            'iframe html': function (iframe) {
+                return iframe && $(iframe[0].body).html();
+            },
+            'iframe xml': function (iframe) {
+                var xmlDoc = iframe && iframe[0];
+                return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc :
+                        $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) ||
+                            $(xmlDoc.body).html());
+            },
+            'iframe script': function (iframe) {
+                return iframe && $.globalEval($(iframe[0].body).text());
+            }
+        }
+    });
+
+}));

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.ui.widget.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.ui.widget.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.ui.widget.js
new file mode 100644
index 0000000..c430419
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.ui.widget.js
@@ -0,0 +1,530 @@
+/*!
+ * jQuery UI Widget 1.10.4+amd
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2014 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/jQuery.widget/
+ */
+
+(function (factory) {
+    if (typeof define === "function" && define.amd) {
+        // Register as an anonymous AMD module:
+        define(["jquery"], factory);
+    } else {
+        // Browser globals:
+        factory(jQuery);
+    }
+}(function( $, undefined ) {
+
+var uuid = 0,
+	slice = Array.prototype.slice,
+	_cleanData = $.cleanData;
+$.cleanData = function( elems ) {
+	for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+		try {
+			$( elem ).triggerHandler( "remove" );
+		// http://bugs.jquery.com/ticket/8235
+		} catch( e ) {}
+	}
+	_cleanData( elems );
+};
+
+$.widget = function( name, base, prototype ) {
+	var fullName, existingConstructor, constructor, basePrototype,
+		// proxiedPrototype allows the provided prototype to remain unmodified
+		// so that it can be used as a mixin for multiple widgets (#8876)
+		proxiedPrototype = {},
+		namespace = name.split( "." )[ 0 ];
+
+	name = name.split( "." )[ 1 ];
+	fullName = namespace + "-" + name;
+
+	if ( !prototype ) {
+		prototype = base;
+		base = $.Widget;
+	}
+
+	// create selector for plugin
+	$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
+		return !!$.data( elem, fullName );
+	};
+
+	$[ namespace ] = $[ namespace ] || {};
+	existingConstructor = $[ namespace ][ name ];
+	constructor = $[ namespace ][ name ] = function( options, element ) {
+		// allow instantiation without "new" keyword
+		if ( !this._createWidget ) {
+			return new constructor( options, element );
+		}
+
+		// allow instantiation without initializing for simple inheritance
+		// must use "new" keyword (the code above always passes args)
+		if ( arguments.length ) {
+			this._createWidget( options, element );
+		}
+	};
+	// extend with the existing constructor to carry over any static properties
+	$.extend( constructor, existingConstructor, {
+		version: prototype.version,
+		// copy the object used to create the prototype in case we need to
+		// redefine the widget later
+		_proto: $.extend( {}, prototype ),
+		// track widgets that inherit from this widget in case this widget is
+		// redefined after a widget inherits from it
+		_childConstructors: []
+	});
+
+	basePrototype = new base();
+	// we need to make the options hash a property directly on the new instance
+	// otherwise we'll modify the options hash on the prototype that we're
+	// inheriting from
+	basePrototype.options = $.widget.extend( {}, basePrototype.options );
+	$.each( prototype, function( prop, value ) {
+		if ( !$.isFunction( value ) ) {
+			proxiedPrototype[ prop ] = value;
+			return;
+		}
+		proxiedPrototype[ prop ] = (function() {
+			var _super = function() {
+					return base.prototype[ prop ].apply( this, arguments );
+				},
+				_superApply = function( args ) {
+					return base.prototype[ prop ].apply( this, args );
+				};
+			return function() {
+				var __super = this._super,
+					__superApply = this._superApply,
+					returnValue;
+
+				this._super = _super;
+				this._superApply = _superApply;
+
+				returnValue = value.apply( this, arguments );
+
+				this._super = __super;
+				this._superApply = __superApply;
+
+				return returnValue;
+			};
+		})();
+	});
+	constructor.prototype = $.widget.extend( basePrototype, {
+		// TODO: remove support for widgetEventPrefix
+		// always use the name + a colon as the prefix, e.g., draggable:start
+		// don't prefix for widgets that aren't DOM-based
+		widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
+	}, proxiedPrototype, {
+		constructor: constructor,
+		namespace: namespace,
+		widgetName: name,
+		widgetFullName: fullName
+	});
+
+	// If this widget is being redefined then we need to find all widgets that
+	// are inheriting from it and redefine all of them so that they inherit from
+	// the new version of this widget. We're essentially trying to replace one
+	// level in the prototype chain.
+	if ( existingConstructor ) {
+		$.each( existingConstructor._childConstructors, function( i, child ) {
+			var childPrototype = child.prototype;
+
+			// redefine the child widget using the same prototype that was
+			// originally used, but inherit from the new version of the base
+			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
+		});
+		// remove the list of existing child constructors from the old constructor
+		// so the old child constructors can be garbage collected
+		delete existingConstructor._childConstructors;
+	} else {
+		base._childConstructors.push( constructor );
+	}
+
+	$.widget.bridge( name, constructor );
+};
+
+$.widget.extend = function( target ) {
+	var input = slice.call( arguments, 1 ),
+		inputIndex = 0,
+		inputLength = input.length,
+		key,
+		value;
+	for ( ; inputIndex < inputLength; inputIndex++ ) {
+		for ( key in input[ inputIndex ] ) {
+			value = input[ inputIndex ][ key ];
+			if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+				// Clone objects
+				if ( $.isPlainObject( value ) ) {
+					target[ key ] = $.isPlainObject( target[ key ] ) ?
+						$.widget.extend( {}, target[ key ], value ) :
+						// Don't extend strings, arrays, etc. with objects
+						$.widget.extend( {}, value );
+				// Copy everything else by reference
+				} else {
+					target[ key ] = value;
+				}
+			}
+		}
+	}
+	return target;
+};
+
+$.widget.bridge = function( name, object ) {
+	var fullName = object.prototype.widgetFullName || name;
+	$.fn[ name ] = function( options ) {
+		var isMethodCall = typeof options === "string",
+			args = slice.call( arguments, 1 ),
+			returnValue = this;
+
+		// allow multiple hashes to be passed on init
+		options = !isMethodCall && args.length ?
+			$.widget.extend.apply( null, [ options ].concat(args) ) :
+			options;
+
+		if ( isMethodCall ) {
+			this.each(function() {
+				var methodValue,
+					instance = $.data( this, fullName );
+				if ( !instance ) {
+					return $.error( "cannot call methods on " + name + " prior to initialization; " +
+						"attempted to call method '" + options + "'" );
+				}
+				if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
+					return $.error( "no such method '" + options + "' for " + name + " widget instance" );
+				}
+				methodValue = instance[ options ].apply( instance, args );
+				if ( methodValue !== instance && methodValue !== undefined ) {
+					returnValue = methodValue && methodValue.jquery ?
+						returnValue.pushStack( methodValue.get() ) :
+						methodValue;
+					return false;
+				}
+			});
+		} else {
+			this.each(function() {
+				var instance = $.data( this, fullName );
+				if ( instance ) {
+					instance.option( options || {} )._init();
+				} else {
+					$.data( this, fullName, new object( options, this ) );
+				}
+			});
+		}
+
+		return returnValue;
+	};
+};
+
+$.Widget = function( /* options, element */ ) {};
+$.Widget._childConstructors = [];
+
+$.Widget.prototype = {
+	widgetName: "widget",
+	widgetEventPrefix: "",
+	defaultElement: "<div>",
+	options: {
+		disabled: false,
+
+		// callbacks
+		create: null
+	},
+	_createWidget: function( options, element ) {
+		element = $( element || this.defaultElement || this )[ 0 ];
+		this.element = $( element );
+		this.uuid = uuid++;
+		this.eventNamespace = "." + this.widgetName + this.uuid;
+		this.options = $.widget.extend( {},
+			this.options,
+			this._getCreateOptions(),
+			options );
+
+		this.bindings = $();
+		this.hoverable = $();
+		this.focusable = $();
+
+		if ( element !== this ) {
+			$.data( element, this.widgetFullName, this );
+			this._on( true, this.element, {
+				remove: function( event ) {
+					if ( event.target === element ) {
+						this.destroy();
+					}
+				}
+			});
+			this.document = $( element.style ?
+				// element within the document
+				element.ownerDocument :
+				// element is window or document
+				element.document || element );
+			this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
+		}
+
+		this._create();
+		this._trigger( "create", null, this._getCreateEventData() );
+		this._init();
+	},
+	_getCreateOptions: $.noop,
+	_getCreateEventData: $.noop,
+	_create: $.noop,
+	_init: $.noop,
+
+	destroy: function() {
+		this._destroy();
+		// we can probably remove the unbind calls in 2.0
+		// all event bindings should go through this._on()
+		this.element
+			.unbind( this.eventNamespace )
+			// 1.9 BC for #7810
+			// TODO remove dual storage
+			.removeData( this.widgetName )
+			.removeData( this.widgetFullName )
+			// support: jquery <1.6.3
+			// http://bugs.jquery.com/ticket/9413
+			.removeData( $.camelCase( this.widgetFullName ) );
+		this.widget()
+			.unbind( this.eventNamespace )
+			.removeAttr( "aria-disabled" )
+			.removeClass(
+				this.widgetFullName + "-disabled " +
+				"ui-state-disabled" );
+
+		// clean up events and states
+		this.bindings.unbind( this.eventNamespace );
+		this.hoverable.removeClass( "ui-state-hover" );
+		this.focusable.removeClass( "ui-state-focus" );
+	},
+	_destroy: $.noop,
+
+	widget: function() {
+		return this.element;
+	},
+
+	option: function( key, value ) {
+		var options = key,
+			parts,
+			curOption,
+			i;
+
+		if ( arguments.length === 0 ) {
+			// don't return a reference to the internal hash
+			return $.widget.extend( {}, this.options );
+		}
+
+		if ( typeof key === "string" ) {
+			// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
+			options = {};
+			parts = key.split( "." );
+			key = parts.shift();
+			if ( parts.length ) {
+				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
+				for ( i = 0; i < parts.length - 1; i++ ) {
+					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
+					curOption = curOption[ parts[ i ] ];
+				}
+				key = parts.pop();
+				if ( arguments.length === 1 ) {
+					return curOption[ key ] === undefined ? null : curOption[ key ];
+				}
+				curOption[ key ] = value;
+			} else {
+				if ( arguments.length === 1 ) {
+					return this.options[ key ] === undefined ? null : this.options[ key ];
+				}
+				options[ key ] = value;
+			}
+		}
+
+		this._setOptions( options );
+
+		return this;
+	},
+	_setOptions: function( options ) {
+		var key;
+
+		for ( key in options ) {
+			this._setOption( key, options[ key ] );
+		}
+
+		return this;
+	},
+	_setOption: function( key, value ) {
+		this.options[ key ] = value;
+
+		if ( key === "disabled" ) {
+			this.widget()
+				.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
+				.attr( "aria-disabled", value );
+			this.hoverable.removeClass( "ui-state-hover" );
+			this.focusable.removeClass( "ui-state-focus" );
+		}
+
+		return this;
+	},
+
+	enable: function() {
+		return this._setOption( "disabled", false );
+	},
+	disable: function() {
+		return this._setOption( "disabled", true );
+	},
+
+	_on: function( suppressDisabledCheck, element, handlers ) {
+		var delegateElement,
+			instance = this;
+
+		// no suppressDisabledCheck flag, shuffle arguments
+		if ( typeof suppressDisabledCheck !== "boolean" ) {
+			handlers = element;
+			element = suppressDisabledCheck;
+			suppressDisabledCheck = false;
+		}
+
+		// no element argument, shuffle and use this.element
+		if ( !handlers ) {
+			handlers = element;
+			element = this.element;
+			delegateElement = this.widget();
+		} else {
+			// accept selectors, DOM elements
+			element = delegateElement = $( element );
+			this.bindings = this.bindings.add( element );
+		}
+
+		$.each( handlers, function( event, handler ) {
+			function handlerProxy() {
+				// allow widgets to customize the disabled handling
+				// - disabled as an array instead of boolean
+				// - disabled class as method for disabling individual parts
+				if ( !suppressDisabledCheck &&
+						( instance.options.disabled === true ||
+							$( this ).hasClass( "ui-state-disabled" ) ) ) {
+					return;
+				}
+				return ( typeof handler === "string" ? instance[ handler ] : handler )
+					.apply( instance, arguments );
+			}
+
+			// copy the guid so direct unbinding works
+			if ( typeof handler !== "string" ) {
+				handlerProxy.guid = handler.guid =
+					handler.guid || handlerProxy.guid || $.guid++;
+			}
+
+			var match = event.match( /^(\w+)\s*(.*)$/ ),
+				eventName = match[1] + instance.eventNamespace,
+				selector = match[2];
+			if ( selector ) {
+				delegateElement.delegate( selector, eventName, handlerProxy );
+			} else {
+				element.bind( eventName, handlerProxy );
+			}
+		});
+	},
+
+	_off: function( element, eventName ) {
+		eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
+		element.unbind( eventName ).undelegate( eventName );
+	},
+
+	_delay: function( handler, delay ) {
+		function handlerProxy() {
+			return ( typeof handler === "string" ? instance[ handler ] : handler )
+				.apply( instance, arguments );
+		}
+		var instance = this;
+		return setTimeout( handlerProxy, delay || 0 );
+	},
+
+	_hoverable: function( element ) {
+		this.hoverable = this.hoverable.add( element );
+		this._on( element, {
+			mouseenter: function( event ) {
+				$( event.currentTarget ).addClass( "ui-state-hover" );
+			},
+			mouseleave: function( event ) {
+				$( event.currentTarget ).removeClass( "ui-state-hover" );
+			}
+		});
+	},
+
+	_focusable: function( element ) {
+		this.focusable = this.focusable.add( element );
+		this._on( element, {
+			focusin: function( event ) {
+				$( event.currentTarget ).addClass( "ui-state-focus" );
+			},
+			focusout: function( event ) {
+				$( event.currentTarget ).removeClass( "ui-state-focus" );
+			}
+		});
+	},
+
+	_trigger: function( type, event, data ) {
+		var prop, orig,
+			callback = this.options[ type ];
+
+		data = data || {};
+		event = $.Event( event );
+		event.type = ( type === this.widgetEventPrefix ?
+			type :
+			this.widgetEventPrefix + type ).toLowerCase();
+		// the original event may come from any element
+		// so we need to reset the target on the new event
+		event.target = this.element[ 0 ];
+
+		// copy original event properties over to the new event
+		orig = event.originalEvent;
+		if ( orig ) {
+			for ( prop in orig ) {
+				if ( !( prop in event ) ) {
+					event[ prop ] = orig[ prop ];
+				}
+			}
+		}
+
+		this.element.trigger( event, data );
+		return !( $.isFunction( callback ) &&
+			callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
+			event.isDefaultPrevented() );
+	}
+};
+
+$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
+	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
+		if ( typeof options === "string" ) {
+			options = { effect: options };
+		}
+		var hasOptions,
+			effectName = !options ?
+				method :
+				options === true || typeof options === "number" ?
+					defaultEffect :
+					options.effect || defaultEffect;
+		options = options || {};
+		if ( typeof options === "number" ) {
+			options = { duration: options };
+		}
+		hasOptions = !$.isEmptyObject( options );
+		options.complete = callback;
+		if ( options.delay ) {
+			element.delay( options.delay );
+		}
+		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
+			element[ method ]( options );
+		} else if ( effectName !== method && element[ effectName ] ) {
+			element[ effectName ]( options.duration, options.easing, callback );
+		} else {
+			element.queue(function( next ) {
+				$( this )[ method ]();
+				if ( callback ) {
+					callback.call( element[ 0 ] );
+				}
+				next();
+			});
+		}
+	};
+});
+
+}));

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.xdomainrequest.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.xdomainrequest.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.xdomainrequest.js
new file mode 100644
index 0000000..91a8c2f
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.xdomainrequest.js
@@ -0,0 +1,90 @@
+// jQuery.XDomainRequest.js
+// Author: Jason Moon - @JSONMOON
+// IE8+
+if (!jQuery.support.cors && jQuery.ajaxTransport && window.XDomainRequest) {
+  var httpRegEx = /^https?:\/\//i;
+  var getOrPostRegEx = /^get|post$/i;
+  var sameSchemeRegEx = new RegExp('^'+location.protocol, 'i');
+  var htmlRegEx = /text\/html/i;
+  var jsonRegEx = /\/json/i;
+  var xmlRegEx = /\/xml/i;
+
+  // ajaxTransport exists in jQuery 1.5+
+  jQuery.ajaxTransport('text html xml json', function(options, userOptions, jqXHR){
+    // XDomainRequests must be: asynchronous, GET or POST methods, HTTP or HTTPS protocol, and same scheme as calling page
+    if (options.crossDomain && options.async && getOrPostRegEx.test(options.type) && httpRegEx.test(options.url) && sameSchemeRegEx.test(options.url)) {
+      var xdr = null;
+      var userType = (userOptions.dataType||'').toLowerCase();
+      return {
+        send: function(headers, complete){
+          xdr = new XDomainRequest();
+          if (/^\d+$/.test(userOptions.timeout)) {
+            xdr.timeout = userOptions.timeout;
+          }
+          xdr.ontimeout = function(){
+            complete(500, 'timeout');
+          };
+          xdr.onload = function(){
+            var allResponseHeaders = 'Content-Length: ' + xdr.responseText.length + '\r\nContent-Type: ' + xdr.contentType;
+            var status = {
+              code: 200,
+              message: 'success'
+            };
+            var responses = {
+              text: xdr.responseText
+            };
+            try {
+              if (userType === 'html' || htmlRegEx.test(xdr.contentType)) {
+                responses.html = xdr.responseText;
+              } else if (userType === 'json' || (userType !== 'text' && jsonRegEx.test(xdr.contentType))) {
+                try {
+                  responses.json = jQuery.parseJSON(xdr.responseText);
+                } catch(e) {
+                  status.code = 500;
+                  status.message = 'parseerror';
+                  //throw 'Invalid JSON: ' + xdr.responseText;
+                }
+              } else if (userType === 'xml' || (userType !== 'text' && xmlRegEx.test(xdr.contentType))) {
+                var doc = new ActiveXObject('Microsoft.XMLDOM');
+                doc.async = false;
+                try {
+                  doc.loadXML(xdr.responseText);
+                } catch(e) {
+                  doc = undefined;
+                }
+                if (!doc || !doc.documentElement || doc.getElementsByTagName('parsererror').length) {
+                  status.code = 500;
+                  status.message = 'parseerror';
+                  throw 'Invalid XML: ' + xdr.responseText;
+                }
+                responses.xml = doc;
+              }
+            } catch(parseMessage) {
+              throw parseMessage;
+            } finally {
+              complete(status.code, status.message, responses, allResponseHeaders);
+            }
+          };
+          // set an empty handler for 'onprogress' so requests don't get aborted
+          xdr.onprogress = function(){};
+          xdr.onerror = function(){
+            complete(500, 'error', {
+              text: xdr.responseText
+            });
+          };
+          var postData = '';
+          if (userOptions.data) {
+            postData = (jQuery.type(userOptions.data) === 'string') ? userOptions.data : jQuery.param(userOptions.data);
+          }
+          xdr.open(options.type, options.url);
+          xdr.send(postData);
+        },
+        abort: function(){
+          if (xdr) {
+            xdr.abort();
+          }
+        }
+      };
+    }
+  });
+}


[24/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.fileupload.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.fileupload.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.fileupload.js
new file mode 100644
index 0000000..0803592
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.fileupload.js
@@ -0,0 +1,1426 @@
+/*
+ * jQuery File Upload Plugin 5.40.1
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2010, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ */
+
+/* jshint nomen:false */
+/* global define, window, document, location, Blob, FormData */
+
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        // Register as an anonymous AMD module:
+        define([
+            'jquery',
+            'jquery.ui.widget'
+        ], factory);
+    } else {
+        // Browser globals:
+        factory(window.jQuery);
+    }
+}(function ($) {
+    'use strict';
+
+    // Detect file input support, based on
+    // http://viljamis.com/blog/2012/file-upload-support-on-mobile/
+    $.support.fileInput = !(new RegExp(
+        // Handle devices which give false positives for the feature detection:
+        '(Android (1\\.[0156]|2\\.[01]))' +
+            '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' +
+            '|(w(eb)?OSBrowser)|(webOS)' +
+            '|(Kindle/(1\\.0|2\\.[05]|3\\.0))'
+    ).test(window.navigator.userAgent) ||
+        // Feature detection for all other devices:
+        $('<input type="file">').prop('disabled'));
+
+    // The FileReader API is not actually used, but works as feature detection,
+    // as some Safari versions (5?) support XHR file uploads via the FormData API,
+    // but not non-multipart XHR file uploads.
+    // window.XMLHttpRequestUpload is not available on IE10, so we check for
+    // window.ProgressEvent instead to detect XHR2 file upload capability:
+    $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader);
+    $.support.xhrFormDataFileUpload = !!window.FormData;
+
+    // Detect support for Blob slicing (required for chunked uploads):
+    $.support.blobSlice = window.Blob && (Blob.prototype.slice ||
+        Blob.prototype.webkitSlice || Blob.prototype.mozSlice);
+
+    // The fileupload widget listens for change events on file input fields defined
+    // via fileInput setting and paste or drop events of the given dropZone.
+    // In addition to the default jQuery Widget methods, the fileupload widget
+    // exposes the "add" and "send" methods, to add or directly send files using
+    // the fileupload API.
+    // By default, files added via file input selection, paste, drag & drop or
+    // "add" method are uploaded immediately, but it is possible to override
+    // the "add" callback option to queue file uploads.
+    $.widget('blueimp.fileupload', {
+
+        options: {
+            // The drop target element(s), by the default the complete document.
+            // Set to null to disable drag & drop support:
+            dropZone: $(document),
+            // The paste target element(s), by the default the complete document.
+            // Set to null to disable paste support:
+            pasteZone: $(document),
+            // The file input field(s), that are listened to for change events.
+            // If undefined, it is set to the file input fields inside
+            // of the widget element on plugin initialization.
+            // Set to null to disable the change listener.
+            fileInput: undefined,
+            // By default, the file input field is replaced with a clone after
+            // each input field change event. This is required for iframe transport
+            // queues and allows change events to be fired for the same file
+            // selection, but can be disabled by setting the following option to false:
+            replaceFileInput: true,
+            // The parameter name for the file form data (the request argument name).
+            // If undefined or empty, the name property of the file input field is
+            // used, or "files[]" if the file input name property is also empty,
+            // can be a string or an array of strings:
+            paramName: undefined,
+            // By default, each file of a selection is uploaded using an individual
+            // request for XHR type uploads. Set to false to upload file
+            // selections in one request each:
+            singleFileUploads: true,
+            // To limit the number of files uploaded with one XHR request,
+            // set the following option to an integer greater than 0:
+            limitMultiFileUploads: undefined,
+            // The following option limits the number of files uploaded with one
+            // XHR request to keep the request size under or equal to the defined
+            // limit in bytes:
+            limitMultiFileUploadSize: undefined,
+            // Multipart file uploads add a number of bytes to each uploaded file,
+            // therefore the following option adds an overhead for each file used
+            // in the limitMultiFileUploadSize configuration:
+            limitMultiFileUploadSizeOverhead: 512,
+            // Set the following option to true to issue all file upload requests
+            // in a sequential order:
+            sequentialUploads: false,
+            // To limit the number of concurrent uploads,
+            // set the following option to an integer greater than 0:
+            limitConcurrentUploads: undefined,
+            // Set the following option to true to force iframe transport uploads:
+            forceIframeTransport: false,
+            // Set the following option to the location of a redirect url on the
+            // origin server, for cross-domain iframe transport uploads:
+            redirect: undefined,
+            // The parameter name for the redirect url, sent as part of the form
+            // data and set to 'redirect' if this option is empty:
+            redirectParamName: undefined,
+            // Set the following option to the location of a postMessage window,
+            // to enable postMessage transport uploads:
+            postMessage: undefined,
+            // By default, XHR file uploads are sent as multipart/form-data.
+            // The iframe transport is always using multipart/form-data.
+            // Set to false to enable non-multipart XHR uploads:
+            multipart: true,
+            // To upload large files in smaller chunks, set the following option
+            // to a preferred maximum chunk size. If set to 0, null or undefined,
+            // or the browser does not support the required Blob API, files will
+            // be uploaded as a whole.
+            maxChunkSize: undefined,
+            // When a non-multipart upload or a chunked multipart upload has been
+            // aborted, this option can be used to resume the upload by setting
+            // it to the size of the already uploaded bytes. This option is most
+            // useful when modifying the options object inside of the "add" or
+            // "send" callbacks, as the options are cloned for each file upload.
+            uploadedBytes: undefined,
+            // By default, failed (abort or error) file uploads are removed from the
+            // global progress calculation. Set the following option to false to
+            // prevent recalculating the global progress data:
+            recalculateProgress: true,
+            // Interval in milliseconds to calculate and trigger progress events:
+            progressInterval: 100,
+            // Interval in milliseconds to calculate progress bitrate:
+            bitrateInterval: 500,
+            // By default, uploads are started automatically when adding files:
+            autoUpload: true,
+
+            // Error and info messages:
+            messages: {
+                uploadedBytes: 'Uploaded bytes exceed file size'
+            },
+
+            // Translation function, gets the message key to be translated
+            // and an object with context specific data as arguments:
+            i18n: function (message, context) {
+                message = this.messages[message] || message.toString();
+                if (context) {
+                    $.each(context, function (key, value) {
+                        message = message.replace('{' + key + '}', value);
+                    });
+                }
+                return message;
+            },
+
+            // Additional form data to be sent along with the file uploads can be set
+            // using this option, which accepts an array of objects with name and
+            // value properties, a function returning such an array, a FormData
+            // object (for XHR file uploads), or a simple object.
+            // The form of the first fileInput is given as parameter to the function:
+            formData: function (form) {
+                return form.serializeArray();
+            },
+
+            // The add callback is invoked as soon as files are added to the fileupload
+            // widget (via file input selection, drag & drop, paste or add API call).
+            // If the singleFileUploads option is enabled, this callback will be
+            // called once for each file in the selection for XHR file uploads, else
+            // once for each file selection.
+            //
+            // The upload starts when the submit method is invoked on the data parameter.
+            // The data object contains a files property holding the added files
+            // and allows you to override plugin options as well as define ajax settings.
+            //
+            // Listeners for this callback can also be bound the following way:
+            // .bind('fileuploadadd', func);
+            //
+            // data.submit() returns a Promise object and allows to attach additional
+            // handlers using jQuery's Deferred callbacks:
+            // data.submit().done(func).fail(func).always(func);
+            add: function (e, data) {
+                if (e.isDefaultPrevented()) {
+                    return false;
+                }
+                if (data.autoUpload || (data.autoUpload !== false &&
+                        $(this).fileupload('option', 'autoUpload'))) {
+                    data.process().done(function () {
+                        data.submit();
+                    });
+                }
+            },
+
+            // Other callbacks:
+
+            // Callback for the submit event of each file upload:
+            // submit: function (e, data) {}, // .bind('fileuploadsubmit', func);
+
+            // Callback for the start of each file upload request:
+            // send: function (e, data) {}, // .bind('fileuploadsend', func);
+
+            // Callback for successful uploads:
+            // done: function (e, data) {}, // .bind('fileuploaddone', func);
+
+            // Callback for failed (abort or error) uploads:
+            // fail: function (e, data) {}, // .bind('fileuploadfail', func);
+
+            // Callback for completed (success, abort or error) requests:
+            // always: function (e, data) {}, // .bind('fileuploadalways', func);
+
+            // Callback for upload progress events:
+            // progress: function (e, data) {}, // .bind('fileuploadprogress', func);
+
+            // Callback for global upload progress events:
+            // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func);
+
+            // Callback for uploads start, equivalent to the global ajaxStart event:
+            // start: function (e) {}, // .bind('fileuploadstart', func);
+
+            // Callback for uploads stop, equivalent to the global ajaxStop event:
+            // stop: function (e) {}, // .bind('fileuploadstop', func);
+
+            // Callback for change events of the fileInput(s):
+            // change: function (e, data) {}, // .bind('fileuploadchange', func);
+
+            // Callback for paste events to the pasteZone(s):
+            // paste: function (e, data) {}, // .bind('fileuploadpaste', func);
+
+            // Callback for drop events of the dropZone(s):
+            // drop: function (e, data) {}, // .bind('fileuploaddrop', func);
+
+            // Callback for dragover events of the dropZone(s):
+            // dragover: function (e) {}, // .bind('fileuploaddragover', func);
+
+            // Callback for the start of each chunk upload request:
+            // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func);
+
+            // Callback for successful chunk uploads:
+            // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func);
+
+            // Callback for failed (abort or error) chunk uploads:
+            // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func);
+
+            // Callback for completed (success, abort or error) chunk upload requests:
+            // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func);
+
+            // The plugin options are used as settings object for the ajax calls.
+            // The following are jQuery ajax settings required for the file uploads:
+            processData: false,
+            contentType: false,
+            cache: false
+        },
+
+        // A list of options that require reinitializing event listeners and/or
+        // special initialization code:
+        _specialOptions: [
+            'fileInput',
+            'dropZone',
+            'pasteZone',
+            'multipart',
+            'forceIframeTransport'
+        ],
+
+        _blobSlice: $.support.blobSlice && function () {
+            var slice = this.slice || this.webkitSlice || this.mozSlice;
+            return slice.apply(this, arguments);
+        },
+
+        _BitrateTimer: function () {
+            this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime());
+            this.loaded = 0;
+            this.bitrate = 0;
+            this.getBitrate = function (now, loaded, interval) {
+                var timeDiff = now - this.timestamp;
+                if (!this.bitrate || !interval || timeDiff > interval) {
+                    this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;
+                    this.loaded = loaded;
+                    this.timestamp = now;
+                }
+                return this.bitrate;
+            };
+        },
+
+        _isXHRUpload: function (options) {
+            return !options.forceIframeTransport &&
+                ((!options.multipart && $.support.xhrFileUpload) ||
+                $.support.xhrFormDataFileUpload);
+        },
+
+        _getFormData: function (options) {
+            var formData;
+            if ($.type(options.formData) === 'function') {
+                return options.formData(options.form);
+            }
+            if ($.isArray(options.formData)) {
+                return options.formData;
+            }
+            if ($.type(options.formData) === 'object') {
+                formData = [];
+                $.each(options.formData, function (name, value) {
+                    formData.push({name: name, value: value});
+                });
+                return formData;
+            }
+            return [];
+        },
+
+        _getTotal: function (files) {
+            var total = 0;
+            $.each(files, function (index, file) {
+                total += file.size || 1;
+            });
+            return total;
+        },
+
+        _initProgressObject: function (obj) {
+            var progress = {
+                loaded: 0,
+                total: 0,
+                bitrate: 0
+            };
+            if (obj._progress) {
+                $.extend(obj._progress, progress);
+            } else {
+                obj._progress = progress;
+            }
+        },
+
+        _initResponseObject: function (obj) {
+            var prop;
+            if (obj._response) {
+                for (prop in obj._response) {
+                    if (obj._response.hasOwnProperty(prop)) {
+                        delete obj._response[prop];
+                    }
+                }
+            } else {
+                obj._response = {};
+            }
+        },
+
+        _onProgress: function (e, data) {
+            if (e.lengthComputable) {
+                var now = ((Date.now) ? Date.now() : (new Date()).getTime()),
+                    loaded;
+                if (data._time && data.progressInterval &&
+                        (now - data._time < data.progressInterval) &&
+                        e.loaded !== e.total) {
+                    return;
+                }
+                data._time = now;
+                loaded = Math.floor(
+                    e.loaded / e.total * (data.chunkSize || data._progress.total)
+                ) + (data.uploadedBytes || 0);
+                // Add the difference from the previously loaded state
+                // to the global loaded counter:
+                this._progress.loaded += (loaded - data._progress.loaded);
+                this._progress.bitrate = this._bitrateTimer.getBitrate(
+                    now,
+                    this._progress.loaded,
+                    data.bitrateInterval
+                );
+                data._progress.loaded = data.loaded = loaded;
+                data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate(
+                    now,
+                    loaded,
+                    data.bitrateInterval
+                );
+                // Trigger a custom progress event with a total data property set
+                // to the file size(s) of the current upload and a loaded data
+                // property calculated accordingly:
+                this._trigger(
+                    'progress',
+                    $.Event('progress', {delegatedEvent: e}),
+                    data
+                );
+                // Trigger a global progress event for all current file uploads,
+                // including ajax calls queued for sequential file uploads:
+                this._trigger(
+                    'progressall',
+                    $.Event('progressall', {delegatedEvent: e}),
+                    this._progress
+                );
+            }
+        },
+
+        _initProgressListener: function (options) {
+            var that = this,
+                xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
+            // Accesss to the native XHR object is required to add event listeners
+            // for the upload progress event:
+            if (xhr.upload) {
+                $(xhr.upload).bind('progress', function (e) {
+                    var oe = e.originalEvent;
+                    // Make sure the progress event properties get copied over:
+                    e.lengthComputable = oe.lengthComputable;
+                    e.loaded = oe.loaded;
+                    e.total = oe.total;
+                    that._onProgress(e, options);
+                });
+                options.xhr = function () {
+                    return xhr;
+                };
+            }
+        },
+
+        _isInstanceOf: function (type, obj) {
+            // Cross-frame instanceof check
+            return Object.prototype.toString.call(obj) === '[object ' + type + ']';
+        },
+
+        _initXHRData: function (options) {
+            var that = this,
+                formData,
+                file = options.files[0],
+                // Ignore non-multipart setting if not supported:
+                multipart = options.multipart || !$.support.xhrFileUpload,
+                paramName = $.type(options.paramName) === 'array' ?
+                    options.paramName[0] : options.paramName;
+            options.headers = $.extend({}, options.headers);
+            if (options.contentRange) {
+                options.headers['Content-Range'] = options.contentRange;
+            }
+            if (!multipart || options.blob || !this._isInstanceOf('File', file)) {
+                options.headers['Content-Disposition'] = 'attachment; filename="' +
+                    encodeURI(file.name) + '"';
+            }
+            if (!multipart) {
+                options.contentType = file.type || 'application/octet-stream';
+                options.data = options.blob || file;
+            } else if ($.support.xhrFormDataFileUpload) {
+                if (options.postMessage) {
+                    // window.postMessage does not allow sending FormData
+                    // objects, so we just add the File/Blob objects to
+                    // the formData array and let the postMessage window
+                    // create the FormData object out of this array:
+                    formData = this._getFormData(options);
+                    if (options.blob) {
+                        formData.push({
+                            name: paramName,
+                            value: options.blob
+                        });
+                    } else {
+                        $.each(options.files, function (index, file) {
+                            formData.push({
+                                name: ($.type(options.paramName) === 'array' &&
+                                    options.paramName[index]) || paramName,
+                                value: file
+                            });
+                        });
+                    }
+                } else {
+                    if (that._isInstanceOf('FormData', options.formData)) {
+                        formData = options.formData;
+                    } else {
+                        formData = new FormData();
+                        $.each(this._getFormData(options), function (index, field) {
+                            formData.append(field.name, field.value);
+                        });
+                    }
+                    if (options.blob) {
+                        formData.append(paramName, options.blob, file.name);
+                    } else {
+                        $.each(options.files, function (index, file) {
+                            // This check allows the tests to run with
+                            // dummy objects:
+                            if (that._isInstanceOf('File', file) ||
+                                    that._isInstanceOf('Blob', file)) {
+                                formData.append(
+                                    ($.type(options.paramName) === 'array' &&
+                                        options.paramName[index]) || paramName,
+                                    file,
+                                    file.uploadName || file.name
+                                );
+                            }
+                        });
+                    }
+                }
+                options.data = formData;
+            }
+            // Blob reference is not needed anymore, free memory:
+            options.blob = null;
+        },
+
+        _initIframeSettings: function (options) {
+            var targetHost = $('<a></a>').prop('href', options.url).prop('host');
+            // Setting the dataType to iframe enables the iframe transport:
+            options.dataType = 'iframe ' + (options.dataType || '');
+            // The iframe transport accepts a serialized array as form data:
+            options.formData = this._getFormData(options);
+            // Add redirect url to form data on cross-domain uploads:
+            if (options.redirect && targetHost && targetHost !== location.host) {
+                options.formData.push({
+                    name: options.redirectParamName || 'redirect',
+                    value: options.redirect
+                });
+            }
+        },
+
+        _initDataSettings: function (options) {
+            if (this._isXHRUpload(options)) {
+                if (!this._chunkedUpload(options, true)) {
+                    if (!options.data) {
+                        this._initXHRData(options);
+                    }
+                    this._initProgressListener(options);
+                }
+                if (options.postMessage) {
+                    // Setting the dataType to postmessage enables the
+                    // postMessage transport:
+                    options.dataType = 'postmessage ' + (options.dataType || '');
+                }
+            } else {
+                this._initIframeSettings(options);
+            }
+        },
+
+        _getParamName: function (options) {
+            var fileInput = $(options.fileInput),
+                paramName = options.paramName;
+            if (!paramName) {
+                paramName = [];
+                fileInput.each(function () {
+                    var input = $(this),
+                        name = input.prop('name') || 'files[]',
+                        i = (input.prop('files') || [1]).length;
+                    while (i) {
+                        paramName.push(name);
+                        i -= 1;
+                    }
+                });
+                if (!paramName.length) {
+                    paramName = [fileInput.prop('name') || 'files[]'];
+                }
+            } else if (!$.isArray(paramName)) {
+                paramName = [paramName];
+            }
+            return paramName;
+        },
+
+        _initFormSettings: function (options) {
+            // Retrieve missing options from the input field and the
+            // associated form, if available:
+            if (!options.form || !options.form.length) {
+                options.form = $(options.fileInput.prop('form'));
+                // If the given file input doesn't have an associated form,
+                // use the default widget file input's form:
+                if (!options.form.length) {
+                    options.form = $(this.options.fileInput.prop('form'));
+                }
+            }
+            options.paramName = this._getParamName(options);
+            if (!options.url) {
+                options.url = options.form.prop('action') || location.href;
+            }
+            // The HTTP request method must be "POST" or "PUT":
+            options.type = (options.type ||
+                ($.type(options.form.prop('method')) === 'string' &&
+                    options.form.prop('method')) || ''
+                ).toUpperCase();
+            if (options.type !== 'POST' && options.type !== 'PUT' &&
+                    options.type !== 'PATCH') {
+                options.type = 'POST';
+            }
+            if (!options.formAcceptCharset) {
+                options.formAcceptCharset = options.form.attr('accept-charset');
+            }
+        },
+
+        _getAJAXSettings: function (data) {
+            var options = $.extend({}, this.options, data);
+            this._initFormSettings(options);
+            this._initDataSettings(options);
+            return options;
+        },
+
+        // jQuery 1.6 doesn't provide .state(),
+        // while jQuery 1.8+ removed .isRejected() and .isResolved():
+        _getDeferredState: function (deferred) {
+            if (deferred.state) {
+                return deferred.state();
+            }
+            if (deferred.isResolved()) {
+                return 'resolved';
+            }
+            if (deferred.isRejected()) {
+                return 'rejected';
+            }
+            return 'pending';
+        },
+
+        // Maps jqXHR callbacks to the equivalent
+        // methods of the given Promise object:
+        _enhancePromise: function (promise) {
+            promise.success = promise.done;
+            promise.error = promise.fail;
+            promise.complete = promise.always;
+            return promise;
+        },
+
+        // Creates and returns a Promise object enhanced with
+        // the jqXHR methods abort, success, error and complete:
+        _getXHRPromise: function (resolveOrReject, context, args) {
+            var dfd = $.Deferred(),
+                promise = dfd.promise();
+            context = context || this.options.context || promise;
+            if (resolveOrReject === true) {
+                dfd.resolveWith(context, args);
+            } else if (resolveOrReject === false) {
+                dfd.rejectWith(context, args);
+            }
+            promise.abort = dfd.promise;
+            return this._enhancePromise(promise);
+        },
+
+        // Adds convenience methods to the data callback argument:
+        _addConvenienceMethods: function (e, data) {
+            var that = this,
+                getPromise = function (args) {
+                    return $.Deferred().resolveWith(that, args).promise();
+                };
+            data.process = function (resolveFunc, rejectFunc) {
+                if (resolveFunc || rejectFunc) {
+                    data._processQueue = this._processQueue =
+                        (this._processQueue || getPromise([this])).pipe(
+                            function () {
+                                if (data.errorThrown) {
+                                    return $.Deferred()
+                                        .rejectWith(that, [data]).promise();
+                                }
+                                return getPromise(arguments);
+                            }
+                        ).pipe(resolveFunc, rejectFunc);
+                }
+                return this._processQueue || getPromise([this]);
+            };
+            data.submit = function () {
+                if (this.state() !== 'pending') {
+                    data.jqXHR = this.jqXHR =
+                        (that._trigger(
+                            'submit',
+                            $.Event('submit', {delegatedEvent: e}),
+                            this
+                        ) !== false) && that._onSend(e, this);
+                }
+                return this.jqXHR || that._getXHRPromise();
+            };
+            data.abort = function () {
+                if (this.jqXHR) {
+                    return this.jqXHR.abort();
+                }
+                this.errorThrown = 'abort';
+                that._trigger('fail', null, this);
+                return that._getXHRPromise(false);
+            };
+            data.state = function () {
+                if (this.jqXHR) {
+                    return that._getDeferredState(this.jqXHR);
+                }
+                if (this._processQueue) {
+                    return that._getDeferredState(this._processQueue);
+                }
+            };
+            data.processing = function () {
+                return !this.jqXHR && this._processQueue && that
+                    ._getDeferredState(this._processQueue) === 'pending';
+            };
+            data.progress = function () {
+                return this._progress;
+            };
+            data.response = function () {
+                return this._response;
+            };
+        },
+
+        // Parses the Range header from the server response
+        // and returns the uploaded bytes:
+        _getUploadedBytes: function (jqXHR) {
+            var range = jqXHR.getResponseHeader('Range'),
+                parts = range && range.split('-'),
+                upperBytesPos = parts && parts.length > 1 &&
+                    parseInt(parts[1], 10);
+            return upperBytesPos && upperBytesPos + 1;
+        },
+
+        // Uploads a file in multiple, sequential requests
+        // by splitting the file up in multiple blob chunks.
+        // If the second parameter is true, only tests if the file
+        // should be uploaded in chunks, but does not invoke any
+        // upload requests:
+        _chunkedUpload: function (options, testOnly) {
+            options.uploadedBytes = options.uploadedBytes || 0;
+            var that = this,
+                file = options.files[0],
+                fs = file.size,
+                ub = options.uploadedBytes,
+                mcs = options.maxChunkSize || fs,
+                slice = this._blobSlice,
+                dfd = $.Deferred(),
+                promise = dfd.promise(),
+                jqXHR,
+                upload;
+            if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||
+                    options.data) {
+                return false;
+            }
+            if (testOnly) {
+                return true;
+            }
+            if (ub >= fs) {
+                file.error = options.i18n('uploadedBytes');
+                return this._getXHRPromise(
+                    false,
+                    options.context,
+                    [null, 'error', file.error]
+                );
+            }
+            // The chunk upload method:
+            upload = function () {
+                // Clone the options object for each chunk upload:
+                var o = $.extend({}, options),
+                    currentLoaded = o._progress.loaded;
+                o.blob = slice.call(
+                    file,
+                    ub,
+                    ub + mcs,
+                    file.type
+                );
+                // Store the current chunk size, as the blob itself
+                // will be dereferenced after data processing:
+                o.chunkSize = o.blob.size;
+                // Expose the chunk bytes position range:
+                o.contentRange = 'bytes ' + ub + '-' +
+                    (ub + o.chunkSize - 1) + '/' + fs;
+                // Process the upload data (the blob and potential form data):
+                that._initXHRData(o);
+                // Add progress listeners for this chunk upload:
+                that._initProgressListener(o);
+                jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||
+                        that._getXHRPromise(false, o.context))
+                    .done(function (result, textStatus, jqXHR) {
+                        ub = that._getUploadedBytes(jqXHR) ||
+                            (ub + o.chunkSize);
+                        // Create a progress event if no final progress event
+                        // with loaded equaling total has been triggered
+                        // for this chunk:
+                        if (currentLoaded + o.chunkSize - o._progress.loaded) {
+                            that._onProgress($.Event('progress', {
+                                lengthComputable: true,
+                                loaded: ub - o.uploadedBytes,
+                                total: ub - o.uploadedBytes
+                            }), o);
+                        }
+                        options.uploadedBytes = o.uploadedBytes = ub;
+                        o.result = result;
+                        o.textStatus = textStatus;
+                        o.jqXHR = jqXHR;
+                        that._trigger('chunkdone', null, o);
+                        that._trigger('chunkalways', null, o);
+                        if (ub < fs) {
+                            // File upload not yet complete,
+                            // continue with the next chunk:
+                            upload();
+                        } else {
+                            dfd.resolveWith(
+                                o.context,
+                                [result, textStatus, jqXHR]
+                            );
+                        }
+                    })
+                    .fail(function (jqXHR, textStatus, errorThrown) {
+                        o.jqXHR = jqXHR;
+                        o.textStatus = textStatus;
+                        o.errorThrown = errorThrown;
+                        that._trigger('chunkfail', null, o);
+                        that._trigger('chunkalways', null, o);
+                        dfd.rejectWith(
+                            o.context,
+                            [jqXHR, textStatus, errorThrown]
+                        );
+                    });
+            };
+            this._enhancePromise(promise);
+            promise.abort = function () {
+                return jqXHR.abort();
+            };
+            upload();
+            return promise;
+        },
+
+        _beforeSend: function (e, data) {
+            if (this._active === 0) {
+                // the start callback is triggered when an upload starts
+                // and no other uploads are currently running,
+                // equivalent to the global ajaxStart event:
+                this._trigger('start');
+                // Set timer for global bitrate progress calculation:
+                this._bitrateTimer = new this._BitrateTimer();
+                // Reset the global progress values:
+                this._progress.loaded = this._progress.total = 0;
+                this._progress.bitrate = 0;
+            }
+            // Make sure the container objects for the .response() and
+            // .progress() methods on the data object are available
+            // and reset to their initial state:
+            this._initResponseObject(data);
+            this._initProgressObject(data);
+            data._progress.loaded = data.loaded = data.uploadedBytes || 0;
+            data._progress.total = data.total = this._getTotal(data.files) || 1;
+            data._progress.bitrate = data.bitrate = 0;
+            this._active += 1;
+            // Initialize the global progress values:
+            this._progress.loaded += data.loaded;
+            this._progress.total += data.total;
+        },
+
+        _onDone: function (result, textStatus, jqXHR, options) {
+            var total = options._progress.total,
+                response = options._response;
+            if (options._progress.loaded < total) {
+                // Create a progress event if no final progress event
+                // with loaded equaling total has been triggered:
+                this._onProgress($.Event('progress', {
+                    lengthComputable: true,
+                    loaded: total,
+                    total: total
+                }), options);
+            }
+            response.result = options.result = result;
+            response.textStatus = options.textStatus = textStatus;
+            response.jqXHR = options.jqXHR = jqXHR;
+            this._trigger('done', null, options);
+        },
+
+        _onFail: function (jqXHR, textStatus, errorThrown, options) {
+            var response = options._response;
+            if (options.recalculateProgress) {
+                // Remove the failed (error or abort) file upload from
+                // the global progress calculation:
+                this._progress.loaded -= options._progress.loaded;
+                this._progress.total -= options._progress.total;
+            }
+            response.jqXHR = options.jqXHR = jqXHR;
+            response.textStatus = options.textStatus = textStatus;
+            response.errorThrown = options.errorThrown = errorThrown;
+            this._trigger('fail', null, options);
+        },
+
+        _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) {
+            // jqXHRorResult, textStatus and jqXHRorError are added to the
+            // options object via done and fail callbacks
+            this._trigger('always', null, options);
+        },
+
+        _onSend: function (e, data) {
+            if (!data.submit) {
+                this._addConvenienceMethods(e, data);
+            }
+            var that = this,
+                jqXHR,
+                aborted,
+                slot,
+                pipe,
+                options = that._getAJAXSettings(data),
+                send = function () {
+                    that._sending += 1;
+                    // Set timer for bitrate progress calculation:
+                    options._bitrateTimer = new that._BitrateTimer();
+                    jqXHR = jqXHR || (
+                        ((aborted || that._trigger(
+                            'send',
+                            $.Event('send', {delegatedEvent: e}),
+                            options
+                        ) === false) &&
+                        that._getXHRPromise(false, options.context, aborted)) ||
+                        that._chunkedUpload(options) || $.ajax(options)
+                    ).done(function (result, textStatus, jqXHR) {
+                        that._onDone(result, textStatus, jqXHR, options);
+                    }).fail(function (jqXHR, textStatus, errorThrown) {
+                        that._onFail(jqXHR, textStatus, errorThrown, options);
+                    }).always(function (jqXHRorResult, textStatus, jqXHRorError) {
+                        that._onAlways(
+                            jqXHRorResult,
+                            textStatus,
+                            jqXHRorError,
+                            options
+                        );
+                        that._sending -= 1;
+                        that._active -= 1;
+                        if (options.limitConcurrentUploads &&
+                                options.limitConcurrentUploads > that._sending) {
+                            // Start the next queued upload,
+                            // that has not been aborted:
+                            var nextSlot = that._slots.shift();
+                            while (nextSlot) {
+                                if (that._getDeferredState(nextSlot) === 'pending') {
+                                    nextSlot.resolve();
+                                    break;
+                                }
+                                nextSlot = that._slots.shift();
+                            }
+                        }
+                        if (that._active === 0) {
+                            // The stop callback is triggered when all uploads have
+                            // been completed, equivalent to the global ajaxStop event:
+                            that._trigger('stop');
+                        }
+                    });
+                    return jqXHR;
+                };
+            this._beforeSend(e, options);
+            if (this.options.sequentialUploads ||
+                    (this.options.limitConcurrentUploads &&
+                    this.options.limitConcurrentUploads <= this._sending)) {
+                if (this.options.limitConcurrentUploads > 1) {
+                    slot = $.Deferred();
+                    this._slots.push(slot);
+                    pipe = slot.pipe(send);
+                } else {
+                    this._sequence = this._sequence.pipe(send, send);
+                    pipe = this._sequence;
+                }
+                // Return the piped Promise object, enhanced with an abort method,
+                // which is delegated to the jqXHR object of the current upload,
+                // and jqXHR callbacks mapped to the equivalent Promise methods:
+                pipe.abort = function () {
+                    aborted = [undefined, 'abort', 'abort'];
+                    if (!jqXHR) {
+                        if (slot) {
+                            slot.rejectWith(options.context, aborted);
+                        }
+                        return send();
+                    }
+                    return jqXHR.abort();
+                };
+                return this._enhancePromise(pipe);
+            }
+            return send();
+        },
+
+        _onAdd: function (e, data) {
+            var that = this,
+                result = true,
+                options = $.extend({}, this.options, data),
+                files = data.files,
+                filesLength = files.length,
+                limit = options.limitMultiFileUploads,
+                limitSize = options.limitMultiFileUploadSize,
+                overhead = options.limitMultiFileUploadSizeOverhead,
+                batchSize = 0,
+                paramName = this._getParamName(options),
+                paramNameSet,
+                paramNameSlice,
+                fileSet,
+                i,
+                j = 0;
+            if (limitSize && (!filesLength || files[0].size === undefined)) {
+                limitSize = undefined;
+            }
+            if (!(options.singleFileUploads || limit || limitSize) ||
+                    !this._isXHRUpload(options)) {
+                fileSet = [files];
+                paramNameSet = [paramName];
+            } else if (!(options.singleFileUploads || limitSize) && limit) {
+                fileSet = [];
+                paramNameSet = [];
+                for (i = 0; i < filesLength; i += limit) {
+                    fileSet.push(files.slice(i, i + limit));
+                    paramNameSlice = paramName.slice(i, i + limit);
+                    if (!paramNameSlice.length) {
+                        paramNameSlice = paramName;
+                    }
+                    paramNameSet.push(paramNameSlice);
+                }
+            } else if (!options.singleFileUploads && limitSize) {
+                fileSet = [];
+                paramNameSet = [];
+                for (i = 0; i < filesLength; i = i + 1) {
+                    batchSize += files[i].size + overhead;
+                    if (i + 1 === filesLength ||
+                            ((batchSize + files[i + 1].size + overhead) > limitSize) ||
+                            (limit && i + 1 - j >= limit)) {
+                        fileSet.push(files.slice(j, i + 1));
+                        paramNameSlice = paramName.slice(j, i + 1);
+                        if (!paramNameSlice.length) {
+                            paramNameSlice = paramName;
+                        }
+                        paramNameSet.push(paramNameSlice);
+                        j = i + 1;
+                        batchSize = 0;
+                    }
+                }
+            } else {
+                paramNameSet = paramName;
+            }
+            data.originalFiles = files;
+            $.each(fileSet || files, function (index, element) {
+                var newData = $.extend({}, data);
+                newData.files = fileSet ? element : [element];
+                newData.paramName = paramNameSet[index];
+                that._initResponseObject(newData);
+                that._initProgressObject(newData);
+                that._addConvenienceMethods(e, newData);
+                result = that._trigger(
+                    'add',
+                    $.Event('add', {delegatedEvent: e}),
+                    newData
+                );
+                return result;
+            });
+            return result;
+        },
+
+        _replaceFileInput: function (input) {
+            var inputClone = input.clone(true);
+            $('<form></form>').append(inputClone)[0].reset();
+            // Detaching allows to insert the fileInput on another form
+            // without loosing the file input value:
+            input.after(inputClone).detach();
+            // Avoid memory leaks with the detached file input:
+            $.cleanData(input.unbind('remove'));
+            // Replace the original file input element in the fileInput
+            // elements set with the clone, which has been copied including
+            // event handlers:
+            this.options.fileInput = this.options.fileInput.map(function (i, el) {
+                if (el === input[0]) {
+                    return inputClone[0];
+                }
+                return el;
+            });
+            // If the widget has been initialized on the file input itself,
+            // override this.element with the file input clone:
+            if (input[0] === this.element[0]) {
+                this.element = inputClone;
+            }
+        },
+
+        _handleFileTreeEntry: function (entry, path) {
+            var that = this,
+                dfd = $.Deferred(),
+                errorHandler = function (e) {
+                    if (e && !e.entry) {
+                        e.entry = entry;
+                    }
+                    // Since $.when returns immediately if one
+                    // Deferred is rejected, we use resolve instead.
+                    // This allows valid files and invalid items
+                    // to be returned together in one set:
+                    dfd.resolve([e]);
+                },
+                dirReader;
+            path = path || '';
+            if (entry.isFile) {
+                if (entry._file) {
+                    // Workaround for Chrome bug #149735
+                    entry._file.relativePath = path;
+                    dfd.resolve(entry._file);
+                } else {
+                    entry.file(function (file) {
+                        file.relativePath = path;
+                        dfd.resolve(file);
+                    }, errorHandler);
+                }
+            } else if (entry.isDirectory) {
+                dirReader = entry.createReader();
+                dirReader.readEntries(function (entries) {
+                    that._handleFileTreeEntries(
+                        entries,
+                        path + entry.name + '/'
+                    ).done(function (files) {
+                        dfd.resolve(files);
+                    }).fail(errorHandler);
+                }, errorHandler);
+            } else {
+                // Return an empy list for file system items
+                // other than files or directories:
+                dfd.resolve([]);
+            }
+            return dfd.promise();
+        },
+
+        _handleFileTreeEntries: function (entries, path) {
+            var that = this;
+            return $.when.apply(
+                $,
+                $.map(entries, function (entry) {
+                    return that._handleFileTreeEntry(entry, path);
+                })
+            ).pipe(function () {
+                return Array.prototype.concat.apply(
+                    [],
+                    arguments
+                );
+            });
+        },
+
+        _getDroppedFiles: function (dataTransfer) {
+            dataTransfer = dataTransfer || {};
+            var items = dataTransfer.items;
+            if (items && items.length && (items[0].webkitGetAsEntry ||
+                    items[0].getAsEntry)) {
+                return this._handleFileTreeEntries(
+                    $.map(items, function (item) {
+                        var entry;
+                        if (item.webkitGetAsEntry) {
+                            entry = item.webkitGetAsEntry();
+                            if (entry) {
+                                // Workaround for Chrome bug #149735:
+                                entry._file = item.getAsFile();
+                            }
+                            return entry;
+                        }
+                        return item.getAsEntry();
+                    })
+                );
+            }
+            return $.Deferred().resolve(
+                $.makeArray(dataTransfer.files)
+            ).promise();
+        },
+
+        _getSingleFileInputFiles: function (fileInput) {
+            fileInput = $(fileInput);
+            var entries = fileInput.prop('webkitEntries') ||
+                    fileInput.prop('entries'),
+                files,
+                value;
+            if (entries && entries.length) {
+                return this._handleFileTreeEntries(entries);
+            }
+            files = $.makeArray(fileInput.prop('files'));
+            if (!files.length) {
+                value = fileInput.prop('value');
+                if (!value) {
+                    return $.Deferred().resolve([]).promise();
+                }
+                // If the files property is not available, the browser does not
+                // support the File API and we add a pseudo File object with
+                // the input value as name with path information removed:
+                files = [{name: value.replace(/^.*\\/, '')}];
+            } else if (files[0].name === undefined && files[0].fileName) {
+                // File normalization for Safari 4 and Firefox 3:
+                $.each(files, function (index, file) {
+                    file.name = file.fileName;
+                    file.size = file.fileSize;
+                });
+            }
+            return $.Deferred().resolve(files).promise();
+        },
+
+        _getFileInputFiles: function (fileInput) {
+            if (!(fileInput instanceof $) || fileInput.length === 1) {
+                return this._getSingleFileInputFiles(fileInput);
+            }
+            return $.when.apply(
+                $,
+                $.map(fileInput, this._getSingleFileInputFiles)
+            ).pipe(function () {
+                return Array.prototype.concat.apply(
+                    [],
+                    arguments
+                );
+            });
+        },
+
+        _onChange: function (e) {
+            var that = this,
+                data = {
+                    fileInput: $(e.target),
+                    form: $(e.target.form)
+                };
+            this._getFileInputFiles(data.fileInput).always(function (files) {
+                data.files = files;
+                if (that.options.replaceFileInput) {
+                    that._replaceFileInput(data.fileInput);
+                }
+                if (that._trigger(
+                        'change',
+                        $.Event('change', {delegatedEvent: e}),
+                        data
+                    ) !== false) {
+                    that._onAdd(e, data);
+                }
+            });
+        },
+
+        _onPaste: function (e) {
+            var items = e.originalEvent && e.originalEvent.clipboardData &&
+                    e.originalEvent.clipboardData.items,
+                data = {files: []};
+            if (items && items.length) {
+                $.each(items, function (index, item) {
+                    var file = item.getAsFile && item.getAsFile();
+                    if (file) {
+                        data.files.push(file);
+                    }
+                });
+                if (this._trigger(
+                        'paste',
+                        $.Event('paste', {delegatedEvent: e}),
+                        data
+                    ) !== false) {
+                    this._onAdd(e, data);
+                }
+            }
+        },
+
+        _onDrop: function (e) {
+            e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
+            var that = this,
+                dataTransfer = e.dataTransfer,
+                data = {};
+            if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {
+                e.preventDefault();
+                this._getDroppedFiles(dataTransfer).always(function (files) {
+                    data.files = files;
+                    if (that._trigger(
+                            'drop',
+                            $.Event('drop', {delegatedEvent: e}),
+                            data
+                        ) !== false) {
+                        that._onAdd(e, data);
+                    }
+                });
+            }
+        },
+
+        _onDragOver: function (e) {
+            e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
+            var dataTransfer = e.dataTransfer;
+            if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 &&
+                    this._trigger(
+                        'dragover',
+                        $.Event('dragover', {delegatedEvent: e})
+                    ) !== false) {
+                e.preventDefault();
+                dataTransfer.dropEffect = 'copy';
+            }
+        },
+
+        _initEventHandlers: function () {
+            if (this._isXHRUpload(this.options)) {
+                this._on(this.options.dropZone, {
+                    dragover: this._onDragOver,
+                    drop: this._onDrop
+                });
+                this._on(this.options.pasteZone, {
+                    paste: this._onPaste
+                });
+            }
+            if ($.support.fileInput) {
+                this._on(this.options.fileInput, {
+                    change: this._onChange
+                });
+            }
+        },
+
+        _destroyEventHandlers: function () {
+            this._off(this.options.dropZone, 'dragover drop');
+            this._off(this.options.pasteZone, 'paste');
+            this._off(this.options.fileInput, 'change');
+        },
+
+        _setOption: function (key, value) {
+            var reinit = $.inArray(key, this._specialOptions) !== -1;
+            if (reinit) {
+                this._destroyEventHandlers();
+            }
+            this._super(key, value);
+            if (reinit) {
+                this._initSpecialOptions();
+                this._initEventHandlers();
+            }
+        },
+
+        _initSpecialOptions: function () {
+            var options = this.options;
+            if (options.fileInput === undefined) {
+                options.fileInput = this.element.is('input[type="file"]') ?
+                        this.element : this.element.find('input[type="file"]');
+            } else if (!(options.fileInput instanceof $)) {
+                options.fileInput = $(options.fileInput);
+            }
+            if (!(options.dropZone instanceof $)) {
+                options.dropZone = $(options.dropZone);
+            }
+            if (!(options.pasteZone instanceof $)) {
+                options.pasteZone = $(options.pasteZone);
+            }
+        },
+
+        _getRegExp: function (str) {
+            var parts = str.split('/'),
+                modifiers = parts.pop();
+            parts.shift();
+            return new RegExp(parts.join('/'), modifiers);
+        },
+
+        _isRegExpOption: function (key, value) {
+            return key !== 'url' && $.type(value) === 'string' &&
+                /^\/.*\/[igm]{0,3}$/.test(value);
+        },
+
+        _initDataAttributes: function () {
+            var that = this,
+                options = this.options,
+                clone = $(this.element[0].cloneNode(false));
+            // Initialize options set via HTML5 data-attributes:
+            $.each(
+                clone.data(),
+                function (key, value) {
+                    var dataAttributeName = 'data-' +
+                        // Convert camelCase to hyphen-ated key:
+                        key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
+                    if (clone.attr(dataAttributeName)) {
+                        if (that._isRegExpOption(key, value)) {
+                            value = that._getRegExp(value);
+                        }
+                        options[key] = value;
+                    }
+                }
+            );
+        },
+
+        _create: function () {
+            this._initDataAttributes();
+            this._initSpecialOptions();
+            this._slots = [];
+            this._sequence = this._getXHRPromise(true);
+            this._sending = this._active = 0;
+            this._initProgressObject(this);
+            this._initEventHandlers();
+        },
+
+        // This method is exposed to the widget API and allows to query
+        // the number of active uploads:
+        active: function () {
+            return this._active;
+        },
+
+        // This method is exposed to the widget API and allows to query
+        // the widget upload progress.
+        // It returns an object with loaded, total and bitrate properties
+        // for the running uploads:
+        progress: function () {
+            return this._progress;
+        },
+
+        // This method is exposed to the widget API and allows adding files
+        // using the fileupload API. The data parameter accepts an object which
+        // must have a files property and can contain additional options:
+        // .fileupload('add', {files: filesList});
+        add: function (data) {
+            var that = this;
+            if (!data || this.options.disabled) {
+                return;
+            }
+            if (data.fileInput && !data.files) {
+                this._getFileInputFiles(data.fileInput).always(function (files) {
+                    data.files = files;
+                    that._onAdd(null, data);
+                });
+            } else {
+                data.files = $.makeArray(data.files);
+                this._onAdd(null, data);
+            }
+        },
+
+        // This method is exposed to the widget API and allows sending files
+        // using the fileupload API. The data parameter accepts an object which
+        // must have a files or fileInput property and can contain additional options:
+        // .fileupload('send', {files: filesList});
+        // The method returns a Promise object for the file upload call.
+        send: function (data) {
+            if (data && !this.options.disabled) {
+                if (data.fileInput && !data.files) {
+                    var that = this,
+                        dfd = $.Deferred(),
+                        promise = dfd.promise(),
+                        jqXHR,
+                        aborted;
+                    promise.abort = function () {
+                        aborted = true;
+                        if (jqXHR) {
+                            return jqXHR.abort();
+                        }
+                        dfd.reject(null, 'abort', 'abort');
+                        return promise;
+                    };
+                    this._getFileInputFiles(data.fileInput).always(
+                        function (files) {
+                            if (aborted) {
+                                return;
+                            }
+                            if (!files.length) {
+                                dfd.reject();
+                                return;
+                            }
+                            data.files = files;
+                            jqXHR = that._onSend(null, data).then(
+                                function (result, textStatus, jqXHR) {
+                                    dfd.resolve(result, textStatus, jqXHR);
+                                },
+                                function (jqXHR, textStatus, errorThrown) {
+                                    dfd.reject(jqXHR, textStatus, errorThrown);
+                                }
+                            );
+                        }
+                    );
+                    return this._enhancePromise(promise);
+                }
+                data.files = $.makeArray(data.files);
+                if (data.files.length) {
+                    return this._onSend(null, data);
+                }
+            }
+            return this._getXHRPromise(false, data && data.context);
+        }
+
+    });
+
+}));


[67/93] [abbrv] jena git commit: JENA-843 : quote replacement string to protect literal \ and $.

Posted by rv...@apache.org.
JENA-843 : quote replacement string to protect literal \ and $.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/3d9cdd5b
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/3d9cdd5b
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/3d9cdd5b

Branch: refs/heads/hadoop-rdf
Commit: 3d9cdd5b7bcdf502651099848fde60b1c25aae97
Parents: 9934c2c
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Jan 6 11:52:49 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Jan 6 11:52:49 2015 +0000

----------------------------------------------------------------------
 .../java/org/apache/jena/fuseki/build/TemplateFunctions.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/3d9cdd5b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
index 41c21c5..61c4b68 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
@@ -22,6 +22,7 @@ import java.io.IOException ;
 import java.io.InputStream ;
 import java.util.Map ;
 import java.util.Map.Entry ;
+import java.util.regex.Matcher ;
 
 import org.apache.jena.atlas.io.IO ;
 import org.apache.jena.fuseki.Fuseki ;
@@ -61,7 +62,9 @@ public class TemplateFunctions
     /** Create a template from a String */ 
     public static String templateString(String template, Map<String, String> params) {
         for ( Entry<String, String> e : params.entrySet() ) {
-            template = template.replaceAll("\\{"+e.getKey()+"\\}", e.getValue()) ;
+            // Backslashes (\) and dollar signs ($) in the replacement string have special meaning.
+            String x = Matcher.quoteReplacement(e.getValue()) ; 
+            template = template.replaceAll("\\{"+e.getKey()+"\\}", x) ;
         }
         return template ;
     }


[74/93] [abbrv] jena git commit: Merge branch 'master' into hadoop-rdf

Posted by rv...@apache.org.
Merge branch 'master' into hadoop-rdf


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

Branch: refs/heads/hadoop-rdf
Commit: b24e9e7d710303ed271da10b72e6b2ce90ea8793
Parents: 963f9ce 3d9cdd5
Author: Rob Vesse <rv...@apache.org>
Authored: Wed Jan 7 14:55:55 2015 +0000
Committer: Rob Vesse <rv...@apache.org>
Committed: Wed Jan 7 14:55:55 2015 +0000

----------------------------------------------------------------------
 .../org/apache/jena/atlas/lib/MultiMap.java     |    5 +-
 jena-csv/pom.xml                                |    6 -
 .../impl/PropertyTableHashMapImpl.java          |   59 +-
 jena-fuseki2/D.trig                             |   20 -
 jena-fuseki2/D.ttl                              |   19 -
 jena-fuseki2/Data/books.ttl                     |   62 -
 jena-fuseki2/Data/test_abox.ttl                 |   21 -
 jena-fuseki2/Data/test_data_rdfs.ttl            |   28 -
 jena-fuseki2/Data/test_tbox.ttl                 |   25 -
 jena-fuseki2/assembly-dist.xml                  |   88 -
 jena-fuseki2/backup                             |   22 -
 jena-fuseki2/bin/s-delete                       |  707 --
 jena-fuseki2/bin/s-get                          |  707 --
 jena-fuseki2/bin/s-head                         |  707 --
 jena-fuseki2/bin/s-post                         |  707 --
 jena-fuseki2/bin/s-put                          |  707 --
 jena-fuseki2/bin/s-query                        |  707 --
 jena-fuseki2/bin/s-update                       |  707 --
 jena-fuseki2/bin/s-update-form                  |  707 --
 jena-fuseki2/bin/soh                            |  707 --
 jena-fuseki2/dist/ABOUT                         |    1 -
 jena-fuseki2/dist/LICENSE                       |  617 --
 jena-fuseki2/dist/NOTICE                        |  216 -
 jena-fuseki2/dwim                               |   19 -
 jena-fuseki2/dwim-upload                        |   48 -
 jena-fuseki2/fuseki                             |  477 -
 jena-fuseki2/fuseki-dev                         |   77 -
 jena-fuseki2/fuseki-server                      |   64 -
 jena-fuseki2/fuseki-server.bat                  |   19 -
 jena-fuseki2/jena-fuseki-core/fuseki-dev        |   77 +
 jena-fuseki2/jena-fuseki-core/make_cp_mvn       |   50 +
 jena-fuseki2/jena-fuseki-core/pom.xml           |  314 +
 .../main/java/org/apache/jena/fuseki/DEF.java   |   79 +
 .../java/org/apache/jena/fuseki/Fuseki.java     |  227 +
 .../java/org/apache/jena/fuseki/FusekiCmd.java  |   49 +
 .../jena/fuseki/FusekiConfigException.java      |   28 +
 .../org/apache/jena/fuseki/FusekiException.java |   29 +
 .../java/org/apache/jena/fuseki/FusekiLib.java  |  258 +
 .../org/apache/jena/fuseki/FusekiLogging.java   |  171 +
 .../jena/fuseki/FusekiNotFoundException.java    |   26 +
 .../jena/fuseki/FusekiRequestException.java     |   57 +
 .../org/apache/jena/fuseki/async/AsyncPool.java |   97 +
 .../org/apache/jena/fuseki/async/AsyncTask.java |  114 +
 .../fuseki/authz/AuthorizationFilter403.java    |   59 +
 .../apache/jena/fuseki/authz/DenyFilter.java    |   33 +
 .../jena/fuseki/authz/LocalhostFilter.java      |   62 +
 .../org/apache/jena/fuseki/build/Builder.java   |  149 +
 .../jena/fuseki/build/DataServiceDesc.java      |  107 +
 .../apache/jena/fuseki/build/FusekiConfig.java  |  261 +
 .../org/apache/jena/fuseki/build/Template.java  |   52 +
 .../jena/fuseki/build/TemplateFunctions.java    |   71 +
 .../org/apache/jena/fuseki/cmd/FusekiCmd.java   |  339 +
 .../org/apache/jena/fuseki/conneg/ConNeg.java   |  206 +
 .../org/apache/jena/fuseki/conneg/WebLib.java   |   60 +
 .../jena/fuseki/jetty/FusekiErrorHandler.java   |   95 +
 .../apache/jena/fuseki/jetty/JettyFuseki.java   |  310 +
 .../jena/fuseki/jetty/JettyServerConfig.java    |   51 +
 .../apache/jena/fuseki/mgt/ActionAsyncTask.java |   70 +
 .../apache/jena/fuseki/mgt/ActionBackup.java    |   84 +
 .../jena/fuseki/mgt/ActionContainerItem.java    |   94 +
 .../org/apache/jena/fuseki/mgt/ActionCtl.java   |   97 +
 .../apache/jena/fuseki/mgt/ActionDatasets.java  |  404 +
 .../org/apache/jena/fuseki/mgt/ActionItem.java  |   45 +
 .../org/apache/jena/fuseki/mgt/ActionLogs.java  |   59 +
 .../org/apache/jena/fuseki/mgt/ActionPing.java  |   78 +
 .../jena/fuseki/mgt/ActionServerStatus.java     |  114 +
 .../org/apache/jena/fuseki/mgt/ActionSleep.java |   98 +
 .../org/apache/jena/fuseki/mgt/ActionStats.java |  214 +
 .../org/apache/jena/fuseki/mgt/ActionTasks.java |  125 +
 .../java/org/apache/jena/fuseki/mgt/Async.java  |   68 +
 .../java/org/apache/jena/fuseki/mgt/Backup.java |  102 +
 .../org/apache/jena/fuseki/mgt/DumpServlet.java |  312 +
 .../org/apache/jena/fuseki/mgt/JsonConst.java   |   52 +
 .../apache/jena/fuseki/mgt/JsonDescription.java |   73 +
 .../org/apache/jena/fuseki/mgt/MgtConst.java    |   30 +
 .../java/org/apache/jena/fuseki/mgt/MgtJMX.java |   61 +
 .../fuseki/migrate/DatasetGraphSwitchable.java  |   88 +
 .../jena/fuseki/migrate/GraphLoadUtils.java     |   76 +
 .../apache/jena/fuseki/migrate/Registry.java    |   39 +
 .../jena/fuseki/migrate/StreamRDFLimited.java   |   63 +
 .../org/apache/jena/fuseki/server/Counter.java  |   34 +
 .../jena/fuseki/server/CounterMXBean.java       |   25 +
 .../apache/jena/fuseki/server/CounterName.java  |   84 +
 .../apache/jena/fuseki/server/CounterSet.java   |   70 +
 .../org/apache/jena/fuseki/server/Counters.java |   25 +
 .../jena/fuseki/server/DataAccessPoint.java     |   75 +
 .../fuseki/server/DataAccessPointRegistry.java  |   37 +
 .../apache/jena/fuseki/server/DataService.java  |  199 +
 .../jena/fuseki/server/DatasetMXBean.java       |   35 +
 .../jena/fuseki/server/DatasetStatus.java       |   40 +
 .../org/apache/jena/fuseki/server/Endpoint.java |   68 +
 .../apache/jena/fuseki/server/FusekiEnv.java    |  114 +
 .../apache/jena/fuseki/server/FusekiServer.java |  395 +
 .../server/FusekiServerEnvironmentInit.java     |   41 +
 .../fuseki/server/FusekiServerListener.java     |   81 +
 .../apache/jena/fuseki/server/FusekiVocab.java  |   77 +
 .../jena/fuseki/server/OperationName.java       |   37 +
 .../apache/jena/fuseki/server/RequestLog.java   |  148 +
 .../jena/fuseki/server/ServerInitialConfig.java |   39 +
 .../jena/fuseki/server/ServiceMXBean.java       |   32 +
 .../fuseki/server/ShiroEnvironmentLoader.java   |  164 +
 .../apache/jena/fuseki/server/SystemState.java  |  108 +
 .../apache/jena/fuseki/servlets/ActionBase.java |  265 +
 .../fuseki/servlets/ActionErrorException.java   |   32 +
 .../apache/jena/fuseki/servlets/ActionLib.java  |  180 +
 .../apache/jena/fuseki/servlets/ActionREST.java |  161 +
 .../jena/fuseki/servlets/ActionSPARQL.java      |  207 +
 .../fuseki/servlets/ConcurrencyPolicyMRSW.java  |  113 +
 .../jena/fuseki/servlets/FusekiFilter.java      |   87 +
 .../apache/jena/fuseki/servlets/HttpAction.java |  387 +
 .../servlets/HttpServletResponseTracker.java    |  140 +
 .../jena/fuseki/servlets/NullOutputStream.java  |   53 +
 .../apache/jena/fuseki/servlets/REST_Quads.java |   68 +
 .../jena/fuseki/servlets/REST_Quads_R.java      |   99 +
 .../jena/fuseki/servlets/REST_Quads_RW.java     |  136 +
 .../jena/fuseki/servlets/ResponseCallback.java  |   24 +
 .../jena/fuseki/servlets/ResponseModel.java     |  136 +
 .../jena/fuseki/servlets/ResponseOps.java       |   94 +
 .../jena/fuseki/servlets/ResponseResultSet.java |  322 +
 .../apache/jena/fuseki/servlets/SPARQL_GSP.java |  214 +
 .../jena/fuseki/servlets/SPARQL_GSP_R.java      |  123 +
 .../jena/fuseki/servlets/SPARQL_GSP_RW.java     |  208 +
 .../jena/fuseki/servlets/SPARQL_Protocol.java   |  101 +
 .../jena/fuseki/servlets/SPARQL_Query.java      |  393 +
 .../fuseki/servlets/SPARQL_QueryDataset.java    |   60 +
 .../fuseki/servlets/SPARQL_QueryGeneral.java    |  142 +
 .../fuseki/servlets/SPARQL_UberServlet.java     |  359 +
 .../jena/fuseki/servlets/SPARQL_Update.java     |  286 +
 .../jena/fuseki/servlets/SPARQL_Upload.java     |  291 +
 .../jena/fuseki/servlets/ServletBase.java       |   98 +
 .../apache/jena/fuseki/servlets/ServletOps.java |  209 +
 .../org/apache/jena/fuseki/servlets/Upload.java |  164 +
 .../jena/fuseki/servlets/UploadDetails.java     |   86 +
 .../jena/fuseki/validation/DataValidator.java   |  131 +
 .../jena/fuseki/validation/IRIValidator.java    |  168 +
 .../jena/fuseki/validation/QueryValidator.java  |  154 +
 .../jena/fuseki/validation/UpdateValidator.java |   91 +
 .../fuseki/validation/ValidationAction.java     |   95 +
 .../jena/fuseki/validation/ValidationError.java |   24 +
 .../fuseki/validation/ValidatorBaseJson.java    |  201 +
 .../src/main/resources/META-INF/DEPENDENCIES    |   24 +
 .../src/main/resources/META-INF/LICENSE         |  253 +
 .../src/main/resources/META-INF/NOTICE          |   16 +
 .../apache/jena/fuseki/fuseki-properties.xml    |    8 +
 .../org/apache/jena/fuseki/log4j.properties     |   42 +
 .../org/apache/jena/fuseki/server/config.ttl    |   30 +
 .../org/apache/jena/fuseki/server/shiro.ini     |   39 +
 .../jena/fuseki/server/templates/config-mem     |   27 +
 .../jena/fuseki/server/templates/config-service |   23 +
 .../jena/fuseki/server/templates/config-tdb     |   36 +
 .../jena/fuseki/server/templates/config-tdb-dir |   35 +
 .../jena/fuseki/server/templates/config-tdb-mem |   36 +
 .../src/main/webapp/WEB-INF/web.xml             |  269 +
 .../src/main/webapp/admin-logs.html             |   72 +
 .../main/webapp/css/bootstrap-select.min.css    |    7 +
 .../src/main/webapp/css/bootstrap-theme.css.map |    1 +
 .../src/main/webapp/css/bootstrap-theme.min.css |    7 +
 .../src/main/webapp/css/bootstrap.css.map       |    1 +
 .../src/main/webapp/css/bootstrap.min.css       |    7 +
 .../src/main/webapp/css/codemirror.min.css      |    1 +
 .../src/main/webapp/css/font-awesome.min.css    |    4 +
 .../src/main/webapp/css/fui.css                 |  191 +
 .../webapp/css/jquery.fileupload-noscript.css   |   22 +
 .../css/jquery.fileupload-ui-noscript.css       |   17 +
 .../main/webapp/css/jquery.fileupload-ui.css    |   57 +
 .../src/main/webapp/css/jquery.fileupload.css   |   36 +
 .../src/main/webapp/css/pivot.min.css           |    1 +
 .../src/main/webapp/css/qonsole.css             |  172 +
 .../src/main/webapp/css/yasqe.min.css           |    1 +
 .../src/main/webapp/css/yasr.min.css            |    1 +
 .../src/main/webapp/dataset.html                |  245 +
 .../src/main/webapp/documentation.html          |   80 +
 .../src/main/webapp/fonts/FontAwesome.otf       |  Bin 0 -> 75188 bytes
 .../main/webapp/fonts/fontawesome-webfont.eot   |  Bin 0 -> 72449 bytes
 .../main/webapp/fonts/fontawesome-webfont.svg   |  504 +
 .../main/webapp/fonts/fontawesome-webfont.ttf   |  Bin 0 -> 141564 bytes
 .../main/webapp/fonts/fontawesome-webfont.woff  |  Bin 0 -> 83760 bytes
 .../fonts/glyphicons-halflings-regular.eot      |  Bin 0 -> 20335 bytes
 .../fonts/glyphicons-halflings-regular.svg      |  229 +
 .../fonts/glyphicons-halflings-regular.ttf      |  Bin 0 -> 41280 bytes
 .../fonts/glyphicons-halflings-regular.woff     |  Bin 0 -> 23320 bytes
 .../src/main/webapp/images/back_disabled.png    |  Bin 0 -> 1361 bytes
 .../src/main/webapp/images/back_enabled.png     |  Bin 0 -> 1379 bytes
 .../main/webapp/images/back_enabled_hover.png   |  Bin 0 -> 1375 bytes
 .../src/main/webapp/images/favicon.ico          |  Bin 0 -> 1085 bytes
 .../src/main/webapp/images/forward_disabled.png |  Bin 0 -> 1363 bytes
 .../src/main/webapp/images/forward_enabled.png  |  Bin 0 -> 1380 bytes
 .../webapp/images/forward_enabled_hover.png     |  Bin 0 -> 1379 bytes
 .../webapp/images/jena-logo-notext-small.png    |  Bin 0 -> 2469 bytes
 .../src/main/webapp/images/sort_asc.png         |  Bin 0 -> 1118 bytes
 .../main/webapp/images/sort_asc_disabled.png    |  Bin 0 -> 1050 bytes
 .../src/main/webapp/images/sort_both.png        |  Bin 0 -> 1136 bytes
 .../src/main/webapp/images/sort_desc.png        |  Bin 0 -> 1127 bytes
 .../main/webapp/images/sort_desc_disabled.png   |  Bin 0 -> 1045 bytes
 .../src/main/webapp/images/wait30.gif           |  Bin 0 -> 6337 bytes
 .../jena-fuseki-core/src/main/webapp/index.html |  103 +
 .../src/main/webapp/js/app/controllers/.svnkeep |    0
 .../js/app/controllers/dataset-controller.js    |   69 +
 .../js/app/controllers/index-controller.js      |   50 +
 .../js/app/controllers/manage-controller.js     |   39 +
 .../js/app/controllers/query-controller.js      |   72 +
 .../js/app/controllers/upload-controller.js     |   42 +
 .../js/app/controllers/validation-controller.js |   38 +
 .../src/main/webapp/js/app/fui.js               |   33 +
 .../src/main/webapp/js/app/layouts/.svnkeep     |    0
 .../src/main/webapp/js/app/main.dataset.js      |   31 +
 .../src/main/webapp/js/app/main.index.js        |   24 +
 .../src/main/webapp/js/app/main.manage.js       |   27 +
 .../src/main/webapp/js/app/main.validation.js   |   24 +
 .../main/webapp/js/app/models/dataset-stats.js  |  102 +
 .../src/main/webapp/js/app/models/dataset.js    |  251 +
 .../main/webapp/js/app/models/fuseki-server.js  |  155 +
 .../src/main/webapp/js/app/models/task.js       |  105 +
 .../webapp/js/app/models/validation-options.js  |   85 +
 .../src/main/webapp/js/app/qonsole-config.js    |   26 +
 .../src/main/webapp/js/app/routers/.svnkeep     |    0
 .../main/webapp/js/app/services/ping-service.js |   54 +
 .../js/app/services/validation-service.js       |   98 +
 .../webapp/js/app/templates/dataset-edit.tpl    |   58 +
 .../webapp/js/app/templates/dataset-info.tpl    |   40 +
 .../js/app/templates/dataset-management.tpl     |   53 +
 .../js/app/templates/dataset-selection-list.tpl |   22 +
 .../js/app/templates/dataset-selector.tpl       |   15 +
 .../js/app/templates/dataset-simple-create.tpl  |   79 +
 .../webapp/js/app/templates/dataset-stats.tpl   |   14 +
 .../webapp/js/app/templates/file-upload.tpl     |   46 +
 .../webapp/js/app/templates/uploadable-file.tpl |   23 +
 .../src/main/webapp/js/app/util/page-utils.js   |   33 +
 .../src/main/webapp/js/app/views/.svnkeep       |    0
 .../main/webapp/js/app/views/dataset-edit.js    |  205 +
 .../main/webapp/js/app/views/dataset-info.js    |   76 +
 .../webapp/js/app/views/dataset-management.js   |  163 +
 .../js/app/views/dataset-selection-list.js      |   58 +
 .../webapp/js/app/views/dataset-selector.js     |   84 +
 .../js/app/views/dataset-simple-create.js       |  100 +
 .../main/webapp/js/app/views/dataset-stats.js   |   41 +
 .../js/app/views/datasets-dropdown-list.js      |   43 +
 .../src/main/webapp/js/app/views/file-upload.js |  225 +
 .../webapp/js/app/views/tabbed-view-manager.js  |   63 +
 .../main/webapp/js/app/views/uploadable-file.js |   39 +
 .../webapp/js/app/views/validation-options.js   |   54 +
 .../src/main/webapp/js/common-config.js         |   93 +
 .../main/webapp/js/lib/addon/fold/brace-fold.js |  105 +
 .../webapp/js/lib/addon/fold/comment-fold.js    |   57 +
 .../main/webapp/js/lib/addon/fold/foldcode.js   |  145 +
 .../main/webapp/js/lib/addon/fold/foldgutter.js |  134 +
 .../main/webapp/js/lib/addon/fold/xml-fold.js   |  181 +
 .../src/main/webapp/js/lib/backbone-min.js      |    2 +
 .../src/main/webapp/js/lib/backbone.js          | 1581 +++
 .../main/webapp/js/lib/backbone.marionette.js   | 2385 +++++
 .../main/webapp/js/lib/bootstrap-select.min.js  |    8 +
 .../src/main/webapp/js/lib/bootstrap.min.js     |    6 +
 .../src/main/webapp/js/lib/html5shiv.js         |    8 +
 .../src/main/webapp/js/lib/jquery-1.10.2.js     | 9789 ++++++++++++++++++
 .../src/main/webapp/js/lib/jquery-1.10.2.min.js |    6 +
 .../src/main/webapp/js/lib/jquery-ui.min.js     |    7 +
 .../main/webapp/js/lib/jquery.dataTables.min.js |  157 +
 .../src/main/webapp/js/lib/jquery.fileupload.js | 1426 +++
 .../webapp/js/lib/jquery.fileupload.local.js    | 1428 +++
 .../src/main/webapp/js/lib/jquery.form.js       | 1278 +++
 .../webapp/js/lib/jquery.iframe-transport.js    |  214 +
 .../src/main/webapp/js/lib/jquery.ui.widget.js  |  530 +
 .../main/webapp/js/lib/jquery.xdomainrequest.js |   90 +
 .../src/main/webapp/js/lib/lib/codemirror.js    | 7638 ++++++++++++++
 .../webapp/js/lib/mode/javascript/javascript.js |  683 ++
 .../main/webapp/js/lib/mode/sparql/sparql.js    |  160 +
 .../main/webapp/js/lib/mode/turtle/turtle.js    |  160 +
 .../src/main/webapp/js/lib/mode/xml/xml.js      |  384 +
 .../src/main/webapp/js/lib/pivot.js             | 1363 +++
 .../src/main/webapp/js/lib/pivot.min.js         |    2 +
 .../src/main/webapp/js/lib/pivot.min.js.map     |    1 +
 .../src/main/webapp/js/lib/plugins/text.js      |  386 +
 .../src/main/webapp/js/lib/qonsole.js           |  570 +
 .../src/main/webapp/js/lib/refresh.sh           |   21 +
 .../src/main/webapp/js/lib/require.js           | 2076 ++++
 .../src/main/webapp/js/lib/require.min.js       |   36 +
 .../src/main/webapp/js/lib/respond.min.js       |    6 +
 .../src/main/webapp/js/lib/sprintf-0.7-beta1.js |  183 +
 .../src/main/webapp/js/lib/underscore.js        | 1276 +++
 .../src/main/webapp/js/lib/yasqe.min.js         |    5 +
 .../src/main/webapp/js/lib/yasqe.min.js.map     |    1 +
 .../src/main/webapp/js/lib/yasr.min.js          |    5 +
 .../src/main/webapp/js/lib/yasr.min.js.map      |    1 +
 .../src/main/webapp/manage.html                 |  107 +
 .../src/main/webapp/services.html               |   75 +
 .../src/main/webapp/test/test-fuseki-config.ttl |   27 +
 .../src/main/webapp/validate.html               |  146 +
 .../apache/jena/fuseki/AbstractFusekiTest.java  |   47 +
 .../java/org/apache/jena/fuseki/FileSender.java |   87 +
 .../java/org/apache/jena/fuseki/ServerTest.java |  157 +
 .../java/org/apache/jena/fuseki/TS_Fuseki.java  |   75 +
 .../java/org/apache/jena/fuseki/TestAdmin.java  |  538 +
 .../java/org/apache/jena/fuseki/TestAuth.java   |  405 +
 .../org/apache/jena/fuseki/TestDatasetOps.java  |  154 +
 .../org/apache/jena/fuseki/TestFileUpload.java  |  128 +
 .../java/org/apache/jena/fuseki/TestQuery.java  |  115 +
 .../apache/jena/fuseki/TestSPARQLProtocol.java  |   95 +
 .../fuseki/http/TestDatasetAccessorHTTP.java    |  261 +
 .../http/TestDatasetGraphAccessorHTTP.java      |   43 +
 .../org/apache/jena/fuseki/http/TestHttpOp.java |  233 +
 .../jena-fuseki-core/testing/config-ds-1.ttl    |   15 +
 jena-fuseki2/jena-fuseki-dist/assembly-dist.xml |  100 +
 jena-fuseki2/jena-fuseki-dist/backup            |   22 +
 jena-fuseki2/jena-fuseki-dist/bin/s-delete      |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-get         |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-head        |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-post        |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-put         |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-query       |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-update      |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-update-form |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/soh           |  707 ++
 jena-fuseki2/jena-fuseki-dist/dist/ABOUT        |    1 +
 jena-fuseki2/jena-fuseki-dist/dist/LICENSE      |  617 ++
 jena-fuseki2/jena-fuseki-dist/dist/NOTICE       |  216 +
 jena-fuseki2/jena-fuseki-dist/fuseki            |  477 +
 jena-fuseki2/jena-fuseki-dist/fuseki-server     |   65 +
 jena-fuseki2/jena-fuseki-dist/fuseki-server.bat |   19 +
 jena-fuseki2/jena-fuseki-dist/pom.xml           |   95 +
 jena-fuseki2/jena-fuseki-server/.gitignore      |    1 +
 jena-fuseki2/jena-fuseki-server/pom.xml         |  127 +
 jena-fuseki2/jena-fuseki-war/pom.xml            |  109 +
 jena-fuseki2/make-html                          |   29 -
 jena-fuseki2/make_cp_mvn                        |   50 -
 jena-fuseki2/pom.xml                            |  381 +-
 .../main/java/org/apache/jena/fuseki/DEF.java   |   79 -
 .../java/org/apache/jena/fuseki/Fuseki.java     |  227 -
 .../java/org/apache/jena/fuseki/FusekiCmd.java  |  337 -
 .../jena/fuseki/FusekiConfigException.java      |   28 -
 .../org/apache/jena/fuseki/FusekiException.java |   29 -
 .../java/org/apache/jena/fuseki/FusekiLib.java  |  258 -
 .../org/apache/jena/fuseki/FusekiLogging.java   |  171 -
 .../jena/fuseki/FusekiNotFoundException.java    |   26 -
 .../jena/fuseki/FusekiRequestException.java     |   57 -
 .../org/apache/jena/fuseki/async/AsyncPool.java |   97 -
 .../org/apache/jena/fuseki/async/AsyncTask.java |  114 -
 .../fuseki/authz/AuthorizationFilter403.java    |   59 -
 .../apache/jena/fuseki/authz/DenyFilter.java    |   33 -
 .../jena/fuseki/authz/LocalhostFilter.java      |   62 -
 .../org/apache/jena/fuseki/build/Builder.java   |  149 -
 .../jena/fuseki/build/DataServiceDesc.java      |  107 -
 .../apache/jena/fuseki/build/FusekiConfig.java  |  261 -
 .../org/apache/jena/fuseki/build/Template.java  |   52 -
 .../jena/fuseki/build/TemplateFunctions.java    |   68 -
 .../org/apache/jena/fuseki/conneg/ConNeg.java   |  206 -
 .../org/apache/jena/fuseki/conneg/WebLib.java   |   60 -
 .../jena/fuseki/jetty/FusekiErrorHandler.java   |   95 -
 .../apache/jena/fuseki/jetty/JettyFuseki.java   |  305 -
 .../jena/fuseki/jetty/JettyServerConfig.java    |   51 -
 .../apache/jena/fuseki/mgt/ActionAsyncTask.java |   70 -
 .../apache/jena/fuseki/mgt/ActionBackup.java    |   84 -
 .../jena/fuseki/mgt/ActionContainerItem.java    |   94 -
 .../org/apache/jena/fuseki/mgt/ActionCtl.java   |   97 -
 .../apache/jena/fuseki/mgt/ActionDatasets.java  |  404 -
 .../org/apache/jena/fuseki/mgt/ActionItem.java  |   45 -
 .../org/apache/jena/fuseki/mgt/ActionLogs.java  |   59 -
 .../org/apache/jena/fuseki/mgt/ActionPing.java  |   78 -
 .../jena/fuseki/mgt/ActionServerStatus.java     |  114 -
 .../org/apache/jena/fuseki/mgt/ActionSleep.java |   98 -
 .../org/apache/jena/fuseki/mgt/ActionStats.java |  214 -
 .../org/apache/jena/fuseki/mgt/ActionTasks.java |  125 -
 .../java/org/apache/jena/fuseki/mgt/Async.java  |   68 -
 .../java/org/apache/jena/fuseki/mgt/Backup.java |  102 -
 .../org/apache/jena/fuseki/mgt/DumpServlet.java |  312 -
 .../org/apache/jena/fuseki/mgt/JsonConst.java   |   52 -
 .../apache/jena/fuseki/mgt/JsonDescription.java |   73 -
 .../org/apache/jena/fuseki/mgt/MgtConst.java    |   30 -
 .../java/org/apache/jena/fuseki/mgt/MgtJMX.java |   61 -
 .../fuseki/migrate/DatasetGraphSwitchable.java  |   88 -
 .../jena/fuseki/migrate/GraphLoadUtils.java     |   76 -
 .../apache/jena/fuseki/migrate/Registry.java    |   39 -
 .../jena/fuseki/migrate/StreamRDFLimited.java   |   63 -
 .../org/apache/jena/fuseki/server/Counter.java  |   34 -
 .../jena/fuseki/server/CounterMXBean.java       |   25 -
 .../apache/jena/fuseki/server/CounterName.java  |   84 -
 .../apache/jena/fuseki/server/CounterSet.java   |   70 -
 .../org/apache/jena/fuseki/server/Counters.java |   25 -
 .../jena/fuseki/server/DataAccessPoint.java     |   75 -
 .../fuseki/server/DataAccessPointRegistry.java  |   37 -
 .../apache/jena/fuseki/server/DataService.java  |  199 -
 .../jena/fuseki/server/DatasetMXBean.java       |   35 -
 .../jena/fuseki/server/DatasetStatus.java       |   40 -
 .../org/apache/jena/fuseki/server/Endpoint.java |   68 -
 .../apache/jena/fuseki/server/FusekiEnv.java    |  114 -
 .../apache/jena/fuseki/server/FusekiServer.java |  395 -
 .../server/FusekiServerEnvironmentInit.java     |   41 -
 .../fuseki/server/FusekiServerListener.java     |   81 -
 .../apache/jena/fuseki/server/FusekiVocab.java  |   77 -
 .../jena/fuseki/server/OperationName.java       |   37 -
 .../apache/jena/fuseki/server/RequestLog.java   |  148 -
 .../jena/fuseki/server/ServerInitialConfig.java |   40 -
 .../jena/fuseki/server/ServiceMXBean.java       |   32 -
 .../fuseki/server/ShiroEnvironmentLoader.java   |  164 -
 .../apache/jena/fuseki/server/SystemState.java  |  108 -
 .../apache/jena/fuseki/servlets/ActionBase.java |  265 -
 .../fuseki/servlets/ActionErrorException.java   |   32 -
 .../apache/jena/fuseki/servlets/ActionLib.java  |  180 -
 .../apache/jena/fuseki/servlets/ActionREST.java |  161 -
 .../jena/fuseki/servlets/ActionSPARQL.java      |  207 -
 .../fuseki/servlets/ConcurrencyPolicyMRSW.java  |  113 -
 .../jena/fuseki/servlets/FusekiFilter.java      |   87 -
 .../apache/jena/fuseki/servlets/HttpAction.java |  387 -
 .../servlets/HttpServletResponseTracker.java    |  140 -
 .../jena/fuseki/servlets/NullOutputStream.java  |   53 -
 .../apache/jena/fuseki/servlets/REST_Quads.java |   68 -
 .../jena/fuseki/servlets/REST_Quads_R.java      |   99 -
 .../jena/fuseki/servlets/REST_Quads_RW.java     |  136 -
 .../jena/fuseki/servlets/ResponseCallback.java  |   24 -
 .../jena/fuseki/servlets/ResponseModel.java     |  136 -
 .../jena/fuseki/servlets/ResponseOps.java       |   94 -
 .../jena/fuseki/servlets/ResponseResultSet.java |  322 -
 .../apache/jena/fuseki/servlets/SPARQL_GSP.java |  214 -
 .../jena/fuseki/servlets/SPARQL_GSP_R.java      |  123 -
 .../jena/fuseki/servlets/SPARQL_GSP_RW.java     |  208 -
 .../jena/fuseki/servlets/SPARQL_Protocol.java   |  101 -
 .../jena/fuseki/servlets/SPARQL_Query.java      |  393 -
 .../fuseki/servlets/SPARQL_QueryDataset.java    |   60 -
 .../fuseki/servlets/SPARQL_QueryGeneral.java    |  142 -
 .../fuseki/servlets/SPARQL_UberServlet.java     |  359 -
 .../jena/fuseki/servlets/SPARQL_Update.java     |  286 -
 .../jena/fuseki/servlets/SPARQL_Upload.java     |  291 -
 .../jena/fuseki/servlets/ServletBase.java       |   98 -
 .../apache/jena/fuseki/servlets/ServletOps.java |  209 -
 .../org/apache/jena/fuseki/servlets/Upload.java |  164 -
 .../jena/fuseki/servlets/UploadDetails.java     |   86 -
 .../jena/fuseki/validation/DataValidator.java   |  131 -
 .../jena/fuseki/validation/IRIValidator.java    |  168 -
 .../jena/fuseki/validation/QueryValidator.java  |  154 -
 .../jena/fuseki/validation/UpdateValidator.java |   91 -
 .../fuseki/validation/ValidationAction.java     |   95 -
 .../jena/fuseki/validation/ValidationError.java |   24 -
 .../fuseki/validation/ValidatorBaseJson.java    |  201 -
 .../src/main/resources/META-INF/DEPENDENCIES    |   24 -
 .../src/main/resources/META-INF/LICENSE         |  253 -
 jena-fuseki2/src/main/resources/META-INF/NOTICE |   16 -
 .../apache/jena/fuseki/fuseki-properties.xml    |    8 -
 .../org/apache/jena/fuseki/log4j.properties     |   42 -
 .../org/apache/jena/fuseki/server/config.ttl    |   30 -
 .../org/apache/jena/fuseki/server/shiro.ini     |   39 -
 .../jena/fuseki/server/templates/config-mem     |   27 -
 .../jena/fuseki/server/templates/config-service |   23 -
 .../jena/fuseki/server/templates/config-tdb     |   36 -
 .../jena/fuseki/server/templates/config-tdb-dir |   35 -
 .../jena/fuseki/server/templates/config-tdb-mem |   36 -
 jena-fuseki2/src/main/webapp/WEB-INF/web.xml    |  269 -
 jena-fuseki2/src/main/webapp/admin-logs.html    |   72 -
 .../main/webapp/css/bootstrap-select.min.css    |    7 -
 .../src/main/webapp/css/bootstrap-theme.css.map |    1 -
 .../src/main/webapp/css/bootstrap-theme.min.css |    7 -
 .../src/main/webapp/css/bootstrap.css.map       |    1 -
 .../src/main/webapp/css/bootstrap.min.css       |    7 -
 .../src/main/webapp/css/codemirror.min.css      |    1 -
 .../src/main/webapp/css/font-awesome.min.css    |    4 -
 jena-fuseki2/src/main/webapp/css/fui.css        |  191 -
 .../webapp/css/jquery.fileupload-noscript.css   |   22 -
 .../css/jquery.fileupload-ui-noscript.css       |   17 -
 .../main/webapp/css/jquery.fileupload-ui.css    |   57 -
 .../src/main/webapp/css/jquery.fileupload.css   |   36 -
 jena-fuseki2/src/main/webapp/css/pivot.min.css  |    1 -
 jena-fuseki2/src/main/webapp/css/qonsole.css    |  172 -
 jena-fuseki2/src/main/webapp/css/yasqe.min.css  |    1 -
 jena-fuseki2/src/main/webapp/css/yasr.min.css   |    1 -
 jena-fuseki2/src/main/webapp/dataset.html       |  245 -
 jena-fuseki2/src/main/webapp/documentation.html |   80 -
 .../src/main/webapp/fonts/FontAwesome.otf       |  Bin 75188 -> 0 bytes
 .../main/webapp/fonts/fontawesome-webfont.eot   |  Bin 72449 -> 0 bytes
 .../main/webapp/fonts/fontawesome-webfont.svg   |  504 -
 .../main/webapp/fonts/fontawesome-webfont.ttf   |  Bin 141564 -> 0 bytes
 .../main/webapp/fonts/fontawesome-webfont.woff  |  Bin 83760 -> 0 bytes
 .../fonts/glyphicons-halflings-regular.eot      |  Bin 20335 -> 0 bytes
 .../fonts/glyphicons-halflings-regular.svg      |  229 -
 .../fonts/glyphicons-halflings-regular.ttf      |  Bin 41280 -> 0 bytes
 .../fonts/glyphicons-halflings-regular.woff     |  Bin 23320 -> 0 bytes
 .../src/main/webapp/images/back_disabled.png    |  Bin 1361 -> 0 bytes
 .../src/main/webapp/images/back_enabled.png     |  Bin 1379 -> 0 bytes
 .../main/webapp/images/back_enabled_hover.png   |  Bin 1375 -> 0 bytes
 jena-fuseki2/src/main/webapp/images/favicon.ico |  Bin 1085 -> 0 bytes
 .../src/main/webapp/images/forward_disabled.png |  Bin 1363 -> 0 bytes
 .../src/main/webapp/images/forward_enabled.png  |  Bin 1380 -> 0 bytes
 .../webapp/images/forward_enabled_hover.png     |  Bin 1379 -> 0 bytes
 .../webapp/images/jena-logo-notext-small.png    |  Bin 2469 -> 0 bytes
 .../src/main/webapp/images/sort_asc.png         |  Bin 1118 -> 0 bytes
 .../main/webapp/images/sort_asc_disabled.png    |  Bin 1050 -> 0 bytes
 .../src/main/webapp/images/sort_both.png        |  Bin 1136 -> 0 bytes
 .../src/main/webapp/images/sort_desc.png        |  Bin 1127 -> 0 bytes
 .../main/webapp/images/sort_desc_disabled.png   |  Bin 1045 -> 0 bytes
 jena-fuseki2/src/main/webapp/images/wait30.gif  |  Bin 6337 -> 0 bytes
 jena-fuseki2/src/main/webapp/index.html         |  103 -
 .../src/main/webapp/js/app/controllers/.svnkeep |    0
 .../js/app/controllers/dataset-controller.js    |   69 -
 .../js/app/controllers/index-controller.js      |   50 -
 .../js/app/controllers/manage-controller.js     |   39 -
 .../js/app/controllers/query-controller.js      |   72 -
 .../js/app/controllers/upload-controller.js     |   42 -
 .../js/app/controllers/validation-controller.js |   38 -
 jena-fuseki2/src/main/webapp/js/app/fui.js      |   33 -
 .../src/main/webapp/js/app/layouts/.svnkeep     |    0
 .../src/main/webapp/js/app/main.dataset.js      |   31 -
 .../src/main/webapp/js/app/main.index.js        |   24 -
 .../src/main/webapp/js/app/main.manage.js       |   27 -
 .../src/main/webapp/js/app/main.validation.js   |   24 -
 .../main/webapp/js/app/models/dataset-stats.js  |  102 -
 .../src/main/webapp/js/app/models/dataset.js    |  251 -
 .../main/webapp/js/app/models/fuseki-server.js  |  155 -
 .../src/main/webapp/js/app/models/task.js       |  105 -
 .../webapp/js/app/models/validation-options.js  |   85 -
 .../src/main/webapp/js/app/qonsole-config.js    |   26 -
 .../src/main/webapp/js/app/routers/.svnkeep     |    0
 .../main/webapp/js/app/services/ping-service.js |   54 -
 .../js/app/services/validation-service.js       |   98 -
 .../webapp/js/app/templates/dataset-edit.tpl    |   58 -
 .../webapp/js/app/templates/dataset-info.tpl    |   40 -
 .../js/app/templates/dataset-management.tpl     |   53 -
 .../js/app/templates/dataset-selection-list.tpl |   22 -
 .../js/app/templates/dataset-selector.tpl       |   15 -
 .../js/app/templates/dataset-simple-create.tpl  |   79 -
 .../webapp/js/app/templates/dataset-stats.tpl   |   14 -
 .../webapp/js/app/templates/file-upload.tpl     |   46 -
 .../webapp/js/app/templates/uploadable-file.tpl |   23 -
 .../src/main/webapp/js/app/util/page-utils.js   |   33 -
 .../src/main/webapp/js/app/views/.svnkeep       |    0
 .../main/webapp/js/app/views/dataset-edit.js    |  205 -
 .../main/webapp/js/app/views/dataset-info.js    |   76 -
 .../webapp/js/app/views/dataset-management.js   |  163 -
 .../js/app/views/dataset-selection-list.js      |   58 -
 .../webapp/js/app/views/dataset-selector.js     |   84 -
 .../js/app/views/dataset-simple-create.js       |  100 -
 .../main/webapp/js/app/views/dataset-stats.js   |   41 -
 .../js/app/views/datasets-dropdown-list.js      |   43 -
 .../src/main/webapp/js/app/views/file-upload.js |  225 -
 .../webapp/js/app/views/tabbed-view-manager.js  |   63 -
 .../main/webapp/js/app/views/uploadable-file.js |   39 -
 .../webapp/js/app/views/validation-options.js   |   54 -
 .../src/main/webapp/js/common-config.js         |   93 -
 .../main/webapp/js/lib/addon/fold/brace-fold.js |  105 -
 .../webapp/js/lib/addon/fold/comment-fold.js    |   57 -
 .../main/webapp/js/lib/addon/fold/foldcode.js   |  145 -
 .../main/webapp/js/lib/addon/fold/foldgutter.js |  134 -
 .../main/webapp/js/lib/addon/fold/xml-fold.js   |  181 -
 .../src/main/webapp/js/lib/backbone-min.js      |    2 -
 jena-fuseki2/src/main/webapp/js/lib/backbone.js | 1581 ---
 .../main/webapp/js/lib/backbone.marionette.js   | 2385 -----
 .../main/webapp/js/lib/bootstrap-select.min.js  |    8 -
 .../src/main/webapp/js/lib/bootstrap.min.js     |    6 -
 .../src/main/webapp/js/lib/html5shiv.js         |    8 -
 .../src/main/webapp/js/lib/jquery-1.10.2.js     | 9789 ------------------
 .../src/main/webapp/js/lib/jquery-1.10.2.min.js |    6 -
 .../src/main/webapp/js/lib/jquery-ui.min.js     |    7 -
 .../main/webapp/js/lib/jquery.dataTables.min.js |  157 -
 .../src/main/webapp/js/lib/jquery.fileupload.js | 1426 ---
 .../webapp/js/lib/jquery.fileupload.local.js    | 1428 ---
 .../src/main/webapp/js/lib/jquery.form.js       | 1278 ---
 .../webapp/js/lib/jquery.iframe-transport.js    |  214 -
 .../src/main/webapp/js/lib/jquery.ui.widget.js  |  530 -
 .../main/webapp/js/lib/jquery.xdomainrequest.js |   90 -
 .../src/main/webapp/js/lib/lib/codemirror.js    | 7638 --------------
 .../webapp/js/lib/mode/javascript/javascript.js |  683 --
 .../main/webapp/js/lib/mode/sparql/sparql.js    |  160 -
 .../main/webapp/js/lib/mode/turtle/turtle.js    |  160 -
 .../src/main/webapp/js/lib/mode/xml/xml.js      |  384 -
 jena-fuseki2/src/main/webapp/js/lib/pivot.js    | 1363 ---
 .../src/main/webapp/js/lib/pivot.min.js         |    2 -
 .../src/main/webapp/js/lib/pivot.min.js.map     |    1 -
 .../src/main/webapp/js/lib/plugins/text.js      |  386 -
 jena-fuseki2/src/main/webapp/js/lib/qonsole.js  |  570 -
 jena-fuseki2/src/main/webapp/js/lib/refresh.sh  |   21 -
 jena-fuseki2/src/main/webapp/js/lib/require.js  | 2076 ----
 .../src/main/webapp/js/lib/require.min.js       |   36 -
 .../src/main/webapp/js/lib/respond.min.js       |    6 -
 .../src/main/webapp/js/lib/sprintf-0.7-beta1.js |  183 -
 .../src/main/webapp/js/lib/underscore.js        | 1276 ---
 .../src/main/webapp/js/lib/yasqe.min.js         |    5 -
 .../src/main/webapp/js/lib/yasqe.min.js.map     |    1 -
 jena-fuseki2/src/main/webapp/js/lib/yasr.min.js |    5 -
 .../src/main/webapp/js/lib/yasr.min.js.map      |    1 -
 jena-fuseki2/src/main/webapp/manage.html        |  107 -
 jena-fuseki2/src/main/webapp/services.html      |   75 -
 .../src/main/webapp/test/test-fuseki-config.ttl |   27 -
 jena-fuseki2/src/main/webapp/validate.html      |  146 -
 .../apache/jena/fuseki/AbstractFusekiTest.java  |   47 -
 .../java/org/apache/jena/fuseki/FileSender.java |   87 -
 .../java/org/apache/jena/fuseki/ServerTest.java |  157 -
 .../java/org/apache/jena/fuseki/TS_Fuseki.java  |   75 -
 .../java/org/apache/jena/fuseki/TestAdmin.java  |  538 -
 .../java/org/apache/jena/fuseki/TestAuth.java   |  405 -
 .../org/apache/jena/fuseki/TestDatasetOps.java  |  154 -
 .../org/apache/jena/fuseki/TestFileUpload.java  |  128 -
 .../java/org/apache/jena/fuseki/TestQuery.java  |  115 -
 .../apache/jena/fuseki/TestSPARQLProtocol.java  |   95 -
 .../fuseki/http/TestDatasetAccessorHTTP.java    |  261 -
 .../http/TestDatasetGraphAccessorHTTP.java      |   43 -
 .../org/apache/jena/fuseki/http/TestHttpOp.java |  233 -
 jena-fuseki2/testing/config-ds-1.ttl            |   15 -
 jena-parent/pom.xml                             |    7 -
 594 files changed, 64914 insertions(+), 64838 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/b24e9e7d/jena-parent/pom.xml
----------------------------------------------------------------------


[17/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/qonsole.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/qonsole.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/qonsole.js
new file mode 100644
index 0000000..366bfed
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/qonsole.js
@@ -0,0 +1,570 @@
+/* Copyright (c) 2012-2013 Epimorphics Ltd. Released under Apache License 2.0 http://www.apache.org/licenses/ */
+
+var qonsole = function() {
+    "use strict";
+    var YASQE = require('yasqe'),
+        YASR = require('yasr');
+    
+    /**
+     * Some custom requirements for Jena, on how to present the bindings. I.e., bnodes prefixed with _:, literals with surrounding quotes, and URIs with brackets
+     */
+    YASR.plugins.table.defaults.getCellContent = function (yasr, plugin, bindings, variable, context) {
+        var binding = bindings[variable];
+        var value = null;
+        if (binding.type == "uri") {
+            var title = null;
+            var href = binding.value;
+            var visibleString = href;
+            var prefixed = false;
+            if (context.usedPrefixes) {
+                for (var prefix in context.usedPrefixes) {
+                    if (visibleString.indexOf(context.usedPrefixes[prefix]) == 0) {
+                        visibleString = prefix + ':' + href.substring(context.usedPrefixes[prefix].length);
+                        prefixed = true;
+                        break;
+                    }
+                }
+            }
+            if (!prefixed) visibleString = "&lt;" + visibleString + "&gt;";
+            value = "<a " + (title? "title='" + href + "' ": "") + "class='uri' target='_blank' href='" + href + "'>" + visibleString + "</a>";
+        } else if (binding.type == "bnode"){
+            value = "<span class='nonUri'>_:" + binding.value + "</span>";
+        } else if (binding.type == "literal") {
+            var stringRepresentation = binding.value;
+            if (binding["xml:lang"]) {
+                stringRepresentation = '"' + binding.value + '"@' + binding["xml:lang"];
+            } else if (binding.datatype) {
+                var xmlSchemaNs = "http://www.w3.org/2001/XMLSchema#";
+                var dataType = binding.datatype;
+                if (dataType.indexOf(xmlSchemaNs) == 0) {
+                    dataType = "xsd:" + dataType.substring(xmlSchemaNs.length);
+                } else {
+                    dataType = "<" + dataType + ">";
+                }
+                
+                stringRepresentation = '"' + stringRepresentation + '"^^' + dataType;
+            } else {
+                //just put quotes around it
+                stringRepresentation = '"' + stringRepresentation + '"';
+            }
+            value = "<span class='nonUri'>" + stringRepresentation + "</span>";
+        } else {
+            //this is a catch-all: when using e.g. a csv content type, the bindings are not typed
+            value = binding.value;
+        }
+        return "<div>" + value + "</div>";
+    };
+    
+    /* JsLint */
+    /*
+     * global sprintf, testCSS, loadConfig, bindEvents, $, onConfigLoaded,
+     * updatePrefixDeclaration, _, showCurrentQuery, setCurrentEndpoint,
+     * setCurrentFormat, elementVisible, runQuery, onLookupPrefix,
+     * startTimingResults, onAddPrefix, initQuery, CodeMirror, onQuerySuccess,
+     * onQueryFail, ajaxDataType, resetResults, XMLSerializer, showTableResult,
+     * showCodeMirrorResult
+     */
+
+    /* --- module vars --- */
+    /** The loaded configuration */
+    var _config = {};
+    var yasqe = null;
+    var yasr = null;
+    var _startTime = 0;
+    var _outstandingQueries = 0;
+
+    /* --- utils --- */
+
+    /**
+     * Return the string representation of the given XML value, which may be a
+     * string or a DOM object
+     */
+    var xmlToString = function(xmlData) {
+        var xs = _.isString(xmlData) ? xmlData : null;
+
+        if (!xs && window.ActiveXObject && xmlData.xml) {
+            xs = xmlData.xml;
+        }
+
+        if (!xs) {
+            xs = new XMLSerializer().serializeToString(xmlData);
+        }
+
+        return xs;
+    };
+
+    /** Browser sniffing */
+    var isOpera = function() {
+        return !!(window.opera && window.opera.version);
+    }; // Opera 8.0+
+    var isFirefox = function() {
+        return testCSS('MozBoxSizing');
+    }; // FF 0.8+
+    var isSafari = function() {
+        return Object.prototype.toString.call(window.HTMLElement).indexOf(
+                'Constructor') > 0;
+    }; // At least Safari 3+: "[object HTMLElementConstructor]"
+    var isChrome = function() {
+        return !isSafari() && testCSS('WebkitTransform');
+    }; // Chrome 1+
+    var isIE = function() {
+        return /* @cc_on!@ */false || testCSS('msTransform');
+    }; // At least IE6
+
+    var testCSS = function(prop) {
+        return document.documentElement.style.hasOwnProperty(prop);
+    };
+
+    /* --- application code --- */
+
+    /** Initialisation - only called once */
+    var init = function(config) {
+        initYasqe();
+        loadConfig(config);
+        bindEvents();
+    };
+
+    var initYasqe = function() {
+        yasqe = YASQE(document.getElementById("query-edit-cm"), {
+            sparql: {
+                showQueryButton: true,
+                callbacks: {
+                    beforeSend: startTimingResults,
+                    complete: showTime,
+                }
+            }
+        });
+        yasr = YASR(document.getElementById("results"), {
+            useGoogleCharts: false,
+            //this way, the URLs in the results are prettified using the defined prefixes in the query
+            getUsedPrefixes: yasqe.getPrefixesFromQuery
+        });
+        
+
+        /**
+        * Set some of the hooks to link YASR and YASQE
+        */
+        yasqe.options.sparql.callbacks.complete = yasr.setResponse;
+    };
+
+    /** Load the configuration definition */
+    var loadConfig = function(config) {
+        if (config.configURL) {
+            $.getJSON(config.configURL, onConfigLoaded);
+        } else {
+            onConfigLoaded(config);
+        }
+    };
+
+    /** Return the current config object */
+    var config = function() {
+        return _config;
+    };
+
+    /** Bind events that we want to manage */
+    var bindEvents = function() {
+        $("ul.prefixes").on(
+                "click",
+                "a.btn",
+                function(e) {
+                    var elem = $(e.currentTarget);
+                    updatePrefixDeclaration($.trim(elem.text()), elem
+                            .data("uri"), !elem.is(".active"));
+                });
+        $("ul.examples").on("click", "a", function(e) {
+            var elem = $(e.currentTarget);
+            $("ul.examples a").removeClass("active");
+            _.defer(function() {
+                showCurrentQuery();
+            });
+        });
+        $(".endpoints").on("click", "a", function(e) {
+            var elem = $(e.currentTarget);
+            setCurrentEndpoint($.trim(elem.text()));
+        });
+        $("#sparqlEndpoint").change(function() {
+           yasqe.options.sparql.endpoint = $(this).val();
+        });
+
+        // dialogue events
+        $("#prefixEditor").on("click", "#lookupPrefix", onLookupPrefix).on(
+                "keyup", "#inputPrefix", function(e) {
+                    var elem = $(e.currentTarget);
+                    $("#lookupPrefix span").text(sprintf("'%s'", elem.val()));
+                });
+        $("#addPrefix").on("click", onAddPrefix);
+        
+        /**
+         * register content type changes.
+         * Do not need to set them on load, as their default values are already the default vals of YASQE as well
+         */
+        $("#graphContentType").change(function(){yasqe.options.sparql.acceptHeaderGraph = $(this).val()});
+        $("#selectContentType").change(function(){yasqe.options.sparql.acceptHeaderSelect = $(this).val()});
+    };
+
+    /** List the current defined prefixes from the config */
+    var initPrefixes = function(config) {
+        var prefixAdd = $("ul.prefixes li:last");
+        $
+                .each(
+                        config.prefixes,
+                        function(key, value) {
+                            var html = sprintf(
+                                    "<li><a class='btn btn-custom2 btn-sm' data-toggle='button' data-uri='%s'>%s</a></li>",
+                                    value, key);
+                            $(html).insertBefore(prefixAdd);
+                        });
+    };
+
+    /** List the example queries from the config */
+    var initExamples = function(config) {
+        var examples = $("ul.examples");
+        examples.empty();
+
+        $
+                .each(
+                        config.queries,
+                        function(i, queryDesc) {
+                            var html = sprintf(
+                                    "<li><a class='btn btn-custom2 btn-sm' data-toggle='button'>%s</a></li>",
+                                    queryDesc.name);
+                            examples.append(html);
+
+                            if (queryDesc.queryURL) {
+                                loadRemoteQuery(queryDesc.name,
+                                        queryDesc.queryURL);
+                            }
+                        });
+        
+        setFirstQueryActive();
+    };
+
+    /** Set the default active query */
+    var setFirstQueryActive = function() {
+        if (_outstandingQueries === 0 && yasqe.getValue() == YASQE.defaults.value) {
+            //only load the example query, when YASQE has not retrieved a previous query executed by the client
+            $("ul.examples").find("a").first().addClass("active");
+            
+            showCurrentQuery();
+        }
+    };
+
+    /** Load a remote query */
+    var loadRemoteQuery = function(name, url) {
+        _outstandingQueries++;
+
+        var options = {
+            success : function(data, xhr) {
+                namedExample(name).query = data;
+
+                _outstandingQueries--;
+                setFirstQueryActive();
+            },
+            failure : function() {
+                namedExample(name).query = "Not found: " + url;
+
+                _outstandingQueries--;
+                setFirstQueryActive();
+            },
+            dataType : "text"
+        };
+
+        $.ajax(url, options);
+    };
+
+    /** Set up the drop-down list of end-points */
+    var initEndpoints = function(config) {
+        var endpoints = $("ul.endpoints");
+        endpoints.empty();
+        if (config.endpoints) {
+            $
+                    .each(
+                            config.endpoints,
+                            function(key, url) {
+                                var html = sprintf(
+                                        "<li role='presentation'><a role='menuitem' tabindex='-1' href='#'>%s</a></li>",
+                                        url);
+                                endpoints.append(html);
+                            });
+
+            setCurrentEndpoint(config.endpoints["default"]);
+        }
+    };
+
+    /** Successfully loaded the configuration */
+    var onConfigLoaded = function(config, status, jqXHR) {
+        _config = config;
+        initPrefixes(config);
+        initExamples(config);
+        initEndpoints(config);
+    };
+
+    /** Set the current endpoint text */
+    var setCurrentEndpoint = function(url) {
+        yasqe.options.sparql.endpoint = url;
+        $("[id=sparqlEndpoint]").val(url);
+    };
+
+    /** Return the current endpoint text */
+    var currentEndpoint = function(url) {
+        return $("[id=sparqlEndpoint]").val();
+    };
+
+    /** Return the query definition with the given name */
+    var namedExample = function(name) {
+        return _.find(config().queries, function(ex) {
+            return ex.name === name;
+        });
+    };
+
+    /** Return the currently active named example */
+    var currentNamedExample = function() {
+        return namedExample($.trim($("ul.examples a.active").first().text()));
+    };
+
+    /** Display the given query, with the currently defined prefixes */
+    var showCurrentQuery = function() {
+        var query = currentNamedExample();
+        displayQuery(query);
+    };
+
+    /** Display the given query */
+    var displayQuery = function(query) {
+        if (query) {
+            var queryBody = query.query ? query.query : query;
+            var prefixes = assemblePrefixes(queryBody, query.prefixes)
+
+            var q = sprintf("%s\n\n%s", renderPrefixes(prefixes),
+                    stripLeader(queryBody));
+            yasqe.setValue(q);
+
+            syncPrefixButtonState(prefixes);
+        }
+    };
+
+    /** Return the currently selected output format */
+    var selectedFormat = function() {
+        return $("a.display-format").data("value");
+    };
+
+    /** Update the user's format selection */
+    var setCurrentFormat = function(val, label) {
+        $("a.display-format").data("value", val).find("span").text(label);
+    };
+
+    /** Assemble the set of prefixes to use when initially rendering the query */
+    var assemblePrefixes = function(queryBody, queryDefinitionPrefixes) {
+        if (queryBody.match(/^prefix/)) {
+            // strategy 1: there are prefixes encoded in the query body
+            return assemblePrefixesFromQuery(queryBody);
+        } else if (queryDefinitionPrefixes) {
+            // strategy 2: prefixes given in query def
+            return _.map(queryDefinitionPrefixes, function(prefixName) {
+                return {
+                    name : prefixName,
+                    uri : config().prefixes[prefixName]
+                };
+            });
+        } else {
+            return assembleCurrentPrefixes();
+        }
+    };
+
+    /** Return an array comprising the currently selected prefixes */
+    var assembleCurrentPrefixes = function() {
+        var l = $("ul.prefixes a.active").map(function(i, elt) {
+            return {
+                name : $.trim($(elt).text()),
+                uri : $(elt).data("uri")
+            };
+        });
+        return $.makeArray(l);
+    };
+
+//    /** Return an array of the prefixes parsed from the given query body */
+//    var assemblePrefixesFromQuery = function(queryBody) {
+//        var leader = queryLeader(queryBody)[0].trim();
+//        var pairs = _.compact(leader.split("prefix"));
+//        var prefixes = [];
+//
+//        _.each(pairs, function(pair) {
+//            var m = pair.match("^\\s*(\\w+)\\s*:\\s*<([^>]*)>\\s*$");
+//            prefixes.push({
+//                name : m[1],
+//                uri : m[2]
+//            });
+//        });
+//
+//        return prefixes;
+//    };
+
+    /**
+     * Ensure that the prefix buttons are in sync with the prefixes used in a
+     * new query
+     */
+    var syncPrefixButtonState = function(prefixes) {
+        $("ul.prefixes a").each(function(i, elt) {
+            var name = $.trim($(elt).text());
+
+            if (_.find(prefixes, function(p) {
+                return p.name === name;
+            })) {
+                $(elt).addClass("active");
+            } else {
+                $(elt).removeClass("active");
+            }
+        });
+    };
+
+    /** Split a query into leader (prefixes and leading blank lines) and body */
+    var queryLeader = function(query) {
+        var pattern = /(prefix [^>]+>[\s\n]*)/;
+        var queryBody = query;
+        var i = 0;
+        var m = queryBody.match(pattern);
+
+        while (m) {
+            i += m[1].length;
+            queryBody = queryBody.substring(i);
+            m = queryBody.match(pattern);
+        }
+
+        return [ query.substring(0, query.length - queryBody.length), queryBody ];
+    };
+
+    /** Remove the query leader */
+    var stripLeader = function(query) {
+        return queryLeader(query)[1];
+    };
+
+    /** Return a string comprising the given prefixes */
+    var renderPrefixes = function(prefixes) {
+        return _.map(prefixes, function(p) {
+            return sprintf("prefix %s: <%s>", p.name, p.uri);
+        }).join("\n");
+    };
+
+    /** Add or remove the given prefix declaration from the current query */
+    var updatePrefixDeclaration = function(prefix, uri, added) {
+        var prefixObj = {};
+        prefixObj[prefix] = uri;
+        if (added) {
+            yasqe.addPrefixes(prefixObj);
+        } else {
+            yasqe.removePrefixes(prefixObj);
+        }
+    };
+
+    /** Return the sparql service we're querying against */
+    var sparqlService = function() {
+        var service = config().service;
+        if (!service) {
+            // default is the remote service
+            config().service = new RemoteSparqlService();
+            service = config().service;
+        }
+
+        return service;
+    };
+
+
+    /** Hide or reveal an element using Bootstrap .hidden class */
+    var elementVisible = function(elem, visible) {
+        if (visible) {
+            $(elem).removeClass("hidden");
+        } else {
+            $(elem).addClass("hidden");
+        }
+    };
+
+    /** Prepare to show query time taken */
+    var startTimingResults = function() {
+        _startTime = new Date().getTime();
+        elementVisible(".timeTaken");
+    };
+    
+    
+    /** Show results count and time */
+    var showTime = function() {
+        var duration = new Date().getTime() - _startTime;
+        var ms = duration % 1000;
+        duration = Math.floor(duration / 1000);
+        var s = duration % 60;
+        var m = Math.floor(duration / 60);
+
+        var html = sprintf("time taken:  %d min %d.%03d s", m, s, ms);
+
+        $(".timeTaken").html(html);
+        elementVisible(".timeTaken", true);
+    };
+
+
+    /** Lookup a prefix on prefix.cc */
+    var onLookupPrefix = function(e) {
+        e.preventDefault();
+
+        var prefix = $.trim($("#inputPrefix").val());
+        $("#inputURI").val("");
+
+        if (prefix) {
+            $.getJSON(sprintf("http://prefix.cc/%s.file.json", prefix),
+                    function(data) {
+                        $("#inputURI").val(data[prefix]);
+                    });
+        }
+    };
+
+    /** User wishes to add the prefix */
+    var onAddPrefix = function(e) {
+        var prefix = $.trim($("#inputPrefix").val());
+        var uri = $.trim($("#inputURI").val());
+
+        if (uri) {
+            _config.prefixes[prefix] = uri;
+        } else {
+            delete _config.prefixes[prefix];
+        }
+
+        // remember the state of current user selections, then re-create the
+        // list
+        var selections = {};
+        $("ul.prefixes a.btn").each(function(i, a) {
+            selections[$(a).text()] = $(a).hasClass("active");
+        });
+
+        $("ul.prefixes li[class!=keep]").remove();
+        initPrefixes(_config);
+
+        // restore selections state
+        $.each(selections, function(k, v) {
+            if (!v) {
+                $(sprintf("ul.prefixes a.btn:contains('%s')", k)).removeClass(
+                        "active");
+            }
+        });
+
+        var lines = yasqe.getValue().split("\n");
+        lines = _.reject(lines, function(line) {
+            return line.match(/^prefix/);
+        });
+        var q = sprintf("%s\n%s", renderPrefixes(assembleCurrentPrefixes()),
+                lines.join("\n"));
+        yasqe.setValue(q);
+    };
+
+    /** Disable or enable the button to submit a query */
+    var disableSubmit = function(disable) {
+        var elem = $("a.run-query");
+        elem.prop('disabled', disable);
+        if (disable) {
+            elem.addClass("disabled");
+        } else {
+            elem.removeClass("disabled");
+        }
+    };
+
+    return {
+        init : init,
+        setCurrentEndpoint: setCurrentEndpoint
+    };
+}();

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/refresh.sh
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/refresh.sh b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/refresh.sh
new file mode 100644
index 0000000..06239b3
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/refresh.sh
@@ -0,0 +1,21 @@
+mkdir -p addon/fold
+mkdir -p mode/javascript
+mkdir -p mode/xml
+mkdir -p mode/turtle
+mkdir -p mode/sparql
+
+cp ~/dev/js/codemirror-4.3/lib/codemirror.js .
+cp ~/dev/js/codemirror-4.3/lib/codemirror.css ../../css
+cp ~/dev/js/codemirror-4.3/addon/fold/brace-fold.js ./addon/fold
+cp ~/dev/js/codemirror-4.3/addon/fold/comment-fold.js ./addon/fold
+cp ~/dev/js/codemirror-4.3/addon/fold/foldcode.js ./addon/fold
+cp ~/dev/js/codemirror-4.3/addon/fold/foldgutter.js ./addon/fold
+cp ~/dev/js/codemirror-4.3/addon/fold/xml-fold.js ./addon/fold
+cp ~/dev/js/codemirror-4.3/addon/fold/foldgutter.css ../../css
+
+cp ~/dev/js/codemirror-4.3/mode/javascript/javascript.js ./mode/javascript
+cp ~/dev/js/codemirror-4.3/mode/sparql/sparql.js ./mode/sparql
+cp ~/dev/js/codemirror-4.3/mode/xml/xml.js ./mode/xml
+cp ~/dev/js/codemirror-4.3/mode/turtle/turtle.js ./mode/turtle
+
+


[40/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-theme.css.map
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-theme.css.map b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-theme.css.map
new file mode 100644
index 0000000..b36fc9a
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-theme.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["less/theme.less","less/mixins.less"],"names":[],"mappings":"AAeA;AACA;AACA;AACA;AACA;AACA;EACE,wCAAA;ECoGA,2FAAA;EACQ,mFAAA;;ADhGR,YAAC;AAAD,YAAC;AAAD,YAAC;AAAD,SAAC;AAAD,YAAC;AAAD,WAAC;AACD,YAAC;AAAD,YAAC;AAAD,YAAC;AAAD,SAAC;AAAD,YAAC;AAAD,WAAC;EC8FD,wDAAA;EACQ,gDAAA;;ADnER,IAAC;AACD,IAAC;EACC,sBAAA;;AAKJ;EC4PI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EAEA,sHAAA;EAoCF,mEAAA;ED7TA,2BAAA;EACA,qBAAA;EAyB2C,yBAAA;EAA2B,kBAAA;;AAvBtE,YAAC;AACD,YAAC;EACC,yBAAA;EACA,4BAAA;;AAGF,YAAC;AACD,YAAC;EACC,yBAAA;EACA,qBAAA;;AAeJ;EC2PI,kBAAkB,sD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//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styl
 es\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n  text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n  @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n  .box-shadow(@shadow);\n\n  // Reset the shadow\n  &:active,\n  &.active {\n    .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n  }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n  #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n  .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners\n  background-repeat: repeat-x;\n  border-color: darken(@btn-color, 14%);\n\n  &:hover,\n  &:focus  {\n    background-color: darken(@btn-color, 12%);\n    background-position: 0 -15px;\n  }\n\n  &:active,\n  &.active {\n    background-color: darken(@btn-color, 12%);\n    border-color: darken(@btn-color, 14%);\n  }\n}\n\n// Common styles\n.btn {\n  // Remove the gradient for the pressed/active s
 tate\n  &:active,\n  &.active {\n    background-image: none;\n  }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info    { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger  { .btn-styles(@btn-danger-bg); }\n\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n  .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n  background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu
  > .active > a:focus {\n  #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n  background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n  #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n  border-radius: @navbar-border-radius;\n  @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n  .box-shadow(@shadow);\n\n  .navbar-nav > .active > a {\n    #gradient > .vertical(@start-color: darken(@navbar-default-bg, 5%); @end-color: darken(@navbar-default-bg, 2%));\n    .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n  }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n  text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inve
 rse {\n  #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n\n  .navbar-nav > .active > a {\n    #gradient > .vertical(@start-color: @navbar-inverse-bg; @end-color: lighten(@navbar-inverse-bg, 2.5%));\n    .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n  }\n\n  .navbar-brand,\n  .navbar-nav > li > a {\n    text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n  }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  border-radius: 0;\n}\n\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n  text-shadow: 0 1px 0 rgba(255,255,255,.2);\n  @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n  .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n  #gradient > .vertical(@start
 -color: @color; @end-color: darken(@color, 7.5%));\n  border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success    { .alert-styles(@alert-success-bg); }\n.alert-info       { .alert-styles(@alert-info-bg); }\n.alert-warning    { .alert-styles(@alert-warning-bg); }\n.alert-danger     { .alert-styles(@alert-danger-bg); }\n\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n  #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar            { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success    { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info       { .progress-bar-styles(@progress-bar-i
 nfo-bg); }\n.progress-bar-warning    { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger     { .progress-bar-styles(@progress-bar-danger-bg); }\n\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n  border-radius: @border-radius-base;\n  .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n  #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n  border-color: darken(@list-group-active-border, 7.5%);\n}\n\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n  .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the 
 mixin to the panel headings only\n.panel-default > .panel-heading   { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading   { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading   { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading      { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading   { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading    { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n  #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n  border-color: darken(@well-bg, 10%);\n  @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n  .box-shadow(@shadow);\n}\n","//\n// Mixins\n// --------------------------------------------------\n\n\n// Utilities\n// -------------------------\
 n\n// Clearfix\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n//    contenteditable attribute is included anywhere else in the document.\n//    Otherwise it causes space to appear at the top and bottom of elements\n//    that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n//    `:before` to contain the top-margins of child elements.\n.clearfix() {\n  &:before,\n  &:after {\n    content: \" \"; // 1\n    display: table; // 2\n  }\n  &:after {\n    clear: both;\n  }\n}\n\n// WebKit-style focus\n.tab-focus() {\n  // Default\n  outline: thin dotted;\n  // WebKit\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n\n// Center-align a block level element\n.center-block() {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n\n// Sizing shortcuts\n.size(@width; @height) {\n  width: @width;\n  height:
  @height;\n}\n.square(@size) {\n  .size(@size; @size);\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n  &::-moz-placeholder           { color: @color;   // Firefox\n                                  opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526\n  &:-ms-input-placeholder       { color: @color; } // Internet Explorer 10+\n  &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome\n}\n\n// Text overflow\n// Requires inline-block or block for proper styling\n.text-overflow() {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n// CSS image replacement\n//\n// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note\n// that we cannot chain the mixins together in Less, so they are repeated.\n//\n// Source: https://github.
 com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (will be removed in v4)\n.hide-text() {\n  font: ~\"0/0\" a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n// New mixin to use as of v3.0.1\n.text-hide() {\n  .hide-text();\n}\n\n\n\n// CSS3 PROPERTIES\n// --------------------------------------------------\n\n// Single side border-radius\n.border-top-radius(@radius) {\n  border-top-right-radius: @radius;\n   border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n  border-bottom-right-radius: @radius;\n     border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n  border-bottom-right-radius: @radius;\n   border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n  border-bottom-left-radius: @radius;\n     border-top-left-radius: @radius;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n//   supported browsers tha
 t have box shadow capabilities now support the\n//   standard `box-shadow` property.\n.box-shadow(@shadow) {\n  -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n          box-shadow: @shadow;\n}\n\n// Transitions\n.transition(@transition) {\n  -webkit-transition: @transition;\n          transition: @transition;\n}\n.transition-property(@transition-property) {\n  -webkit-transition-property: @transition-property;\n          transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n  -webkit-transition-delay: @transition-delay;\n          transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n  -webkit-transition-duration: @transition-duration;\n          transition-duration: @transition-duration;\n}\n.transition-transform(@transition) {\n  -webkit-transition: -webkit-transform @transition;\n     -moz-transition: -moz-transform @transition;\n       -o-transition: -o-transform @transition;\n          transition: trans
 form @transition;\n}\n\n// Transformations\n.rotate(@degrees) {\n  -webkit-transform: rotate(@degrees);\n      -ms-transform: rotate(@degrees); // IE9 only\n          transform: rotate(@degrees);\n}\n.scale(@ratio; @ratio-y...) {\n  -webkit-transform: scale(@ratio, @ratio-y);\n      -ms-transform: scale(@ratio, @ratio-y); // IE9 only\n          transform: scale(@ratio, @ratio-y);\n}\n.translate(@x; @y) {\n  -webkit-transform: translate(@x, @y);\n      -ms-transform: translate(@x, @y); // IE9 only\n          transform: translate(@x, @y);\n}\n.skew(@x; @y) {\n  -webkit-transform: skew(@x, @y);\n      -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n          transform: skew(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n  -webkit-transform: translate3d(@x, @y, @z);\n          transform: translate3d(@x, @y, @z);\n}\n\n.rotateX(@degrees) {\n  -webkit-transform: rotateX(@degrees);\n      -ms-transform: rotateX(@degrees); // IE9 only\n          tra
 nsform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n  -webkit-transform: rotateY(@degrees);\n      -ms-transform: rotateY(@degrees); // IE9 only\n          transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n  -webkit-perspective: @perspective;\n     -moz-perspective: @perspective;\n          perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n  -webkit-perspective-origin: @perspective;\n     -moz-perspective-origin: @perspective;\n          perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n  -webkit-transform-origin: @origin;\n     -moz-transform-origin: @origin;\n      -ms-transform-origin: @origin; // IE9 only\n          transform-origin: @origin;\n}\n\n// Animations\n.animation(@animation) {\n  -webkit-animation: @animation;\n          animation: @animation;\n}\n.animation-name(@name) {\n  -webkit-animation-name: @name;\n          animation-name: @name;\n}\n.animation-duration(@duration) {\n  -webkit-animation-duration: @duration;\n
           animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n  -webkit-animation-timing-function: @timing-function;\n          animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n  -webkit-animation-delay: @delay;\n          animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n  -webkit-animation-iteration-count: @iteration-count;\n          animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n  -webkit-animation-direction: @direction;\n          animation-direction: @direction;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n.backface-visibility(@visibility){\n  -webkit-backface-visibility: @visibility;\n     -moz-backface-visibility: @visibility;\n          backface-visibility: @visibility;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n  -webkit-box-sizing: @
 boxmodel;\n     -moz-box-sizing: @boxmodel;\n          box-sizing: @boxmodel;\n}\n\n// User select\n// For selecting text on the page\n.user-select(@select) {\n  -webkit-user-select: @select;\n     -moz-user-select: @select;\n      -ms-user-select: @select; // IE10+\n          user-select: @select;\n}\n\n// Resize anything\n.resizable(@direction) {\n  resize: @direction; // Options: horizontal, vertical, both\n  overflow: auto; // Safari fix\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n  -webkit-column-count: @column-count;\n     -moz-column-count: @column-count;\n          column-count: @column-count;\n  -webkit-column-gap: @column-gap;\n     -moz-column-gap: @column-gap;\n          column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n  word-wrap: break-word;\n  -webkit-hyphens: @mode;\n     -moz-hyphens: @mode;\n      -ms-hyphens: @mode; // IE10+\n       -o-hyphens: @mode;\n          hyphens: @mode;\
 n}\n\n// Opacity\n.opacity(@opacity) {\n  opacity: @opacity;\n  // IE8 filter\n  @opacity-ie: (@opacity * 100);\n  filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n\n\n\n// GRADIENTS\n// --------------------------------------------------\n\n#gradient {\n\n  // Horizontal gradient, from left to right\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+\n    background-image:  linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorst
 r='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  // Vertical gradient, from top to bottom\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+\n    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\
 n    background-repeat: repeat-x;\n    background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n    background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n  }\n  .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image:
  -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .radial(@inner-color: #555; @outer-color: #333) {\n    background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n    background-image: radial-gradient(circle, @inner-color, @outer-color);\n    background-repeat: no-repeat;\n  }\n  .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n    background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50
 %, @color 75%, transparent 75%, transparent);\n  }\n}\n\n// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n.reset-filter() {\n  filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n\n\n\n// Retina images\n//\n// Short retina mixin for setting background-image and -size\n\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n  background-image: url(\"@{file-1x}\");\n\n  @media\n  only screen and (-webkit-min-device-pixel-ratio: 2),\n  only screen and (   min--moz-device-pixel-ratio: 2),\n  only screen and (     -o-min-device-pixel-ratio: 2/1),\n  only screen and (        min-device-pixel-ratio: 2),\n  only screen and (                min-resolution: 192dpi),\n  only screen and (                min-resolution: 2dppx) {\n    background-image: url(\"@{file-2x}\");\n    background-size: @width-1x @height-1x;\n  }\n}\n\n\n// Responsive image\n//\n// Keep
  images from scaling beyond the width of their parents.\n\n.img-responsive(@display: block) {\n  display: @display;\n  max-width: 100%; // Part 1: Set a maximum relative to the parent\n  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// COMPONENT MIXINS\n// --------------------------------------------------\n\n// Horizontal dividers\n// -------------------------\n// Dividers (basically an hr) within dropdowns and nav lists\n.nav-divider(@color: #e5e5e5) {\n  height: 1px;\n  margin: ((@line-height-computed / 2) - 1) 0;\n  overflow: hidden;\n  background-color: @color;\n}\n\n// Panels\n// -------------------------\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n  border-color: @border;\n\n  & > .panel-heading {\n    color: @heading-text-color;\n    background-color: @heading-bg-color;\n    border-color: @heading-border;\n\n    + .panel-collapse .panel-body {\n      border-top-color: @border;\n
     }\n  }\n  & > .panel-footer {\n    + .panel-collapse .panel-body {\n      border-bottom-color: @border;\n    }\n  }\n}\n\n// Alerts\n// -------------------------\n.alert-variant(@background; @border; @text-color) {\n  background-color: @background;\n  border-color: @border;\n  color: @text-color;\n\n  hr {\n    border-top-color: darken(@border, 5%);\n  }\n  .alert-link {\n    color: darken(@text-color, 10%);\n  }\n}\n\n// Tables\n// -------------------------\n.table-row-variant(@state; @background) {\n  // Exact selectors below required to override `.table-striped` and prevent\n  // inheritance to nested tables.\n  .table > thead > tr,\n  .table > tbody > tr,\n  .table > tfoot > tr {\n    > td.@{state},\n    > th.@{state},\n    &.@{state} > td,\n    &.@{state} > th {\n      background-color: @background;\n    }\n  }\n\n  // Hover states for `.table-hover`\n  // Note: this is not available for cells or rows within `thead` or `tfoot`.\n  .table-hover > tbody > tr {\n    > td.@{sta
 te}:hover,\n    > th.@{state}:hover,\n    &.@{state}:hover > td,\n    &.@{state}:hover > th {\n      background-color: darken(@background, 5%);\n    }\n  }\n}\n\n// List Groups\n// -------------------------\n.list-group-item-variant(@state; @background; @color) {\n  .list-group-item-@{state} {\n    color: @color;\n    background-color: @background;\n\n    a& {\n      color: @color;\n\n      .list-group-item-heading { color: inherit; }\n\n      &:hover,\n      &:focus {\n        color: @color;\n        background-color: darken(@background, 5%);\n      }\n      &.active,\n      &.active:hover,\n      &.active:focus {\n        color: #fff;\n        background-color: @color;\n        border-color: @color;\n      }\n    }\n  }\n}\n\n// Button variants\n// -------------------------\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n.button-variant(@color; @background; @border) {\n  color: @color;\n  background-color: @backgrou
 nd;\n  border-color: @border;\n\n  &:hover,\n  &:focus,\n  &:active,\n  &.active,\n  .open .dropdown-toggle& {\n    color: @color;\n    background-color: darken(@background, 8%);\n        border-color: darken(@border, 12%);\n  }\n  &:active,\n  &.active,\n  .open .dropdown-toggle& {\n    background-image: none;\n  }\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    &,\n    &:hover,\n    &:focus,\n    &:active,\n    &.active {\n      background-color: @background;\n          border-color: @border;\n    }\n  }\n\n  .badge {\n    color: @background;\n    background-color: @color;\n  }\n}\n\n// Button sizes\n// -------------------------\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n  padding: @padding-vertical @padding-horizontal;\n  font-size: @font-size;\n  line-height: @line-height;\n  border-radius: @border-radius;\n}\n\n// Pagination\n// -------------------------\n.pagination-size(@padding-vertical; @padding-horizonta
 l; @font-size; @border-radius) {\n  > li {\n    > a,\n    > span {\n      padding: @padding-vertical @padding-horizontal;\n      font-size: @font-size;\n    }\n    &:first-child {\n      > a,\n      > span {\n        .border-left-radius(@border-radius);\n      }\n    }\n    &:last-child {\n      > a,\n      > span {\n        .border-right-radius(@border-radius);\n      }\n    }\n  }\n}\n\n// Labels\n// -------------------------\n.label-variant(@color) {\n  background-color: @color;\n  &[href] {\n    &:hover,\n    &:focus {\n      background-color: darken(@color, 10%);\n    }\n  }\n}\n\n// Contextual backgrounds\n// -------------------------\n.bg-variant(@color) {\n  background-color: @color;\n  a&:hover {\n    background-color: darken(@color, 10%);\n  }\n}\n\n// Typography\n// -------------------------\n.text-emphasis-variant(@color) {\n  color: @color;\n  a&:hover {\n    color: darken(@color, 10%);\n  }\n}\n\n// Navbar vertical align\n// -------------------------\n// Vertically cen
 ter elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n.navbar-vertical-align(@element-height) {\n  margin-top: ((@navbar-height - @element-height) / 2);\n  margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n\n// Progress bars\n// -------------------------\n.progress-bar-variant(@color) {\n  background-color: @color;\n  .progress-striped & {\n    #gradient > .striped();\n  }\n}\n\n// Responsive utilities\n// -------------------------\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n  display: block !important;\n  table&  { display: table; }\n  tr&     { display: table-row !important; }\n  th&,\n  td&     { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n  display: none !important;\n}\n\n\n// Grid System\n// -----------\n\n// Centered container element\n.container-fixed() {\n  margin-right: auto;\n 
  margin-left: auto;\n  padding-left:  (@grid-gutter-width / 2);\n  padding-right: (@grid-gutter-width / 2);\n  &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n  margin-left:  (@gutter / -2);\n  margin-right: (@gutter / -2);\n  &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  float: left;\n  width: percentage((@columns / @grid-columns));\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n  @media (min-width: @screen-xs-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-xs-column-push(@columns) {\n  @media (min-width: @screen-xs-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-xs-column-pull(@columns) {\n  @media (min-width: @screen-xs-min) {\n    right: percentage((@columns / @grid-column
 s));\n  }\n}\n\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-sm-min) {\n    float: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-offset(@columns) {\n  @media (min-width: @screen-sm-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-push(@columns) {\n  @media (min-width: @screen-sm-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-pull(@columns) {\n  @media (min-width: @screen-sm-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-md-min) {\n    flo
 at: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-offset(@columns) {\n  @media (min-width: @screen-md-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-push(@columns) {\n  @media (min-width: @screen-md-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-pull(@columns) {\n  @media (min-width: @screen-md-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-lg-min) {\n    float: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-offset(@columns) {\n  @media (min-width: @screen-lg-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-push(@columns) {\n  @media (min-width
 : @screen-lg-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-pull(@columns) {\n  @media (min-width: @screen-lg-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n  // Common styles for all sizes of grid columns, widths 1-12\n  .col(@index) when (@index = 1) { // initial\n    @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n    .col((@index + 1), @item);\n  }\n  .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n    @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n    .col((@index + 1), ~\"@{list}, @{item}\");\n  }\n  .col(@index, @list) when (@index > @grid-columns) { // terminal\n    @{list} {\n      position: relative;\n      // Prevent columns from 
 collapsing when empty\n      min-height: 1px;\n      // Inner gutter via padding\n      padding-left:  (@grid-gutter-width / 2);\n      padding-right: (@grid-gutter-width / 2);\n    }\n  }\n  .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n  .col(@index) when (@index = 1) { // initial\n    @item: ~\".col-@{class}-@{index}\";\n    .col((@index + 1), @item);\n  }\n  .col(@index, @list) when (@index =< @grid-columns) { // general\n    @item: ~\".col-@{class}-@{index}\";\n    .col((@index + 1), ~\"@{list}, @{item}\");\n  }\n  .col(@index, @list) when (@index > @grid-columns) { // terminal\n    @{list} {\n      float: left;\n    }\n  }\n  .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n  .col-@{class}-@{index} {\n    width: percentage((@index / @grid-columns));\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) {\n  .col-@{class}-push-@{index} {\n    left: percentage((@index / @grid-columns)
 );\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) {\n  .col-@{class}-pull-@{index} {\n    right: percentage((@index / @grid-columns));\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n  .col-@{class}-offset-@{index} {\n    margin-left: percentage((@index / @grid-columns));\n  }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n  .calc-grid-column(@index, @class, @type);\n  // next iteration\n  .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n  .float-grid-columns(@class);\n  .loop-grid-columns(@grid-columns, @class, width);\n  .loop-grid-columns(@grid-columns, @class, pull);\n  .loop-grid-columns(@grid-columns, @class, push);\n  .loop-grid-columns(@grid-columns, @class, offset);\n}\n\n// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and successes.\n\n.form-contro
 l-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {\n  // Color the label and help text\n  .help-block,\n  .control-label,\n  .radio,\n  .checkbox,\n  .radio-inline,\n  .checkbox-inline  {\n    color: @text-color;\n  }\n  // Set the border and box shadow on specific inputs to match\n  .form-control {\n    border-color: @border-color;\n    .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work\n    &:focus {\n      border-color: darken(@border-color, 10%);\n      @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);\n      .box-shadow(@shadow);\n    }\n  }\n  // Set validation states also for addons\n  .input-group-addon {\n    color: @text-color;\n    border-color: @border-color;\n    background-color: @background-color;\n  }\n  // Optional feedback icon\n  .form-control-feedback {\n    color: @text-color;\n  }\n}\n\n// Form control focus state\n//\n// Generate a customized focus state and for any inpu
 t with the specified color,\n// which defaults to the `@input-focus-border` variable.\n//\n// We highly encourage you to not customize the default value, but instead use\n// this to tweak colors on an as-needed basis. This aesthetic change is based on\n// WebKit's default styles, but applicable to a wider range of browsers. Its\n// usability and accessibility should be taken into account with any change.\n//\n// Example usage: change the default blue border and shadow to white for better\n// contrast against a dark gray background.\n\n.form-control-focus(@color: @input-border-focus) {\n  @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);\n  &:focus {\n    border-color: @color;\n    outline: 0;\n    .box-shadow(~\"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}\");\n  }\n}\n\n// Form control sizing\n//\n// Relative text size, padding, and border-radii changes for form controls. For\n// horizontal sizing, wrap controls in the predefined grid classes. `<select>`\n
 // element gets special love because it's special, and that's a fact!\n\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n  height: @input-height;\n  padding: @padding-vertical @padding-horizontal;\n  font-size: @font-size;\n  line-height: @line-height;\n  border-radius: @border-radius;\n\n  select& {\n    height: @input-height;\n    line-height: @input-height;\n  }\n\n  textarea&,\n  select[multiple]& {\n    height: auto;\n  }\n}\n"]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-theme.min.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-theme.min.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-theme.min.css
new file mode 100644
index 0000000..ba4bd28
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-theme.min.css
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn:active,.btn.active{background-image:none}.btn-default{background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;bord
 er-color:#dbdbdb;text-shadow:0 1px 0 #fff;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-primary{background-image:-webkit-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:linear-gradient(to bottom,#428bca 0,#2d6ca2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#2b669a}.btn-primary:hover,.btn-primary:focus{background-color:#2d6ca2;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#2d6ca2;border-color:#2b669a}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(star
 tColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:li
 near-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-col
 or:#b92c28}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-color:#e8e8e8}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-color:#357ebd}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,
 #fff 0,#f8f8f8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f3f3f3 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f3f3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:linea
 r-gradient(to bottom,#3c3c3c 0,#222 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#222 0,#282828 100%);background-image:linear-gradient(to bottom,#222 0,#282828 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,2
 55,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);border-color:#f5e79e}.alert-dang
 er{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0)}.progress-bar{background-image:-webkit-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0)}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-imag
 e:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0)}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0)}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0)}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);background-repeat:repeat-x;filter:progid
 :DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);border-color:#3278b3}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endC
 olorstr='#ffe8e8e8', GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0)}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0)}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0)}.panel-warning>.panel-heading{
 background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0)}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0)}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0
  1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
\ No newline at end of file


[53/93] [abbrv] jena git commit: Cope with no entry at all on deletion

Posted by rv...@apache.org.
Cope with no entry at all on deletion


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

Branch: refs/heads/hadoop-rdf
Commit: 4eaa2e8c82dabd7775f4cb820890fbcc647b14df
Parents: 47bf098
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 18:05:48 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 18:05:48 2015 +0000

----------------------------------------------------------------------
 jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/4eaa2e8c/jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java b/jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java
index ad33046..1e02028 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/lib/MultiMap.java
@@ -65,7 +65,10 @@ public abstract class MultiMap<K, V>
         x.add(value) ;
     }
     
-    public void remove(K key, V value)  { map.get(key).remove(value) ; }
+    public void remove(K key, V value)  {
+        if ( map.containsKey(key))
+            map.get(key).remove(value) ;
+    }
     public void removeKey(K key)        { map.remove(key) ; }
     
     protected Collection<V> valuesForKey(K key) { return map.get(key); }


[57/93] [abbrv] jena git commit: Typo in comment

Posted by rv...@apache.org.
Typo in comment

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

Branch: refs/heads/hadoop-rdf
Commit: e376e750eb4ded54feced05b3250f90796daf773
Parents: 20393b5
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 18:58:25 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 18:58:25 2015 +0000

----------------------------------------------------------------------
 .../java/org/apache/jena/fuseki/server/ServerInitialConfig.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/e376e750/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
index 67f5d26..769fc17 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
@@ -32,9 +32,8 @@ public class ServerInitialConfig {
     public boolean   allowUpdate      = false ;
     // Or this ...
     public String    fusekiConfigFile = null ;
-    
     // Special case - directly pass in the dataset graphs - datasetPath must be given.
-    // This is not persistet across server restarts. 
+    // This is not persistent across server restarts. 
     public DatasetGraph dsg           = null ;
     
 }


[62/93] [abbrv] jena git commit: UI fixes for FF\nThis closes #17

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/4e6da043/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js.map
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js.map b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js.map
index 4738eb3..81f9fd3 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js.map
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["node_modules/browserify/node_modules/browser-pack/_prelude.js","src/entry.js","lib/deparam.js","lib/flint.js","lib/trie.js","node_modules/codemirror/addon/display/fullscreen.js","node_modules/codemirror/addon/edit/matchbrackets.js","node_modules/codemirror/addon/fold/brace-fold.js","node_modules/codemirror/addon/fold/foldcode.js","node_modules/codemirror/addon/fold/foldgutter.js","node_modules/codemirror/addon/fold/xml-fold.js","node_modules/codemirror/addon/hint/show-hint.js","node_modules/codemirror/addon/runmode/runmode.js","node_modules/codemirror/addon/search/searchcursor.js","node_modules/yasgui-utils/node_modules/store/store.js","node_modules/yasgui-utils/package.json","node_modules/yasgui-utils/src/main.js","node_modules/yasgui-utils/src/storage.js","node_modules/yasgui-utils/src/svg.js","package.json","src/autocompleters/autocompleterBase.js","src/autocompleters/classes.js","src/autocompleters/prefixes.js","src/autocompleters/properties.js","src/aut
 ocompleters/utils.js","src/autocompleters/variables.js","src/defaults.js","src/imgs.js","src/main.js","src/prefixUtils.js","src/sparql.js","src/tokenUtils.js","src/tooltip.js","src/utils.js"],"names":[],"mappings":"CAAA,SAAA,GAAA,GAAA,gBAAA,UAAA,mBAAA,QAAA,OAAA,QAAA,QAAA,IAAA,kBAAA,SAAA,OAAA,IAAA,UAAA,OAAA,CAAA,GAAA,EAAA,oBAAA,QAAA,EAAA,OAAA,mBAAA,QAAA,EAAA,OAAA,mBAAA,QAAA,EAAA,MAAA,EAAA,MAAA,MAAA,WAAA,GAAA,EAAA,OAAA,SAAA,GAAA,EAAA,EAAA,GAAA,QAAA,GAAA,EAAA,GAAA,IAAA,EAAA,GAAA,CAAA,IAAA,EAAA,GAAA,CAAA,GAAA,GAAA,kBAAA,UAAA,OAAA,KAAA,GAAA,EAAA,MAAA,GAAA,GAAA,EAAA,IAAA,EAAA,MAAA,GAAA,GAAA,EAAA,IAAA,GAAA,GAAA,OAAA,uBAAA,EAAA,IAAA,MAAA,GAAA,KAAA,mBAAA,EAAA,GAAA,GAAA,EAAA,IAAA,WAAA,GAAA,GAAA,GAAA,KAAA,EAAA,QAAA,SAAA,GAAA,GAAA,GAAA,EAAA,GAAA,GAAA,EAAA,OAAA,GAAA,EAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,GAAA,MAAA,GAAA,GAAA,QAAA,IAAA,GAAA,GAAA,kBAAA,UAAA,QAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,EAAA,EAAA,GAAA,OAAA,KAAA,GAAA,SAAA,EAAA,GCGA,EAAA,QAAA,EAAA,+CCHA,YAKA,IAAA,GAAA,WAAA,IAAA,MAAA,GAAA,U
 AAA,MAAA,GAAA,MAAA,QAAA,UACA,GAAA,QAAA,SAAA,EAAA,GACA,GAAA,MACA,GAAA,QAAA,EAAA,SAAA,EAAA,O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,QACA,mBACA,KAAA,iBAAA,mBACA,OACA,OACA,OACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,eACA,KAAA,aAAA,eACA,OACA,OACA,OACA,OACA,SACA,OACA,YACA,SACA,WACA,UACA,QACA,WACA,yBACA,KAAA,uBAAA,yBACA,OACA,OACA,OACA,OACA,QACA,QACA,OACA,WACA,QACA,SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,oBACA,gDACA,KAAA,8CAAA,gDACA,OACA,OACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,2BACA,KAAA,yBAAA,2BACA,OACA,OACA,OACA,SACA,OACA,YACA,SACA,WACA,UACA,QACA,WACA,8BACA,OAAA,4BAAA,8BACA,QACA,QACA,OACA,OACA,OACA,WACA,QACA,SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,w
 BACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,mBACA,OACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,8CACA,KAAA,4CAAA,8CACA,UAAA,4CAAA,8CACA,OAAA,4CAAA,8CACA,OAAA,4CAAA,8CACA,SAAA,4CAAA,8CACA,QAAA,4CAAA,8CACA,MAAA,4CAAA,8CACA,QAAA,4CAAA,8CACA,QACA,0CACA,OAAA,wCAAA,0CACA,QACA,6BACA,KAAA,2BAAA,6BACA,QACA,qBACA,KAAA,mBAAA,qBACA,OACA,OACA,OACA,QACA,QACA,OACA,WACA,QACA,SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,oBACA,kCACA,MAAA,gCAAA,kCACA,MACA,OACA,OACA,QACA,mBACA,OAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,MAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,UAAA,iBAAA,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A,mBACA,QAAA,iBAAA,mBACA,QAAA,iBAAA,mBACA,QAAA,iBAAA,mBACA,UAAA,iBAAA,mBACA,IAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,UAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,WAAA,iBAAA,mBACA,WAAA,iBAAA,mBACA,QAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,QAAA,iBAAA,mBACA,KAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,UAAA,iBAAA,mBACA,UAAA,iBAAA,oBACA,gBACA,MAAA,cAAA,gBACA,MAAA,cAAA,gBACA,SAAA,cAAA,gBACA,UAAA,cAAA,gBACA,UAAA,cAAA,iBACA,MACA,KAAA,KACA,QACA,QACA,OACA,OACA,OACA,WACA,QACA,SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA
 ,oBACA,mBACA,SACA,OACA,YACA,SACA,WACA,UACA,QACA,UACA,QACA,aACA,UAAA,YACA,OACA,OACA,OACA,QACA,QACA,OACA,OACA,QACA,eACA,YACA,SACA,OACA,OACA,SACA,QACA,OACA,QACA,SACA,SACA,UACA,UACA,SACA,SACA,kBACA,YACA,aACA,WACA,aACA,YACA,QACA,SACA,OACA,SACA,WACA,WACA,YACA,MACA,OACA,QACA,WACA,OACA,QACA,UACA,UACA,UACA,YACA,MACA,WACA,SACA,YACA,SACA,SACA,WACA,aACA,aACA,QACA,SACA,SACA,OACA,OACA,OACA,OACA,UACA,gBACA,UACA,WACA,SACA,UACA,OACA,WACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,mBACA,YACA,YACA,QACA,UACA,OAAA,SACA,WACA,YACA,aACA,WACA,QAAA,UACA,QACA,QACA,WACA,YACA,aACA,aACA,QAAA,UACA,WACA,YACA,aACA,aACA,QAAA,UACA,SACA,WACA,SACA,QACA,aACA,QAAA,UACA,UACA,aACA,QAAA,UACA,WACA,SACA,WACA,YACA,aACA,UACA,OAAA,SACA,QACA,mBACA,KAAA,kBACA,QACA,0BACA,KAAA,yBACA,QACA,sBACA,KAAA,qBACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,yBACA,KAAA,wBACA,OACA,UACA,2BACA,KAAA,0BACA,QACA,eACA,KAAA,cACA,MACA,aACA,IAAA,YACA,QACA,oBACA,MAAA,mBACA,OACA,MACA,2CACA,MAAA,0CACA,MAAA,0CACA,KAAA,0CACA,GAAA,0
 CACA,KAAA,0CACA,KAAA,0CACA,SAAA,0CACA,UAAA,0CACA,UAAA,0CACA,OACA,OACA,OACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,qDACA,GAAA,oDACA,KAAA,oDACA,SAAA,oDACA,UAAA,oDACA,UAAA,oDACA,QACA,0BACA,QAAA,yBACA,QAAA,yBACA,MAAA,yBACA,OAAA,yBACA,MAAA,yBACA,KAAA,yBACA,MAAA,yBACA,MAAA,yBACA,QAAA,yBACA,MAAA,yBACA,MACA,sBACA,GAAA,qBACA,MAAA,qBACA,MAAA,qBACA,SAAA,qBACA,UAAA,qBACA,UAAA,qBACA,OACA,OACA,OACA,OACA,SACA,OACA,YACA,SACA,WACA,UACA,QACA,WACA,YACA,KAAA,WACA,KAAA,WACA,MACA,OACA,OACA,QACA,QACA,OACA,QACA,OACA,OACA,QACA,QACA,MACA,OACA,OACA,OACA,oBACA,oBACA,mBACA,oBACA,oBACA,mBACA,OACA,OACA,QACA,aACA,MAAA,YACA,KACA,aACA,YACA,OACA,UACA,UACA,UACA,QACA,SACA,QACA,OACA,QACA,QACA,UACA,QACA,WACA,qBACA,MAAA,oBACA,MAAA,oBACA,KAAA,oBACA,KAAA,oBACA,KAAA,oBACA,SAAA,oBACA,MAAA,oBACA,OAAA,oBACA,kBAAA,oBACA,MAAA,oBACA,UAAA,oBACA,UAAA,oBACA,iBAAA,oBACA,iBAAA,oBACA,sBAAA,oBACA,sBAAA,oBACA,SAAA,oBACA,SAAA,oBACA,QAAA,oBACA,kBAAA,oBACA,kBAAA,oBACA,iBAAA,oBACA,kBAAA,oBACA,kBAAA,oBACA,iBAAA,oBACA,QACA,gBACA,OAAA,eACA
 ,UACA,SACA,UACA,SACA,UACA,KACA,QACA,iBACA,QAAA,gBACA,UACA,SACA,UACA,SACA,KACA,QACA,iBACA,QAAA,gBACA,SACA,UACA,gBACA,OAAA,eACA,UACA,KACA,QACA,uBACA,OAAA,sBACA,QAAA,sBACA,UACA,KACA,QACA,iBACA,QAAA,gBACA,UACA,KACA,QACA,2BACA,UAAA,0BACA,SAAA,0BACA,OACA,OACA,QACA,SACA,8BACA,SAAA,6BACA,MAAA,6BACA,SACA,WACA,QACA,SACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,mBACA,KACA,QACA,QACA,OACA,OACA,OACA,OACA,OACA,OACA,MACA,OACA,QACA,QACA,OACA,QACA,OACA,OACA,QACA,QACA,MACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,oBACA,QACA,OACA,SACA,OACA,YACA,SACA,WACA,UACA,QACA,WACA,kDACA,KAAA,iDACA,KAAA,iDACA,OACA,OACA,oBACA,oBACA,mBACA,oBACA,oBACA,mBACA,MACA,OACA,OACA,QACA,QACA,OACA,QACA,OACA,OACA,QACA,QACA,MACA,OACA,QACA,6LACA,KAAA,4LACA,MAAA,4LACA,KAAA,4LACA,KAAA,4LACA,MAAA,4LACA,MAAA,4LACA,IAAA,4LACA,KAAA,4LACA,MACA,OACA,OACA,QACA,QACA,QACA,gBACA,OAAA,eACA,UACA,SACA,UACA,KACA,QACA,YACA,KAAA,WACA,KAAA,WACA,KAAA,WACA,KAAA,WACA,OACA,OACA,OACA,OACA,OACA,QACA,QACA,OACA,WACA,QACA,
 SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,oBACA,iBACA,MAAA,gBACA,MAAA,gBACA,KAAA,gBACA,KAAA,gBACA,KAAA,gBACA,SAAA,gBACA,MAAA,gBACA,OAAA,gBACA,kBAAA,gBACA,MAAA,gBACA,UAAA,gBACA,UAAA,gBACA,iBAAA,gBACA,iBAAA,gBACA,sBAAA,gBACA,sBAAA,gBACA,SAAA,gBACA,SAAA,gBACA,QAAA,gBACA,kBAAA,gBACA,kBAAA,gBACA,iBAAA,gBACA,kBAAA,gBACA,kBAAA,gBACA,iBAAA,gBACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,oBACA,MAAA,mBACA,MAAA,mBACA,KAAA,mBACA,KAAA,mBACA,KAAA,mBACA,SAAA,mBACA,MAAA,mBACA,OAAA,mBACA,kBAAA,mBACA,MAAA,mBACA,UAAA,mBACA,UAAA,mBACA,iBAAA,mBACA,iBAAA,mBACA,sBAAA,mBACA,sBAAA,mBACA,SAAA,mBACA,SAAA,mBACA,QAAA,mBACA,kBAAA,mBACA,kBAAA,mBACA,iBAAA,mBACA,kBAAA,mBACA,kBAAA,mBACA,iBAAA,mBACA,OACA,UACA,gBACA,OAAA,eACA,KAAA,eACA,SACA,UACA,SACA,SACA,UACA,UACA,MACA,0BACA,KAAA,IAAA,kBAAA,MACA,eACA,KAAA,IAAA,OAAA,MACA,qBACA,KAAA,IAAA,aAAA,MACA,4BACA,KAAA,IAAA,aAAA,KAAA,MAAA,MACA,0BACA,MAAA,KAAA,sBACA,qBACA,MAAA,KAAA,iBACA,uBACA,KAAA,IAAA,oBACA,gEACA,OAAA,iBAAA
 ,QAAA,IAAA,mBAAA,IAAA,oBACA,MAAA,iBAAA,QAAA,IAAA,mBAAA,IAAA,qBACA,gCACA,KAAA,IAAA,6BACA,kBACA,KAAA,IAAA,eACA,iBACA,KAAA,IAAA,UAAA,MACA,kBACA,K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A,SAAA,qBAAA,0BACA,QAAA,qBAAA,0BACA,kBAAA,qBAAA,0BACA,kBAAA,qBAAA,0BACA,iBAAA,qBAAA,0BACA,kBAAA,qBAAA,0BACA,
 kBAAA,qBAAA,0BACA,iBAAA,qBAAA,2BACA,MACA,MAAA,OAAA,YAAA,iBAAA,KAAA,mBACA,QACA,QAAA,SAAA,YAAA,aACA,WACA,KAAA,yCACA,KAAA,yCACA,MAAA,yCACA,MAAA,0CACA,gBACA,SAAA,UACA,UAAA,UACA,UAAA,UACA,iBAAA,cACA,iBAAA,cACA,sBAAA,cACA,sBAAA,cACA,SAAA,kBACA,SAAA,kBACA,QAAA,kBACA,kBAAA,kBACA,kBAAA,kBACA,iBAAA,kBACA,kBAAA,kBACA,kBAAA,kBACA,iBAAA,kBACA,MAAA,kBACA,OAAA,kBACA,OAAA,UACA,eACA,MAAA,OAAA,8CACA,oBACA,SAAA,kBACA,UAAA,kBACA,UAAA,mBACA,SACA,MAAA,OAAA,oBACA,OAAA,QAAA,uBACA,KAAA,sBAAA,gBAAA,eAAA,QAAA,sBACA,cACA,QAAA,SAAA,gBACA,uBACA,MAAA,OAAA,8CACA,eACA,UAAA,WAAA,uBAAA,yBAAA,eAAA,qBACA,gBACA,OACA,SACA,QACA,QACA,OACA,OACA,OACA,WACA,QACA,SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,oBACA,cACA,OACA,SACA,QACA,QACA,OACA,OACA,OACA,WACA,QACA,SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,oBACA,MACA,MAAA,OAAA,YAAA,gBACA,YACA,QAAA,SAAA,sBACA,YACA,KAAA,2BACA,KAAA,2BACA,KAAA,2BACA,MAAA,2BACA,MAAA,2BACA,KAAA,2BACA,K
 AAA,2BACA,MAAA,2BACA,aAAA,2BACA,UAAA,2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A,aACA,SAAA,aACA,SAAA,aACA,QAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,aACA,KAAA,eACA,KAAA,gBACA,eACA,MAAA,aACA,MAAA,aACA,KAAA,aACA,SAAA,aACA,MAAA,aACA,OAAA,aACA,kBAAA,aACA,MAAA,aACA,UAAA,aACA,UAAA,aACA,iBAAA,aACA,iBAAA,aACA,sBAAA,aACA,sBAAA,aACA,SAAA,aACA,SAAA,aACA,QAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,aACA,KAAA,mBACA,KAAA,oBACA,gBACA,SAAA,WACA,SAAA,SAAA,UACA,UAAA,SAAA,UACA,UAAA,SAAA,UACA,OAAA,SAAA,WACA,wBACA,KAAA,4BACA,UAAA,wBACA,OAAA,qBACA,OAAA,qBACA,SAAA,uBACA,QAAA,UACA,MAAA,QACA,QAAA,eACA,UACA,OAAA,QAAA,WACA,aACA,OAAA,YACA,SAAA,WACA,OAAA,SACA,KAAA,QACA,WACA,SAAA,UACA,UAAA,UACA,UAAA,UACA,iBAAA,cACA,iBAAA,cACA,sBAAA,cACA,sBAAA,cACA,SAAA,kBACA,SAAA,kBACA,QAAA,kBACA,kBAAA,kBACA,kBAAA,kBACA,iBAAA,kBACA,kBAAA,kBACA,kBAAA,kBACA,iBAAA,kBACA,MAAA,kBACA,OAAA,kBACA,kBA
 AA,aACA,MAAA,aACA,KAAA,QACA,aACA,OAAA,QAAA,KAAA,oBACA,gBACA,KAAA,eACA,MAAA,eACA,aAAA,eACA,UAAA,eACA,OAAA,eACA,KAAA,eACA,KAAA,eACA,OAAA,eACA,MAAA,eACA,KAAA,eACA,MAAA,eACA,OAAA,eACA,OAAA,eACA,QAAA,eACA,QAAA,eACA,OAAA,eACA,OAAA,eACA,gBAAA,eACA,UAAA,eACA,WAAA,eACA,SAAA,eACA,WAAA,eACA,UAAA,eACA,MAAA,e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KAAA,cACA,MAAA,cACA,QAAA,cACA,Q
 AAA,cACA,QAAA,cACA,UAAA,cACA,IAAA,cACA,SAAA,cACA,OAAA,cACA,UAAA,cACA,OAAA,cACA,OAAA,cACA,SAAA,cACA,WAAA,cACA,WAAA,cACA,MAAA,cACA,OAAA,cACA,OAAA,cACA,KAAA,cACA,KAAA,cACA,KAAA,cACA,KAAA,cACA,QAAA,cACA,cAAA,cACA,QAAA,cACA,SAAA,cACA,OAAA,cACA,QAAA,cACA,KAAA,cACA,SAAA,cACA,iBAAA,cACA,iBAAA,cACA,sBAAA,cACA,sBAAA,cACA,SAAA,cACA,SAAA,cACA,QAAA,cACA,kBAAA,cACA,kBAAA,cACA,iBAAA,cACA,kBAAA,cACA,kBAAA,cACA,iBAAA,cACA,UAAA,cACA,UAAA,eACA,+CACA,KAAA,uCACA,MAAA,uCACA,MAAA,uCACA,KAAA,MACA,wBACA,MAAA,gBACA,MAAA,gBACA,SAAA,gBACA,UAAA,gBACA,UAAA,gBACA,KAAA,MACA,kBACA,KAAA,OACA,MAAA,SACA,0BACA,UAAA,YACA,SAAA,YACA,6BACA,SAAA,WACA,MAAA,gBACA,yBACA,KAAA,OACA,KAAA,gBACA,oCACA,KAAA,0BACA,KAAA,QACA,+BACA,KAAA,qBACA,KAAA,QACA,iDACA,KAAA,uBACA,KAAA,wBACA,wKACA,KAAA,gCACA,KAAA,gCACA,kBAAA,wGACA,kBAAA,wGACA,iBAAA,wGACA,kBAAA,wGACA,kBAAA,wGACA,iBAAA,yGACA,mCACA,KAAA,2BACA,KAAA,MACA,4LACA,KAAA,yBACA,MAAA,0BACA,KAAA,yBACA,KAAA,yBACA,MAAA,0BACA,MAAA,0BACA,IAAA,uBACA,KAAA,4BACA,sIACA,KAAA,mEACA,OAAA,gEACA,MAAA,iEACA,
 mDACA,QAAA,gCACA,QAAA,iBACA,iEACA,SAAA,6CACA,KAAA,kBACA,6CACA,SAAA,sBACA,UAAA,sBACA,UAAA,sBACA,OAAA,qBACA,yCACA,MAAA,oBACA,MAAA,oBACA,KAAA,kBACA,KAAA,mBACA,+BACA,SAAA,UACA,UAAA,UACA,UAAA,UACA,OAAA,mBACA,kBACA,SAAA,UACA,UAAA,UACA,UAAA,UACA,GAAA,MACA,uDACA,kBAAA,0BACA,kBAAA,0BACA,iBAAA,0BACA,kBAAA,0BACA,kBAAA,0BACA,iBAAA,2BACA,4BACA,WAAA,YACA,UAAA,YACA,KAAA,YACA,QAAA,YACA,QAAA,aACA,QAAA,aACA,MAAA,aACA,OAAA,aACA,MAAA,aACA,KAAA,aACA,MAAA,aACA,MAAA,aACA,QAAA,aACA,MAAA,aACA,GAAA,cACA,2DACA,QAAA,eACA,WAAA,kBACA,UAAA,iBACA,KAAA,aACA,wCACA,QAAA,aACA,KAAA,wBACA,UAAA,wBACA,OAAA,wBACA,OAAA,wBACA,SAAA,wBACA,QAAA,wBACA,MAAA,wBACA,QAAA,wBACA,MAAA,wBACA,MAAA,wBACA,KAAA,wBACA,KAAA,wBACA,KAAA,wBACA,SAAA,wBACA,MAAA,wBACA,OAAA,wBACA,kBAAA,wBACA,MAAA,wBACA,UAAA,wBACA,UAAA,wBACA,iBAAA,wBACA,iBAAA,wBACA,sBAAA,wBACA,sBAAA,wBACA,SAAA,wBACA,SAAA,wBACA,QAAA,wBACA,kBAAA,wBACA,kBAAA,wBACA,iBAAA,wBACA,kBAAA,wBACA,kBAAA,wBACA,iBAAA,wBACA,KAAA,yBACA,sCACA,MAAA,OACA,MAAA,OACA,KAAA,6BACA,6BACA,KAAA,YACA,GAAA,YACA,KA
 AA,YACA,KAAA,YACA,SAAA,YACA,UAAA,YACA,UAAA,YACA,MAAA,cACA,MAAA,eACA,uBACA,KAAA,KACA,SAAA,gBACA,aACA,OAAA,QAAA,KAAA,oBACA,gBACA,KAAA,iBAAA,wBACA,MAAA,iBAAA,wBACA,KAAA,cACA,KAAA,cACA,MAAA,cACA,aAAA,cACA,UAAA,cACA,OAAA,cACA,KAAA,cACA,KAAA,cACA,OAAA,cACA,MAAA,cACA,KAAA,cACA,MAAA,cACA,OAAA,cACA,OAAA,cACA,QAAA,cACA,QAAA,cACA,OAAA,cACA,OAAA,cACA,gBAAA,cACA,UAAA,cACA,WAAA,cACA,SAAA,cACA,WAAA,cACA,UAAA,cACA,MAAA,cACA,OAAA,cACA,KAAA,cACA,OAAA,cACA,SAAA,cACA,SAAA,cACA,UAAA,cACA,IAAA,cACA,KAAA,cACA,MAAA,cACA,SAAA,cACA,KAAA,cACA,MAAA,cACA,QAAA,cACA,QAAA,cACA,QAAA,cACA,UAAA,cACA,IAAA,cACA,SAAA,cACA,OAAA,cACA,UAAA,cACA,OAAA,cACA,OAAA,cACA,SAAA,cACA,WAAA,cACA,WAAA,cACA,QAAA,cACA,SAAA,cACA,OAAA,cACA,QAAA,cACA,KAAA,cACA,SAAA,cACA,UAAA,cACA,UAAA,cACA,MAAA,OACA,MAAA,QACA,MACA,KAAA,mBACA,GAAA,mBACA,KAAA,mBACA,KAAA,mBACA,SAAA,mBACA,UAAA,mBACA,UAAA,oBACA,iBACA,KAAA,eAAA,qBACA,GAAA,eAAA,qBACA,KAAA,eAAA,qBACA,KAAA,eAAA,qBACA,SAAA,eAAA,qBACA,UAAA,eAAA,qBACA,UAAA,eAAA,sBACA,SACA,GAAA,cAAA,YACA,KAAA,cAAA,YACA,
 KAAA,cAAA,YACA,SAAA,cAAA,YACA,UAAA,cAAA,YACA,UAAA,cAAA,aACA,kBACA,GAAA,WACA,KAAA,WACA,KAAA,WACA,SAAA,WACA,UAAA,WACA,UAAA,WACA,KAAA,IAAA,YACA,SACA,KAAA,KACA,KAAA,KACA,KAAA,KACA,KAAA,IAAA,kEACA,wBACA,GAAA,wBACA,KAAA,wBACA,SAAA,wBACA,UAAA,wBACA,UAAA,wBACA,KAAA,IAAA,oDAAA,MACA,sBACA,SAAA,UACA,UAAA,UACA,UAAA,UACA,GAAA,KACA,KAAA,IAAA,mBACA,aACA,SAAA,gBAAA,UACA,UAAA,gBAAA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ACA,MAAA,wBACA,SAAA,wBACA,KAAA,wBACA,MAAA,wBACA,QAAA,wBACA,QAAA,wBACA,QAAA,wBACA,UAAA,wBACA,IAAA,wBACA,SAAA,wBACA,OAAA,wBACA,UAAA,wBACA,OAAA,wBACA,OAAA,wBACA,SAAA,wBACA,WAAA,wBACA,WAAA,wBACA,MAAA,wBACA,OAAA,wBACA,OAAA,wBACA,KAAA,wBACA,KAAA,wBACA,KAAA,wBACA,KAAA,wBACA,QAAA,wBACA,cAAA,wBACA,QAAA,wBACA,SAAA,wBACA,OAAA,wBACA,QAAA,wBACA,KAAA,wBACA,SAAA,wBACA,iBAAA,wBACA,iBAAA,wBACA,sBAAA,wBACA,sBAAA,wBACA,SAAA,wBACA,SAAA,wBACA,QAAA,wBACA,kBAAA,wBACA,kBAAA,wBACA,iBAAA,wBACA,kBAAA,wBACA,kBAAA,wBACA,iBAAA,wBACA,UAAA,wBACA,UAAA,yBACA,cACA,QAAA,SAAA,aACA,KACA,QACA,OACA,MAAA,QACA,MAAA,SACA,aACA,MAAA,OACA,MAAA,OACA,SAAA,UACA,UAAA,UACA,UAAA,WACA,WACA,MAAA,OACA,MAAA,OACA,KAAA,aACA,SAAA,aACA,MAAA,aACA,OAAA,aACA,kBAAA,aACA,MAAA,aACA,UAAA,aACA,UAAA,aACA,iBAAA,aACA,iBAAA,aACA,sBAAA,aACA,sBAAA,aACA,SAAA,aACA,SAAA,aA
 CA,QAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,cACA,MACA,MAAA,gBAAA,eACA,MAAA,gBAAA,eACA,SAAA,gBAAA,eACA,UAAA,gBAAA,eACA,UAAA,gBAAA,eACA,GAAA,gBAAA,MACA,UACA,KAAA,QACA,GAAA,QACA,KAAA,QACA,KAAA,QACA,SAAA,QACA,UAAA,QACA,UAAA,SACA,YACA,MAAA,OACA,MAAA,QACA,aACA,KAAA,SAAA,qBACA,OAAA,SAAA,wBAGA,E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Index into store/tupleindex.

Posted by rv...@apache.org.
Move AbstractTestTupleIndex into store/tupleindex.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/2e4c6c77
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/2e4c6c77
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/2e4c6c77

Branch: refs/heads/hadoop-rdf
Commit: 2e4c6c77f5f364ce037665da19653176ff17ae0b
Parents: eb9400d
Author: Andy Seaborne <an...@apache.org>
Authored: Fri Jan 9 15:38:00 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri Jan 9 15:38:00 2015 +0000

----------------------------------------------------------------------
 .../jena/tdb/index/AbstractTestTupleIndex.java  | 271 -------------------
 .../tupletable/AbstractTestTupleIndex.java      | 271 +++++++++++++++++++
 .../store/tupletable/TestTupleIndexRecord.java  |   1 -
 3 files changed, 271 insertions(+), 272 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/2e4c6c77/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/AbstractTestTupleIndex.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/AbstractTestTupleIndex.java b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/AbstractTestTupleIndex.java
deleted file mode 100644
index bcc078d..0000000
--- a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/AbstractTestTupleIndex.java
+++ /dev/null
@@ -1,271 +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 com.hp.hpl.jena.tdb.index;
-
-import java.util.Iterator ;
-import java.util.Set ;
-
-import org.apache.jena.atlas.iterator.Iter ;
-import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.atlas.lib.Tuple ;
-import static org.apache.jena.atlas.lib.Tuple.* ;
-import org.junit.Test ;
-
-import com.hp.hpl.jena.tdb.store.NodeId ;
-import com.hp.hpl.jena.tdb.store.tupletable.TupleIndex ;
-
-/** Test TupleIndexes (general) */
-public abstract class AbstractTestTupleIndex extends BaseTest
-{
-    protected static NodeId n1 = new NodeId(1) ;
-    protected static NodeId n2 = new NodeId(2) ;
-    protected static NodeId n3 = new NodeId(3) ;
-    protected static NodeId n4 = new NodeId(0x4040404040404040L) ;
-    protected static NodeId n5 = new NodeId(0x5555555555555555L) ;
-    protected static NodeId n6 = new NodeId(0x6666666666666666L) ; 
-    
-    protected abstract TupleIndex create(String description) ;
-    
-    protected static void add(TupleIndex index, NodeId x1, NodeId x2, NodeId x3)
-    {
-        Tuple<NodeId> tuple = createTuple(x1, x2, x3) ;
-        index.add(tuple) ;
-    }
-    
-    @Test public void TupleIndex_1()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-    }
-    
-    @Test public void TupleIndexRecordSPO_1()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n1, n2, n3) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertTrue(iter.hasNext()) ;
-        iter.next();
-        assertFalse(iter.hasNext()) ;
-    }
- 
-    @Test public void TupleIndexRecordSPO_2()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n1, n2, null) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertTrue(iter.hasNext()) ;
-        iter.next();
-        assertFalse(iter.hasNext()) ;
-    }
-    
-    @Test public void TupleIndexRecordSPO_3()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n1, null, n3) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertTrue(iter.hasNext()) ;
-        iter.next();
-        assertFalse(iter.hasNext()) ;
-    }
-    
-    @Test public void TupleIndexRecordSPO_4()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertTrue(iter.hasNext()) ;
-        iter.next();
-        assertFalse(iter.hasNext()) ;
-    }
-    
-    @Test public void TupleIndexRecordSPO_5()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        add(index, n1, n2, n4) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n1, n2, n3) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
-        assertEquals(1, x.size()) ;
-        assertTrue(x.contains(createTuple(n1, n2, n3))) ;
-        assertFalse(x.contains(createTuple(n1, n2, n4))) ;
-    }
-
-    @Test public void TupleIndexRecordSPO_6()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        add(index, n1, n2, n4) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n1, n2, NodeId.NodeIdAny) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
-        assertEquals(2, x.size()) ;
-        assertTrue(x.contains(createTuple(n1, n2, n3))) ;
-        assertTrue(x.contains(createTuple(n1, n2, n4))) ;
-    }
-
-    @Test public void TupleIndexRecordSPO_7()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        add(index, n1, n2, n4) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
-        assertEquals(2, x.size()) ;
-        assertTrue(x.contains(createTuple(n1, n2, n3))) ;
-        assertTrue(x.contains(createTuple(n1, n2, n4))) ;
-    }
-
-    @Test public void TupleIndexRecordSPO_8()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        add(index, n2, n3, n4) ;
-
-        {
-            Tuple<NodeId> tuple2 = createTuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
-            Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-            Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
-            assertEquals(1, x.size()) ;
-            assertTrue(x.contains(createTuple(n1, n2, n3))) ;
-        }
-
-        {
-            Tuple<NodeId> tuple2 = createTuple(n2, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
-            Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-            Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
-            assertEquals(1, x.size()) ;
-            assertTrue(x.contains(createTuple(n2, n3, n4))) ;
-        }
-    }
-
-    @Test public void TupleIndexRecordPOS_1()
-    {
-        TupleIndex index = create("POS") ;
-        add(index, n1, n2, n3) ;
-        Tuple<NodeId> tuple2 = createTuple(n1, n2, n3) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertTrue("Can't find tuple", iter.hasNext()) ;
-        iter.next();
-        assertFalse(iter.hasNext()) ;
-    }
- 
-    @Test public void TupleIndexRecordPOS_2()
-    {
-        TupleIndex index = create("POS") ;
-        add(index, n1, n2, n3) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(null, n2, null) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertTrue("Can't find tuple",iter.hasNext()) ;
-        iter.next();
-        assertFalse(iter.hasNext()) ;
-    }
-    
-
-    @Test public void TupleIndexRecordPOS_3()
-    {
-        TupleIndex index = create("POS") ;
-        add(index, n1, n2, n3) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(null, n2, n3) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertTrue("Can't find tuple", iter.hasNext()) ;
-        iter.next();
-        assertFalse(iter.hasNext()) ;
-    }
-
-    @Test public void TupleIndexRecordFindNot_1()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n4, n5, n6) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertNotNull(iter) ;
-        assertFalse(iter.hasNext()) ;
-   }
-    
-    @Test public void TupleIndexRecordFindNot_2()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n1, n5, n6) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertFalse(iter.hasNext()) ;
-   }
-
-    @Test public void TupleIndexRecordFindNot_3()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n1, null, n6) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertFalse(iter.hasNext()) ;
-   }
-
-    @Test public void TupleIndexRecordFindNot_4()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        add(index, n1, n5, n6) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n4, n5, n6) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertFalse(iter.hasNext()) ;
-   }
-    
-    @Test public void TupleIndexRecordFindNot_5()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        add(index, n1, n5, n6) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n2, n5, n6) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertFalse(iter.hasNext()) ;
-   }
-
-    @Test public void TupleIndexRecordFindNot_6()
-    {
-        TupleIndex index = create("SPO") ;
-        add(index, n1, n2, n3) ;
-        add(index, n4, n5, n6) ;
-        
-        Tuple<NodeId> tuple2 = createTuple(n1, null, n6) ;
-        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
-        assertFalse(iter.hasNext()) ;
-   }
-
-    
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/2e4c6c77/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/tupletable/AbstractTestTupleIndex.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/tupletable/AbstractTestTupleIndex.java b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/tupletable/AbstractTestTupleIndex.java
new file mode 100644
index 0000000..496d3b5
--- /dev/null
+++ b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/tupletable/AbstractTestTupleIndex.java
@@ -0,0 +1,271 @@
+/*
+ * 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 com.hp.hpl.jena.tdb.store.tupletable;
+
+import java.util.Iterator ;
+import java.util.Set ;
+
+import org.apache.jena.atlas.iterator.Iter ;
+import org.apache.jena.atlas.junit.BaseTest ;
+import org.apache.jena.atlas.lib.Tuple ;
+import static org.apache.jena.atlas.lib.Tuple.* ;
+import org.junit.Test ;
+
+import com.hp.hpl.jena.tdb.store.NodeId ;
+import com.hp.hpl.jena.tdb.store.tupletable.TupleIndex ;
+
+/** Test TupleIndexes (general) */
+public abstract class AbstractTestTupleIndex extends BaseTest
+{
+    protected static NodeId n1 = new NodeId(1) ;
+    protected static NodeId n2 = new NodeId(2) ;
+    protected static NodeId n3 = new NodeId(3) ;
+    protected static NodeId n4 = new NodeId(0x4040404040404040L) ;
+    protected static NodeId n5 = new NodeId(0x5555555555555555L) ;
+    protected static NodeId n6 = new NodeId(0x6666666666666666L) ; 
+    
+    protected abstract TupleIndex create(String description) ;
+    
+    protected static void add(TupleIndex index, NodeId x1, NodeId x2, NodeId x3)
+    {
+        Tuple<NodeId> tuple = createTuple(x1, x2, x3) ;
+        index.add(tuple) ;
+    }
+    
+    @Test public void TupleIndex_1()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+    }
+    
+    @Test public void TupleIndexRecordSPO_1()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n1, n2, n3) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertTrue(iter.hasNext()) ;
+        iter.next();
+        assertFalse(iter.hasNext()) ;
+    }
+ 
+    @Test public void TupleIndexRecordSPO_2()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n1, n2, null) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertTrue(iter.hasNext()) ;
+        iter.next();
+        assertFalse(iter.hasNext()) ;
+    }
+    
+    @Test public void TupleIndexRecordSPO_3()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n1, null, n3) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertTrue(iter.hasNext()) ;
+        iter.next();
+        assertFalse(iter.hasNext()) ;
+    }
+    
+    @Test public void TupleIndexRecordSPO_4()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertTrue(iter.hasNext()) ;
+        iter.next();
+        assertFalse(iter.hasNext()) ;
+    }
+    
+    @Test public void TupleIndexRecordSPO_5()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        add(index, n1, n2, n4) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n1, n2, n3) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
+        assertEquals(1, x.size()) ;
+        assertTrue(x.contains(createTuple(n1, n2, n3))) ;
+        assertFalse(x.contains(createTuple(n1, n2, n4))) ;
+    }
+
+    @Test public void TupleIndexRecordSPO_6()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        add(index, n1, n2, n4) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n1, n2, NodeId.NodeIdAny) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
+        assertEquals(2, x.size()) ;
+        assertTrue(x.contains(createTuple(n1, n2, n3))) ;
+        assertTrue(x.contains(createTuple(n1, n2, n4))) ;
+    }
+
+    @Test public void TupleIndexRecordSPO_7()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        add(index, n1, n2, n4) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
+        assertEquals(2, x.size()) ;
+        assertTrue(x.contains(createTuple(n1, n2, n3))) ;
+        assertTrue(x.contains(createTuple(n1, n2, n4))) ;
+    }
+
+    @Test public void TupleIndexRecordSPO_8()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        add(index, n2, n3, n4) ;
+
+        {
+            Tuple<NodeId> tuple2 = createTuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
+            Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+            Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
+            assertEquals(1, x.size()) ;
+            assertTrue(x.contains(createTuple(n1, n2, n3))) ;
+        }
+
+        {
+            Tuple<NodeId> tuple2 = createTuple(n2, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
+            Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+            Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
+            assertEquals(1, x.size()) ;
+            assertTrue(x.contains(createTuple(n2, n3, n4))) ;
+        }
+    }
+
+    @Test public void TupleIndexRecordPOS_1()
+    {
+        TupleIndex index = create("POS") ;
+        add(index, n1, n2, n3) ;
+        Tuple<NodeId> tuple2 = createTuple(n1, n2, n3) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertTrue("Can't find tuple", iter.hasNext()) ;
+        iter.next();
+        assertFalse(iter.hasNext()) ;
+    }
+ 
+    @Test public void TupleIndexRecordPOS_2()
+    {
+        TupleIndex index = create("POS") ;
+        add(index, n1, n2, n3) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(null, n2, null) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertTrue("Can't find tuple",iter.hasNext()) ;
+        iter.next();
+        assertFalse(iter.hasNext()) ;
+    }
+    
+
+    @Test public void TupleIndexRecordPOS_3()
+    {
+        TupleIndex index = create("POS") ;
+        add(index, n1, n2, n3) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(null, n2, n3) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertTrue("Can't find tuple", iter.hasNext()) ;
+        iter.next();
+        assertFalse(iter.hasNext()) ;
+    }
+
+    @Test public void TupleIndexRecordFindNot_1()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n4, n5, n6) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertNotNull(iter) ;
+        assertFalse(iter.hasNext()) ;
+   }
+    
+    @Test public void TupleIndexRecordFindNot_2()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n1, n5, n6) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertFalse(iter.hasNext()) ;
+   }
+
+    @Test public void TupleIndexRecordFindNot_3()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n1, null, n6) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertFalse(iter.hasNext()) ;
+   }
+
+    @Test public void TupleIndexRecordFindNot_4()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        add(index, n1, n5, n6) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n4, n5, n6) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertFalse(iter.hasNext()) ;
+   }
+    
+    @Test public void TupleIndexRecordFindNot_5()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        add(index, n1, n5, n6) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n2, n5, n6) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertFalse(iter.hasNext()) ;
+   }
+
+    @Test public void TupleIndexRecordFindNot_6()
+    {
+        TupleIndex index = create("SPO") ;
+        add(index, n1, n2, n3) ;
+        add(index, n4, n5, n6) ;
+        
+        Tuple<NodeId> tuple2 = createTuple(n1, null, n6) ;
+        Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
+        assertFalse(iter.hasNext()) ;
+   }
+
+    
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/2e4c6c77/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/tupletable/TestTupleIndexRecord.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/tupletable/TestTupleIndexRecord.java b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/tupletable/TestTupleIndexRecord.java
index 1f2bd2c..4078628 100644
--- a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/tupletable/TestTupleIndexRecord.java
+++ b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/tupletable/TestTupleIndexRecord.java
@@ -23,7 +23,6 @@ import org.apache.jena.atlas.lib.ColumnMap ;
 
 import com.hp.hpl.jena.tdb.base.file.FileSet ;
 import com.hp.hpl.jena.tdb.base.record.RecordFactory ;
-import com.hp.hpl.jena.tdb.index.AbstractTestTupleIndex ;
 import com.hp.hpl.jena.tdb.index.IndexFactory ;
 import com.hp.hpl.jena.tdb.index.IndexParams ;
 import com.hp.hpl.jena.tdb.index.RangeIndex ;


[78/93] [abbrv] jena git commit: Don't print usage summary on CLI errors

Posted by rv...@apache.org.
Don't print usage summary on CLI errors

Instead only print the error message which is all the user wants to see,
they can re-run with -h/--help option if they need the usage summary


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

Branch: refs/heads/hadoop-rdf
Commit: 6bb5d129072523f2c54bbb5fe4238002af7e4c4a
Parents: 5a49ce8
Author: Rob Vesse <rv...@apache.org>
Authored: Wed Jan 7 16:00:50 2015 +0000
Committer: Rob Vesse <rv...@apache.org>
Committed: Wed Jan 7 16:00:50 2015 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/jena/hadoop/rdf/stats/RdfStats.java   | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/6bb5d129/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/RdfStats.java
----------------------------------------------------------------------
diff --git a/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/RdfStats.java b/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/RdfStats.java
index b9bd9e7..e31c801 100644
--- a/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/RdfStats.java
+++ b/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/RdfStats.java
@@ -183,27 +183,21 @@ public class RdfStats implements Tool {
         } catch (ParseOptionMissingException e) {
             System.err.println(ANSI_RED + e.getMessage());
             System.err.println();
-            showUsage();
         } catch (ParseOptionMissingValueException e) {
             System.err.println(ANSI_RED + e.getMessage());
             System.err.println();
-            showUsage();
         } catch (ParseArgumentsMissingException e) {
             System.err.println(ANSI_RED + e.getMessage());
             System.err.println();
-            showUsage();
         } catch (ParseArgumentsUnexpectedException e) {
             System.err.println(ANSI_RED + e.getMessage());
             System.err.println();
-            showUsage();
         } catch (ParseOptionIllegalValueException e) {
             System.err.println(ANSI_RED + e.getMessage());
             System.err.println();
-            showUsage();
         } catch (ParseException e) {
             System.err.println(ANSI_RED + e.getMessage());
             System.err.println();
-            showUsage();
         } catch (UnsupportedOperationException e) {
             System.err.println(ANSI_RED + e.getMessage());
         } catch (Throwable e) {


[81/93] [abbrv] jena git commit: Refactor setup utilities for indexes into the index package.

Posted by rv...@apache.org.
Refactor setup utilities for indexes into the index package.

Leave redirection code so that the operations are still easy to find.

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

Branch: refs/heads/hadoop-rdf
Commit: b659de12c952d52a38b93649a016bbece108ec74
Parents: a6b5b55
Author: Andy Seaborne <an...@apache.org>
Authored: Fri Jan 9 15:56:47 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri Jan 9 15:56:47 2015 +0000

----------------------------------------------------------------------
 .../com/hp/hpl/jena/tdb/index/SetupIndex.java   | 173 +++++++++++++++++++
 .../java/com/hp/hpl/jena/tdb/sys/SetupTDB.java  | 162 +++++++----------
 jena-tdb/src/main/java/tdb/CmdRewriteIndex.java |   4 +-
 .../index/bplustree/TestBPlusTreeRewriter.java  |   4 +-
 4 files changed, 237 insertions(+), 106 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/b659de12/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/index/SetupIndex.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/index/SetupIndex.java b/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/index/SetupIndex.java
new file mode 100644
index 0000000..a60d491
--- /dev/null
+++ b/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/index/SetupIndex.java
@@ -0,0 +1,173 @@
+/**
+ * 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 com.hp.hpl.jena.tdb.index;
+
+import com.hp.hpl.jena.tdb.base.block.BlockMgr ;
+import com.hp.hpl.jena.tdb.base.block.BlockMgrFactory ;
+import com.hp.hpl.jena.tdb.base.file.FileSet ;
+import com.hp.hpl.jena.tdb.base.file.Location ;
+import com.hp.hpl.jena.tdb.base.record.RecordFactory ;
+import com.hp.hpl.jena.tdb.index.bplustree.BPlusTree ;
+import com.hp.hpl.jena.tdb.index.bplustree.BPlusTreeParams ;
+import com.hp.hpl.jena.tdb.sys.Names ;
+import com.hp.hpl.jena.tdb.sys.SystemTDB ;
+
+public class SetupIndex {
+
+    /** Create a B+Tree using defaults */
+    public static RangeIndex createBPTree(FileSet fileset,
+                                          RecordFactory factory)
+    {
+        int readCacheSize = SystemTDB.BlockReadCacheSize ;
+        int writeCacheSize = SystemTDB.BlockWriteCacheSize ;
+        int blockSize = SystemTDB.BlockSize ;
+        if ( fileset.isMem() )
+        {
+            readCacheSize = 0 ;
+            writeCacheSize = 0 ;
+            blockSize = SystemTDB.BlockSizeTest ;
+        }
+        
+        return createBPTreeByBlockSize(fileset, blockSize, readCacheSize, writeCacheSize, factory) ; 
+    }
+
+    /** Create a B+Tree by BlockSize */
+    public static RangeIndex createBPTreeByBlockSize(FileSet fileset,
+                                                     int blockSize,
+                                                     int readCacheSize, int writeCacheSize,
+                                                     RecordFactory factory)
+    {
+        return createBPTree(fileset, -1, blockSize, readCacheSize, writeCacheSize, factory) ; 
+    }
+
+    /** Create a B+Tree by Order */
+    public static RangeIndex createBPTreeByOrder(FileSet fileset,
+                                                 int order,
+                                                 int readCacheSize, int writeCacheSize,
+                                                 RecordFactory factory)
+    {
+        return createBPTree(fileset, order, -1, readCacheSize, writeCacheSize, factory) ; 
+    }
+
+    /** Knowing all the parameters, create a B+Tree */
+    public static BPlusTree createBPTree(FileSet fileset, int order, int blockSize,
+                                          int readCacheSize, int writeCacheSize,
+                                          RecordFactory factory)
+    {
+        // ---- Checking
+        if (blockSize < 0 && order < 0) throw new IllegalArgumentException("Neither blocksize nor order specified") ;
+        if (blockSize >= 0 && order < 0) order = BPlusTreeParams.calcOrder(blockSize, factory.recordLength()) ;
+        if (blockSize >= 0 && order >= 0)
+        {
+            int order2 = BPlusTreeParams.calcOrder(blockSize, factory.recordLength()) ;
+            if (order != order2) throw new IllegalArgumentException("Wrong order (" + order + "), calculated = "
+                                                                    + order2) ;
+        }
+    
+        // Iffy - does not allow for slop.
+        if (blockSize < 0 && order >= 0)
+        {
+            // Only in-memory.
+            blockSize = BPlusTreeParams.calcBlockSize(order, factory) ;
+        }
+    
+        BPlusTreeParams params = new BPlusTreeParams(order, factory) ;
+        BlockMgr blkMgrNodes = BlockMgrFactory.create(fileset, Names.bptExtTree, blockSize, readCacheSize, writeCacheSize) ;
+        BlockMgr blkMgrRecords = BlockMgrFactory.create(fileset, Names.bptExtRecords, blockSize, readCacheSize, writeCacheSize) ;
+        return BPlusTree.create(params, blkMgrNodes, blkMgrRecords) ;
+    }
+
+    public static Index makeIndex(Location location, String indexName,
+                                  int blkSize,
+                                  int dftKeyLength, int dftValueLength, 
+                                  int readCacheSize,int writeCacheSize)
+    {
+        return makeRangeIndex(location, indexName, blkSize, dftKeyLength, dftValueLength, readCacheSize, writeCacheSize) ;
+    }
+
+    public static RangeIndex makeRangeIndex(Location location, String indexName, 
+                                            int blkSize,
+                                             int dftKeyLength, int dftValueLength,
+                                             int readCacheSize,int writeCacheSize)
+    {
+         FileSet fs = new FileSet(location, indexName) ;
+         RangeIndex rIndex =  makeBPlusTree(fs, blkSize, readCacheSize, writeCacheSize, dftKeyLength, dftValueLength) ;
+         return rIndex ;
+    }
+
+    public static RangeIndex makeBPlusTree(FileSet fs, int blkSize,
+                                           int readCacheSize, int writeCacheSize,
+                                           int dftKeyLength, int dftValueLength)
+    {
+        RecordFactory recordFactory = makeRecordFactory(dftKeyLength, dftValueLength) ;
+        int order = BPlusTreeParams.calcOrder(blkSize, recordFactory.recordLength()) ;
+        RangeIndex rIndex = createBPTree(fs, order, blkSize, readCacheSize, writeCacheSize, recordFactory) ;
+        return rIndex ;
+    }
+
+    public static RecordFactory makeRecordFactory(int keyLen, int valueLen)
+        {
+            return new RecordFactory(keyLen, valueLen) ;
+        }
+    //    
+    //    /** Make a NodeTable without cache and inline wrappers */ 
+    //    public static NodeTable makeNodeTableBase(Location location, String indexNode2Id, String indexId2Node)
+    //    {
+    //        if (location.isMem()) 
+    //            return NodeTableFactory.createMem() ;
+    //
+    //        // -- make id to node mapping -- Names.indexId2Node
+    //        FileSet fsIdToNode = new FileSet(location, indexId2Node) ;
+    //        
+    //        ObjectFile stringFile = makeObjectFile(fsIdToNode) ;
+    //        
+    //        // -- make node to id mapping -- Names.indexNode2Id
+    //        // Make index of id to node (data table)
+    //        
+    //        // No caching at the index level - we use the internal caches of the node table.
+    //        Index nodeToId = makeIndex(location, indexNode2Id, LenNodeHash, SizeOfNodeId, -1 ,-1) ;
+    //        
+    //        // -- Make the node table using the components established above.
+    //        NodeTable nodeTable = new NodeTableNative(nodeToId, stringFile) ;
+    //        return nodeTable ;
+    //    }
+    //
+    //    /** Make a NodeTable with cache and inline wrappers */ 
+    //    public static NodeTable makeNodeTable(Location location)
+    //    {
+    //        return makeNodeTable(location,
+    //                             Names.indexNode2Id, SystemTDB.Node2NodeIdCacheSize,
+    //                             Names.indexId2Node, SystemTDB.NodeId2NodeCacheSize,
+    //                             SystemTDB.NodeMissCacheSize) ;
+    //    }
+    //
+    //    /** Make a NodeTable with cache and inline wrappers */ 
+    //    public static NodeTable makeNodeTable(Location location,
+    //                                          String indexNode2Id, int nodeToIdCacheSize,
+    //                                          String indexId2Node, int idToNodeCacheSize,
+    //                                          int nodeMissCacheSize)
+    //    {
+    //        NodeTable nodeTable = makeNodeTableBase(location, indexNode2Id, indexId2Node) ;
+    //        nodeTable = NodeTableCache.create(nodeTable, nodeToIdCacheSize, idToNodeCacheSize, nodeMissCacheSize) ; 
+    //        nodeTable = NodeTableInline.create(nodeTable) ;
+    //        return nodeTable ;
+    //    }
+    //
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/b659de12/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/sys/SetupTDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/sys/SetupTDB.java b/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/sys/SetupTDB.java
index 72268de..0c160c1 100644
--- a/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/sys/SetupTDB.java
+++ b/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/sys/SetupTDB.java
@@ -23,8 +23,6 @@ import org.slf4j.Logger ;
 
 import com.hp.hpl.jena.tdb.TDB ;
 import com.hp.hpl.jena.tdb.TDBException ;
-import com.hp.hpl.jena.tdb.base.block.BlockMgr ;
-import com.hp.hpl.jena.tdb.base.block.BlockMgrFactory ;
 import com.hp.hpl.jena.tdb.base.file.FileFactory ;
 import com.hp.hpl.jena.tdb.base.file.FileSet ;
 import com.hp.hpl.jena.tdb.base.file.Location ;
@@ -32,8 +30,8 @@ import com.hp.hpl.jena.tdb.base.objectfile.ObjectFile ;
 import com.hp.hpl.jena.tdb.base.record.RecordFactory ;
 import com.hp.hpl.jena.tdb.index.Index ;
 import com.hp.hpl.jena.tdb.index.RangeIndex ;
+import com.hp.hpl.jena.tdb.index.SetupIndex ;
 import com.hp.hpl.jena.tdb.index.bplustree.BPlusTree ;
-import com.hp.hpl.jena.tdb.index.bplustree.BPlusTreeParams ;
 import com.hp.hpl.jena.tdb.setup.StoreParams ;
 import com.hp.hpl.jena.tdb.store.NodeId ;
 import com.hp.hpl.jena.tdb.store.tupletable.TupleIndex ;
@@ -143,7 +141,7 @@ public class SetupTDB
         int writeCacheSize = params.getBlockWriteCacheSize() ;
         
         // Value part is null (zero length)
-        RangeIndex rIndex = makeRangeIndex(location, indexName, params.getBlockSize(), keyLength, 0, readCacheSize, writeCacheSize) ;
+        RangeIndex rIndex = SetupIndex.makeRangeIndex(location, indexName, params.getBlockSize(), keyLength, 0, readCacheSize, writeCacheSize) ;
         TupleIndex tupleIndex = new TupleIndexRecord(primary.length(), new ColumnMap(primary, indexOrder), indexOrder, rIndex.getRecordFactory(), rIndex) ;
         return tupleIndex ;
     }
@@ -154,7 +152,7 @@ public class SetupTDB
                                   int dftKeyLength, int dftValueLength, 
                                   int readCacheSize,int writeCacheSize)
     {
-        return makeRangeIndex(location, indexName, blkSize, dftKeyLength, dftValueLength, readCacheSize, writeCacheSize) ;
+        return SetupIndex.makeIndex(location, indexName, blkSize, dftKeyLength, dftValueLength, readCacheSize, writeCacheSize) ;
     }
     
     public static RangeIndex makeRangeIndex(Location location, String indexName, 
@@ -162,69 +160,64 @@ public class SetupTDB
                                              int dftKeyLength, int dftValueLength,
                                              int readCacheSize,int writeCacheSize)
     {
-         FileSet fs = new FileSet(location, indexName) ;
-         RangeIndex rIndex =  makeBPlusTree(fs, blkSize, readCacheSize, writeCacheSize, dftKeyLength, dftValueLength) ;
-         return rIndex ;
+        return SetupIndex.makeRangeIndex(location, indexName, blkSize, dftKeyLength, dftValueLength, readCacheSize, writeCacheSize) ;
     }
     
     public static RangeIndex makeBPlusTree(FileSet fs, int blkSize,
                                            int readCacheSize, int writeCacheSize,
                                            int dftKeyLength, int dftValueLength)
     {
-        RecordFactory recordFactory = makeRecordFactory(dftKeyLength, dftValueLength) ;
-        int order = BPlusTreeParams.calcOrder(blkSize, recordFactory.recordLength()) ;
-        RangeIndex rIndex = createBPTree(fs, order, blkSize, readCacheSize, writeCacheSize, recordFactory) ;
-        return rIndex ;
+        return SetupIndex.makeBPlusTree(fs, blkSize, readCacheSize, writeCacheSize, dftKeyLength, dftValueLength) ;
     }
 
     public static RecordFactory makeRecordFactory(int keyLen, int valueLen)
-    {
-        return new RecordFactory(keyLen, valueLen) ;
-    }
-//    
-//    /** Make a NodeTable without cache and inline wrappers */ 
-//    public static NodeTable makeNodeTableBase(Location location, String indexNode2Id, String indexId2Node)
-//    {
-//        if (location.isMem()) 
-//            return NodeTableFactory.createMem() ;
-//
-//        // -- make id to node mapping -- Names.indexId2Node
-//        FileSet fsIdToNode = new FileSet(location, indexId2Node) ;
-//        
-//        ObjectFile stringFile = makeObjectFile(fsIdToNode) ;
-//        
-//        // -- make node to id mapping -- Names.indexNode2Id
-//        // Make index of id to node (data table)
-//        
-//        // No caching at the index level - we use the internal caches of the node table.
-//        Index nodeToId = makeIndex(location, indexNode2Id, LenNodeHash, SizeOfNodeId, -1 ,-1) ;
-//        
-//        // -- Make the node table using the components established above.
-//        NodeTable nodeTable = new NodeTableNative(nodeToId, stringFile) ;
-//        return nodeTable ;
-//    }
-//
-//    /** Make a NodeTable with cache and inline wrappers */ 
-//    public static NodeTable makeNodeTable(Location location)
-//    {
-//        return makeNodeTable(location,
-//                             Names.indexNode2Id, SystemTDB.Node2NodeIdCacheSize,
-//                             Names.indexId2Node, SystemTDB.NodeId2NodeCacheSize,
-//                             SystemTDB.NodeMissCacheSize) ;
-//    }
-//
-//    /** Make a NodeTable with cache and inline wrappers */ 
-//    public static NodeTable makeNodeTable(Location location,
-//                                          String indexNode2Id, int nodeToIdCacheSize,
-//                                          String indexId2Node, int idToNodeCacheSize,
-//                                          int nodeMissCacheSize)
-//    {
-//        NodeTable nodeTable = makeNodeTableBase(location, indexNode2Id, indexId2Node) ;
-//        nodeTable = NodeTableCache.create(nodeTable, nodeToIdCacheSize, idToNodeCacheSize, nodeMissCacheSize) ; 
-//        nodeTable = NodeTableInline.create(nodeTable) ;
-//        return nodeTable ;
-//    }
-//
+        {
+            return SetupIndex.makeRecordFactory(keyLen, valueLen) ;
+        }
+    //    
+    //    /** Make a NodeTable without cache and inline wrappers */ 
+    //    public static NodeTable makeNodeTableBase(Location location, String indexNode2Id, String indexId2Node)
+    //    {
+    //        if (location.isMem()) 
+    //            return NodeTableFactory.createMem() ;
+    //
+    //        // -- make id to node mapping -- Names.indexId2Node
+    //        FileSet fsIdToNode = new FileSet(location, indexId2Node) ;
+    //        
+    //        ObjectFile stringFile = makeObjectFile(fsIdToNode) ;
+    //        
+    //        // -- make node to id mapping -- Names.indexNode2Id
+    //        // Make index of id to node (data table)
+    //        
+    //        // No caching at the index level - we use the internal caches of the node table.
+    //        Index nodeToId = makeIndex(location, indexNode2Id, LenNodeHash, SizeOfNodeId, -1 ,-1) ;
+    //        
+    //        // -- Make the node table using the components established above.
+    //        NodeTable nodeTable = new NodeTableNative(nodeToId, stringFile) ;
+    //        return nodeTable ;
+    //    }
+    //
+    //    /** Make a NodeTable with cache and inline wrappers */ 
+    //    public static NodeTable makeNodeTable(Location location)
+    //    {
+    //        return makeNodeTable(location,
+    //                             Names.indexNode2Id, SystemTDB.Node2NodeIdCacheSize,
+    //                             Names.indexId2Node, SystemTDB.NodeId2NodeCacheSize,
+    //                             SystemTDB.NodeMissCacheSize) ;
+    //    }
+    //
+    //    /** Make a NodeTable with cache and inline wrappers */ 
+    //    public static NodeTable makeNodeTable(Location location,
+    //                                          String indexNode2Id, int nodeToIdCacheSize,
+    //                                          String indexId2Node, int idToNodeCacheSize,
+    //                                          int nodeMissCacheSize)
+    //    {
+    //        NodeTable nodeTable = makeNodeTableBase(location, indexNode2Id, indexId2Node) ;
+    //        nodeTable = NodeTableCache.create(nodeTable, nodeToIdCacheSize, idToNodeCacheSize, nodeMissCacheSize) ; 
+    //        nodeTable = NodeTableInline.create(nodeTable) ;
+    //        return nodeTable ;
+    //    }
+    //
     
     // XXX Move to FileFactory
     public static ObjectFile makeObjectFile(FileSet fsIdToNode)
@@ -235,66 +228,31 @@ public class SetupTDB
     }
 
     /** Create a B+Tree using defaults */
-    public static RangeIndex createBPTree(FileSet fileset,
-                                          RecordFactory factory)
-    {
-        int readCacheSize = SystemTDB.BlockReadCacheSize ;
-        int writeCacheSize = SystemTDB.BlockWriteCacheSize ;
-        int blockSize = SystemTDB.BlockSize ;
-        if ( fileset.isMem() )
-        {
-            readCacheSize = 0 ;
-            writeCacheSize = 0 ;
-            blockSize = SystemTDB.BlockSizeTest ;
-        }
-        
-        return createBPTreeByBlockSize(fileset, blockSize, readCacheSize, writeCacheSize, factory) ; 
+    public static RangeIndex createBPTree(FileSet fileset, RecordFactory factory) {
+        return SetupIndex.createBPTree(fileset, factory) ;
     }
     
     /** Create a B+Tree by BlockSize */
     public static RangeIndex createBPTreeByBlockSize(FileSet fileset,
                                                      int blockSize,
                                                      int readCacheSize, int writeCacheSize,
-                                                     RecordFactory factory)
-    {
-        return createBPTree(fileset, -1, blockSize, readCacheSize, writeCacheSize, factory) ; 
+                                                     RecordFactory factory) {
+        return SetupIndex.createBPTreeByBlockSize(fileset, blockSize, readCacheSize, writeCacheSize, factory) ;
     }
     
     /** Create a B+Tree by Order */
     public static RangeIndex createBPTreeByOrder(FileSet fileset,
                                                  int order,
                                                  int readCacheSize, int writeCacheSize,
-                                                 RecordFactory factory)
-    {
-        return createBPTree(fileset, order, -1, readCacheSize, writeCacheSize, factory) ; 
+                                                 RecordFactory factory) {
+        return SetupIndex.createBPTreeByOrder(fileset, order, readCacheSize, writeCacheSize, factory) ;
     }
     
 
     /** Knowing all the parameters, create a B+Tree */
     public static BPlusTree createBPTree(FileSet fileset, int order, int blockSize,
                                           int readCacheSize, int writeCacheSize,
-                                          RecordFactory factory)
-    {
-        // ---- Checking
-        if (blockSize < 0 && order < 0) throw new IllegalArgumentException("Neither blocksize nor order specified") ;
-        if (blockSize >= 0 && order < 0) order = BPlusTreeParams.calcOrder(blockSize, factory.recordLength()) ;
-        if (blockSize >= 0 && order >= 0)
-        {
-            int order2 = BPlusTreeParams.calcOrder(blockSize, factory.recordLength()) ;
-            if (order != order2) throw new IllegalArgumentException("Wrong order (" + order + "), calculated = "
-                                                                    + order2) ;
-        }
-    
-        // Iffy - does not allow for slop.
-        if (blockSize < 0 && order >= 0)
-        {
-            // Only in-memory.
-            blockSize = BPlusTreeParams.calcBlockSize(order, factory) ;
-        }
-    
-        BPlusTreeParams params = new BPlusTreeParams(order, factory) ;
-        BlockMgr blkMgrNodes = BlockMgrFactory.create(fileset, Names.bptExtTree, blockSize, readCacheSize, writeCacheSize) ;
-        BlockMgr blkMgrRecords = BlockMgrFactory.create(fileset, Names.bptExtRecords, blockSize, readCacheSize, writeCacheSize) ;
-        return BPlusTree.create(params, blkMgrNodes, blkMgrRecords) ;
+                                          RecordFactory factory) {
+        return SetupIndex.createBPTree(fileset, order, blockSize, readCacheSize, writeCacheSize, factory) ;
     }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/b659de12/jena-tdb/src/main/java/tdb/CmdRewriteIndex.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/tdb/CmdRewriteIndex.java b/jena-tdb/src/main/java/tdb/CmdRewriteIndex.java
index a8353bf..a256bcc 100644
--- a/jena-tdb/src/main/java/tdb/CmdRewriteIndex.java
+++ b/jena-tdb/src/main/java/tdb/CmdRewriteIndex.java
@@ -30,11 +30,11 @@ import com.hp.hpl.jena.tdb.base.file.Location ;
 import com.hp.hpl.jena.tdb.base.record.Record ;
 import com.hp.hpl.jena.tdb.base.record.RecordFactory ;
 import com.hp.hpl.jena.tdb.index.RangeIndex ;
+import com.hp.hpl.jena.tdb.index.SetupIndex ;
 import com.hp.hpl.jena.tdb.index.bplustree.BPlusTree ;
 import com.hp.hpl.jena.tdb.index.bplustree.BPlusTreeParams ;
 import com.hp.hpl.jena.tdb.index.bplustree.BPlusTreeRewriter ;
 import com.hp.hpl.jena.tdb.sys.Names ;
-import com.hp.hpl.jena.tdb.sys.SetupTDB ;
 import com.hp.hpl.jena.tdb.sys.SystemTDB ;
 
 /** Rewrite one index */
@@ -107,7 +107,7 @@ public class CmdRewriteIndex
         BlockMgr blkMgrRecords ;
         int blockSize = SystemTDB.BlockSize ;
         
-        RangeIndex rangeIndex = SetupTDB.makeRangeIndex(srcLoc, indexName, blockSize, dftKeyLength, dftValueLength, readCacheSize, writeCacheSize) ;
+        RangeIndex rangeIndex = SetupIndex.makeRangeIndex(srcLoc, indexName, blockSize, dftKeyLength, dftValueLength, readCacheSize, writeCacheSize) ;
         BPlusTree bpt = (BPlusTree)rangeIndex ;
         bptParams = bpt.getParams() ;
         recordFactory = bpt.getRecordFactory() ;

http://git-wip-us.apache.org/repos/asf/jena/blob/b659de12/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/bplustree/TestBPlusTreeRewriter.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/bplustree/TestBPlusTreeRewriter.java b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/bplustree/TestBPlusTreeRewriter.java
index 9cf549e..c0e644e 100644
--- a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/bplustree/TestBPlusTreeRewriter.java
+++ b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/bplustree/TestBPlusTreeRewriter.java
@@ -34,8 +34,8 @@ import com.hp.hpl.jena.tdb.base.block.BlockMgrFactory ;
 import com.hp.hpl.jena.tdb.base.file.FileSet ;
 import com.hp.hpl.jena.tdb.base.record.Record ;
 import com.hp.hpl.jena.tdb.base.record.RecordFactory ;
+import com.hp.hpl.jena.tdb.index.SetupIndex ;
 import com.hp.hpl.jena.tdb.sys.Names ;
-import com.hp.hpl.jena.tdb.sys.SetupTDB ;
 
 public class TestBPlusTreeRewriter extends BaseTest
 {
@@ -169,7 +169,7 @@ public class TestBPlusTreeRewriter extends BaseTest
     static List<Record> createData2(int ORDER, int N, RecordFactory recordFactory)
     {
         // Use a B+Tree - so original data can be unsorted.
-        BPlusTree bpt = SetupTDB.createBPTree(FileSet.mem(), ORDER, -1, -1, -1, recordFactory) ;
+        BPlusTree bpt = SetupIndex.createBPTree(FileSet.mem(), ORDER, -1, -1, -1, recordFactory) ;
 
         //BPlusTreeParams.checkAll() ;
         // 200 -> runt leaf problem.


[51/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
Maven modules for Fuseki2


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/470ee4d7
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/470ee4d7
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/470ee4d7

Branch: refs/heads/hadoop-rdf
Commit: 470ee4d73a846567b85c246468cbaec9e3b74e8b
Parents: 89400fb
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 17:31:05 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 17:31:05 2015 +0000

----------------------------------------------------------------------
 jena-fuseki2/D.trig                             |   20 -
 jena-fuseki2/D.ttl                              |   19 -
 jena-fuseki2/Data/books.ttl                     |   62 -
 jena-fuseki2/Data/test_abox.ttl                 |   21 -
 jena-fuseki2/Data/test_data_rdfs.ttl            |   28 -
 jena-fuseki2/Data/test_tbox.ttl                 |   25 -
 jena-fuseki2/assembly-dist.xml                  |   88 -
 jena-fuseki2/backup                             |   22 -
 jena-fuseki2/bin/s-delete                       |  707 --
 jena-fuseki2/bin/s-get                          |  707 --
 jena-fuseki2/bin/s-head                         |  707 --
 jena-fuseki2/bin/s-post                         |  707 --
 jena-fuseki2/bin/s-put                          |  707 --
 jena-fuseki2/bin/s-query                        |  707 --
 jena-fuseki2/bin/s-update                       |  707 --
 jena-fuseki2/bin/s-update-form                  |  707 --
 jena-fuseki2/bin/soh                            |  707 --
 jena-fuseki2/dist/ABOUT                         |    1 -
 jena-fuseki2/dist/LICENSE                       |  617 --
 jena-fuseki2/dist/NOTICE                        |  216 -
 jena-fuseki2/dwim                               |   19 -
 jena-fuseki2/dwim-upload                        |   48 -
 jena-fuseki2/fuseki                             |  477 -
 jena-fuseki2/fuseki-server                      |   64 -
 jena-fuseki2/fuseki-server.bat                  |   19 -
 jena-fuseki2/jena-fuseki-core/pom.xml           |  301 +
 .../main/java/org/apache/jena/fuseki/DEF.java   |   79 +
 .../java/org/apache/jena/fuseki/Fuseki.java     |  227 +
 .../java/org/apache/jena/fuseki/FusekiCmd.java  |   49 +
 .../jena/fuseki/FusekiConfigException.java      |   28 +
 .../org/apache/jena/fuseki/FusekiException.java |   29 +
 .../java/org/apache/jena/fuseki/FusekiLib.java  |  258 +
 .../org/apache/jena/fuseki/FusekiLogging.java   |  171 +
 .../jena/fuseki/FusekiNotFoundException.java    |   26 +
 .../jena/fuseki/FusekiRequestException.java     |   57 +
 .../org/apache/jena/fuseki/async/AsyncPool.java |   97 +
 .../org/apache/jena/fuseki/async/AsyncTask.java |  114 +
 .../fuseki/authz/AuthorizationFilter403.java    |   59 +
 .../apache/jena/fuseki/authz/DenyFilter.java    |   33 +
 .../jena/fuseki/authz/LocalhostFilter.java      |   62 +
 .../org/apache/jena/fuseki/build/Builder.java   |  149 +
 .../jena/fuseki/build/DataServiceDesc.java      |  107 +
 .../apache/jena/fuseki/build/FusekiConfig.java  |  261 +
 .../org/apache/jena/fuseki/build/Template.java  |   52 +
 .../jena/fuseki/build/TemplateFunctions.java    |   68 +
 .../org/apache/jena/fuseki/cmd/FusekiCmd.java   |  339 +
 .../org/apache/jena/fuseki/conneg/ConNeg.java   |  206 +
 .../org/apache/jena/fuseki/conneg/WebLib.java   |   60 +
 .../jena/fuseki/jetty/FusekiErrorHandler.java   |   95 +
 .../apache/jena/fuseki/jetty/JettyFuseki.java   |  305 +
 .../jena/fuseki/jetty/JettyServerConfig.java    |   51 +
 .../apache/jena/fuseki/mgt/ActionAsyncTask.java |   70 +
 .../apache/jena/fuseki/mgt/ActionBackup.java    |   84 +
 .../jena/fuseki/mgt/ActionContainerItem.java    |   94 +
 .../org/apache/jena/fuseki/mgt/ActionCtl.java   |   97 +
 .../apache/jena/fuseki/mgt/ActionDatasets.java  |  404 +
 .../org/apache/jena/fuseki/mgt/ActionItem.java  |   45 +
 .../org/apache/jena/fuseki/mgt/ActionLogs.java  |   59 +
 .../org/apache/jena/fuseki/mgt/ActionPing.java  |   78 +
 .../jena/fuseki/mgt/ActionServerStatus.java     |  114 +
 .../org/apache/jena/fuseki/mgt/ActionSleep.java |   98 +
 .../org/apache/jena/fuseki/mgt/ActionStats.java |  214 +
 .../org/apache/jena/fuseki/mgt/ActionTasks.java |  125 +
 .../java/org/apache/jena/fuseki/mgt/Async.java  |   68 +
 .../java/org/apache/jena/fuseki/mgt/Backup.java |  102 +
 .../org/apache/jena/fuseki/mgt/DumpServlet.java |  312 +
 .../org/apache/jena/fuseki/mgt/JsonConst.java   |   52 +
 .../apache/jena/fuseki/mgt/JsonDescription.java |   73 +
 .../org/apache/jena/fuseki/mgt/MgtConst.java    |   30 +
 .../java/org/apache/jena/fuseki/mgt/MgtJMX.java |   61 +
 .../fuseki/migrate/DatasetGraphSwitchable.java  |   88 +
 .../jena/fuseki/migrate/GraphLoadUtils.java     |   76 +
 .../apache/jena/fuseki/migrate/Registry.java    |   39 +
 .../jena/fuseki/migrate/StreamRDFLimited.java   |   63 +
 .../org/apache/jena/fuseki/server/Counter.java  |   34 +
 .../jena/fuseki/server/CounterMXBean.java       |   25 +
 .../apache/jena/fuseki/server/CounterName.java  |   84 +
 .../apache/jena/fuseki/server/CounterSet.java   |   70 +
 .../org/apache/jena/fuseki/server/Counters.java |   25 +
 .../jena/fuseki/server/DataAccessPoint.java     |   75 +
 .../fuseki/server/DataAccessPointRegistry.java  |   37 +
 .../apache/jena/fuseki/server/DataService.java  |  199 +
 .../jena/fuseki/server/DatasetMXBean.java       |   35 +
 .../jena/fuseki/server/DatasetStatus.java       |   40 +
 .../org/apache/jena/fuseki/server/Endpoint.java |   68 +
 .../apache/jena/fuseki/server/FusekiEnv.java    |  114 +
 .../apache/jena/fuseki/server/FusekiServer.java |  395 +
 .../server/FusekiServerEnvironmentInit.java     |   41 +
 .../fuseki/server/FusekiServerListener.java     |   81 +
 .../apache/jena/fuseki/server/FusekiVocab.java  |   77 +
 .../jena/fuseki/server/OperationName.java       |   37 +
 .../apache/jena/fuseki/server/RequestLog.java   |  148 +
 .../jena/fuseki/server/ServerInitialConfig.java |   40 +
 .../jena/fuseki/server/ServiceMXBean.java       |   32 +
 .../fuseki/server/ShiroEnvironmentLoader.java   |  164 +
 .../apache/jena/fuseki/server/SystemState.java  |  108 +
 .../apache/jena/fuseki/servlets/ActionBase.java |  265 +
 .../fuseki/servlets/ActionErrorException.java   |   32 +
 .../apache/jena/fuseki/servlets/ActionLib.java  |  180 +
 .../apache/jena/fuseki/servlets/ActionREST.java |  161 +
 .../jena/fuseki/servlets/ActionSPARQL.java      |  207 +
 .../fuseki/servlets/ConcurrencyPolicyMRSW.java  |  113 +
 .../jena/fuseki/servlets/FusekiFilter.java      |   87 +
 .../apache/jena/fuseki/servlets/HttpAction.java |  387 +
 .../servlets/HttpServletResponseTracker.java    |  140 +
 .../jena/fuseki/servlets/NullOutputStream.java  |   53 +
 .../apache/jena/fuseki/servlets/REST_Quads.java |   68 +
 .../jena/fuseki/servlets/REST_Quads_R.java      |   99 +
 .../jena/fuseki/servlets/REST_Quads_RW.java     |  136 +
 .../jena/fuseki/servlets/ResponseCallback.java  |   24 +
 .../jena/fuseki/servlets/ResponseModel.java     |  136 +
 .../jena/fuseki/servlets/ResponseOps.java       |   94 +
 .../jena/fuseki/servlets/ResponseResultSet.java |  322 +
 .../apache/jena/fuseki/servlets/SPARQL_GSP.java |  214 +
 .../jena/fuseki/servlets/SPARQL_GSP_R.java      |  123 +
 .../jena/fuseki/servlets/SPARQL_GSP_RW.java     |  208 +
 .../jena/fuseki/servlets/SPARQL_Protocol.java   |  101 +
 .../jena/fuseki/servlets/SPARQL_Query.java      |  393 +
 .../fuseki/servlets/SPARQL_QueryDataset.java    |   60 +
 .../fuseki/servlets/SPARQL_QueryGeneral.java    |  142 +
 .../fuseki/servlets/SPARQL_UberServlet.java     |  359 +
 .../jena/fuseki/servlets/SPARQL_Update.java     |  286 +
 .../jena/fuseki/servlets/SPARQL_Upload.java     |  291 +
 .../jena/fuseki/servlets/ServletBase.java       |   98 +
 .../apache/jena/fuseki/servlets/ServletOps.java |  209 +
 .../org/apache/jena/fuseki/servlets/Upload.java |  164 +
 .../jena/fuseki/servlets/UploadDetails.java     |   86 +
 .../jena/fuseki/validation/DataValidator.java   |  131 +
 .../jena/fuseki/validation/IRIValidator.java    |  168 +
 .../jena/fuseki/validation/QueryValidator.java  |  154 +
 .../jena/fuseki/validation/UpdateValidator.java |   91 +
 .../fuseki/validation/ValidationAction.java     |   95 +
 .../jena/fuseki/validation/ValidationError.java |   24 +
 .../fuseki/validation/ValidatorBaseJson.java    |  201 +
 .../src/main/resources/META-INF/DEPENDENCIES    |   24 +
 .../src/main/resources/META-INF/LICENSE         |  253 +
 .../src/main/resources/META-INF/NOTICE          |   16 +
 .../apache/jena/fuseki/fuseki-properties.xml    |    8 +
 .../org/apache/jena/fuseki/log4j.properties     |   42 +
 .../org/apache/jena/fuseki/server/config.ttl    |   30 +
 .../org/apache/jena/fuseki/server/shiro.ini     |   39 +
 .../jena/fuseki/server/templates/config-mem     |   27 +
 .../jena/fuseki/server/templates/config-service |   23 +
 .../jena/fuseki/server/templates/config-tdb     |   36 +
 .../jena/fuseki/server/templates/config-tdb-dir |   35 +
 .../jena/fuseki/server/templates/config-tdb-mem |   36 +
 .../src/main/webapp/WEB-INF/web.xml             |  269 +
 .../src/main/webapp/admin-logs.html             |   72 +
 .../main/webapp/css/bootstrap-select.min.css    |    7 +
 .../src/main/webapp/css/bootstrap-theme.css.map |    1 +
 .../src/main/webapp/css/bootstrap-theme.min.css |    7 +
 .../src/main/webapp/css/bootstrap.css.map       |    1 +
 .../src/main/webapp/css/bootstrap.min.css       |    7 +
 .../src/main/webapp/css/codemirror.min.css      |    1 +
 .../src/main/webapp/css/font-awesome.min.css    |    4 +
 .../src/main/webapp/css/fui.css                 |  191 +
 .../webapp/css/jquery.fileupload-noscript.css   |   22 +
 .../css/jquery.fileupload-ui-noscript.css       |   17 +
 .../main/webapp/css/jquery.fileupload-ui.css    |   57 +
 .../src/main/webapp/css/jquery.fileupload.css   |   36 +
 .../src/main/webapp/css/pivot.min.css           |    1 +
 .../src/main/webapp/css/qonsole.css             |  172 +
 .../src/main/webapp/css/yasqe.min.css           |    1 +
 .../src/main/webapp/css/yasr.min.css            |    1 +
 .../src/main/webapp/dataset.html                |  245 +
 .../src/main/webapp/documentation.html          |   80 +
 .../src/main/webapp/fonts/FontAwesome.otf       |  Bin 0 -> 75188 bytes
 .../main/webapp/fonts/fontawesome-webfont.eot   |  Bin 0 -> 72449 bytes
 .../main/webapp/fonts/fontawesome-webfont.svg   |  504 +
 .../main/webapp/fonts/fontawesome-webfont.ttf   |  Bin 0 -> 141564 bytes
 .../main/webapp/fonts/fontawesome-webfont.woff  |  Bin 0 -> 83760 bytes
 .../fonts/glyphicons-halflings-regular.eot      |  Bin 0 -> 20335 bytes
 .../fonts/glyphicons-halflings-regular.svg      |  229 +
 .../fonts/glyphicons-halflings-regular.ttf      |  Bin 0 -> 41280 bytes
 .../fonts/glyphicons-halflings-regular.woff     |  Bin 0 -> 23320 bytes
 .../src/main/webapp/images/back_disabled.png    |  Bin 0 -> 1361 bytes
 .../src/main/webapp/images/back_enabled.png     |  Bin 0 -> 1379 bytes
 .../main/webapp/images/back_enabled_hover.png   |  Bin 0 -> 1375 bytes
 .../src/main/webapp/images/favicon.ico          |  Bin 0 -> 1085 bytes
 .../src/main/webapp/images/forward_disabled.png |  Bin 0 -> 1363 bytes
 .../src/main/webapp/images/forward_enabled.png  |  Bin 0 -> 1380 bytes
 .../webapp/images/forward_enabled_hover.png     |  Bin 0 -> 1379 bytes
 .../webapp/images/jena-logo-notext-small.png    |  Bin 0 -> 2469 bytes
 .../src/main/webapp/images/sort_asc.png         |  Bin 0 -> 1118 bytes
 .../main/webapp/images/sort_asc_disabled.png    |  Bin 0 -> 1050 bytes
 .../src/main/webapp/images/sort_both.png        |  Bin 0 -> 1136 bytes
 .../src/main/webapp/images/sort_desc.png        |  Bin 0 -> 1127 bytes
 .../main/webapp/images/sort_desc_disabled.png   |  Bin 0 -> 1045 bytes
 .../src/main/webapp/images/wait30.gif           |  Bin 0 -> 6337 bytes
 .../jena-fuseki-core/src/main/webapp/index.html |  103 +
 .../src/main/webapp/js/app/controllers/.svnkeep |    0
 .../js/app/controllers/dataset-controller.js    |   69 +
 .../js/app/controllers/index-controller.js      |   50 +
 .../js/app/controllers/manage-controller.js     |   39 +
 .../js/app/controllers/query-controller.js      |   72 +
 .../js/app/controllers/upload-controller.js     |   42 +
 .../js/app/controllers/validation-controller.js |   38 +
 .../src/main/webapp/js/app/fui.js               |   33 +
 .../src/main/webapp/js/app/layouts/.svnkeep     |    0
 .../src/main/webapp/js/app/main.dataset.js      |   31 +
 .../src/main/webapp/js/app/main.index.js        |   24 +
 .../src/main/webapp/js/app/main.manage.js       |   27 +
 .../src/main/webapp/js/app/main.validation.js   |   24 +
 .../main/webapp/js/app/models/dataset-stats.js  |  102 +
 .../src/main/webapp/js/app/models/dataset.js    |  251 +
 .../main/webapp/js/app/models/fuseki-server.js  |  155 +
 .../src/main/webapp/js/app/models/task.js       |  105 +
 .../webapp/js/app/models/validation-options.js  |   85 +
 .../src/main/webapp/js/app/qonsole-config.js    |   26 +
 .../src/main/webapp/js/app/routers/.svnkeep     |    0
 .../main/webapp/js/app/services/ping-service.js |   54 +
 .../js/app/services/validation-service.js       |   98 +
 .../webapp/js/app/templates/dataset-edit.tpl    |   58 +
 .../webapp/js/app/templates/dataset-info.tpl    |   40 +
 .../js/app/templates/dataset-management.tpl     |   53 +
 .../js/app/templates/dataset-selection-list.tpl |   22 +
 .../js/app/templates/dataset-selector.tpl       |   15 +
 .../js/app/templates/dataset-simple-create.tpl  |   79 +
 .../webapp/js/app/templates/dataset-stats.tpl   |   14 +
 .../webapp/js/app/templates/file-upload.tpl     |   46 +
 .../webapp/js/app/templates/uploadable-file.tpl |   23 +
 .../src/main/webapp/js/app/util/page-utils.js   |   33 +
 .../src/main/webapp/js/app/views/.svnkeep       |    0
 .../main/webapp/js/app/views/dataset-edit.js    |  205 +
 .../main/webapp/js/app/views/dataset-info.js    |   76 +
 .../webapp/js/app/views/dataset-management.js   |  163 +
 .../js/app/views/dataset-selection-list.js      |   58 +
 .../webapp/js/app/views/dataset-selector.js     |   84 +
 .../js/app/views/dataset-simple-create.js       |  100 +
 .../main/webapp/js/app/views/dataset-stats.js   |   41 +
 .../js/app/views/datasets-dropdown-list.js      |   43 +
 .../src/main/webapp/js/app/views/file-upload.js |  225 +
 .../webapp/js/app/views/tabbed-view-manager.js  |   63 +
 .../main/webapp/js/app/views/uploadable-file.js |   39 +
 .../webapp/js/app/views/validation-options.js   |   54 +
 .../src/main/webapp/js/common-config.js         |   93 +
 .../main/webapp/js/lib/addon/fold/brace-fold.js |  105 +
 .../webapp/js/lib/addon/fold/comment-fold.js    |   57 +
 .../main/webapp/js/lib/addon/fold/foldcode.js   |  145 +
 .../main/webapp/js/lib/addon/fold/foldgutter.js |  134 +
 .../main/webapp/js/lib/addon/fold/xml-fold.js   |  181 +
 .../src/main/webapp/js/lib/backbone-min.js      |    2 +
 .../src/main/webapp/js/lib/backbone.js          | 1581 +++
 .../main/webapp/js/lib/backbone.marionette.js   | 2385 +++++
 .../main/webapp/js/lib/bootstrap-select.min.js  |    8 +
 .../src/main/webapp/js/lib/bootstrap.min.js     |    6 +
 .../src/main/webapp/js/lib/html5shiv.js         |    8 +
 .../src/main/webapp/js/lib/jquery-1.10.2.js     | 9789 ++++++++++++++++++
 .../src/main/webapp/js/lib/jquery-1.10.2.min.js |    6 +
 .../src/main/webapp/js/lib/jquery-ui.min.js     |    7 +
 .../main/webapp/js/lib/jquery.dataTables.min.js |  157 +
 .../src/main/webapp/js/lib/jquery.fileupload.js | 1426 +++
 .../webapp/js/lib/jquery.fileupload.local.js    | 1428 +++
 .../src/main/webapp/js/lib/jquery.form.js       | 1278 +++
 .../webapp/js/lib/jquery.iframe-transport.js    |  214 +
 .../src/main/webapp/js/lib/jquery.ui.widget.js  |  530 +
 .../main/webapp/js/lib/jquery.xdomainrequest.js |   90 +
 .../src/main/webapp/js/lib/lib/codemirror.js    | 7638 ++++++++++++++
 .../webapp/js/lib/mode/javascript/javascript.js |  683 ++
 .../main/webapp/js/lib/mode/sparql/sparql.js    |  160 +
 .../main/webapp/js/lib/mode/turtle/turtle.js    |  160 +
 .../src/main/webapp/js/lib/mode/xml/xml.js      |  384 +
 .../src/main/webapp/js/lib/pivot.js             | 1363 +++
 .../src/main/webapp/js/lib/pivot.min.js         |    2 +
 .../src/main/webapp/js/lib/pivot.min.js.map     |    1 +
 .../src/main/webapp/js/lib/plugins/text.js      |  386 +
 .../src/main/webapp/js/lib/qonsole.js           |  570 +
 .../src/main/webapp/js/lib/refresh.sh           |   21 +
 .../src/main/webapp/js/lib/require.js           | 2076 ++++
 .../src/main/webapp/js/lib/require.min.js       |   36 +
 .../src/main/webapp/js/lib/respond.min.js       |    6 +
 .../src/main/webapp/js/lib/sprintf-0.7-beta1.js |  183 +
 .../src/main/webapp/js/lib/underscore.js        | 1276 +++
 .../src/main/webapp/js/lib/yasqe.min.js         |    5 +
 .../src/main/webapp/js/lib/yasqe.min.js.map     |    1 +
 .../src/main/webapp/js/lib/yasr.min.js          |    5 +
 .../src/main/webapp/js/lib/yasr.min.js.map      |    1 +
 .../src/main/webapp/manage.html                 |  107 +
 .../src/main/webapp/services.html               |   75 +
 .../src/main/webapp/test/test-fuseki-config.ttl |   27 +
 .../src/main/webapp/validate.html               |  146 +
 .../apache/jena/fuseki/AbstractFusekiTest.java  |   47 +
 .../java/org/apache/jena/fuseki/FileSender.java |   87 +
 .../java/org/apache/jena/fuseki/ServerTest.java |  157 +
 .../java/org/apache/jena/fuseki/TS_Fuseki.java  |   75 +
 .../java/org/apache/jena/fuseki/TestAdmin.java  |  538 +
 .../java/org/apache/jena/fuseki/TestAuth.java   |  405 +
 .../org/apache/jena/fuseki/TestDatasetOps.java  |  154 +
 .../org/apache/jena/fuseki/TestFileUpload.java  |  128 +
 .../java/org/apache/jena/fuseki/TestQuery.java  |  115 +
 .../apache/jena/fuseki/TestSPARQLProtocol.java  |   95 +
 .../fuseki/http/TestDatasetAccessorHTTP.java    |  261 +
 .../http/TestDatasetGraphAccessorHTTP.java      |   43 +
 .../org/apache/jena/fuseki/http/TestHttpOp.java |  233 +
 .../jena-fuseki-core/testing/config-ds-1.ttl    |   15 +
 jena-fuseki2/jena-fuseki-dist/assembly-dist.xml |  100 +
 jena-fuseki2/jena-fuseki-dist/backup            |   22 +
 jena-fuseki2/jena-fuseki-dist/bin/s-delete      |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-get         |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-head        |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-post        |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-put         |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-query       |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-update      |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/s-update-form |  707 ++
 jena-fuseki2/jena-fuseki-dist/bin/soh           |  707 ++
 jena-fuseki2/jena-fuseki-dist/dist/ABOUT        |    1 +
 jena-fuseki2/jena-fuseki-dist/dist/LICENSE      |  617 ++
 jena-fuseki2/jena-fuseki-dist/dist/NOTICE       |  216 +
 jena-fuseki2/jena-fuseki-dist/fuseki            |  477 +
 jena-fuseki2/jena-fuseki-dist/fuseki-server     |   64 +
 jena-fuseki2/jena-fuseki-dist/fuseki-server.bat |   19 +
 jena-fuseki2/jena-fuseki-dist/pom.xml           |   94 +
 .../dependency-reduced-pom.xml                  |   93 +
 jena-fuseki2/jena-fuseki-server/pom.xml         |  127 +
 jena-fuseki2/jena-fuseki-war/pom.xml            |  109 +
 jena-fuseki2/make-html                          |   29 -
 jena-fuseki2/pom.xml                            |  377 +-
 .../main/java/org/apache/jena/fuseki/DEF.java   |   79 -
 .../java/org/apache/jena/fuseki/Fuseki.java     |  227 -
 .../java/org/apache/jena/fuseki/FusekiCmd.java  |   28 -
 .../jena/fuseki/FusekiConfigException.java      |   28 -
 .../org/apache/jena/fuseki/FusekiException.java |   29 -
 .../java/org/apache/jena/fuseki/FusekiLib.java  |  258 -
 .../org/apache/jena/fuseki/FusekiLogging.java   |  171 -
 .../jena/fuseki/FusekiNotFoundException.java    |   26 -
 .../jena/fuseki/FusekiRequestException.java     |   57 -
 .../org/apache/jena/fuseki/async/AsyncPool.java |   97 -
 .../org/apache/jena/fuseki/async/AsyncTask.java |  114 -
 .../fuseki/authz/AuthorizationFilter403.java    |   59 -
 .../apache/jena/fuseki/authz/DenyFilter.java    |   33 -
 .../jena/fuseki/authz/LocalhostFilter.java      |   62 -
 .../org/apache/jena/fuseki/build/Builder.java   |  149 -
 .../jena/fuseki/build/DataServiceDesc.java      |  107 -
 .../apache/jena/fuseki/build/FusekiConfig.java  |  261 -
 .../org/apache/jena/fuseki/build/Template.java  |   52 -
 .../jena/fuseki/build/TemplateFunctions.java    |   68 -
 .../org/apache/jena/fuseki/cmd/FusekiCmd.java   |  339 -
 .../org/apache/jena/fuseki/conneg/ConNeg.java   |  206 -
 .../org/apache/jena/fuseki/conneg/WebLib.java   |   60 -
 .../jena/fuseki/jetty/FusekiErrorHandler.java   |   95 -
 .../apache/jena/fuseki/jetty/JettyFuseki.java   |  305 -
 .../jena/fuseki/jetty/JettyServerConfig.java    |   51 -
 .../apache/jena/fuseki/mgt/ActionAsyncTask.java |   70 -
 .../apache/jena/fuseki/mgt/ActionBackup.java    |   84 -
 .../jena/fuseki/mgt/ActionContainerItem.java    |   94 -
 .../org/apache/jena/fuseki/mgt/ActionCtl.java   |   97 -
 .../apache/jena/fuseki/mgt/ActionDatasets.java  |  404 -
 .../org/apache/jena/fuseki/mgt/ActionItem.java  |   45 -
 .../org/apache/jena/fuseki/mgt/ActionLogs.java  |   59 -
 .../org/apache/jena/fuseki/mgt/ActionPing.java  |   78 -
 .../jena/fuseki/mgt/ActionServerStatus.java     |  114 -
 .../org/apache/jena/fuseki/mgt/ActionSleep.java |   98 -
 .../org/apache/jena/fuseki/mgt/ActionStats.java |  214 -
 .../org/apache/jena/fuseki/mgt/ActionTasks.java |  125 -
 .../java/org/apache/jena/fuseki/mgt/Async.java  |   68 -
 .../java/org/apache/jena/fuseki/mgt/Backup.java |  102 -
 .../org/apache/jena/fuseki/mgt/DumpServlet.java |  312 -
 .../org/apache/jena/fuseki/mgt/JsonConst.java   |   52 -
 .../apache/jena/fuseki/mgt/JsonDescription.java |   73 -
 .../org/apache/jena/fuseki/mgt/MgtConst.java    |   30 -
 .../java/org/apache/jena/fuseki/mgt/MgtJMX.java |   61 -
 .../fuseki/migrate/DatasetGraphSwitchable.java  |   88 -
 .../jena/fuseki/migrate/GraphLoadUtils.java     |   76 -
 .../apache/jena/fuseki/migrate/Registry.java    |   39 -
 .../jena/fuseki/migrate/StreamRDFLimited.java   |   63 -
 .../org/apache/jena/fuseki/server/Counter.java  |   34 -
 .../jena/fuseki/server/CounterMXBean.java       |   25 -
 .../apache/jena/fuseki/server/CounterName.java  |   84 -
 .../apache/jena/fuseki/server/CounterSet.java   |   70 -
 .../org/apache/jena/fuseki/server/Counters.java |   25 -
 .../jena/fuseki/server/DataAccessPoint.java     |   75 -
 .../fuseki/server/DataAccessPointRegistry.java  |   37 -
 .../apache/jena/fuseki/server/DataService.java  |  199 -
 .../jena/fuseki/server/DatasetMXBean.java       |   35 -
 .../jena/fuseki/server/DatasetStatus.java       |   40 -
 .../org/apache/jena/fuseki/server/Endpoint.java |   68 -
 .../apache/jena/fuseki/server/FusekiEnv.java    |  114 -
 .../apache/jena/fuseki/server/FusekiServer.java |  395 -
 .../server/FusekiServerEnvironmentInit.java     |   41 -
 .../fuseki/server/FusekiServerListener.java     |   81 -
 .../apache/jena/fuseki/server/FusekiVocab.java  |   77 -
 .../jena/fuseki/server/OperationName.java       |   37 -
 .../apache/jena/fuseki/server/RequestLog.java   |  148 -
 .../jena/fuseki/server/ServerInitialConfig.java |   40 -
 .../jena/fuseki/server/ServiceMXBean.java       |   32 -
 .../fuseki/server/ShiroEnvironmentLoader.java   |  164 -
 .../apache/jena/fuseki/server/SystemState.java  |  108 -
 .../apache/jena/fuseki/servlets/ActionBase.java |  265 -
 .../fuseki/servlets/ActionErrorException.java   |   32 -
 .../apache/jena/fuseki/servlets/ActionLib.java  |  180 -
 .../apache/jena/fuseki/servlets/ActionREST.java |  161 -
 .../jena/fuseki/servlets/ActionSPARQL.java      |  207 -
 .../fuseki/servlets/ConcurrencyPolicyMRSW.java  |  113 -
 .../jena/fuseki/servlets/FusekiFilter.java      |   87 -
 .../apache/jena/fuseki/servlets/HttpAction.java |  387 -
 .../servlets/HttpServletResponseTracker.java    |  140 -
 .../jena/fuseki/servlets/NullOutputStream.java  |   53 -
 .../apache/jena/fuseki/servlets/REST_Quads.java |   68 -
 .../jena/fuseki/servlets/REST_Quads_R.java      |   99 -
 .../jena/fuseki/servlets/REST_Quads_RW.java     |  136 -
 .../jena/fuseki/servlets/ResponseCallback.java  |   24 -
 .../jena/fuseki/servlets/ResponseModel.java     |  136 -
 .../jena/fuseki/servlets/ResponseOps.java       |   94 -
 .../jena/fuseki/servlets/ResponseResultSet.java |  322 -
 .../apache/jena/fuseki/servlets/SPARQL_GSP.java |  214 -
 .../jena/fuseki/servlets/SPARQL_GSP_R.java      |  123 -
 .../jena/fuseki/servlets/SPARQL_GSP_RW.java     |  208 -
 .../jena/fuseki/servlets/SPARQL_Protocol.java   |  101 -
 .../jena/fuseki/servlets/SPARQL_Query.java      |  393 -
 .../fuseki/servlets/SPARQL_QueryDataset.java    |   60 -
 .../fuseki/servlets/SPARQL_QueryGeneral.java    |  142 -
 .../fuseki/servlets/SPARQL_UberServlet.java     |  359 -
 .../jena/fuseki/servlets/SPARQL_Update.java     |  286 -
 .../jena/fuseki/servlets/SPARQL_Upload.java     |  291 -
 .../jena/fuseki/servlets/ServletBase.java       |   98 -
 .../apache/jena/fuseki/servlets/ServletOps.java |  209 -
 .../org/apache/jena/fuseki/servlets/Upload.java |  164 -
 .../jena/fuseki/servlets/UploadDetails.java     |   86 -
 .../jena/fuseki/validation/DataValidator.java   |  131 -
 .../jena/fuseki/validation/IRIValidator.java    |  168 -
 .../jena/fuseki/validation/QueryValidator.java  |  154 -
 .../jena/fuseki/validation/UpdateValidator.java |   91 -
 .../fuseki/validation/ValidationAction.java     |   95 -
 .../jena/fuseki/validation/ValidationError.java |   24 -
 .../fuseki/validation/ValidatorBaseJson.java    |  201 -
 .../src/main/resources/META-INF/DEPENDENCIES    |   24 -
 .../src/main/resources/META-INF/LICENSE         |  253 -
 jena-fuseki2/src/main/resources/META-INF/NOTICE |   16 -
 .../apache/jena/fuseki/fuseki-properties.xml    |    8 -
 .../org/apache/jena/fuseki/log4j.properties     |   42 -
 .../org/apache/jena/fuseki/server/config.ttl    |   30 -
 .../org/apache/jena/fuseki/server/shiro.ini     |   39 -
 .../jena/fuseki/server/templates/config-mem     |   27 -
 .../jena/fuseki/server/templates/config-service |   23 -
 .../jena/fuseki/server/templates/config-tdb     |   36 -
 .../jena/fuseki/server/templates/config-tdb-dir |   35 -
 .../jena/fuseki/server/templates/config-tdb-mem |   36 -
 jena-fuseki2/src/main/webapp/WEB-INF/web.xml    |  269 -
 jena-fuseki2/src/main/webapp/admin-logs.html    |   72 -
 .../main/webapp/css/bootstrap-select.min.css    |    7 -
 .../src/main/webapp/css/bootstrap-theme.css.map |    1 -
 .../src/main/webapp/css/bootstrap-theme.min.css |    7 -
 .../src/main/webapp/css/bootstrap.css.map       |    1 -
 .../src/main/webapp/css/bootstrap.min.css       |    7 -
 .../src/main/webapp/css/codemirror.min.css      |    1 -
 .../src/main/webapp/css/font-awesome.min.css    |    4 -
 jena-fuseki2/src/main/webapp/css/fui.css        |  191 -
 .../webapp/css/jquery.fileupload-noscript.css   |   22 -
 .../css/jquery.fileupload-ui-noscript.css       |   17 -
 .../main/webapp/css/jquery.fileupload-ui.css    |   57 -
 .../src/main/webapp/css/jquery.fileupload.css   |   36 -
 jena-fuseki2/src/main/webapp/css/pivot.min.css  |    1 -
 jena-fuseki2/src/main/webapp/css/qonsole.css    |  172 -
 jena-fuseki2/src/main/webapp/css/yasqe.min.css  |    1 -
 jena-fuseki2/src/main/webapp/css/yasr.min.css   |    1 -
 jena-fuseki2/src/main/webapp/dataset.html       |  245 -
 jena-fuseki2/src/main/webapp/documentation.html |   80 -
 .../src/main/webapp/fonts/FontAwesome.otf       |  Bin 75188 -> 0 bytes
 .../main/webapp/fonts/fontawesome-webfont.eot   |  Bin 72449 -> 0 bytes
 .../main/webapp/fonts/fontawesome-webfont.svg   |  504 -
 .../main/webapp/fonts/fontawesome-webfont.ttf   |  Bin 141564 -> 0 bytes
 .../main/webapp/fonts/fontawesome-webfont.woff  |  Bin 83760 -> 0 bytes
 .../fonts/glyphicons-halflings-regular.eot      |  Bin 20335 -> 0 bytes
 .../fonts/glyphicons-halflings-regular.svg      |  229 -
 .../fonts/glyphicons-halflings-regular.ttf      |  Bin 41280 -> 0 bytes
 .../fonts/glyphicons-halflings-regular.woff     |  Bin 23320 -> 0 bytes
 .../src/main/webapp/images/back_disabled.png    |  Bin 1361 -> 0 bytes
 .../src/main/webapp/images/back_enabled.png     |  Bin 1379 -> 0 bytes
 .../main/webapp/images/back_enabled_hover.png   |  Bin 1375 -> 0 bytes
 jena-fuseki2/src/main/webapp/images/favicon.ico |  Bin 1085 -> 0 bytes
 .../src/main/webapp/images/forward_disabled.png |  Bin 1363 -> 0 bytes
 .../src/main/webapp/images/forward_enabled.png  |  Bin 1380 -> 0 bytes
 .../webapp/images/forward_enabled_hover.png     |  Bin 1379 -> 0 bytes
 .../webapp/images/jena-logo-notext-small.png    |  Bin 2469 -> 0 bytes
 .../src/main/webapp/images/sort_asc.png         |  Bin 1118 -> 0 bytes
 .../main/webapp/images/sort_asc_disabled.png    |  Bin 1050 -> 0 bytes
 .../src/main/webapp/images/sort_both.png        |  Bin 1136 -> 0 bytes
 .../src/main/webapp/images/sort_desc.png        |  Bin 1127 -> 0 bytes
 .../main/webapp/images/sort_desc_disabled.png   |  Bin 1045 -> 0 bytes
 jena-fuseki2/src/main/webapp/images/wait30.gif  |  Bin 6337 -> 0 bytes
 jena-fuseki2/src/main/webapp/index.html         |  103 -
 .../src/main/webapp/js/app/controllers/.svnkeep |    0
 .../js/app/controllers/dataset-controller.js    |   69 -
 .../js/app/controllers/index-controller.js      |   50 -
 .../js/app/controllers/manage-controller.js     |   39 -
 .../js/app/controllers/query-controller.js      |   72 -
 .../js/app/controllers/upload-controller.js     |   42 -
 .../js/app/controllers/validation-controller.js |   38 -
 jena-fuseki2/src/main/webapp/js/app/fui.js      |   33 -
 .../src/main/webapp/js/app/layouts/.svnkeep     |    0
 .../src/main/webapp/js/app/main.dataset.js      |   31 -
 .../src/main/webapp/js/app/main.index.js        |   24 -
 .../src/main/webapp/js/app/main.manage.js       |   27 -
 .../src/main/webapp/js/app/main.validation.js   |   24 -
 .../main/webapp/js/app/models/dataset-stats.js  |  102 -
 .../src/main/webapp/js/app/models/dataset.js    |  251 -
 .../main/webapp/js/app/models/fuseki-server.js  |  155 -
 .../src/main/webapp/js/app/models/task.js       |  105 -
 .../webapp/js/app/models/validation-options.js  |   85 -
 .../src/main/webapp/js/app/qonsole-config.js    |   26 -
 .../src/main/webapp/js/app/routers/.svnkeep     |    0
 .../main/webapp/js/app/services/ping-service.js |   54 -
 .../js/app/services/validation-service.js       |   98 -
 .../webapp/js/app/templates/dataset-edit.tpl    |   58 -
 .../webapp/js/app/templates/dataset-info.tpl    |   40 -
 .../js/app/templates/dataset-management.tpl     |   53 -
 .../js/app/templates/dataset-selection-list.tpl |   22 -
 .../js/app/templates/dataset-selector.tpl       |   15 -
 .../js/app/templates/dataset-simple-create.tpl  |   79 -
 .../webapp/js/app/templates/dataset-stats.tpl   |   14 -
 .../webapp/js/app/templates/file-upload.tpl     |   46 -
 .../webapp/js/app/templates/uploadable-file.tpl |   23 -
 .../src/main/webapp/js/app/util/page-utils.js   |   33 -
 .../src/main/webapp/js/app/views/.svnkeep       |    0
 .../main/webapp/js/app/views/dataset-edit.js    |  205 -
 .../main/webapp/js/app/views/dataset-info.js    |   76 -
 .../webapp/js/app/views/dataset-management.js   |  163 -
 .../js/app/views/dataset-selection-list.js      |   58 -
 .../webapp/js/app/views/dataset-selector.js     |   84 -
 .../js/app/views/dataset-simple-create.js       |  100 -
 .../main/webapp/js/app/views/dataset-stats.js   |   41 -
 .../js/app/views/datasets-dropdown-list.js      |   43 -
 .../src/main/webapp/js/app/views/file-upload.js |  225 -
 .../webapp/js/app/views/tabbed-view-manager.js  |   63 -
 .../main/webapp/js/app/views/uploadable-file.js |   39 -
 .../webapp/js/app/views/validation-options.js   |   54 -
 .../src/main/webapp/js/common-config.js         |   93 -
 .../main/webapp/js/lib/addon/fold/brace-fold.js |  105 -
 .../webapp/js/lib/addon/fold/comment-fold.js    |   57 -
 .../main/webapp/js/lib/addon/fold/foldcode.js   |  145 -
 .../main/webapp/js/lib/addon/fold/foldgutter.js |  134 -
 .../main/webapp/js/lib/addon/fold/xml-fold.js   |  181 -
 .../src/main/webapp/js/lib/backbone-min.js      |    2 -
 jena-fuseki2/src/main/webapp/js/lib/backbone.js | 1581 ---
 .../main/webapp/js/lib/backbone.marionette.js   | 2385 -----
 .../main/webapp/js/lib/bootstrap-select.min.js  |    8 -
 .../src/main/webapp/js/lib/bootstrap.min.js     |    6 -
 .../src/main/webapp/js/lib/html5shiv.js         |    8 -
 .../src/main/webapp/js/lib/jquery-1.10.2.js     | 9789 ------------------
 .../src/main/webapp/js/lib/jquery-1.10.2.min.js |    6 -
 .../src/main/webapp/js/lib/jquery-ui.min.js     |    7 -
 .../main/webapp/js/lib/jquery.dataTables.min.js |  157 -
 .../src/main/webapp/js/lib/jquery.fileupload.js | 1426 ---
 .../webapp/js/lib/jquery.fileupload.local.js    | 1428 ---
 .../src/main/webapp/js/lib/jquery.form.js       | 1278 ---
 .../webapp/js/lib/jquery.iframe-transport.js    |  214 -
 .../src/main/webapp/js/lib/jquery.ui.widget.js  |  530 -
 .../main/webapp/js/lib/jquery.xdomainrequest.js |   90 -
 .../src/main/webapp/js/lib/lib/codemirror.js    | 7638 --------------
 .../webapp/js/lib/mode/javascript/javascript.js |  683 --
 .../main/webapp/js/lib/mode/sparql/sparql.js    |  160 -
 .../main/webapp/js/lib/mode/turtle/turtle.js    |  160 -
 .../src/main/webapp/js/lib/mode/xml/xml.js      |  384 -
 jena-fuseki2/src/main/webapp/js/lib/pivot.js    | 1363 ---
 .../src/main/webapp/js/lib/pivot.min.js         |    2 -
 .../src/main/webapp/js/lib/pivot.min.js.map     |    1 -
 .../src/main/webapp/js/lib/plugins/text.js      |  386 -
 jena-fuseki2/src/main/webapp/js/lib/qonsole.js  |  570 -
 jena-fuseki2/src/main/webapp/js/lib/refresh.sh  |   21 -
 jena-fuseki2/src/main/webapp/js/lib/require.js  | 2076 ----
 .../src/main/webapp/js/lib/require.min.js       |   36 -
 .../src/main/webapp/js/lib/respond.min.js       |    6 -
 .../src/main/webapp/js/lib/sprintf-0.7-beta1.js |  183 -
 .../src/main/webapp/js/lib/underscore.js        | 1276 ---
 .../src/main/webapp/js/lib/yasqe.min.js         |    5 -
 .../src/main/webapp/js/lib/yasqe.min.js.map     |    1 -
 jena-fuseki2/src/main/webapp/js/lib/yasr.min.js |    5 -
 .../src/main/webapp/js/lib/yasr.min.js.map      |    1 -
 jena-fuseki2/src/main/webapp/manage.html        |  107 -
 jena-fuseki2/src/main/webapp/services.html      |   75 -
 .../src/main/webapp/test/test-fuseki-config.ttl |   27 -
 jena-fuseki2/src/main/webapp/validate.html      |  146 -
 .../apache/jena/fuseki/AbstractFusekiTest.java  |   47 -
 .../java/org/apache/jena/fuseki/FileSender.java |   87 -
 .../java/org/apache/jena/fuseki/ServerTest.java |  157 -
 .../java/org/apache/jena/fuseki/TS_Fuseki.java  |   75 -
 .../java/org/apache/jena/fuseki/TestAdmin.java  |  538 -
 .../java/org/apache/jena/fuseki/TestAuth.java   |  405 -
 .../org/apache/jena/fuseki/TestDatasetOps.java  |  154 -
 .../org/apache/jena/fuseki/TestFileUpload.java  |  128 -
 .../java/org/apache/jena/fuseki/TestQuery.java  |  115 -
 .../apache/jena/fuseki/TestSPARQLProtocol.java  |   95 -
 .../fuseki/http/TestDatasetAccessorHTTP.java    |  261 -
 .../http/TestDatasetGraphAccessorHTTP.java      |   43 -
 .../org/apache/jena/fuseki/http/TestHttpOp.java |  233 -
 jena-fuseki2/testing/config-ds-1.ttl            |   15 -
 587 files changed, 64825 insertions(+), 64692 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/D.trig
----------------------------------------------------------------------
diff --git a/jena-fuseki2/D.trig b/jena-fuseki2/D.trig
deleted file mode 100644
index a3e8fcc..0000000
--- a/jena-fuseki2/D.trig
+++ /dev/null
@@ -1,20 +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.
-
-@prefix : <http://example/> .
-
-{ :s :p "quads" }
-:g { :s :p 2 }

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/D.ttl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/D.ttl b/jena-fuseki2/D.ttl
deleted file mode 100644
index 739ff9a..0000000
--- a/jena-fuseki2/D.ttl
+++ /dev/null
@@ -1,19 +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.
-
-@prefix : <http://example/> .
-
-[] :p "TTL" .

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/Data/books.ttl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/Data/books.ttl b/jena-fuseki2/Data/books.ttl
deleted file mode 100644
index 7957323..0000000
--- a/jena-fuseki2/Data/books.ttl
+++ /dev/null
@@ -1,62 +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.
-
-@prefix dc:        <http://purl.org/dc/elements/1.1/> .
-@prefix vcard:     <http://www.w3.org/2001/vcard-rdf/3.0#> .
-@prefix ns:        <http://example.org/ns#> .
-
-@prefix :          <http://example.org/book/> .
-
-# A small dataset for usage examples of Joseki
-# This data is intentionaly irregular (e.g. different ways to
-# record the book creator) as if the information is either an
-# aggregation or was created at different times.
-
-:book1
-    dc:title    "Harry Potter and the Philosopher's Stone" ;
-    dc:creator  "J.K. Rowling" ;
-    .
-    
-:book2
-    dc:title    "Harry Potter and the Chamber of Secrets" ;
-    dc:creator  _:a .
-    
-:book3
-    dc:title    "Harry Potter and the Prisoner Of Azkaban" ;
-    dc:creator  _:a .
-    
-:book4
-    dc:title    "Harry Potter and the Goblet of Fire" .
-    
-:book5
-    dc:title    "Harry Potter and the Order of the Phoenix";
-    dc:creator  "J.K. Rowling" ;
-    .
-
-:book6
-    dc:title    "Harry Potter and the Half-Blood Prince";
-    dc:creator  "J.K. Rowling" .
-
-:book7
-    dc:title    "Harry Potter and the Deathly Hallows" ;
-    dc:creator  "J.K. Rowling" .
-_:a
-    vcard:FN "J.K. Rowling" ;
-    vcard:N
-        [ vcard:Family "Rowling" ;
-          vcard:Given "Joanna" 
-        ]
-    .

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/Data/test_abox.ttl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/Data/test_abox.ttl b/jena-fuseki2/Data/test_abox.ttl
deleted file mode 100644
index bb3939a..0000000
--- a/jena-fuseki2/Data/test_abox.ttl
+++ /dev/null
@@ -1,21 +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.
-
-@prefix rdf:        <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix :           <http://example/ns#> .
-
-:x rdf:type :A .
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/Data/test_data_rdfs.ttl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/Data/test_data_rdfs.ttl b/jena-fuseki2/Data/test_data_rdfs.ttl
deleted file mode 100644
index 9e6daf1..0000000
--- a/jena-fuseki2/Data/test_data_rdfs.ttl
+++ /dev/null
@@ -1,28 +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.
-
-@prefix rdf:        <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix rdfs:       <http://www.w3.org/2000/01/rdf-schema#> .
-
-@prefix :           <http://example/ns#> .
-
-:A a rdfs:Class .
-:B a rdfs:Class .
-
-:A rdfs:subClassOf :B .
-
-:x rdf:type :A .
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/Data/test_tbox.ttl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/Data/test_tbox.ttl b/jena-fuseki2/Data/test_tbox.ttl
deleted file mode 100644
index fae2124..0000000
--- a/jena-fuseki2/Data/test_tbox.ttl
+++ /dev/null
@@ -1,25 +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.
-
-@prefix rdf:        <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix rdfs:       <http://www.w3.org/2000/01/rdf-schema#> .
-
-@prefix :           <http://example/ns#> .
-
-:A a rdfs:Class .
-:B a rdfs:Class .
-
-:A rdfs:subClassOf :B .

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/assembly-dist.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/assembly-dist.xml b/jena-fuseki2/assembly-dist.xml
deleted file mode 100644
index 682ac39..0000000
--- a/jena-fuseki2/assembly-dist.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?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.
--->
-
-<!-- 
-The distribution.
-Assumes jar made and onejar has been assembled.
--->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
-
-  <id>distribution</id>
-
-  <formats>
-    <format>zip</format>
-    <format>tar.gz</format>
-  </formats>
-
-  <baseDirectory>${project.artifactId}-${project.version}</baseDirectory>
-
-  <files>
-    <file>
-      <source>${project.build.directory}/${server.jar.name}.jar</source>
-      <outputDirectory></outputDirectory>
-      <destName>fuseki-server.jar</destName>
-    </file>
-    <file>
-      <source>${project.build.directory}/${project.build.finalName}.war</source>
-      <outputDirectory></outputDirectory>
-      <destName>fuseki-server.war</destName>
-    </file>
-
-    <file>
-      <source>dist/LICENSE</source>
-      <destName>LICENSE</destName>
-    </file>
-    <file>
-      <source>dist/NOTICE</source>
-      <destName>NOTICE</destName>
-    </file>
-  </files>
-
-  <fileSets>
-    <fileSet>
-      <outputDirectory></outputDirectory>
-      <includes>
-	<include>templates/*</include>
-        <include>README*</include>
-        <include>DEPENDENCIES*</include>
-        <include>ReleaseNotes.txt</include>
-      </includes>
-    </fileSet>
-
-    <fileSet>
-      <outputDirectory></outputDirectory>
-      <includes>
-        <include>log4j.properties</include>
-	<!--<include>examples/**</include>-->
-        <include>fuseki</include>
-        <include>fuseki-server</include>
-        <include>fuseki-server.bat</include>
-        <!--<include>s-*</include>-->
-      </includes>
-    </fileSet>
-
-     <fileSet>
-       <directory>src/main/webapp</directory>
-       <outputDirectory>webapp</outputDirectory>
-    </fileSet>
-
-  </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/backup
----------------------------------------------------------------------
diff --git a/jena-fuseki2/backup b/jena-fuseki2/backup
deleted file mode 100755
index a3cb0b1..0000000
--- a/jena-fuseki2/backup
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# 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.
-
-DB="ds"
-
-curl -v -XPOST 'http://localhost:3030/$/sleep?interval=10000'
-
-curl -v 'http://localhost:3030/$/tasks'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/bin/s-delete
----------------------------------------------------------------------
diff --git a/jena-fuseki2/bin/s-delete b/jena-fuseki2/bin/s-delete
deleted file mode 100755
index 0e3a807..0000000
--- a/jena-fuseki2/bin/s-delete
+++ /dev/null
@@ -1,707 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: 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.
-
-# SPARQL HTTP Update, client.
-
-require 'optparse'
-require 'net/http'
-require 'uri'
-require 'cgi'
-require 'pp'
-require 'ostruct'
-
-# ToDo
-#  Allow a choice of media type for GET
-#   --accept "content-type" (and abbreviations)
-#   --header "Add:this"
-#   --user, --password
-#  Basic authentication: request.basic_auth("username", "password")
-#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
-
-SOH_NAME="SOH"
-SOH_VERSION="0.0.0"
-
-$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
-
-# What about direct naming?
-
-# Names
-$mtTurtle           = 'text/turtle;charset=utf-8'
-$mtRDF              = 'application/rdf+xml'
-$mtText             = 'text/plain'
-$mtNQuads           = 'text/n-quads'
-$mtTriG             = 'application/trig'
-$mtSparqlResultsX   = 'application/sparql-results+xml'
-$mtSparqlResultsJ   = 'application/sparql-results+json'
-$mtAppJSON          = 'application/json'
-$mtAppXML           = 'application/xml'
-$mtSparqlResultsTSV = 'application/sparql-results+tsv'
-$mtSparqlResultsCSV = 'application/sparql-results+csv'
-$mtSparqlUpdate     = 'application/sparql-update'
-$mtWWWForm          = 'application/x-www-form-urlencoded'
-$mtSparqlQuery      = "application/sparql-query" ;
-
-# Global media type table.
-$fileMediaTypes = {}
-$fileMediaTypes['ttl']   = $mtTurtle
-$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
-$fileMediaTypes['nt']    = $mtText
-$fileMediaTypes['rdf']   = $mtRDF
-$fileMediaTypes['owl']   = $mtRDF
-$fileMediaTypes['nq']    = $mtNQuads
-$fileMediaTypes['trig']  = $mtTriG
-
-# Global charset : no entry means "don't set"
-$charsetUTF8      = 'utf-8'
-$charset = {}
-$charset[$mtTurtle]   = 'utf-8'
-$charset[$mtText]     = 'ascii'
-$charset[$mtTriG]     = 'utf-8'
-$charset[$mtNQuads]   = 'ascii'
-
-# Headers
-
-$hContentType         = 'Content-Type'
-# $hContentEncoding     = 'Content-Encoding'
-$hContentLength       = 'Content-Length'
-# $hContentLocation     = 'Content-Location'
-# $hContentRange        = 'Content-Range'
-
-$hAccept              = 'Accept'
-$hAcceptCharset       = 'Accept-Charset'
-$hAcceptEncoding      = 'Accept-Encoding'
-$hAcceptRanges        = 'Accept-Ranges' 
-
-$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
-$print_http = false
-
-# Default for GET
-# At least allow anythign (and hope!)
-$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
-# For SPARQL query
-$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
-
-# Accept any in case of trouble.
-$accept_rdf="#{$accept_rdf} , */*;q=0.1"
-$accept_results="#{$accept_results} , */*;q=0.1" 
-
-# The media type usually forces the charset.
-$accept_charset=nil
-
-## Who we are.
-## Two styles:
-##    s-query .....
-##    soh query .....
-
-$cmd = File.basename($0)
-if $cmd == 'soh'
-then
-  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
-end
-
-if ! $cmd.start_with?('s-') && $cmd != 'soh'
-  $cmd = 's-'+$cmd
-end
-
-## -------- 
-
-def GET(dataset, graph)
-  print "GET #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  get_worker(requestURI, headers)
-end
-
-def get_worker(requestURI, headers)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Get.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-def HEAD(dataset, graph)
-  print "HEAD #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Head.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def PUT(dataset, graph, file)
-  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Put)
-end
-
-def POST(dataset, graph, file)
-  print "POST #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Post)
-end
-
-def DELETE(dataset, graph)
-  print "DELETE #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Delete.new(uri.request_uri)
-  headers = {}
-  headers.merge!($headers)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def uri_escape(string)
-  CGI.escape(string)
-end
-
-def target(dataset, graph)
-  return dataset+"?default" if graph == "default"
-  return dataset+"?graph="+uri_escape(graph)
-end
-
-def send_body(dataset, graph, file, method)
-  mt = content_type(file)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hContentType] = mt
-  headers[$hContentLength] = File.size(file).to_s
-  ## p headers
-
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  
-  request = method.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  request.body_stream = File.open(file)
-  response_no_body(uri, request)
-end
-
-def response_no_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue Exception => e  
-    # puts e.message  
-    #puts e.backtrace.inspect  
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-  response = http.request(request)
-  print_http_response(response)
-  case response
-  when Net::HTTPSuccess, Net::HTTPRedirection
-    # OK
-  when Net::HTTPNotFound
-    warn_exit "404 Not found: #{uri}", 9
-    #print response.body
-  else
-    warn_exit "#{response.code} #{response.message} #{uri}", 9
-    # Unreachable
-      response.error!
-  end
-  # NO BODY IN RESPONSE
-end
-
-def response_print_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue => e  
-    #puts e.backtrace.inspect  
-    #print e.class
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-
-  # Add a blank line if headers were output.
-  print "\n" if $http_print ;
-
-  begin
-    response = http.request(request) { |res| 
-      print_http_response(res)
-      #puts res.code
-      res.read_body do |segment|
-        print segment
-      end
-    }
-    case response
-    when Net::HTTPSuccess, Net::HTTPRedirection
-      # OK
-    when Net::HTTPNotFound
-      warn_exit "404 Not found: #{uri}", 9
-      #print response.body
-    else
-      warn_exit "#{response.code}: #{uri}", 9
-      # Unreachable
-      response.error!
-    end
-  rescue EOFError => e
-    warn_exit "IO Error: "+e.message, 3
-  end
-end
-
-def print_http_request(uri, request)
-  return unless $print_http
-  #print "Request\n"
-  print request.method," ",uri, "\n"
-  print_headers("  ",request)
-end
-
-def print_http_response(response)
-  return unless $print_http
-  #print "Response\n"
-  print response.code, " ", response.message, "\n"
-  print_headers("  ",response)
-end
-
-def print_headers(marker, headers)
-  headers.each do |k,v| 
-    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
-    printf "%s%-20s %s\n",marker,k,v
-  end
-end
-
-def content_type(file)
-  file =~ /\.([^.]*)$/
-  ext = $1
-  mt = $fileMediaTypes[ext]
-  cs = $charset[mt]
-  mt = mt+';charset='+cs if ! cs.nil?
-  return mt
-end
-
-def charset(content_type)
-  return $charset[content_type]
-end
-
-def warn_exit(msg, rc)
-    warn msg
-    exit rc ;
-end
-
-def parseURI(uri_string)
-  begin
-    return URI.parse(uri_string).to_s
-  rescue URI::InvalidURIError => err
-    warn_exit "Bad URI: <#{uri_string}>", 2
-  end
-end
-
-## ---- Command
-
-def cmd_soh(command=nil)
-  ## Command line
-  options = {}
-  optparse = OptionParser.new do |opts|
-    # Set a banner, displayed at the top
-    # of the help screen.
-    case $cmd
-    when "s-http", "sparql-http", "soh"
-      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
-    when "s-get", "s-head", "s-delete"
-      banner="$cmd  datasetURI graph"
-    end
-
-    opts.banner = $banner
-    # Define the options, and what they do
-    
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    
-    options[:version] = false
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end
-    
-    # This displays the help screen, all programs are
-    # assumed to have this option.
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  if command.nil?
-    if ARGV.size == 0
-      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
-      exit 1
-    end
-    cmdPrint=ARGV.shift
-    command=cmdPrint.upcase
-  else
-    cmdPrint=command
-  end
-
-  case command
-  when "HEAD", "GET", "DELETE"
-    requiredFile=false
-  when "PUT", "POST"
-    requiredFile=true
-  when "QUERY"
-    cmd_sparql_query
-  when "UPDATE"
-    cmd_sparql_update
-  else
-    warn_exit "Unknown command: #{command}", 2
-  end
-
-  if requiredFile 
-  then
-    if ARGV.size != 3
-      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
-    end
-  else
-    if ARGV.size != 2
-      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
-    end
-  end
-
-  dataset=parseURI(ARGV.shift)
-  # Relative URI?
-  graph=parseURI(ARGV.shift)
-  file=""
-  if requiredFile
-  then
-    file = ARGV.shift if requiredFile
-    if ! File.exist?(file)
-      warn_exit "No such file: "+file, 3
-    end
-    if File.directory?(file)
-      warn_exit "File is a directory: "+file, 3
-    end
-  end
-
-  case command
-  when "GET"
-    GET(dataset, graph)
-  when "HEAD"
-    HEAD(dataset, graph)
-  when "PUT"
-    PUT(dataset, graph, file)
-  when "DELETE"
-    DELETE(dataset, graph)
-  when "POST"
-    POST(dataset, graph, file)
-  else
-    warn_exit "Internal error: Unknown command: #{cmd}", 2
-  end
-  exit 0
-end
-
-## --------
-def string_or_file(arg)
-  return arg if ! arg.match(/^@/)
-  a=(arg[1..-1])
-  open(a, 'rb'){|f| f.read}
-end
-
-## -------- SPARQL Query
-
-## Choose method
-def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
-   if ! query_file.nil?
-    query = open(query_file, 'rb'){|f| f.read}
-  end
-  if forcePOST || query.length >= 2*1024 
-    SPARQL_query_POST(service, query, args2)
-  else
-    SPARQL_query_GET(service, query, args2)
-  end
-end
-
-## By GET
-
-def SPARQL_query_GET(service, query, args2)
-  args = { "query" => query }
-  args.merge!(args2)
-  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  action="#{service}?#{qs}"
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  get_worker(action, headers)
-end
-
-## By POST
-
-def SPARQL_query_POST(service, query, args2)
-  # DRY - body/no body for each of request and response.
-  post_params={ "query" => query }
-  post_params.merge!(args2)
-  uri = URI.parse(service)
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  execute_post_form_body(uri, headers, post_params)
-end
-
-def execute_post_form_body(uri, headers, post_params)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = qs.length.to_s
-  request.initialize_http_header(headers)
-  request.body = qs
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-# Usage: -v --help --file= --query=
-def cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
-      options[:file]=file
-    end
-    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
-            'Set the output argument') do |type|
-      options[:output]=type
-    end
-    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
-            'Set the accept header type') do |type|
-      options[:accept]=type
-    end
-    options[:verbose] = false
-    opts.on( '--post', 'Force use of POST' ) do
-      options[:post] = true
-    end
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
-    warn e
-    exit 1
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-  usePOST = options[:post]
-
-  service = options[:service]
-  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
-
-  # Query
-  query=nil
-  query_file=options[:file]
-  if query_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No query specified.',1
-    end
-  if query_file.nil?
-    query = ARGV.shift
-    if query.match(/^@/)
-      query_file = query[1..-1]
-      query = nil
-    end
-  end
-
-  # --output ==> output= (non-standard)
-  args={}
-  case options[:output]
-  when nil
-  when  "json","xml","text","csv","tsv"
-    args['output'] = options[:output]
-  when :json,:xml,:text,:csv,:tsv
-    args['output'] = options[:output].to_s
-  else
-    warn_exit "Unrecognized output type: "+options[:output],2
-  end
-
-  # --accept
-  # options[:accept]
-
-  print "SPARQL #{service}\n" if $verbose
-  #args={"output"=>"text"}
-  SPARQL_query(service, query, query_file, usePOST, args)
-  exit(0)
-end
-
-## -------- SPARQL Update
-
-# Update sent as a WWW form.
-def SPARQL_update_by_form(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  # args? encode?
-  body="update="+uri_escape(update)
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = body.length.to_s
-  uri = URI.parse(service)
-  execute_post_form(uri, headers, body)
-end
-
-# DRY - query form.
-def execute_post_form(uri, headers, body)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = body
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def SPARQL_update(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  headers[$hContentType] = $mtSparqlUpdate
-  uri = URI.parse(service)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = update
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def cmd_sparql_update(by_raw_post=true)
-  # Share with cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
-      options[:file]=file
-    end
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  service = options[:service]
-  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
-  
-  update=nil
-  update_file=options[:file]
-
-  if update_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No update specified.',1
-    end
-  if update_file.nil?
-    update = ARGV.shift
-    if update.match(/^@/)
-      update_file = update[1..-1]
-      update = nil
-    end
-  end
-  
-  print "SPARQL-Update #{service}\n" if $verbose
-  args={}
-
-  # Reads in the file :-(
-  if update.nil?
-  then
-    update = open(update_file, 'rb'){|f| f.read}
-  else
-    update = string_or_file(update)
-  end
-
-  if by_raw_post
-    SPARQL_update(service, update, args)
-  else
-    SPARQL_update_by_form(service, update, args)
-  end
-  exit(0)
-end
-
-## -------
-
-case $cmd
-when "s-http", "sparql-http", "soh"
-  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
-  cmd_soh
-when "s-get", "s-head", "s-put", "s-delete", "s-post"
-
-  case $cmd
-  when "s-get", "s-head", "s-delete"
-    $banner="#{$cmd} datasetURI graph"
-  when "s-put", "s-post"
-    $banner="#{$cmd} datasetURI graph file"
-  end
-  cmd2 = $cmd.sub(/^s-/, '').upcase
-  cmd_soh cmd2
-
-when "s-query", "sparql-query"
-  cmd_sparql_query
-when "s-update", "sparql-update"
-  cmd_sparql_update true
-when "s-update-form", "sparql-update-form"
-  cmd_sparql_update false
-else 
-  warn_exit "Unknown: "+$cmd, 1
-end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/bin/s-get
----------------------------------------------------------------------
diff --git a/jena-fuseki2/bin/s-get b/jena-fuseki2/bin/s-get
deleted file mode 100755
index 0e3a807..0000000
--- a/jena-fuseki2/bin/s-get
+++ /dev/null
@@ -1,707 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: 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.
-
-# SPARQL HTTP Update, client.
-
-require 'optparse'
-require 'net/http'
-require 'uri'
-require 'cgi'
-require 'pp'
-require 'ostruct'
-
-# ToDo
-#  Allow a choice of media type for GET
-#   --accept "content-type" (and abbreviations)
-#   --header "Add:this"
-#   --user, --password
-#  Basic authentication: request.basic_auth("username", "password")
-#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
-
-SOH_NAME="SOH"
-SOH_VERSION="0.0.0"
-
-$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
-
-# What about direct naming?
-
-# Names
-$mtTurtle           = 'text/turtle;charset=utf-8'
-$mtRDF              = 'application/rdf+xml'
-$mtText             = 'text/plain'
-$mtNQuads           = 'text/n-quads'
-$mtTriG             = 'application/trig'
-$mtSparqlResultsX   = 'application/sparql-results+xml'
-$mtSparqlResultsJ   = 'application/sparql-results+json'
-$mtAppJSON          = 'application/json'
-$mtAppXML           = 'application/xml'
-$mtSparqlResultsTSV = 'application/sparql-results+tsv'
-$mtSparqlResultsCSV = 'application/sparql-results+csv'
-$mtSparqlUpdate     = 'application/sparql-update'
-$mtWWWForm          = 'application/x-www-form-urlencoded'
-$mtSparqlQuery      = "application/sparql-query" ;
-
-# Global media type table.
-$fileMediaTypes = {}
-$fileMediaTypes['ttl']   = $mtTurtle
-$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
-$fileMediaTypes['nt']    = $mtText
-$fileMediaTypes['rdf']   = $mtRDF
-$fileMediaTypes['owl']   = $mtRDF
-$fileMediaTypes['nq']    = $mtNQuads
-$fileMediaTypes['trig']  = $mtTriG
-
-# Global charset : no entry means "don't set"
-$charsetUTF8      = 'utf-8'
-$charset = {}
-$charset[$mtTurtle]   = 'utf-8'
-$charset[$mtText]     = 'ascii'
-$charset[$mtTriG]     = 'utf-8'
-$charset[$mtNQuads]   = 'ascii'
-
-# Headers
-
-$hContentType         = 'Content-Type'
-# $hContentEncoding     = 'Content-Encoding'
-$hContentLength       = 'Content-Length'
-# $hContentLocation     = 'Content-Location'
-# $hContentRange        = 'Content-Range'
-
-$hAccept              = 'Accept'
-$hAcceptCharset       = 'Accept-Charset'
-$hAcceptEncoding      = 'Accept-Encoding'
-$hAcceptRanges        = 'Accept-Ranges' 
-
-$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
-$print_http = false
-
-# Default for GET
-# At least allow anythign (and hope!)
-$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
-# For SPARQL query
-$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
-
-# Accept any in case of trouble.
-$accept_rdf="#{$accept_rdf} , */*;q=0.1"
-$accept_results="#{$accept_results} , */*;q=0.1" 
-
-# The media type usually forces the charset.
-$accept_charset=nil
-
-## Who we are.
-## Two styles:
-##    s-query .....
-##    soh query .....
-
-$cmd = File.basename($0)
-if $cmd == 'soh'
-then
-  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
-end
-
-if ! $cmd.start_with?('s-') && $cmd != 'soh'
-  $cmd = 's-'+$cmd
-end
-
-## -------- 
-
-def GET(dataset, graph)
-  print "GET #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  get_worker(requestURI, headers)
-end
-
-def get_worker(requestURI, headers)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Get.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-def HEAD(dataset, graph)
-  print "HEAD #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Head.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def PUT(dataset, graph, file)
-  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Put)
-end
-
-def POST(dataset, graph, file)
-  print "POST #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Post)
-end
-
-def DELETE(dataset, graph)
-  print "DELETE #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Delete.new(uri.request_uri)
-  headers = {}
-  headers.merge!($headers)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def uri_escape(string)
-  CGI.escape(string)
-end
-
-def target(dataset, graph)
-  return dataset+"?default" if graph == "default"
-  return dataset+"?graph="+uri_escape(graph)
-end
-
-def send_body(dataset, graph, file, method)
-  mt = content_type(file)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hContentType] = mt
-  headers[$hContentLength] = File.size(file).to_s
-  ## p headers
-
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  
-  request = method.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  request.body_stream = File.open(file)
-  response_no_body(uri, request)
-end
-
-def response_no_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue Exception => e  
-    # puts e.message  
-    #puts e.backtrace.inspect  
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-  response = http.request(request)
-  print_http_response(response)
-  case response
-  when Net::HTTPSuccess, Net::HTTPRedirection
-    # OK
-  when Net::HTTPNotFound
-    warn_exit "404 Not found: #{uri}", 9
-    #print response.body
-  else
-    warn_exit "#{response.code} #{response.message} #{uri}", 9
-    # Unreachable
-      response.error!
-  end
-  # NO BODY IN RESPONSE
-end
-
-def response_print_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue => e  
-    #puts e.backtrace.inspect  
-    #print e.class
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-
-  # Add a blank line if headers were output.
-  print "\n" if $http_print ;
-
-  begin
-    response = http.request(request) { |res| 
-      print_http_response(res)
-      #puts res.code
-      res.read_body do |segment|
-        print segment
-      end
-    }
-    case response
-    when Net::HTTPSuccess, Net::HTTPRedirection
-      # OK
-    when Net::HTTPNotFound
-      warn_exit "404 Not found: #{uri}", 9
-      #print response.body
-    else
-      warn_exit "#{response.code}: #{uri}", 9
-      # Unreachable
-      response.error!
-    end
-  rescue EOFError => e
-    warn_exit "IO Error: "+e.message, 3
-  end
-end
-
-def print_http_request(uri, request)
-  return unless $print_http
-  #print "Request\n"
-  print request.method," ",uri, "\n"
-  print_headers("  ",request)
-end
-
-def print_http_response(response)
-  return unless $print_http
-  #print "Response\n"
-  print response.code, " ", response.message, "\n"
-  print_headers("  ",response)
-end
-
-def print_headers(marker, headers)
-  headers.each do |k,v| 
-    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
-    printf "%s%-20s %s\n",marker,k,v
-  end
-end
-
-def content_type(file)
-  file =~ /\.([^.]*)$/
-  ext = $1
-  mt = $fileMediaTypes[ext]
-  cs = $charset[mt]
-  mt = mt+';charset='+cs if ! cs.nil?
-  return mt
-end
-
-def charset(content_type)
-  return $charset[content_type]
-end
-
-def warn_exit(msg, rc)
-    warn msg
-    exit rc ;
-end
-
-def parseURI(uri_string)
-  begin
-    return URI.parse(uri_string).to_s
-  rescue URI::InvalidURIError => err
-    warn_exit "Bad URI: <#{uri_string}>", 2
-  end
-end
-
-## ---- Command
-
-def cmd_soh(command=nil)
-  ## Command line
-  options = {}
-  optparse = OptionParser.new do |opts|
-    # Set a banner, displayed at the top
-    # of the help screen.
-    case $cmd
-    when "s-http", "sparql-http", "soh"
-      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
-    when "s-get", "s-head", "s-delete"
-      banner="$cmd  datasetURI graph"
-    end
-
-    opts.banner = $banner
-    # Define the options, and what they do
-    
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    
-    options[:version] = false
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end
-    
-    # This displays the help screen, all programs are
-    # assumed to have this option.
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  if command.nil?
-    if ARGV.size == 0
-      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
-      exit 1
-    end
-    cmdPrint=ARGV.shift
-    command=cmdPrint.upcase
-  else
-    cmdPrint=command
-  end
-
-  case command
-  when "HEAD", "GET", "DELETE"
-    requiredFile=false
-  when "PUT", "POST"
-    requiredFile=true
-  when "QUERY"
-    cmd_sparql_query
-  when "UPDATE"
-    cmd_sparql_update
-  else
-    warn_exit "Unknown command: #{command}", 2
-  end
-
-  if requiredFile 
-  then
-    if ARGV.size != 3
-      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
-    end
-  else
-    if ARGV.size != 2
-      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
-    end
-  end
-
-  dataset=parseURI(ARGV.shift)
-  # Relative URI?
-  graph=parseURI(ARGV.shift)
-  file=""
-  if requiredFile
-  then
-    file = ARGV.shift if requiredFile
-    if ! File.exist?(file)
-      warn_exit "No such file: "+file, 3
-    end
-    if File.directory?(file)
-      warn_exit "File is a directory: "+file, 3
-    end
-  end
-
-  case command
-  when "GET"
-    GET(dataset, graph)
-  when "HEAD"
-    HEAD(dataset, graph)
-  when "PUT"
-    PUT(dataset, graph, file)
-  when "DELETE"
-    DELETE(dataset, graph)
-  when "POST"
-    POST(dataset, graph, file)
-  else
-    warn_exit "Internal error: Unknown command: #{cmd}", 2
-  end
-  exit 0
-end
-
-## --------
-def string_or_file(arg)
-  return arg if ! arg.match(/^@/)
-  a=(arg[1..-1])
-  open(a, 'rb'){|f| f.read}
-end
-
-## -------- SPARQL Query
-
-## Choose method
-def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
-   if ! query_file.nil?
-    query = open(query_file, 'rb'){|f| f.read}
-  end
-  if forcePOST || query.length >= 2*1024 
-    SPARQL_query_POST(service, query, args2)
-  else
-    SPARQL_query_GET(service, query, args2)
-  end
-end
-
-## By GET
-
-def SPARQL_query_GET(service, query, args2)
-  args = { "query" => query }
-  args.merge!(args2)
-  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  action="#{service}?#{qs}"
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  get_worker(action, headers)
-end
-
-## By POST
-
-def SPARQL_query_POST(service, query, args2)
-  # DRY - body/no body for each of request and response.
-  post_params={ "query" => query }
-  post_params.merge!(args2)
-  uri = URI.parse(service)
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  execute_post_form_body(uri, headers, post_params)
-end
-
-def execute_post_form_body(uri, headers, post_params)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = qs.length.to_s
-  request.initialize_http_header(headers)
-  request.body = qs
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-# Usage: -v --help --file= --query=
-def cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
-      options[:file]=file
-    end
-    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
-            'Set the output argument') do |type|
-      options[:output]=type
-    end
-    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
-            'Set the accept header type') do |type|
-      options[:accept]=type
-    end
-    options[:verbose] = false
-    opts.on( '--post', 'Force use of POST' ) do
-      options[:post] = true
-    end
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
-    warn e
-    exit 1
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-  usePOST = options[:post]
-
-  service = options[:service]
-  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
-
-  # Query
-  query=nil
-  query_file=options[:file]
-  if query_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No query specified.',1
-    end
-  if query_file.nil?
-    query = ARGV.shift
-    if query.match(/^@/)
-      query_file = query[1..-1]
-      query = nil
-    end
-  end
-
-  # --output ==> output= (non-standard)
-  args={}
-  case options[:output]
-  when nil
-  when  "json","xml","text","csv","tsv"
-    args['output'] = options[:output]
-  when :json,:xml,:text,:csv,:tsv
-    args['output'] = options[:output].to_s
-  else
-    warn_exit "Unrecognized output type: "+options[:output],2
-  end
-
-  # --accept
-  # options[:accept]
-
-  print "SPARQL #{service}\n" if $verbose
-  #args={"output"=>"text"}
-  SPARQL_query(service, query, query_file, usePOST, args)
-  exit(0)
-end
-
-## -------- SPARQL Update
-
-# Update sent as a WWW form.
-def SPARQL_update_by_form(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  # args? encode?
-  body="update="+uri_escape(update)
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = body.length.to_s
-  uri = URI.parse(service)
-  execute_post_form(uri, headers, body)
-end
-
-# DRY - query form.
-def execute_post_form(uri, headers, body)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = body
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def SPARQL_update(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  headers[$hContentType] = $mtSparqlUpdate
-  uri = URI.parse(service)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = update
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def cmd_sparql_update(by_raw_post=true)
-  # Share with cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
-      options[:file]=file
-    end
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  service = options[:service]
-  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
-  
-  update=nil
-  update_file=options[:file]
-
-  if update_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No update specified.',1
-    end
-  if update_file.nil?
-    update = ARGV.shift
-    if update.match(/^@/)
-      update_file = update[1..-1]
-      update = nil
-    end
-  end
-  
-  print "SPARQL-Update #{service}\n" if $verbose
-  args={}
-
-  # Reads in the file :-(
-  if update.nil?
-  then
-    update = open(update_file, 'rb'){|f| f.read}
-  else
-    update = string_or_file(update)
-  end
-
-  if by_raw_post
-    SPARQL_update(service, update, args)
-  else
-    SPARQL_update_by_form(service, update, args)
-  end
-  exit(0)
-end
-
-## -------
-
-case $cmd
-when "s-http", "sparql-http", "soh"
-  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
-  cmd_soh
-when "s-get", "s-head", "s-put", "s-delete", "s-post"
-
-  case $cmd
-  when "s-get", "s-head", "s-delete"
-    $banner="#{$cmd} datasetURI graph"
-  when "s-put", "s-post"
-    $banner="#{$cmd} datasetURI graph file"
-  end
-  cmd2 = $cmd.sub(/^s-/, '').upcase
-  cmd_soh cmd2
-
-when "s-query", "sparql-query"
-  cmd_sparql_query
-when "s-update", "sparql-update"
-  cmd_sparql_update true
-when "s-update-form", "sparql-update-form"
-  cmd_sparql_update false
-else 
-  warn_exit "Unknown: "+$cmd, 1
-end


[06/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/fuseki
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/fuseki b/jena-fuseki2/jena-fuseki-dist/fuseki
new file mode 100644
index 0000000..9cc1fe8
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/fuseki
@@ -0,0 +1,477 @@
+#!/usr/bin/env bash
+
+# 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.
+#
+# =========
+#
+# Startup script for Fuseki under *nix systems (works with cygwin too)
+#
+# Configuration
+# -------------
+# Default values are loaded from /etc/default/fuseki, if it exists.
+#
+# JAVA
+#   Command to invoke Java. If not set, java (from the PATH) will be used.
+#
+# JAVA_OPTIONS
+#   Extra options to pass to the JVM.
+#
+# FUSEKI_HOME
+#   Where Fuseki is installed.  If not set, the script will try
+#   to guess it based on the script invokation path.
+# 
+# FUSEKI_BASE
+#   The root of the runtime area - logs files, system files, local configuration.
+#   Defaults to /etc/fuseki.
+#
+# FUSEKI_RUN
+#   Where the fuseki.pid file should be stored.  It defaults
+#   first available of /var/run, /usr/var/run, and /tmp if not set.
+#
+# FUSEKI_PID
+#   The FUSEKI PID file, defaults to $FUSEKI_RUN/fuseki.pid
+#
+# FUSEKI_ARGS
+#   The arguments to pass to the Fuseki server on the command line. Defaults to:
+#                                        # if FUSEKI_CONF is not set
+#    --config=$FUSEKI_CONF               # if FUSEKI_CONF is set
+#
+# FUSEKI_START
+#   Path to the jar file. Defaults to $FUSEKI_HOME/fuseki-server.jar 
+
+# FUSEKI_CONF
+#   The Fuseki configuration file, usually in RDF Turtle notation.
+#
+# FUSEKI_USER
+#   If set, the server will be run as this user
+#
+# FUSEKI_LOGS
+#   Directory where logs will be generated. 
+#   Fixed as $FUSEKI_BASE/logs.
+#
+# FUSEKI_LOGS_STDERROUT
+#   Log file with stderr and stdout log output from Fuseki. 
+#   Defaults to $FUSEKI_LOGS/stderrout.log
+
+### BEGIN INIT INFO
+# Provides:          fuseki
+# Required-Start:    $remote_fs $network
+# Required-Stop:     $remote_fs $network
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Start Jena Fuseki at boot time
+# Description:       Jena Fuseki is a service that provides a SPARQL API over HTTP
+### END INIT INFO
+
+# DEBUG=1
+NAME=fuseki
+if [ -f /etc/default/$NAME ]; then
+  . /etc/default/$NAME
+fi
+
+if [ -f /lib/lsb/init-functions ]; then
+  . /lib/lsb/init-functions
+else
+  # simple replacements for LSB daemon logging functions if not defined
+  log_daemon_msg() {
+    echo $1
+  }
+  log_begin_msg() {
+    echo $1
+  }
+  log_end_msg() {
+    if [ $1 -eq 0]; then
+      echo '[OK]'
+    else
+      echo '[failed]'
+    fi
+  }
+fi
+
+usage()
+{
+  echo "Usage: ${0##*/} {start|stop|restart|run|status}"
+  exit 1
+}
+
+[ $# -gt 0 ] || usage
+CMD="$1"
+
+# Utility functions
+
+findDirectory()
+{
+  local L OP=$1
+  shift
+  for L in "$@"; do
+    [ "$OP" "$L" ] || continue
+    printf %s "$L"
+    break
+  done
+}
+
+findFile()
+{
+  local L F=$1
+  shift
+  for L in "$@"; do
+    [ -f "${L}/${F}" ] || continue
+    printf %s "${L}/${F}"
+    break
+  done
+}
+
+running()
+{
+  local PID=$(cat "$1" 2>/dev/null) || return 1
+  ps -p "$PID" >/dev/null 2>&1
+}
+
+# Are we running in cygwin?
+cygwin=false
+case "`uname`" in
+    CYGWIN*) cygwin=true;;
+esac
+
+# Set FUSKEI_HOME to the script invocation directory if it is not specified
+if [ -z "$FUSEKI_HOME" ]
+then
+  SCRIPT="$0"
+  # Catch common issue: script has been symlinked
+  if [ -L "$SCRIPT" ]
+  then
+    SCRIPT="$(readlink "$0")"
+    # If link is relative
+    case "$SCRIPT" in
+      /*) ;; # fine
+      *) SCRIPT=$( dirname "$0" )/$SCRIPT;; # fix
+    esac
+  fi
+
+  # Work out root from script location
+  FUSEKI_HOME="$( cd "$( dirname "$SCRIPT" )" && pwd )"
+
+fi
+
+# Deal with Cygwin path issues
+if [ "$cygwin" == "true" ]
+then
+  FUSEKI_HOME=`cygpath -w "$FUSEKI_HOME"`
+fi
+
+if [ ! -e "$FUSEKI_HOME" ]
+then
+  log_daemon_msg "FUSEKI_HOME '$FUSEKI_HOME' does not exist" 1>&2
+  exit 1
+fi
+
+if [ -z "$FUSEKI_BASE" ]
+then
+  FUSEKI_BASE="/etc/fuseki"
+fi
+
+if [ "$cygwin" == "true" ]
+then
+  FUSEKI_BASE=`cygpath -w "$FUSEKI_BASE"`
+fi
+
+
+if [ ! -e "$FUSEKI_BASE" -o ! -d "$FUSEKI_BASE" ]
+then
+  log_daemon_msg "FUSEKI_BASE '$FUSEKI_BASE' does not exist or is not a directory" 1>&2
+  exit 1
+fi
+
+if [ ! -w "$FUSEKI_BASE" ]
+then
+  log_daemon_msg "FUSEKI_BASE '$FUSEKI_BASE' is not writable." 1>&2
+  exit 1
+fi
+
+
+# Deal with Cygwin path issues
+if [ "$cygwin" == "true" ]
+then
+  FUSEKI_HOME=`cygpath -w "$FUSEKI_HOME"`
+  FUSEKI_BASE=`cygpath -w "$FUSEKI_BASE"`
+ fi
+
+# Find a location for the pid file
+if [ -z "$FUSEKI_RUN" ]
+then
+  FUSEKI_RUN=$(findDirectory -w /var/run /usr/var/run $FUSEKI_HOME /tmp)
+fi
+
+# Get PID file name
+if [ -z "$FUSEKI_PID" ]
+then
+  FUSEKI_PID="$FUSEKI_RUN/fuseki.pid"
+fi
+
+# Log directory
+if [ -n "$FUSEKI_LOGS" ]
+then
+    log_daemon_message "FUSEKI_LOGS can not be set externally - ignored" 1>&2
+fi
+FUSEKI_LOGS="$FUSEKI_BASE/logs"
+
+# Std Err and Out log
+if [ -z "$FUSEKI_LOGS_STDERROUT" ]
+then
+  FUSEKI_LOGS_STDERROUT="$FUSEKI_LOGS/stderrout.log"
+fi
+
+# Data directory
+if [ -z "$FUSEKI_DATA_DIR" ]
+then
+  FUSEKI_DATA_DIR="$FUSEKI_HOME/DB"
+fi
+
+# Set up JAVA if not set
+if [ -z "$JAVA" ]
+then
+  JAVA=$(which java)
+fi
+if [ -z "$JAVA" ]
+then
+  echo "Cannot find a Java JDK. Please set either set JAVA or put java (>=1.7) in your PATH." 2>&2
+  exit 1
+fi
+
+# The location of the start up JAR
+FUSEKI_START=${FUSEKI_START:-$FUSEKI_HOME/fuseki-server.jar}
+
+# Deal with Cygwin path issues
+if [ "$cygwin" == "true" ]
+then
+  DATA_DIR=`cygpath -w "$FUSEKI_DATA_DIR"`
+  FUSEKI_START=`cygpath -w "$FUSEKI_START"`
+else
+  DATA_DIR="$FUSEKI_DATA_DIR"
+fi
+
+# Some JVM settings
+if [ -z "$JAVA_OPTIONS" ]
+then
+  JAVA_OPTIONS="-Xmx1200M"
+fi
+
+# Default Fuseki Arguments
+if [ -z "$FUSEKI_ARGS" ]
+then
+  if [ -z "$FUSEKI_CONF" ]
+  then
+    FUSEKI_ARGS=""
+  else
+    FUSEKI_ARGS="--config=$FUSEKI_CONF"
+  fi
+fi
+
+# Run command
+
+RUN_ARGS=(${JAVA_OPTIONS[@]} -jar "$FUSEKI_START" $FUSEKI_ARGS)
+RUN_CMD=("$JAVA" ${RUN_ARGS[@]})
+
+
+#####################################################
+# Comment these out after you're happy with what
+# the script is doing.
+#####################################################
+if (( DEBUG ))
+then
+  log_daemon_msg "FUSEKI_HOME    =  $FUSEKI_HOME"
+  log_daemon_msg "FUSEKI_CONF    =  $FUSEKI_CONF"
+  log_daemon_msg "FUSEKI_RUN     =  $FUSEKI_RUN"
+  log_daemon_msg "FUSEKI_PID     =  $FUSEKI_PID"
+  log_daemon_msg "FUSEKI_ARGS    =  $FUSEKI_ARGS"
+  log_daemon_msg "FUSEKI_START   =  $FUSEKI_START"
+  log_daemon_msg "CONFIGS        =  ${CONFIGS[*]}"
+  log_daemon_msg "JAVA           =  $JAVA"
+  log_daemon_msg "JAVA_OPTIONS   =  ${JAVA_OPTIONS[*]}"
+  log_daemon_msg "RUN_ARGS       =  ${RUN_ARGS[@]}"
+  log_daemon_msg "RUN_CMD        =  ${RUN_CMD[@]}"
+fi
+
+NO_START=0
+
+# Life cycle functions
+start() {
+  if (( NO_START )); then
+    log_daemon_msg "Not starting Fuseki - NO_START=1"
+    exit
+  fi
+
+  # Make sure the data and log directories exist
+  mkdir -p "$FUSEKI_DATA_DIR"
+  mkdir -p "$FUSEKI_LOGS"
+
+  # Make sure the .jar file exists
+  if [ ! -e $FUSEKI_START ]; then
+    log_daemon_msg "Could not see Fuseki .jar file: \$FUSEKI_START has value '$FUSEKI_START'"
+    exit 1
+  fi
+
+  log_begin_msg "Starting Fuseki"
+  if type start-stop-daemon > /dev/null 2>&1
+  then
+    unset CH_USER
+    if [ -n "$FUSEKI_USER" ]
+    then
+      CH_USER="--chuid $FUSEKI_USER"
+    fi
+    if start-stop-daemon --start $CH_USER --chdir "$FUSEKI_HOME" --background --make-pidfile --pidfile "$FUSEKI_PID" --startas /bin/bash -- -c "exec $JAVA ${RUN_ARGS[*]} > $FUSEKI_LOGS_STDERROUT 2>&1"
+    then
+      sleep 2
+      if running "$FUSEKI_PID"
+      then
+        log_end_msg 0
+        print_started
+      else
+        log_end_msg 1
+      fi
+    else
+      log_end_msg 1
+      log_daemon_msg "** start-stop-daemon failed to run"
+    fi
+  else
+    if running $FUSEKI_PID
+    then
+      log_end_msg 1
+      log_daemon_msg 'Already Running!'
+      exit 1
+    else
+      # dead pid file - remove
+      rm -f "$FUSEKI_PID"
+    fi
+
+    if [ "$FUSEKI_USER" ]
+    then
+      touch "$FUSEKI_PID"
+      chown "$FUSEKI_USER" "$FUSEKI_PID"
+      su - "$FUSEKI_USER" -c "
+        log_daemon_msg "Redirecting Fuseki stderr/stdout to $FUSEKI_LOGS_STDERROUT"
+        exec ${RUN_CMD[*]} &
+        disown \$!
+        echo \$! > '$FUSEKI_PID'"
+    else
+      #log_daemon_msg "Redirecting Fuseki stderr/stdout to $FUSEKI_LOGS_STDERROUT"
+      exec "${RUN_CMD[@]}" &> "$FUSEKI_LOGS_STDERROUT" &
+      disown $!
+      echo $! > "$FUSEKI_PID"
+    fi
+
+    log_end_msg 0
+    print_started
+  fi
+}
+
+print_started() {
+  log_daemon_msg "STARTED Fuseki `date`"
+  log_daemon_msg "PID=$(cat "$FUSEKI_PID" 2>/dev/null)"
+}
+
+delete_fuseki_pid_file() {
+  rm -f "$FUSEKI_PID"
+}
+
+stop() {
+  log_begin_msg "Stopping Fuseki: "
+
+  if ! running "$FUSEKI_PID"
+  then
+    log_end_msg 1
+
+    # if a stop rather than a restart, signal failure to stop
+    if [ -z "$1" ]
+    then
+      exit 1
+    fi
+  fi
+
+  ###############################################################
+  # !!!! This code needs to be improved, too many repeats !!!!  #
+  ###############################################################
+  if type start-stop-daemon > /dev/null 2>&1; then
+    start-stop-daemon --stop --pidfile "$FUSEKI_PID" --chdir "$FUSEKI_HOME" --startas "$JAVA" --signal HUP
+
+    ## Die after a 30 second timeout
+    TIMEOUT=30
+    while running "$FUSEKI_PID"; do
+      if (( TIMEOUT-- == 0 )); then
+        start-stop-daemon --stop --pidfile "$FUSEKI_PID" --chdir "$FUSEKI_HOME" --startas "$JAVA" --signal KILL
+      fi
+        sleep 1
+    done
+    delete_fuseki_pid_file
+    log_end_msg 0
+  else
+    PID=$(cat "$FUSEKI_PID" 2>/dev/null)
+    kill "$PID" 2>/dev/null
+
+    TIMEOUT=30
+    while running $FUSEKI_PID; do
+      if (( TIMEOUT-- == 0 )); then
+        kill -KILL "$PID" 2>/dev/null
+      fi
+      sleep 1
+    done
+    delete_fuseki_pid_file
+    log_end_msg 0
+  fi
+}
+
+
+# Run in the foreground, as the current user
+run() {
+  # Make sure the .jar file exists
+  if [ ! -e $FUSEKI_START ]; then
+    log_daemon_msg "Could not see Fuseki .jar file: \$FUSEKI_START has value '$FUSEKI_START'"
+    exit 1
+  fi
+  exec "${RUN_CMD[@]}"
+}
+
+case $CMD in
+  start)
+    start
+  ;;
+  stop)
+    stop
+  ;;
+  restart)
+    stop "restarting"
+    start
+  ;;
+  run)
+    run
+  ;;
+  status)
+    FUSEKI_PID=$(findFile fuseki.pid /var/run /usr/var/run $FUSEKI_HOME /tmp)
+    if running $FUSEKI_PID
+    then
+      PID=`cat "$FUSEKI_PID"`
+      log_daemon_msg "Fuseki is running with pid: $PID"
+    else
+      log_daemon_msg "Fuseki is not running"
+    fi
+  ;;
+  *)
+    usage
+  ;;
+esac
+
+exit 0

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/fuseki-server
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/fuseki-server b/jena-fuseki2/jena-fuseki-dist/fuseki-server
new file mode 100755
index 0000000..679b3bd
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/fuseki-server
@@ -0,0 +1,64 @@
+#!/bin/sh
+# 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.
+
+# Run fuseki as a standalone server
+
+export FUSEKI_HOME="${FUSEKI_HOME:-$PWD}"
+
+if [ ! -e "$FUSEKI_HOME" ]
+then
+    echo "$FUSEKI_HOME does not exist" 1>&2
+    exit 1
+    fi
+
+JAR1="$FUSEKI_HOME/fuseki-server.jar"
+JAR2="$FUSEKI_HOME/jena-fuseki-*-server.jar"
+JAR=""
+
+for J in "$JAR1" "$JAR2"
+do
+    # Expand
+    J="$(echo $J)"
+    if [ -e "$J" ]
+    then
+	JAR="$J"
+	break
+    fi
+done
+
+if [ "$JAR" = "" ]
+then
+    echo "Can't find jarfile to run"
+    exit 1
+fi
+
+# Deal with Cygwin path issues
+cygwin=false
+case "`uname`" in
+    CYGWIN*) cygwin=true;;
+esac
+if [ "$cygwin" = "true" ]
+then
+    JAR=`cygpath -w "$JAR"`
+    FUSEKI_HOME=`cygpath -w "$FUSEKI_HOME"`
+fi
+
+export FUSEKI_BASE="${FUSEKI_BASE:-$PWD/run}"
+
+JVM_ARGS=${JVM_ARGS:--Xmx1200M}
+
+exec java  $JVM_ARGS -jar "$JAR" "$@"

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/fuseki-server.bat
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/fuseki-server.bat b/jena-fuseki2/jena-fuseki-dist/fuseki-server.bat
new file mode 100644
index 0000000..5881660
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/fuseki-server.bat
@@ -0,0 +1,19 @@
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM     http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+@echo off
+@REM modify this to name the server jar
+java -Xmx1200M -jar fuseki-server.jar %*

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/pom.xml b/jena-fuseki2/jena-fuseki-dist/pom.xml
new file mode 100644
index 0000000..6da0ca9
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/pom.xml
@@ -0,0 +1,94 @@
+<?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>
+
+  <name>Apache Jena Fuseki - Binary distribution</name>
+  <artifactId>jena-fuseki-dist</artifactId>
+  <version>2.0.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <parent>
+    <groupId>org.apache.jena</groupId>
+    <artifactId>jena-fuseki</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent> 
+
+  <description>Fuseki distribution</description>
+  <url>http://jena.apache.org/</url>
+
+  <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>
+
+  <properties>
+    <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
+    <build.time.xsd>${maven.build.timestamp}</build.time.xsd>  
+  </properties>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-fuseki-server</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-fuseki-war</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+    </dependency>
+
+  </dependencies>
+  <build>
+    <plugins>
+
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>create-zip-assembly</id>
+	    <phase>package</phase>
+	    <!--<phase/>-->
+            <goals><goal>single</goal></goals>
+            <configuration>
+              <descriptors>
+                <descriptor>assembly-dist.xml</descriptor>
+              </descriptors>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      
+    </plugins>
+
+  </build>
+  
+</project>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-server/dependency-reduced-pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-server/dependency-reduced-pom.xml b/jena-fuseki2/jena-fuseki-server/dependency-reduced-pom.xml
new file mode 100644
index 0000000..270d99a
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-server/dependency-reduced-pom.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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">
+  <parent>
+    <artifactId>jena-fuseki</artifactId>
+    <groupId>org.apache.jena</groupId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jena-fuseki-server</artifactId>
+  <name>Apache Jena Fuseki - Server Standalone Jar</name>
+  <version>2.0.0-SNAPSHOT</version>
+  <description>Fuseki server - combined jar with built-in webserver.</description>
+  <url>http://jena.apache.org/</url>
+  <licenses>
+    <license>
+      <name>Apache 2.0 License</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
+    </license>
+  </licenses>
+  <organization>
+    <name>Apache Jena</name>
+    <url>http://jena.apache.org/</url>
+  </organization>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>2.1</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <shadedArtifactAttached>false</shadedArtifactAttached>
+          <transformers>
+            <transformer>
+              <mainClass>org.apache.jena.fuseki.FusekiCmd</mainClass>
+            </transformer>
+            <transformer />
+            <transformer />
+            <transformer>
+              <addHeader>false</addHeader>
+            </transformer>
+          </transformers>
+          <filters>
+            <filter>
+              <artifact>*:*</artifact>
+              <excludes>
+                <exclude>META-INF/*.SF</exclude>
+                <exclude>META-INF/*.DSA</exclude>
+                <exclude>META-INF/*.RSA</exclude>
+              </excludes>
+            </filter>
+          </filters>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <repositories>
+    <repository>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <id>apache.snapshots</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://repository.apache.org/snapshots</url>
+    </repository>
+  </repositories>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <artifactId>hamcrest-core</artifactId>
+          <groupId>org.hamcrest</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+  <properties>
+    <this.root>${project.artifactId}-${project.version}</this.root>
+    <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
+    <build.time.xsd>${maven.build.timestamp}</build.time.xsd>
+  </properties>
+</project>
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-server/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-server/pom.xml b/jena-fuseki2/jena-fuseki-server/pom.xml
new file mode 100644
index 0000000..b809285
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-server/pom.xml
@@ -0,0 +1,127 @@
+<?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>
+
+  <name>Apache Jena Fuseki - Server Standalone Jar</name>
+  <artifactId>jena-fuseki-server</artifactId>
+
+  <parent>
+    <groupId>org.apache.jena</groupId>
+    <artifactId>jena-fuseki</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+    <relativePath>../</relativePath>
+  </parent> 
+
+  <packaging>jar</packaging>
+  <description>Fuseki server - combined jar with built-in webserver.</description>
+  <url>http://jena.apache.org/</url>
+
+  <!-- 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>
+
+  <properties>
+    <this.root>${project.artifactId}-${project.version}</this.root>
+    <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
+    <build.time.xsd>${maven.build.timestamp}</build.time.xsd>  
+  </properties>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-fuseki-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+  </dependencies>
+
+  <build>
+    <plugins>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <shadedArtifactAttached>false</shadedArtifactAttached>
+	  <!--
+          <shadedClassifierName>server</shadedClassifierName>
+	  -->
+          <transformers>
+            <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+              <mainClass>org.apache.jena.fuseki.FusekiCmd</mainClass>
+            </transformer>
+            <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
+            <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
+            <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
+              <addHeader>false</addHeader>
+            </transformer>
+          </transformers>
+          <filters>
+            <filter>
+              <artifact>*:*</artifact>
+              <excludes>
+                <!-- Some jars are signed but shading breaks that.
+                     Don't include signing files.
+                -->
+                <exclude>META-INF/*.SF</exclude>
+                <exclude>META-INF/*.DSA</exclude>
+                <exclude>META-INF/*.RSA</exclude>
+              </excludes>
+            </filter>
+          </filters>
+        </configuration>
+        <executions>
+          <execution>
+	    <phase>package</phase>
+	    <!--<phase/><!- - Switch off -->
+            <goals>
+              <goal>shade</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+    </plugins>
+
+  </build>
+  
+</project>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-war/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-war/pom.xml b/jena-fuseki2/jena-fuseki-war/pom.xml
new file mode 100644
index 0000000..3c80e05
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-war/pom.xml
@@ -0,0 +1,109 @@
+<?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>
+
+  <name>Apache Jena Fuseki - WAR file</name>
+  <artifactId>jena-fuseki-war</artifactId>
+  <version>2.0.0-SNAPSHOT</version>
+
+  <parent>
+    <groupId>org.apache.jena</groupId>
+    <artifactId>jena-fuseki</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent> 
+
+  <packaging>war</packaging>
+
+  <description>WAR file for Fuseki</description>
+  <url>http://jena.apache.org/</url>
+
+  <!-- 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>
+
+  <properties>
+    <this.root>${project.artifactId}-${project.version}</this.root>
+    
+    <server.jar.name>${this.root}-server</server.jar.name>
+    <!-- Eventually, move to jena-parent -->
+    <ver.jetty>9.1.1.v20140108</ver.jetty>
+    <ver.shiro>1.2.2</ver.shiro>
+
+    <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
+    <build.time.xsd>${maven.build.timestamp}</build.time.xsd>  
+  </properties>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-fuseki-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+  </dependencies>
+
+  <build>
+    
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>2.4</version>
+        <executions> 
+          <execution>
+            <id>generate-webapp</id>
+            <phase>package</phase>
+            <goals><goal>war</goal></goals>
+          </execution>
+        </executions>
+        <configuration>
+	  <warSourceDirectory>../jena-fuseki-core/src/main/webapp</warSourceDirectory>
+	  <webXml>../jena-fuseki-core/src/main/webapp/WEB-INF/web.xml</webXml>
+          <!-- Safe: Don't put in the Jetty dependency nor javax.servlet -->
+          <packagingExcludes>WEB-INF/lib/jetty-*,WEB-INF/lib/javax.servlet*</packagingExcludes>
+        </configuration>
+      </plugin>
+    </plugins>
+
+  </build>
+  
+</project>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/make-html
----------------------------------------------------------------------
diff --git a/jena-fuseki2/make-html b/jena-fuseki2/make-html
deleted file mode 100755
index 4ee6a81..0000000
--- a/jena-fuseki2/make-html
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-# 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.
-
-for f in "$@"
-do
-    echo "==== $f"
-    B="$(basename $f .md)"
-    D="$(dirname $f)"
-    X="$D/$B.html"
-    curl -s -XPOST -H 'Content-type:text/plain' \
-	--data-binary @$f \
-	https://api.github.com/markdown/raw \
-	> $X
-    
-done

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/pom.xml b/jena-fuseki2/pom.xml
index f839217..2215ab1 100644
--- a/jena-fuseki2/pom.xml
+++ b/jena-fuseki2/pom.xml
@@ -19,9 +19,12 @@
 <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>
 
-  <name>Apache Jena - Fuseki2 (SPARQL 1.1 Server)</name>
+  <name>Apache Jena Fuseki (SPARQL 1.1 Server)</name>
+  <groupId>org.apache.jena</groupId>
   <artifactId>jena-fuseki</artifactId>
-  <version>2.0.0-beta-1-SNAPSHOT</version>
+  <version>2.0.0-SNAPSHOT</version>
+
+  <description>Apache Jena Fuseki</description>
 
   <parent>
     <groupId>org.apache.jena</groupId>
@@ -30,15 +33,9 @@
     <relativePath>../jena-parent</relativePath>
   </parent> 
 
-  <!-- We make the JAR file so that the shade plugin includes it.
-       The war:war goal is added to the package phase.
-  -->
-  <packaging>jar</packaging>
-  <description>Fuseki is a SPARQL 1.1 Server which provides query, update and graph store protocol endpoints that can be used to expose triple stores over HTTP</description>
+  <packaging>pom</packaging>
   <url>http://jena.apache.org/</url>
 
-
-  <!-- Need if the parent is a snapshot -->
   <repositories>
     <repository>
       <id>apache.snapshots</id>
@@ -74,361 +71,11 @@
     <build.time.xsd>${maven.build.timestamp}</build.time.xsd>  
   </properties>
 
-  <dependencies>
-
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>jena-arq</artifactId>
-      <version>2.12.2-SNAPSHOT</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>jena-arq</artifactId>
-      <version>2.12.2-SNAPSHOT</version>
-      <classifier>tests</classifier>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>jena-core</artifactId>
-      <version>2.12.2-SNAPSHOT</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>jena-tdb</artifactId>
-      <version>1.1.2-SNAPSHOT</version>
-    </dependency>
-
-    <!--
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>sdb</artifactId>
-      <version>${ver.sdb}</version>
-      <optional>true</optional>
-    </dependency>
-    -->
-
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>jena-text</artifactId>
-      <version>1.1.2-SNAPSHOT</version>
-      <exclusions>
-        <!-- 
-          Get this via commons-fileupload and also via jena-text/sol4j
-        -->
-        <exclusion>
-          <groupId>commons-io</groupId>
-          <artifactId>commons-io</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.jena</groupId>
-      <artifactId>jena-spatial</artifactId>
-      <version>1.1.2-SNAPSHOT</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.shiro</groupId>
-      <artifactId>shiro-core</artifactId>
-      <version>${ver.shiro}</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.apache.shiro</groupId>
-      <artifactId>shiro-web</artifactId>
-      <version>${ver.shiro}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.httpcomponents</groupId>
-      <artifactId>httpclient</artifactId>
-      <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>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-webapp</artifactId>
-      <version>${ver.jetty}</version>
-    </dependency>    
-
-
-    <!--
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-runner</artifactId>
-      <version>${ver.jetty}</version>
-    </dependency>    
-    -->
-
-    <!-- Development and standalone jar (if built) -->
-    <!-- Jetty's useful servlets, inc compression -->
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-servlets</artifactId>
-      <version>${ver.jetty}</version>
-    </dependency>    
-    
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-    </dependency>
-
-    <!-- Intercept any uses of Jakarta Commons Logging e.g. Apache Common HTTP client. -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>jcl-over-slf4j</artifactId>
-    </dependency>
-
-    <!-- Needed because the Fuseki command line and the test suite reset logging levels -->
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <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>
-    <resources>
-      <resource>
-        <filtering>false</filtering>
-        <directory>src/main/resources</directory>
-        <excludes>
-          <exclude>org/apache/jena/fuseki/fuseki-properties.xml</exclude>
-        </excludes>
-      </resource>
-      <resource>
-        <filtering>true</filtering>
-        <directory>src/main/resources</directory>
-        <includes>
-          <include>org/apache/jena/fuseki/fuseki-properties.xml</include>
-        </includes>
-      </resource>
-    </resources>
-    
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <encoding>UTF-8</encoding>
-          <optimize>true</optimize>
-          <debug>true</debug>
-          <debuglevel>source,lines,vars</debuglevel>
-          <source>1.7</source>
-          <target>1.7</target>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-source-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>attach-sources</id>
-            <phase>package</phase>
-            <goals>
-              <goal>jar-no-fork</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <!--
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-        <configuration>
-          <version>true</version>
-          <show>public</show>
-          <quiet>true</quiet>
-          <encoding>UTF-8</encoding>
-          <windowtitle>Apache Jena Fuseki</windowtitle>
-          <doctitle>Apache Jena Fuseki ${project.version}</doctitle>
-          <bottom>Licenced under the Apache License, Version 2.0</bottom>
-        </configuration>
-      </plugin>
-      -->
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>test-jar</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <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-shade-plugin</artifactId>
-        <version>2.1</version>
-        <configuration>
-          <shadedArtifactAttached>true</shadedArtifactAttached>
-          <shadedClassifierName>server</shadedClassifierName>
-          <transformers>
-            <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-              <mainClass>org.apache.jena.fuseki.cmd.FusekiCmd</mainClass>
-            </transformer>
-            <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
-            <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
-            <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
-              <addHeader>false</addHeader>
-            </transformer>
-          </transformers>
-          <filters>
-            <filter>
-              <artifact>*:*</artifact>
-              <excludes>
-                <!-- Some jars are signed but shading breaks that.
-                     Don't include signing files.
-                -->
-                <exclude>META-INF/*.SF</exclude>
-                <exclude>META-INF/*.DSA</exclude>
-                <exclude>META-INF/*.RSA</exclude>
-              </excludes>
-            </filter>
-          </filters>
-        </configuration>
-        <executions>
-          <execution>
-	    <phase>package</phase>
-	    <!--<phase/><!- - Switch off -->
-            <goals>
-              <goal>shade</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-war-plugin</artifactId>
-        <version>2.4</version>
-        <executions> 
-          <execution>
-            <id>generate-webapp</id>
-            <phase>package</phase>
-            <goals><goal>war</goal></goals>
-          </execution>
-        </executions>
-        <configuration>
-          <webappDirectory>${project.build.webappDirectory}</webappDirectory>
-          <!-- This can't be set because then maven will not install/deploy the war file -->
-          <!--<warName>${webapp.name}</warName>-->
-          <!-- Don't put in the Jetty dependency nor javax.servlet -->
-          <packagingExcludes>WEB-INF/lib/jetty-*,WEB-INF/lib/javax.servlet*</packagingExcludes>
-        </configuration>
-      </plugin>
-
-      <!-- Untested.
-      <plugin>
-        <groupId>org.eclipse.jetty</groupId>
-        <artifactId>jetty-maven-plugin</artifactId>
-        <version>${ver.jetty}</version>
-        <configuration>
-          <war>target/${this.root}.war</war>
-        </configuration>
-      </plugin>
-      -->
-
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <!-- After shaded jar, after war file - same phase -->
-        <executions>
-          <execution>
-            <id>create-zip-assembly</id>
-	    <phase>package</phase>
-	    <!--<phase/>-->
-            <goals><goal>single</goal></goals>
-            <configuration>
-              <!--
-              <finalName>${assembly.zip.name}</finalName>
-              <appendAssemblyId>false</appendAssemblyId>
-              -->
-              <descriptors>
-                <descriptor>assembly-dist.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <configuration>
-          <encoding>UTF-8</encoding>
-        </configuration>
-      </plugin>
-
-    </plugins>
-
-  </build>
+  <modules>
+    <module>jena-fuseki-core</module>
+    <module>jena-fuseki-war</module>
+    <module>jena-fuseki-server</module>
+    <module>jena-fuseki-dist</module>
+  </modules>
   
 </project>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/DEF.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/DEF.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/DEF.java
deleted file mode 100644
index 8d8495a..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/DEF.java
+++ /dev/null
@@ -1,79 +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.jena.fuseki;
-
-import org.apache.jena.atlas.web.AcceptList ;
-import org.apache.jena.atlas.web.MediaType ;
-import static org.apache.jena.riot.WebContent.* ;
-
-public class DEF
-{
-    public static final MediaType acceptRDFXML        = MediaType.create(contentTypeRDFXML) ;
-    public static final MediaType acceptNQuads        = MediaType.create(contentTypeNQuads) ;
-    public static final MediaType acceptRSXML         = MediaType.create(contentTypeResultsXML) ;
-    public static final MediaType acceptJSON          = MediaType.create(contentTypeJSON) ;
-    
-    public static final AcceptList jsonOffer          = AcceptList.create(contentTypeJSON) ;
-
-    public static final AcceptList rdfOffer           = AcceptList.create(contentTypeTurtle, 
-                                                                          contentTypeTurtleAlt1,
-                                                                          contentTypeTurtleAlt2,
-                                                                          contentTypeNTriples,
-                                                                          contentTypeNTriplesAlt,
-                                                                          contentTypeRDFXML,
-                                                                          contentTypeJSONLD,
-                                                                          contentTypeRDFJSON,
-                                                                          contentTypeRDFThrift
-                                                                          ) ;
-    
-    public static final AcceptList quadsOffer         = AcceptList.create(contentTypeTriG,
-                                                                          contentTypeTriGAlt1,
-                                                                          contentTypeTriGAlt2,
-                                                                          contentTypeJSONLD,
-                                                                          contentTypeNQuads,
-                                                                          contentTypeNQuadsAlt1,
-                                                                          contentTypeNQuadsAlt2 
-                                                                          ) ;
-    
-    // Offer for SELECT
-    public static final AcceptList rsOfferTable       = AcceptList.create(contentTypeResultsJSON,
-                                                                          contentTypeTextCSV,
-                                                                          contentTypeTextTSV,
-                                                                          contentTypeResultsXML,
-                                                                          contentTypeResultsThrift,
-                                                                          contentTypeTextPlain
-                                                                          ) ;
-         
-    // Offer for ASK
-    public static final AcceptList rsOfferBoolean      = AcceptList.create(contentTypeResultsJSON,
-                                                                           contentTypeTextCSV,
-                                                                           contentTypeTextTSV,
-                                                                           contentTypeResultsXML,
-                                                                           contentTypeTextPlain
-                                                                           ) ;
-
-    
-    // Names for services in the default configuration
-    public static final String ServiceQuery         = "query" ;
-    public static final String ServiceQueryAlt      = "sparql" ;
-    public static final String ServiceUpdate        = "update" ;
-    public static final String ServiceData          = "data" ;
-    public static final String ServiceUpload        = "upload" ;
-    public static final String ServiceGeneralQuery  = "/sparql" ;
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/Fuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/Fuseki.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/Fuseki.java
deleted file mode 100644
index 0f42219..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/Fuseki.java
+++ /dev/null
@@ -1,227 +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.jena.fuseki ;
-
-import java.util.Calendar ;
-import java.util.TimeZone ;
-import java.util.concurrent.TimeUnit ;
-
-import org.apache.jena.riot.RIOT ;
-import org.apache.jena.riot.system.stream.LocatorFTP ;
-import org.apache.jena.riot.system.stream.LocatorHTTP ;
-import org.apache.jena.riot.system.stream.StreamManager ;
-import org.slf4j.Logger ;
-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.SystemInfo ;
-import com.hp.hpl.jena.sparql.util.Context ;
-import com.hp.hpl.jena.sparql.util.MappingRegistry ;
-import com.hp.hpl.jena.sparql.util.Utils ;
-import com.hp.hpl.jena.tdb.TDB ;
-import com.hp.hpl.jena.tdb.transaction.TransactionManager ;
-
-public class Fuseki {
-    // General fixed constants.
-    // See also FusekiServer for the naming on the filesystem
-    
-    /** Path to ??? */
-    static public String    PATH                         = "org.apache.jena.fuseki" ;
-
-    /** a unique IRI for the Fuseki namespace */
-    static public String    FusekiIRI                    = "http://jena.apache.org/Fuseki" ;
-
-    /**
-     * a unique IRI including the symbol notation for which properties should be
-     * appended
-     */
-    static public String    FusekiSymbolIRI              = "http://jena.apache.org/fuseki#" ;
-
-    /** Default location of the pages for the Fuseki UI  */
-    static public String    PagesStatic                  = "pages" ;
-    
-    /** Dummy base URi string for parsing SPARQL Query and Update requests */
-    static public final String BaseParserSPARQL          = "http://server/unset-base/" ;
-    
-    /** Dummy base URi string for parsing SPARQL Query and Update requests */
-    static public final String BaseUpload                = "http://server/unset-base/" ;
-
-    /**
-     * A relative resources path to the location of 
-     * <code>fuseki-properties.xml</code> file.
-     */
-    static private String   metadataLocation             = "org/apache/jena/fuseki/fuseki-properties.xml" ;
-
-    /**
-     * Object which holds metadata specified within
-     * {@link Fuseki#metadataLocation}
-     */
-    static private Metadata metadata                     = initMetadata() ;
-
-    private static Metadata initMetadata() {
-        Metadata m = new Metadata() ;
-        // m.addMetadata(metadataDevLocation) ;
-        m.addMetadata(metadataLocation) ;
-        return m ;
-    }
-
-    /** The name of the Fuseki server. Set to the string <code>Fuseki</code> by default. */
-    static public final String        NAME              = "Fuseki" ;
-
-    /** Version of this Fuseki instance */
-    static public final String        VERSION           = metadata.get(PATH + ".version", "development") ;
-
-    /** Date when Fuseki was built */
-    static public final String        BUILD_DATE        = metadata.get(PATH + ".build.datetime", "unknown") ;
-
-    /** An identifier for the HTTP Fuseki server instance */
-    static public final String        serverHttpName    = NAME + " (" + VERSION + ")" ;
-
-    /** Loger name for operations */
-    public static final String        actionLogName     = PATH + ".Fuseki" ;
-
-    /** Instance of log for operations */
-    public static final Logger        actionLog         = LoggerFactory.getLogger(actionLogName) ;
-
-    /** Logger name for standard webserver log file request log */
-    public static final String        requestLogName    = PATH + ".Request" ;
-
-    // See HttpAction.finishRequest.
-    // Normally OFF
-    /** Instance of a log for requests: format is NCSA. */
-    public static final Logger        requestLog        = LoggerFactory.getLogger(requestLogName) ;
-    
-    /** Admin log file for operations. */
-    public static final String        adminLogName      = PATH + ".Admin" ;
-
-    /** Instance of log for operations. */
-    public static final Logger        adminLog          = LoggerFactory.getLogger(adminLogName) ;
-
-    /** Admin log file for operations. */
-    public static final String        builderLogName    = PATH + ".Builder" ;
-
-    /** Instance of log for operations. */
-    public static final Logger        builderLog        = LoggerFactory.getLogger(builderLogName) ;
-
-    /** Validation log file for operations. */
-    public static final String        validationLogName = PATH + ".Validate" ;
-
-    /** Instance of log for validation. */
-    public static final Logger        validationLog     = LoggerFactory.getLogger(adminLogName) ;
-
-    /** Actual log file for general server messages. */
-    public static final String        serverLogName     = PATH + ".Server" ;
-
-    /** Instance of log for general server messages. */
-    public static final Logger        serverLog         = LoggerFactory.getLogger(serverLogName) ;
-
-    /** Logger used for the servletContent.log operations (if settable -- depends on environment) */
-    public static final String        servletRequestLogName     = PATH + ".Servlet" ;
-
-    /** Actual log file for config server messages. */
-    public static final String        configLogName     = PATH + ".Config" ;
-
-    /** Instance of log for config server messages. */
-    public static final Logger        configLog         = LoggerFactory.getLogger(configLogName) ;
-
-    /** Instance of log for config server message s */
-    public static boolean             verboseLogging    = false ;
-
-    /**
-     * An instance of management for stream opening, including redirecting
-     * through a location mapper whereby a name (e.g. URL) is redirected to
-     * another name (e.g. local file).
-     * */
-    public static final StreamManager webStreamManager ;
-    static {
-        webStreamManager = new StreamManager() ;
-        // Only know how to handle http URLs
-        webStreamManager.addLocator(new LocatorHTTP()) ;
-        webStreamManager.addLocator(new LocatorFTP()) ;
-    }
-
-    /** Default (and development) root of the Fuseki installation for fixed files. */ 
-    public static String DFT_FUSEKI_HOME = "." ;
-    /** Default (and development) root of the varying files in this deployment. */ 
-    public static String DFT_FUSEKI_BASE = "." ;
-    
-    private static boolean            initialized       = false ;
-    
-    // Serevr start time and uptime.
-    private static final long startMillis = System.currentTimeMillis() ;
-    // Hide server locale
-    private static final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("00:00")) ; 
-    static { cal.setTimeInMillis(startMillis) ; }  // Exactly the same start point!
-    
-    private static final String startDateTime = Utils.calendarToXSDDateTimeString(cal) ; 
-    
-    /** Return the number of milliseconds since the server started */  
-    public static long serverUptimeMillis() {
-        return System.currentTimeMillis() - startMillis ;
-    }
-    
-    /** Server uptime in seconds */ 
-    public static long serverUptimeSeconds() {
-        long x = System.currentTimeMillis() - startMillis ;
-        return TimeUnit.MILLISECONDS.toSeconds(x) ;
-    }
-    
-    /** XSD DateTime for when the server started */
-    public static String serverStartedAt() {
-        return startDateTime ;
-    }
-
-    /**
-     * Initialize an instance of the Fuseki server stack.
-     */
-    public synchronized static void init() {
-        if ( initialized )
-            return ;
-        initialized = true ;
-        // FusekiEnv.setEnvironment() ;
-        FusekiLogging.setLogging() ;
-        ARQ.init() ;
-        SystemInfo sysInfo = new SystemInfo(FusekiIRI, PATH, VERSION, BUILD_DATE) ;
-        SystemARQ.registerSubSystem(sysInfo) ;
-        RIOT.init() ;
-        TDB.init() ;
-        MappingRegistry.addPrefixMapping("fuseki", FusekiSymbolIRI) ;
-
-        TDB.setOptimizerWarningFlag(false) ;
-        // Don't set TDB batch commits.
-        // This can be slower, but it less memory hungry and more predictable.
-        TransactionManager.QueueBatchSize = 0 ;
-    }
-    
-    /**
-     * Get server global {@link com.hp.hpl.jena.sparql.util.Context}.
-     * 
-     * @return {@link com.hp.hpl.jena.query.ARQ#getContext()}
-     */
-    public static Context getContext() {
-        return ARQ.getContext() ;
-    }
-
-    // Force a call to init.
-    static {
-        init() ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiCmd.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
deleted file mode 100644
index 6d2e247..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
+++ /dev/null
@@ -1,28 +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.jena.fuseki;
-
-public class FusekiCmd {
-    public static void main(String[] args) {
-        // NOT logging.
-        System.err.println("Deprecated: Use org.apache.jena.fuseki.cmd.FusekiCmd") ;
-        org.apache.jena.fuseki.cmd.FusekiCmd.main(args) ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiConfigException.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiConfigException.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiConfigException.java
deleted file mode 100644
index 5e1b018..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiConfigException.java
+++ /dev/null
@@ -1,28 +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.jena.fuseki;
-
-
-public class FusekiConfigException extends FusekiException
-{
-    public FusekiConfigException(String msg, Throwable cause)    { super(msg, cause) ; }
-    public FusekiConfigException(String msg)                     { super(msg) ; }
-    public FusekiConfigException(Throwable cause)                { super(cause) ; }
-    public FusekiConfigException()                               { super() ; }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiException.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiException.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiException.java
deleted file mode 100644
index 04953ce..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiException.java
+++ /dev/null
@@ -1,29 +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.jena.fuseki;
-
-import com.hp.hpl.jena.sparql.ARQException ;
-
-public class FusekiException extends ARQException
-{
-    public FusekiException(String msg, Throwable cause)    { super(msg, cause) ; }
-    public FusekiException(String msg)                     { super(msg) ; }
-    public FusekiException(Throwable cause)                { super(cause) ; }
-    public FusekiException()                               { super() ; }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiLib.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiLib.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiLib.java
deleted file mode 100644
index 52024d4..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiLib.java
+++ /dev/null
@@ -1,258 +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.jena.fuseki;
-
-import java.util.Iterator ;
-
-import javax.servlet.http.HttpServletRequest ;
-
-import org.apache.jena.atlas.lib.MultiMap ;
-import org.apache.jena.atlas.lib.MultiMapToList ;
-import org.apache.jena.atlas.web.ContentType ;
-import org.apache.jena.fuseki.server.SystemState ;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFLanguages ;
-
-import com.hp.hpl.jena.graph.Graph ;
-import com.hp.hpl.jena.graph.Node ;
-import com.hp.hpl.jena.graph.Triple ;
-import com.hp.hpl.jena.query.* ;
-import com.hp.hpl.jena.rdf.model.Literal ;
-import com.hp.hpl.jena.rdf.model.Model ;
-import com.hp.hpl.jena.rdf.model.RDFNode ;
-import com.hp.hpl.jena.rdf.model.Resource ;
-import com.hp.hpl.jena.shared.PrefixMapping ;
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-import com.hp.hpl.jena.sparql.core.Quad ;
-import com.hp.hpl.jena.sparql.util.Convert ;
-import com.hp.hpl.jena.vocabulary.RDFS ;
-
-public class FusekiLib {
-    // ==> ActionLib
-    
-    /** Get the content type of an action or return the default.
-     * @param  action
-     * @return ContentType
-     */
-    public static ContentType getContentType(HttpAction action) {
-        return getContentType(action.request) ;
-    }
-    
-    /** Get the content type of an action or return the default.
-     * @param  request
-     * @return ContentType
-     */
-    public static ContentType getContentType(HttpServletRequest request) {
-        String contentTypeHeader = request.getContentType() ;
-        if ( contentTypeHeader == null ) 
-            return null ;
-        return ContentType.create(contentTypeHeader) ;
-    }
-    
-    /** Get the incoming Lang based on Content-Type of an action.
-     * @param  action
-     * @param  dft Default if no "Content-Type:" found. 
-     * @return ContentType
-     */
-    public static Lang getLangFromAction(HttpAction action, Lang dft) {
-        String contentTypeHeader = action.request.getContentType() ;
-        if ( contentTypeHeader == null )
-            return dft ;
-        return RDFLanguages.contentTypeToLang(contentTypeHeader) ;
-    }
-
-    static String fmtRequest(HttpServletRequest request) {
-        StringBuffer sbuff = new StringBuffer() ;
-        sbuff.append(request.getMethod()) ;
-        sbuff.append(" ") ;
-        sbuff.append(Convert.decWWWForm(request.getRequestURL())) ;
-
-        String qs = request.getQueryString() ;
-        if ( qs != null ) {
-            String tmp = request.getQueryString() ;
-            tmp = Convert.decWWWForm(tmp) ;
-            tmp = tmp.replace('\n', ' ') ;
-            tmp = tmp.replace('\r', ' ') ;
-            sbuff.append("?").append(tmp) ;
-        }
-        return sbuff.toString() ;
-    }
-
-    /** Parse the query string - do not process the body even for a form */
-    public static MultiMap<String, String> parseQueryString(HttpServletRequest req) {
-        MultiMap<String, String> map = MultiMapToList.create() ;
-
-        // Don't use ServletRequest.getParameter or getParamterNames
-        // as that reads form data. This code parses just the query string.
-        if ( req.getQueryString() != null ) {
-            String[] params = req.getQueryString().split("&") ;
-            for (int i = 0; i < params.length; i++) {
-                String p = params[i] ;
-                String[] x = p.split("=", 2) ;
-                String name = null ;
-                String value = null ;
-
-                if ( x.length == 0 ) { // No "="
-                    name = p ;
-                    value = "" ;
-                } else if ( x.length == 1 ) { // param=
-                    name = x[0] ;
-                    value = "" ;
-                } else { // param=value
-                    name = x[0] ;
-                    value = x[1] ;
-                }
-                map.put(name, value) ;
-            }
-        }
-        return map ;
-    }
-    
-    public static String safeParameter(HttpServletRequest request, String pName) {
-        String value = request.getParameter(pName) ;
-        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?
-        if ( graphName == null )
-            graphName = Quad.defaultGraphNodeGenerated ;
-
-        Iterator<Triple> iter = data.find(Node.ANY, Node.ANY, Node.ANY) ;
-        for (; iter.hasNext();) {
-            Triple t = iter.next() ;
-            dsg.add(graphName, t.getSubject(), t.getPredicate(), t.getObject()) ;
-        }
-
-        PrefixMapping pmapSrc = data.getPrefixMapping() ;
-        PrefixMapping pmapDest = dsg.getDefaultGraph().getPrefixMapping() ;
-        pmapDest.setNsPrefixes(pmapSrc) ;
-    }
-    
-    public static void addDataInto(DatasetGraph src, DatasetGraph dest) {
-        Iterator<Quad> iter = src.find(Node.ANY, Node.ANY, Node.ANY, Node.ANY) ;
-        for (; iter.hasNext();) {
-            Quad q = iter.next() ;
-            dest.add(q) ;
-        }
-
-        PrefixMapping pmapSrc = src.getDefaultGraph().getPrefixMapping() ;
-        PrefixMapping pmapDest = dest.getDefaultGraph().getPrefixMapping() ;
-        pmapDest.withDefaultMappings(pmapSrc) ;
-    }
-
-    // ---- Helper code
-    public static ResultSet query(String string, Model m) {
-        return query(string, m, null, null) ;
-    }
-
-    public static ResultSet query(String string, Dataset ds) {
-        return query(string, ds, null, null) ;
-    }
-
-    public static ResultSet query(String string, Model m, String varName, RDFNode value) {
-        Query query = QueryFactory.create(SystemState.PREFIXES + string) ;
-        QuerySolutionMap initValues = null ;
-        if ( varName != null )
-            initValues = querySolution(varName, value) ;
-        try ( QueryExecution qExec = QueryExecutionFactory.create(query, m, initValues) ) {
-            return ResultSetFactory.copyResults(qExec.execSelect()) ;
-        }
-    }
-
-    public static ResultSet query(String string, Dataset ds, String varName, RDFNode value) {
-        Query query = QueryFactory.create(SystemState.PREFIXES + string) ;
-        QuerySolutionMap initValues = null ;
-        if ( varName != null )
-            initValues = querySolution(varName, value) ;
-        try ( QueryExecution qExec = QueryExecutionFactory.create(query, ds, initValues) ) {
-            return ResultSetFactory.copyResults(qExec.execSelect()) ;
-        }
-    }
-
-    private static QuerySolutionMap querySolution(String varName, RDFNode value) {
-        QuerySolutionMap qsm = new QuerySolutionMap() ;
-        querySolution(qsm, varName, value) ;
-        return qsm ;
-    }
-
-    public static QuerySolutionMap querySolution(QuerySolutionMap qsm, String varName, RDFNode value) {
-        qsm.add(varName, value) ;
-        return qsm ;
-    }
-    
-    public static RDFNode getOne(Resource svc, String property) {
-        ResultSet rs = FusekiLib.query("SELECT * { ?svc " + property + " ?x}", svc.getModel(), "svc", svc) ;
-        if ( !rs.hasNext() )
-            throw new FusekiConfigException("No property '" + property + "' for service " + FusekiLib.nodeLabel(svc)) ;
-        RDFNode x = rs.next().get("x") ;
-        if ( rs.hasNext() )
-            throw new FusekiConfigException("Multiple properties '" + property + "' for service " + FusekiLib.nodeLabel(svc)) ;
-        return x ;
-    }
-    
-    // Node presentation
-    public static String nodeLabel(RDFNode n) {
-        if ( n == null )
-            return "<null>" ;
-        if ( n instanceof Resource )
-            return strForResource((Resource)n) ;
-    
-        Literal lit = (Literal)n ;
-        return lit.getLexicalForm() ;
-    }
-
-    // XXX Lib
-    public static String strForResource(Resource r) {
-        return strForResource(r, r.getModel()) ;
-    }
-
-    // XXX Lib
-    public static String strForResource(Resource r, PrefixMapping pm) {
-        if ( r == null )
-            return "NULL " ;
-        if ( r.hasProperty(RDFS.label) ) {
-            RDFNode n = r.getProperty(RDFS.label).getObject() ;
-            if ( n instanceof Literal )
-                return ((Literal)n).getString() ;
-        }
-    
-        if ( r.isAnon() )
-            return "<<blank node>>" ;
-    
-        if ( pm == null )
-            pm = r.getModel() ;
-    
-        return strForURI(r.getURI(), pm) ;
-    }
-
-    public static String strForURI(String uri, PrefixMapping pm) {
-        if ( pm != null ) {
-            String x = pm.shortForm(uri) ;
-    
-            if ( !x.equals(uri) )
-                return x ;
-        }
-        return "<" + uri + ">" ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiLogging.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiLogging.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiLogging.java
deleted file mode 100644
index 1add2b2..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiLogging.java
+++ /dev/null
@@ -1,171 +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.jena.fuseki;
-
-import java.io.File ;
-import java.net.URL ;
-
-import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.atlas.logging.LogCtl ;
-import org.apache.jena.fuseki.server.FusekiEnv ;
-import org.apache.jena.riot.SysRIOT ;
-import org.apache.log4j.PropertyConfigurator ;
-import org.apache.log4j.helpers.Loader ;
-
-public class FusekiLogging
-{
-    // This class must not have static constants, or otherwise not use "Fuseki.*"
-    // or any class else where that might kick off logging.  Otherwise, the 
-    // setLogging is poiintless (it's already set).
-    // PlanB - reinitialize logging regardless on first call. 
-    
-    // Set logging.
-    // 1/ Use log4j.configuration if defined.
-    // 2/ Use file:log4j.properties if exists
-    // 3/ Use log4j.properties on the classpath.
-    // 4/ Use built-in org/apache/jena/fuseki/log4j.properties on the classpath.
-    // 5/ Use Built in string
-
-    /** Places for the log4j properties file at (3) */ 
-    private static final String[] resourcesForLog4jProperties = { 
-        "log4j.properties",
-        "org/apache/jena/fuseki/log4j.properties"
-    } ;
-    
-    private static final boolean LogLogging     = false ;
-    private static boolean loggingInitialized   = false ;
-    
-    public static synchronized void setLogging() {
-        if ( loggingInitialized )
-            return ;
-        loggingInitialized = true ;
-        FusekiEnv.setEnvironment() ;
-        
-        logLogging("Fuseki logging") ;
-        // No loggers have been created but configuration may have been set up.
-        String x = System.getProperty("log4j.configuration", null) ;
-        logLogging("log4j.configuration = %s", x) ;
-
-        if ( x != null ) { 
-            // log4j wil initialize in the usual way. This includes avalue of
-            // "set", which indicates that logging was set before by some other Jena code.
-            if ( x.equals("set") )
-                Fuseki.serverLog.warn("Fuseki logging: Unexpected: Log4j was setup by someother part of Jena") ;
-            return ;
-        }
-        logLogging("Fuseki logging - setup") ;
-        // Look for a log4j.properties in the current working directory
-        // and an existing FUSEKI_BASE for easy customization.
-        String fn1 = "log4j.properties" ;
-        String fn2 = null ;
-        
-        if ( FusekiEnv.FUSEKI_BASE != null ) 
-            fn2 = FusekiEnv.FUSEKI_BASE.toString()+"/log4j.properties" ;
-        if ( attempt(fn1) ) return ; 
-        if ( attempt(fn2) ) return ;
-        
-        // Try classpath
-        for ( String resourceName : resourcesForLog4jProperties ) {
-            // The log4j general initialization is done in a class static
-            // in LogManager so it can't be called again in any sensible manner.
-            // Instead, we include the same basic mechanism ...
-            logLogging("Fuseki logging - classpath %s", resourceName) ;
-            URL url = Loader.getResource(resourceName) ;
-            if ( url != null ) {
-                PropertyConfigurator.configure(url) ;
-                logLogging("Fuseki logging - found via classpath %s", url) ;
-                System.setProperty("log4j.configuration", url.toString()) ;
-                return ;
-            }
-        }
-        // Use builtin.
-        logLogging("Fuseki logging - Fallback log4j.properties string") ;
-        String dftLog4j = log4JsetupFallback() ;
-        LogCtl.resetLogging(dftLog4j);
-        // Stop anything attempting to do it again.
-        System.setProperty("log4j.configuration", "set") ;
-    }
-
-    private static boolean attempt(String fn) {
-        try {
-            File f = new File(fn) ;
-            if ( f.exists() ) {
-                logLogging("Fuseki logging - found file:log4j.properties") ;
-                PropertyConfigurator.configure(fn) ;
-                System.setProperty("log4j.configuration", "file:" + fn) ;
-                return true ;
-            }
-        }
-        catch (Throwable th) {}
-        return false ;
-    }
-
-    private static void logLogging(String fmt, Object ... args) {
-        if ( LogLogging ) {
-            System.out.printf(fmt, args) ; 
-            System.out.println() ;
-        }
-    }
-
-    private static String log4JsetupFallback() {
-        return StrUtils.strjoinNL
-            // Preferred: classes/log4j.properties, from src/main/resources/log4j.properties
-            // Keep these in-step.  Different usages cause different logging initalizations;
-            // if the jar is rebundled, it may loose the associated log4.properties file.
-            ("## Plain output to stdout",
-             "log4j.appender.jena.plainstdout=org.apache.log4j.ConsoleAppender",
-             "log4j.appender.jena.plainstdout.target=System.out",
-             "log4j.appender.jena.plainstdout.layout=org.apache.log4j.PatternLayout",
-             "log4j.appender.jena.plainstdout.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %-10c{1} %-5p %m%n",
-             //"log4j.appender.jena.plainstdout.layout.ConversionPattern=%d{HH:mm:ss} %-10c{1} %-5p %m%n",
-
-             "# Unadorned, for the requests log.",
-             "log4j.appender.fuseki.plain=org.apache.log4j.ConsoleAppender",
-             "log4j.appender.fuseki.plain.target=System.out",
-             "log4j.appender.fuseki.plain.layout=org.apache.log4j.PatternLayout",
-             "log4j.appender.fuseki.plain.layout.ConversionPattern=%m%n",
-             
-             "## Most things", 
-             "log4j.rootLogger=INFO, jena.plainstdout",
-             "log4j.logger.com.hp.hpl.jena=WARN",
-             "log4j.logger.org.openjena=WARN",
-             "log4j.logger.org.apache.jena=WARN",
-
-             "# Fuseki System logs.",
-             "log4j.logger." + Fuseki.serverLogName     + "=INFO",
-             "log4j.logger." + Fuseki.actionLogName     + "=INFO",
-             "log4j.logger." + Fuseki.adminLogName      + "=INFO",
-             "log4j.logger." + Fuseki.validationLogName + "=INFO",
-             "log4j.logger." + Fuseki.configLogName     + "=INFO",
-
-             "log4j.logger.org.apache.jena.tdb.loader=INFO",
-             "log4j.logger.org.eclipse.jetty=WARN" ,
-             "log4j.logger.org.apache.shiro=WARN",
-
-             "# NCSA Request Access log",
-             "log4j.additivity."+Fuseki.requestLogName   + "=false",
-             "log4j.logger."+Fuseki.requestLogName       + "=OFF, fuseki.plain",
-
-             "## Parser output", 
-             "log4j.additivity" + SysRIOT.riotLoggerName + "=false",
-             "log4j.logger." + SysRIOT.riotLoggerName + "=INFO, plainstdout"
-                ) ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiNotFoundException.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiNotFoundException.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiNotFoundException.java
deleted file mode 100644
index be9be90..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiNotFoundException.java
+++ /dev/null
@@ -1,26 +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.jena.fuseki;
-
-import org.apache.jena.web.HttpSC ;
-
-public class FusekiNotFoundException extends FusekiRequestException
-{
-    public FusekiNotFoundException(String msg)    { super(HttpSC.NOT_FOUND_404, msg) ; }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiRequestException.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiRequestException.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiRequestException.java
deleted file mode 100644
index e197be2..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/FusekiRequestException.java
+++ /dev/null
@@ -1,57 +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.jena.fuseki;
-
-import org.apache.jena.web.HttpSC ;
-
-
-public class FusekiRequestException extends FusekiException
-{
-    public static FusekiRequestException create(int code, String msg)
-    {
-        if ( code == HttpSC.NOT_FOUND_404 )
-            return new FusekiNotFoundException(msg) ;
-        return new FusekiRequestException(code, msg) ;
-    }
-    
-    private final int statusCode ;
-    private final String responseMessage ;
-    protected FusekiRequestException(int code, String msg)
-    {
-        super(msg) ;
-        this.statusCode = code ;
-        responseMessage = msg ;
-    }
-    
-    public int getStatusCode()
-    {
-        return statusCode ;
-    }
-
-    public String getResponseMessage()
-    {
-        return responseMessage ;
-    }
-
-    @Override
-    public String toString()
-    {
-        return "HTTP: "+statusCode+" "+getMessage() ;
-    }
-}


[59/93] [abbrv] jena git commit: Even large header processing

Posted by rv...@apache.org.
Even large header processing


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

Branch: refs/heads/hadoop-rdf
Commit: c06e7207f0003503a3951d774c2c1ffc7c7e0f1c
Parents: 3042cf9
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 20:14:32 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 20:14:32 2015 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/c06e7207/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
index b354296..ba93ab7 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
@@ -291,8 +291,8 @@ public class JettyFuseki {
     private void defaultServerConfig(int port, boolean loopback) {
         server = new Server() ;
         HttpConnectionFactory f1 = new HttpConnectionFactory() ;
-        // Some people do try very large operations ...
-        f1.getHttpConfiguration().setRequestHeaderSize(64 * 1024);
+        // Some people do try very large operations ... really, should use POST.
+        f1.getHttpConfiguration().setRequestHeaderSize(512 * 1024);
         f1.getHttpConfiguration().setOutputBufferSize(5 * 1024 * 1024) ;
         
         //SslConnectionFactory f2 = new SslConnectionFactory() ;


[64/93] [abbrv] jena git commit: UI fixes for FF\nThis closes #17

Posted by rv...@apache.org.
UI fixes for FF\nThis closes #17


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

Branch: refs/heads/hadoop-rdf
Commit: 4e6da043f6bea9f60b48bdf2e7e8f8e2f854e4e9
Parents: 5827dcc
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 20:23:38 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 20:23:38 2015 +0000

----------------------------------------------------------------------
 .../jena-fuseki-core/src/main/webapp/css/yasqe.min.css         | 2 +-
 jena-fuseki2/jena-fuseki-core/src/main/webapp/dataset.html     | 6 +++---
 .../jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js       | 4 ++--
 .../jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js.map   | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/4e6da043/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasqe.min.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasqe.min.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasqe.min.css
index 04fb1ff..13314cd 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasqe.min.css
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasqe.min.css
@@ -1 +1 @@
-.yasqe{@-moz-keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@-webkit-keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}}.yasqe .CodeMirror{font-family:monospace;height:300px}.yasqe .CodeMirror-scroll{overflow:auto}.yasqe .CodeMirror-lines{padding:4px 0}.yasqe .CodeMirror pre{padding:0 4px}.yasqe .CodeMirror-scrollbar-filler,.yasqe .CodeMirror-gutter-filler{background-color:#fff}.yasqe .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.yasqe .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;-moz-box-sizing:content-box;box-sizing:content-box}.yasqe .CodeMirror-guttermarker{color:#000}.yasqe .CodeMirror-guttermarker-subtle{color:#999}.yasqe .CodeMirror div.CodeMirror-cursor{border-left:1px solid #000}.yasqe .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.
 yasqe .CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.yasqe .CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.yasqe .cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.yasqe .cm-tab{display:inline-block;text-decoration:inherit}.yasqe .CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.yasqe .cm-s-default .cm-keyword{color:#708}.yasqe .cm-s-default .cm-atom{color:#219}.yasqe .cm-s-default .cm-number{color:#164}.yasqe .cm-s-default .cm-def{color:#00f}.yasqe .cm-s-default .cm-variable-2{color:#05a}.yasqe .cm-s-default .cm-variable-3{color:#085}.yasqe .cm-s-default .cm-comment{color:#a50}.yasqe .cm-s-default .cm-string{color:#a11}.yasqe .cm-s-default .cm-string-2{color:#f50}.yasqe .cm-s-default .cm-meta{color:#555}.yasqe .cm-s-default .cm-qualifier{color:#555}.yasqe .cm-s-default .cm-builtin{color:#30a}.ya
 sqe .cm-s-default .cm-bracket{color:#997}.yasqe .cm-s-default .cm-tag{color:#170}.yasqe .cm-s-default .cm-attribute{color:#00c}.yasqe .cm-s-default .cm-header{color:#00f}.yasqe .cm-s-default .cm-quote{color:#090}.yasqe .cm-s-default .cm-hr{color:#999}.yasqe .cm-s-default .cm-link{color:#00c}.yasqe .cm-negative{color:#d44}.yasqe .cm-positive{color:#292}.yasqe .cm-header,.yasqe .cm-strong{font-weight:700}.yasqe .cm-em{font-style:italic}.yasqe .cm-link{text-decoration:underline}.yasqe .cm-strikethrough{text-decoration:line-through}.yasqe .cm-s-default .cm-error{color:red}.yasqe .cm-invalidchar{color:red}.yasqe div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}.yasqe div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.yasqe .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.yasqe .CodeMirror-activeline-background{background:#e8f2ff}.yasqe .CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.yasqe .CodeMirror-scroll{margin-bottom:-
 30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative;-moz-box-sizing:content-box;box-sizing:content-box}.yasqe .CodeMirror-sizer{position:relative;border-right:30px solid transparent;-moz-box-sizing:content-box;box-sizing:content-box}.yasqe .CodeMirror-vscrollbar,.yasqe .CodeMirror-hscrollbar,.yasqe .CodeMirror-scrollbar-filler,.yasqe .CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.yasqe .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.yasqe .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.yasqe .CodeMirror-scrollbar-filler{right:0;bottom:0}.yasqe .CodeMirror-gutter-filler{left:0;bottom:0}.yasqe .CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.yasqe .CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;padding-bottom:30px;margin-bottom:-32px;display:inline-block;;}.yasqe .CodeMirror-gutter-wrapper{posit
 ion:absolute;z-index:4;height:100%}.yasqe .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.yasqe .CodeMirror-lines{cursor:text;min-height:1px}.yasqe .CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.yasqe .CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.yasqe .CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.yasqe .CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.yasqe .CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.yasqe .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.yasqe .CodeMirror-measure pre{position:static}.yasqe .CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}.yasqe div.CodeMirro
 r-cursors{visibility:hidden;position:relative;z-index:3}.yasqe .CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.yasqe .CodeMirror-selected{background:#d9d9d9}.yasqe .CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.yasqe .CodeMirror-crosshair{cursor:crosshair}.yasqe .cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.yasqe .cm-force-border{padding-right:.1px}@media print{.yasqe .CodeMirror div.CodeMirror-cursors{visibility:hidden}}.yasqe .cm-tab-wrap-hack:after{content:''}.yasqe span.CodeMirror-selectedtext{background:0 0}.yasqe .CodeMirror-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;height:auto;z-index:9}.yasqe .CodeMirror-foldmarker{color:#00f;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.yasqe .CodeMirror-foldgutter{width:.7em}.yasqe .CodeMirror-foldgutter-open,.yasqe .CodeMirror-foldgutter-folded{cursor:pointer}.yasqe .CodeMirror-foldgutter-open:af
 ter{content:"\25BE"}.yasqe .CodeMirror-foldgutter-folded:after{content:"\25B8"}.yasqe .svgImg{display:inline-block}.yasqe .CodeMirror{line-height:1.5em;border:1px solid #d1d1d1}.yasqe pre{font-size:13px}.yasqe span.cm-error{border-bottom:2px dotted red}.yasqe .gutterErrorBar{width:4px}.yasqe .yasqe_buttons{position:absolute;top:5px;right:5px;z-index:5}.yasqe .yasqe_buttons div{vertical-align:top;margin-left:5px}.yasqe .yasqe_queryButton{display:inline-block;cursor:pointer}.yasqe .yasqe_share{cursor:pointer;height:20px;width:20px;margin-top:3px}.yasqe .yasqe_sharePopup{position:absolute;padding:6px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05);width:400px;height:auto}.yasqe .yasqe_sharePopup textarea{width:100%}.yasqe .completionNotification{color:#999;background-color:#f7f7f7;position:absolute;padding:0 5px;right:0;bottom:0;font-size:90%}.yasqe .CodeMirror-fullscreen .
 fullscreenToggleBtns .yasqe_smallscreenBtn{display:inline-block}.yasqe .CodeMirror-fullscreen .fullscreenToggleBtns .yasqe_fullscreenBtn{display:none}.yasqe .fullscreenToggleBtns{display:inline-block;margin-top:3px}.yasqe .fullscreenToggleBtns div{cursor:pointer;width:20px;height:20px}.yasqe .fullscreenToggleBtns .yasqe_smallscreenBtn{display:none}.yasqe .parseErrorIcon{width:15px;height:15px}.yasqe .yasqe_tooltip{display:inline;position:absolute;background:#333;background:rgba(0,0,0,.8);border-radius:5px;bottom:26px;color:#fff;left:20%;padding:5px 15px;position:absolute;width:220px;white-space:-moz-pre-wrap!important;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;white-space:normal}.yasqe .notificationLoader{width:18px;height:18px;vertical-align:middle}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px r
 gba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}.CodeMirror-hint{max-width:30em}
\ No newline at end of file
+.yasqe{@-moz-keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@-webkit-keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}}.yasqe .CodeMirror{font-family:monospace;height:300px}.yasqe .CodeMirror-scroll{overflow:auto}.yasqe .CodeMirror-lines{padding:4px 0}.yasqe .CodeMirror pre{padding:0 4px}.yasqe .CodeMirror-scrollbar-filler,.yasqe .CodeMirror-gutter-filler{background-color:#fff}.yasqe .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.yasqe .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;-moz-box-sizing:content-box;box-sizing:content-box}.yasqe .CodeMirror-guttermarker{color:#000}.yasqe .CodeMirror-guttermarker-subtle{color:#999}.yasqe .CodeMirror div.CodeMirror-cursor{border-left:1px solid #000}.yasqe .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.
 yasqe .CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.yasqe .CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.yasqe .cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.yasqe .cm-tab{display:inline-block;text-decoration:inherit}.yasqe .CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.yasqe .cm-s-default .cm-keyword{color:#708}.yasqe .cm-s-default .cm-atom{color:#219}.yasqe .cm-s-default .cm-number{color:#164}.yasqe .cm-s-default .cm-def{color:#00f}.yasqe .cm-s-default .cm-variable-2{color:#05a}.yasqe .cm-s-default .cm-variable-3{color:#085}.yasqe .cm-s-default .cm-comment{color:#a50}.yasqe .cm-s-default .cm-string{color:#a11}.yasqe .cm-s-default .cm-string-2{color:#f50}.yasqe .cm-s-default .cm-meta{color:#555}.yasqe .cm-s-default .cm-qualifier{color:#555}.yasqe .cm-s-default .cm-builtin{color:#30a}.ya
 sqe .cm-s-default .cm-bracket{color:#997}.yasqe .cm-s-default .cm-tag{color:#170}.yasqe .cm-s-default .cm-attribute{color:#00c}.yasqe .cm-s-default .cm-header{color:#00f}.yasqe .cm-s-default .cm-quote{color:#090}.yasqe .cm-s-default .cm-hr{color:#999}.yasqe .cm-s-default .cm-link{color:#00c}.yasqe .cm-negative{color:#d44}.yasqe .cm-positive{color:#292}.yasqe .cm-header,.yasqe .cm-strong{font-weight:700}.yasqe .cm-em{font-style:italic}.yasqe .cm-link{text-decoration:underline}.yasqe .cm-strikethrough{text-decoration:line-through}.yasqe .cm-s-default .cm-error{color:red}.yasqe .cm-invalidchar{color:red}.yasqe div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}.yasqe div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.yasqe .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.yasqe .CodeMirror-activeline-background{background:#e8f2ff}.yasqe .CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.yasqe .CodeMirror-scroll{margin-bottom:-
 30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative;-moz-box-sizing:content-box;box-sizing:content-box}.yasqe .CodeMirror-sizer{position:relative;border-right:30px solid transparent;-moz-box-sizing:content-box;box-sizing:content-box}.yasqe .CodeMirror-vscrollbar,.yasqe .CodeMirror-hscrollbar,.yasqe .CodeMirror-scrollbar-filler,.yasqe .CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.yasqe .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.yasqe .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.yasqe .CodeMirror-scrollbar-filler{right:0;bottom:0}.yasqe .CodeMirror-gutter-filler{left:0;bottom:0}.yasqe .CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.yasqe .CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;padding-bottom:30px;margin-bottom:-32px;display:inline-block;;}.yasqe .CodeMirror-gutter-wrapper{posit
 ion:absolute;z-index:4;height:100%}.yasqe .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.yasqe .CodeMirror-lines{cursor:text;min-height:1px}.yasqe .CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.yasqe .CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.yasqe .CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.yasqe .CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.yasqe .CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.yasqe .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.yasqe .CodeMirror-measure pre{position:static}.yasqe .CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}.yasqe div.CodeMirro
 r-cursors{visibility:hidden;position:relative;z-index:3}.yasqe .CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.yasqe .CodeMirror-selected{background:#d9d9d9}.yasqe .CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.yasqe .CodeMirror-crosshair{cursor:crosshair}.yasqe .cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.yasqe .cm-force-border{padding-right:.1px}@media print{.yasqe .CodeMirror div.CodeMirror-cursors{visibility:hidden}}.yasqe .cm-tab-wrap-hack:after{content:''}.yasqe span.CodeMirror-selectedtext{background:0 0}.yasqe .CodeMirror-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;height:auto;z-index:9}.yasqe .CodeMirror-foldmarker{color:#00f;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.yasqe .CodeMirror-foldgutter{width:.7em}.yasqe .CodeMirror-foldgutter-open,.yasqe .CodeMirror-foldgutter-folded{cursor:pointer}.yasqe .CodeMirror-foldgutter-open:af
 ter{content:"\25BE"}.yasqe .CodeMirror-foldgutter-folded:after{content:"\25B8"}.yasqe .svgImg{display:inline-block}.yasqe .CodeMirror{line-height:1.5em;border:1px solid #d1d1d1}.yasqe pre{font-size:13px}.yasqe span.cm-error{border-bottom:2px dotted red}.yasqe .gutterErrorBar{width:4px}.yasqe .yasqe_buttons{position:absolute;top:5px;right:5px;z-index:5}.yasqe .yasqe_buttons div{vertical-align:top;margin-left:5px}.yasqe .yasqe_queryButton{display:inline-block;cursor:pointer;width:40px;height:40px}.yasqe .yasqe_queryButton .svgImg{display:block}.yasqe .yasqe_share{cursor:pointer;height:20px;width:20px;margin-top:3px}.yasqe .yasqe_sharePopup{position:absolute;padding:6px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05);width:400px;height:auto}.yasqe .yasqe_sharePopup textarea{width:100%}.yasqe .completionNotification{color:#999;background-color:#f7f7f7;position:absolute;paddi
 ng:0 5px;right:0;bottom:0;font-size:90%}.yasqe .CodeMirror-fullscreen .fullscreenToggleBtns .yasqe_smallscreenBtn{display:inline-block}.yasqe .CodeMirror-fullscreen .fullscreenToggleBtns .yasqe_fullscreenBtn{display:none}.yasqe .fullscreenToggleBtns{display:inline-block;margin-top:3px}.yasqe .fullscreenToggleBtns div{cursor:pointer;width:20px;height:20px}.yasqe .fullscreenToggleBtns .yasqe_smallscreenBtn{display:none}.yasqe .parseErrorIcon{width:15px;height:15px}.yasqe .yasqe_tooltip{display:inline;position:absolute;background:#333;background:rgba(0,0,0,.8);border-radius:5px;bottom:26px;color:#fff;left:20%;padding:5px 15px;position:absolute;width:220px;white-space:-moz-pre-wrap!important;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;white-space:normal}.yasqe .notificationLoader{width:18px;height:18px;vertical-align:middle}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,
 .2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}.CodeMirror-hint{max-width:30em}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/4e6da043/jena-fuseki2/jena-fuseki-core/src/main/webapp/dataset.html
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/dataset.html b/jena-fuseki2/jena-fuseki-core/src/main/webapp/dataset.html
index a6b6a1d..486789b 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/webapp/dataset.html
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/dataset.html
@@ -114,13 +114,13 @@
                           </ul>
                         </div>
                         <div class="col-md-12 well">
-                            <div class="query-chrome" style="margin-top:0px; display:inline-block;width:40%">
+                            <div class="query-chrome" style="margin-top:0px; display:inline-block;vertical-align: top;width:40%;">
                                   <div class="form-group">
 	                                <label for="sparqlEndpoint">SPARQL endpoint</label>
 	                                <input type="text" class="form-control" id="sparqlEndpoint" />
 	                              </div>
                             </div>
-                             <div class="query-chrome" style="margin-top:0px; display:inline-block; width:28%">
+                             <div class="query-chrome" style="margin-top:0px; display:inline-block; vertical-align: top;width:28%">
                                   <div class="form-group">
                                     <label for="selectContentType">Content Type (Select)</label>
                                     <select id="selectContentType" class="form-control">
@@ -131,7 +131,7 @@
                                     </select>
                                   </div>
                             </div>
-                            <div class="query-chrome" style="margin-top:0px; display:inline-block; width:28%">
+                            <div class="query-chrome" style="margin-top:0px; display:inline-block; vertical-align: top;width:28%">
                                   <div class="form-group">
                                     <label for="graphContentType">Content Type (Graph)</label>
                                     <select id="graphContentType" class="form-control">


[33/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/upload-controller.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/upload-controller.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/upload-controller.js
new file mode 100644
index 0000000..ace2547
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/upload-controller.js
@@ -0,0 +1,42 @@
+/** Controller for the file uploader component */
+
+define(
+  function( require ) {
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        sprintf = require("sprintf"),
+        pageUtils = require( "app/util/page-utils" ),
+        fui = require( "app/fui" ),
+        FileUploadView = require( "app/views/file-upload" );
+
+    var UploadController = function() {
+      this.initialize();
+    };
+
+    _.extend( UploadController.prototype, {
+
+      /** Initialize the controler */
+      initialize: function() {
+        if (fui.models.fusekiServer && fui.models.fusekiServer.get( "ready" )) {
+          this.onServerModelReady();
+        }
+        else {
+          _.bindAll( this, "onServerModelReady" );
+          fui.vent.on( "models.fuseki-server.ready", this.onServerModelReady );
+        }
+
+      },
+
+      /** When the fuseki server is ready, we can set up the initial view */
+      onServerModelReady: function( event ) {
+        var fusekiServer = fui.models.fusekiServer;
+
+        fui.views.fileUploadView = new FileUploadView();
+        fui.views.fileUploadView.render();
+      },
+    } );
+
+    return UploadController;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/validation-controller.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/validation-controller.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/validation-controller.js
new file mode 100644
index 0000000..43ed8ce
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/validation-controller.js
@@ -0,0 +1,38 @@
+/** Controller for the main index.html page */
+define(
+  function( require ) {
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        ValidationOptions = require( "app/views/validation-options" ),
+        ValidationService = require( "app/services/validation-service" );
+
+    var ValidationController = function() {
+      this.initServices();
+      this.initEvents();
+    };
+
+    // add the behaviours defined on the controller
+    _.extend( ValidationController.prototype, {
+      initEvents: function() {
+        fui.vent.on( "models.validation-options.ready", this.onValidationOptionsModelReady );
+        $(".validation").on( "click", "a.perform-validation", function( event ) {
+          fui.services.validation.performValidation( fui.views.validationOptions.model );
+        } );
+      },
+
+      onValidationOptionsModelReady: function( e ) {
+        fui.views.validationOptions = new ValidationOptions( {model: fui.models.validationOptions} );
+      },
+
+      initServices: function() {
+        fui.services.validation = new ValidationService( "#query-edit-cm", "#validation-output-cm" );
+        fui.services.validation.init();
+      }
+
+    } );
+
+    return ValidationController;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/fui.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/fui.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/fui.js
new file mode 100644
index 0000000..e8bc41d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/fui.js
@@ -0,0 +1,33 @@
+/**
+ * Top-level application code module for Fuseki UI
+ */
+
+define( ['require', 'backbone', 'marionette'],
+  function( require, Backbone, Marionette ) {
+    // define the application object, and add it to the global namespace
+    var fui = new Marionette.Application();
+
+    // define some Marionette modules, because they have a lifecycle component
+    // see https://github.com/marionettejs/backbone.marionette/wiki/AMD-Modules-vs-Marionette%27s-Modules
+    fui.module( "models" );
+    fui.module( "views" );
+    fui.module( "layouts" );
+    fui.module( "controllers" );
+    fui.module( "services" );
+
+    // define top-level regions where our layouts will go
+    fui.addRegions({
+    });
+
+    fui.on('initialize:before', function( options ) {
+    });
+
+    fui.on('initialize:after', function( options ) {
+      // Backbone.history.start();
+      this.initialized = true;
+    });
+
+
+    return fui;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/layouts/.svnkeep
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/layouts/.svnkeep b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/layouts/.svnkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.dataset.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.dataset.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.dataset.js
new file mode 100644
index 0000000..50ba27b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.dataset.js
@@ -0,0 +1,31 @@
+/** RequireJS dependency configuration for dataset.html page */
+
+define( ['require', '../common-config'],
+  function( require ) {
+    require(
+      ['underscore', 'jquery', 'backbone', 'marionette', 'app/fui', 'app/controllers/dataset-controller',
+       'sprintf',
+       'bootstrap-select.min',
+       'app/controllers/query-controller',
+       'app/controllers/upload-controller',
+       'app/models/fuseki-server',
+       'app/models/dataset',
+       'app/views/dataset-selector',
+       'app/views/tabbed-view-manager',
+       'app/services/ping-service',
+       'jquery.xdomainrequest',
+       'jquery.form',
+       'jquery.fileupload'
+      ],
+      function( _, $, Backbone, Marionette, fui, DatasetController ) {
+          var options = { };
+
+        // initialise the backbone application
+        fui.controllers.datasetController = new DatasetController();
+        fui.start( options );
+
+        // additional services
+        require( 'app/services/ping-service' ).start();
+      });
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.index.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.index.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.index.js
new file mode 100644
index 0000000..56c8903
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.index.js
@@ -0,0 +1,24 @@
+
+define( ['require', '../common-config'],
+  function( require ) {
+    require(
+      ['underscore', 'jquery', 'backbone', 'marionette',
+       'app/fui', 'app/controllers/index-controller',
+       'sprintf', 'bootstrap',
+       'app/models/fuseki-server',
+       'app/models/dataset',
+       'app/views/dataset-selection-list',
+       'app/services/ping-service'
+      ],
+      function( _, $, Backbone, Marionette, fui, IndexController ) {
+        var options = { };
+
+        // initialise the backbone application
+        fui.controllers.indexController = new IndexController();
+        fui.start( options );
+
+        // additional services
+        require( 'app/services/ping-service' ).start();
+      });
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.manage.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.manage.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.manage.js
new file mode 100644
index 0000000..312972c
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.manage.js
@@ -0,0 +1,27 @@
+
+define( ['require', '../common-config'],
+  function( require ) {
+    require(
+      ['underscore', 'jquery', 'backbone', 'marionette',
+       'app/fui', 'app/controllers/manage-controller',
+       'sprintf', 'bootstrap',
+       'app/models/fuseki-server',
+       'app/models/dataset',
+       'app/models/task',
+       'app/views/dataset-management',
+       'app/services/ping-service',
+       'jquery.xdomainrequest'
+      ],
+      function( _, $, Backbone, Marionette, fui, ManageController ) {
+
+        var options = { } ;
+
+        // initialise the backbone application
+        fui.controllers.manageController = new ManageController();
+        fui.start( options );
+
+        // additional services
+        require( 'app/services/ping-service' ).start();
+      });
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.validation.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.validation.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.validation.js
new file mode 100644
index 0000000..0e30fad
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/main.validation.js
@@ -0,0 +1,24 @@
+
+define( ['require', '../common-config'],
+  function( require ) {
+    require(
+      ['underscore', 'jquery', 'backbone', 'marionette',
+       'app/fui', 'app/controllers/validation-controller',
+       'sprintf', 'bootstrap',
+       'app/models/validation-options',
+       'app/services/ping-service',
+       'app/services/validation-service',
+       'jquery.xdomainrequest'
+      ],
+      function( _, $, Backbone, Marionette, fui, ValidationController ) {
+        var options = { } ;
+
+        // initialise the backbone application
+        fui.controllers.validationController = new ValidationController();
+        fui.start( options );
+
+        // additional services
+//        require( 'services/ping-service' ).start(); TODO restore
+      });
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/dataset-stats.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/dataset-stats.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/dataset-stats.js
new file mode 100644
index 0000000..35527c7
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/dataset-stats.js
@@ -0,0 +1,102 @@
+/**
+ * Backbone model denoting statistics on a dataset
+ */
+define(
+  function( require ) {
+    "use strict";
+
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        sprintf = require( "sprintf" );
+
+    /**
+     * This model represents the statistics available on a one or more datasets
+     */
+    var DatasetStats = Backbone.Model.extend( {
+      initialize: function( dataset, stats ) {
+        this.set( {dataset: dataset, stats: stats} );
+      },
+
+      /** Return the number of datasets we have statistics for */
+      size: function() {
+        return _.keys( datasets() ).length;
+      },
+
+      toJSON: function() {
+        return this.asTable();
+      },
+
+      /** Return a table of the statistics we have, one row per dataset */
+      asTable: function() {
+        var ds = this.datasets();
+        var endpoints = this.collectEndpoints( ds );
+        var rows = [];
+
+        _.each( ds, function( d, dsName ) {
+          var row = [dsName, d.Requests, d.RequestsGood, d.RequestsBad];
+          var es = d.endpoints;
+
+          _.each( endpoints, function( e ) {
+            if (es[e.key]) {
+              var servStats = es[e.key];
+
+              if (servStats.Requests === 0) {
+                row.push( "0" );
+              }
+              else {
+                row.push( sprintf( "%d (%d bad)", servStats.Requests, servStats.RequestsBad ))
+              }
+            }
+            else {
+              row.push( "&ndash;" );
+            }
+          } );
+
+          rows.push( row );
+        } );
+
+        return {headings: this.columnHeadings( endpoints ), rows: rows};
+      },
+
+      stats: function() {
+        return this.get( "stats" );
+      },
+
+      datasets: function() {
+        return this.stats().datasets;
+      },
+
+      /** Reload the numbers from the server */
+      refresh: function() {
+        var self = this;
+
+        this.get( "dataset" )
+            .statistics()
+            .done( function( data ) {
+              self.set( "stats", data );
+            } );
+      },
+
+      // internal methods
+
+      collectEndpoints: function( ds ) {
+        var endpoints = [];
+        _.each( ds, function( d ) {
+          var ep = _.each( d.endpoints, function( v, k ) {
+            endpoints.push( {key: k, label: v.description} );
+          } );
+        } );
+
+        return _.uniq( endpoints ).sort();
+      },
+
+      columnHeadings: function( services ) {
+        return ["Name", "Overall", "Overall good", "Overall bad"].concat( _.pluck( services, 'label' ) );
+      }
+    } );
+
+    return DatasetStats;
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/dataset.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/dataset.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/dataset.js
new file mode 100644
index 0000000..80dc092
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/dataset.js
@@ -0,0 +1,251 @@
+/**
+ * Backbone model denoting the remote Fuseki server.
+ */
+define(
+  function( require ) {
+    "use strict";
+
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        sprintf = require( "sprintf" ),
+        Task = require( "app/models/task" );
+
+    /**
+     * This model represents the core representation of the remote Fuseki
+     * server. Individual datasets have their own model.
+     */
+    var Dataset = Backbone.Model.extend( {
+      initialize: function( datasetDescription, baseURL, mgmtURL ) {
+        this.set( datasetDescription );
+        this.set( {
+                    baseURL: baseURL,
+                    mgmtURL: mgmtURL,
+                    counts: {},
+                    countPerformed: false,
+                    counting: false,
+                    statistics: false
+                  } );
+      },
+
+      baseURL: function() {
+        return this.get( "baseURL" );
+      },
+
+      mgmtURL: function() {
+        return this.get( "mgmtURL" );
+      },
+
+      mgmtActionURL: function() {
+        return this.get( "mgmtURL" ) + this.name();
+      },
+
+      statisticsURL: function() {
+        return sprintf( "%s/$/stats%s", this.baseURL(), this.name() );
+      },
+
+      name: function() {
+        return this.get( "ds.name" );
+      },
+
+      services: function() {
+        return this.get( "ds.services" );
+      },
+
+      countPerformed: function() {
+        return this.get( "countPerformed" );
+      },
+
+      counts: function() {
+        return this.get( "counts" );
+      },
+
+      serviceTypes: function() {
+        return _.map( this.services(), function( s ) {return s["srv.type"];} );
+      },
+
+      /** Return a descriptive data-structure listing all this datasets services */
+      servicesDescription: function() {
+        var description = [];
+        var self = this;
+
+        _.each( this.services(), function( s ) {
+          _.each( s["srv.endpoints"], function( e ) {
+            description.push( {label: s["srv.description"],
+                               url: self.datasetEndpointURL( e )
+                              } );
+          } );
+        } );
+
+        description.sort( function( d0, d1 ) {
+          return (d0.label < d1.label) ? -1 : (d0.label > d1.label ? 1 : 0);
+        } );
+
+        return description;
+      },
+
+      /** Return the first service that has the given type */
+      serviceOfType: function( serviceType ) {
+        return _.find( this.services(), function( s ) {
+          return s["srv.type"] === serviceType;
+        } );
+      },
+
+      /** Return the first endpoint of the first service that has the given type */
+      endpointOfType: function( serviceType ) {
+        var service = this.serviceOfType( serviceType );
+        return service && _.first( service["srv.endpoints"] );
+      },
+
+      /* Return URL for a service of a given type or null, if no such service */
+      endpointURL: function( serviceType ) {
+        var endpoint = this.endpointOfType( serviceType );
+        return endpoint ? this.datasetEndpointURL( endpoint ) : null;
+      },
+
+      /** Return the URL for the given endpoint */
+      datasetEndpointURL: function( endpoint ) {
+        return sprintf( "%s%s/%s", this.baseURL(), this.name(), endpoint );
+      },
+
+      /** Return the sparql query URL for this dataset, if it has one, or null */
+      queryURL: function() {
+        return this.endpointURL( "Query" ) ;
+      },
+
+      /** Return the sparql query URL for this dataset, if it has one, or null */
+      quadsURL: function() {
+        return this.endpointURL( "Quads" ) ;
+      },
+
+      /** Return the sparql update URL for this dataset, if it has one, or null */
+      updateURL: function() {
+        return this.endpointURL( "Update" ) ;
+      },
+
+      /** Return the GSP write URL for this dataset, if it has one, or null */
+      graphStoreProtocolURL: function() {
+        return this.endpointURL( "GSP" ) ;
+      },
+
+      /** Return the GSP read URL for this dataset, if it has one, or null */
+      graphStoreProtocolReadURL: function() {
+        return this.endpointURL( "GSP_R" ) ;
+      },
+
+      /** Return the upload URL for this dataset, if it has one, or null */
+      uploadURL: function( graphName ) {
+        if (this.graphStoreProtocolURL() !== null) {
+          return sprintf( "%s%s", this.graphStoreProtocolURL(), (graphName === "default" ? "" : ("?graph=" + graphName) ));
+        }
+        else {
+          return null;
+        }
+      },
+
+      /** Perform the action to delete the dataset. Returns the Ajax deferred object */
+      deleteDataset: function() {
+        return $.ajax( {
+          url: this.mgmtActionURL(),
+          type: 'DELETE'
+        } );
+      },
+
+      /** Perform the action of taking a backup of this dataset */
+      backupDataset: function() {
+        var backupURL = sprintf( "%s/$/backup%s", this.baseURL(), this.name() );
+        var ds = this;
+
+        return $.ajax( {
+          url: backupURL,
+          type: 'POST'
+        } )
+          .done( function( taskDescription ) {
+            new Task( ds, "backup", taskDescription );
+          } );
+      },
+
+      /**
+       * Request the statistics for this dataset, and return the promise object for the callback.
+       * @param keep If truthy, and we have existing statistics, re-use the existing stats
+       * */
+      statistics: function( keep ) {
+        var self = this;
+        var currentStats = this.get( "statistics" );
+
+        if (currentStats && keep) {
+          return $.Deferred().resolveWith( null, currentStats );
+        }
+        else {
+          return $.getJSON( this.statisticsURL() )
+                  .then( function( data ) {
+                    self.set( "statistics", data );
+                    return data;
+                  } );
+        }
+      },
+
+      /** Perform a count query to determine the size of the dataset. Changes the size property when done,
+       * but also returns the JQuery promise object used to monitor the query response */
+      count: function() {
+        var self = this;
+        var query1 = sprintf( "select (count(*) as ?count) {?s ?p ?o}" );
+        var query2 = sprintf( "select ?g (count(*) as ?count) {graph ?g {?s ?p ?o}} group by ?g" );
+
+        self.set( "counting", true );
+
+        var updateCount = function( model, result, graph ) {
+          var n = parseInt( result.count.value );
+          var counts = _.extend( {}, model.get( "counts" ) );
+          counts[graph] = n;
+          model.set( "counts", counts );
+        };
+
+        $.getJSON( sprintf( "%s?query=%s", self.queryURL(), query1 ) )
+         .done( function( data ) {
+           updateCount( self, data.results.bindings[0], "default graph" );
+
+           $.getJSON( sprintf( "%s?query=%s", self.queryURL(), query2 ) )
+            .done( function( data ) {
+              _.each( data.results.bindings, function( binding ) {
+                if (binding.g) {
+                  updateCount( self, binding, binding.g.value );
+                }
+              } );
+            } );
+
+           self.set( {countPerformed: true, counting: false} );
+         } );
+      },
+
+      /**
+       * Fetch the content of the given graph as Turtle. Return the jQuery promise
+       * object for the Ajax call.
+       */
+      fetchGraph: function( graphName ) {
+        return $.ajax( this.graphStoreProtocolReadURL(),
+                       {method: "get",
+                        headers: {Accept : "text/turtle; charset=utf-8"},
+                        dataType: "html",
+                        data: {graph: graphName}
+                       } );
+      },
+
+      /**
+       * Put the given Turtle content back to the server using the given graph name
+       */
+      putGraph: function( turtle, graphName ) {
+        return $.ajax( sprintf( "%s?graph=%s", this.graphStoreProtocolURL(), graphName ),
+                       {method: "put",
+                        dataType: "json",
+                        data: turtle,
+                        contentType: "text/turtle; charset=uft-8"
+                       } );
+      }
+
+    } );
+
+    return Dataset;
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/fuseki-server.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/fuseki-server.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/fuseki-server.js
new file mode 100644
index 0000000..59d8d31
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/fuseki-server.js
@@ -0,0 +1,155 @@
+/**
+ * Backbone model denoting the remote Fuseki server.
+ */
+
+define(
+  function( require ) {
+    "use strict";
+
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        sprintf = require( "sprintf" ),
+        Dataset = require( "app/models/dataset" ),
+        PageUtils = require( "app/util/page-utils" );
+
+    var DATASETS_MANAGEMENT_PATH = "/$/datasets";
+
+    /**
+     * This model represents the core representation of the remote Fuseki
+     * server. Individual datasets have their own model.
+     */
+    var FusekiServer = Backbone.Model.extend( {
+      /** This initializer occurs when the module starts, not when the constructor is invoked */
+      init: function( options ) {
+        this._baseURL = this.currentRootPath();
+        this._managementURL = null;
+        this.set( "selectedDatasetName", PageUtils.queryParam( "ds" ) )
+      },
+
+      baseURL: function() {
+        return this._baseURL;
+      },
+
+      /** Return the URL from which we extract the details of the current server */
+      serverDetailsURL: function() {
+        return sprintf( "%s/$/server", this.baseURL() );
+      },
+
+      /** Return the URL for issuing commands to the management API, or null if no API defined */
+      managementURL: function() {
+        return this._managementURL;
+      },
+
+      /** Return the URL for getting the stats for all datasets */
+      statsURL: function() {
+        return sprintf( "%s/$/stats", this.managementURL() );
+      },
+
+      /** Return the list of datasets that this server knows about. Each dataset will be a Dataset model object */
+      datasets: function() {
+        return this.get( "datasets" );
+      },
+
+      /** Return the dataset with the given name */
+      dataset: function( dsName ) {
+        return _.find( this.datasets(), function( ds ) {return dsName === ds.name();} )
+      },
+
+      /** Return the name of the currently selected dataset, if known */
+      selectedDatasetName: function() {
+        return this.get( "selectedDatasetName" );
+      },
+
+      /** Return the dataset that is currently selected, or null */
+      selectedDataset: function() {
+        var dsName = this.selectedDatasetName();
+        return dsName && this.dataset( dsName );
+      },
+
+      /** Load and cache the remote server description. Trigger change event when done */
+      loadServerDescription: function() {
+          var self = this;
+          return this.getJSON( this.serverDetailsURL() )
+              .done( function( data ) {
+                  self.saveServerDescription( data );
+              } )
+              .then( function() {
+                  fui.vent.trigger( "models.fuseki-server.ready" );
+              });
+      },
+
+      /** Store the server description in this model */
+      saveServerDescription: function( serverDesc ) {
+        // wrap each dataset JSON description as a dataset model
+        var bURL = this.baseURL();
+        var mgmtURL = bURL;
+
+        if (serverDesc.admin) {
+          mgmtURL = bURL.replace( ":" + window.location.port, ":" + serverDesc.admin.port );
+          this._managementURL = mgmtURL;
+        }
+
+        var datasets = _.map( serverDesc.datasets, function( d ) {
+          return new Dataset( d, bURL, mgmtURL + DATASETS_MANAGEMENT_PATH );
+        } );
+
+        datasets.sort( function( ds0, ds1 ) {
+          if (ds0.name() > ds1.name()) {
+            return 1;
+          }
+          else if (ds0.name() < ds1.name()) {
+            return -1;
+          }
+          else
+            return 0;
+        } );
+
+        this.set( {
+          serverDescription: serverDesc,
+          datasets: datasets,
+          ready: true
+        } );
+      },
+
+      /**
+       * Get the given relative path from the server, and return a promise object which will
+       * complete with the JSON object denoted by the path.
+       */
+      getJSON: function( path, data ) {
+        return $.getJSON( path, data );
+      },
+
+      /** Update or create a dataset by posting to its endpoint */
+      updateOrCreateDataset: function( datasetId, data ) {
+        var url = sprintf( "%s/$/datasets%s", this.managementURL(),
+                           datasetId ? ("/" + datasetId) : ""
+                         );
+
+        return $.ajax( url,
+                       { data: data,
+                         method: "post"
+                       }
+                     );
+      },
+
+      /** Extract the server root path from the current window href */
+      currentRootPath: function() {
+        var path = window.location.pathname.replace( /\/[^/]*$/, "" );
+        return sprintf( "http://%s:%s%s", window.location.hostname, window.location.port, path );
+      }
+    } );
+
+    // when the models module starts, automatically load the server description
+    fui.models.addInitializer( function( options ) {
+      var fusekiServer = new FusekiServer();
+      fui.models.fusekiServer = fusekiServer;
+
+      fusekiServer.init( options );
+      fusekiServer.loadServerDescription();
+    } );
+
+    return FusekiServer;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/task.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/task.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/task.js
new file mode 100644
index 0000000..10c0563
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/task.js
@@ -0,0 +1,105 @@
+/**
+ * A long-running task, which periodically pings the server for its task status
+ */
+
+define(
+  function( require ) {
+    "use strict";
+
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        sprintf = require( "sprintf" );
+
+    /* Constants */
+
+    var MS = 1000;
+    var MAX_DELAY = 10 * MS;
+
+    /**
+     * This model represents a long running task process
+     */
+    var Task = function( ds, operationType, taskDescription ) {
+      this.taskDescription = taskDescription;
+      this.ds = ds;
+      this.operationType = operationType;
+      this.delay = 500;
+
+      _.bindAll( this, "checkTaskStatus", "onCurrentTaskStatusFail", "onCurrentTaskStatus" );
+
+      this.checkTaskStatus();
+    };
+
+    _.extend( Task.prototype, {
+      /** Return the unique ID (on this server) of the task */
+      taskId: function() {
+        return this.taskDescription.taskId;
+      },
+
+      /** Return the URL for the task's API */
+      taskURL: function() {
+        return sprintf( "%s/$/tasks/%s", this.ds.baseURL(), this.taskId() );
+      },
+
+      /** Test the current status of the task */
+      checkTaskStatus: function() {
+        $.getJSON( this.taskURL() )
+         .done( this.onCurrentTaskStatus )
+         .fail( this.onCurrentTaskStatusFail )
+      },
+
+      /** Successful result from checking the task */
+      onCurrentTaskStatus: function( taskDescription ) {
+        this.taskDescription = taskDescription;
+
+        var status = {
+            task: this,
+            dsId: this.ds.name(),
+            finished: this.taskFinished()
+        };
+
+        fui.vent.trigger( "task.status", status );
+
+        this.queueTaskStatusCheck();
+      },
+
+      /** Failed to check the task */
+      onCurrentTaskStatusFail: function( jqxhr, msg, err ) {
+        var status = {
+            task: this,
+            dsId: this.ds.name(),
+            errorMessage: err || msg
+        };
+
+        fui.vent.trigger( "task.failed", status );
+      },
+
+      /** Re-queue the status check if the task is not yet complete */
+      queueTaskStatusCheck: function() {
+        if (!this.taskFinished()) {
+          _.delay( this.checkTaskStatus, this.statusDelay() );
+        }
+      },
+
+      /** Return the completion time if the task has been fid, otherwise null */
+      taskFinished: function() {
+        return this.taskDescription.finished;
+      },
+
+      /** Return the delay in ms until the next status check is due. */
+      statusDelay: function() {
+        var t = this.delay;
+
+        if (t < MAX_DELAY) {
+          this.delay = t * 2;
+        }
+
+        return t;
+      }
+    } );
+
+    return Task;
+  }
+);
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/validation-options.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/validation-options.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/validation-options.js
new file mode 100644
index 0000000..b114cf9
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/validation-options.js
@@ -0,0 +1,85 @@
+/**
+ * Backbone model denoting the remote Fuseki server.
+ */
+define(
+  function( require ) {
+    "use strict";
+
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        sprintf = require( "sprintf" );
+
+    /**
+     * This model represents the users current choice of options to the
+     * validation service.
+     */
+    var ValidationOptions = Backbone.Model.extend( {
+      initialize: function() {
+        this.set( {validateAs: "sparql"} );
+        this.set( {outputFormat: "algebra"} );
+      },
+
+      validateAs: function() {
+        return this.get( "validateAs" );
+      },
+
+      validateAsQuery: function() {
+        return this.validateAs() === "sparql" || this.validateAs() === "arq";
+      },
+
+      setValidateAs: function( va ) {
+        this.set( "validateAs", va );
+        console.log( JSON.stringify( this.toJSON() ));
+        console.log( "----" );
+      },
+
+      outputFormat: function() {
+        return this.get( "outputFormat" );
+      },
+
+      setOutputFormat: function( of ) {
+        this.set( "outputFormat", of );
+      },
+
+      validationURL: function() {
+        switch (this.get( "validateAs" )) {
+        case "sparql":  return "/validate/query";
+        case "arq":  return "/validate/query";
+        case "Turtle": return "/validate/data";
+        case "TriG": return "/validate/data";
+        case "N-Triples": return "/validate/data";
+        case "N-Quads": return "/validate/data";
+        }
+      },
+
+      payloadParam: function() {
+        return this.validateAsQuery() ? "query" : "data";
+      },
+
+      toJSON: function() {
+        var json = {
+          languageSyntax: this.validateAs(),
+          lineNumbers: true
+        };
+
+        if (this.validateAsQuery()) {
+          json.outputFormat = this.outputFormat();
+        }
+
+        return json;
+      }
+
+    } );
+
+    // when the models module starts, create the model
+    fui.models.addInitializer( function( options ) {
+      fui.models.validationOptions = new ValidationOptions();
+      fui.vent.trigger( "models.validation-options.ready" );
+    } );
+
+
+    return ValidationOptions;
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/qonsole-config.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/qonsole-config.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/qonsole-config.js
new file mode 100644
index 0000000..132e5ab
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/qonsole-config.js
@@ -0,0 +1,26 @@
+/** Standalone configuration for qonsole on index page */
+
+define( [], function() {
+  return {
+    prefixes: {
+      "rdf":      "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+      "rdfs":     "http://www.w3.org/2000/01/rdf-schema#",
+      "owl":      "http://www.w3.org/2002/07/owl#",
+      "xsd":      "http://www.w3.org/2001/XMLSchema#"
+    },
+    queries: [
+      { "name": "Selection of triples",
+        "query": "SELECT ?subject ?predicate ?object\nwhere {\n" +
+                 "  ?subject ?predicate ?object\n}\n" +
+                 "LIMIT 25"
+      },
+      { "name": "Selection of classes",
+        "query": "SELECT distinct ?class ?label ?description\nwhere {\n" +
+                 "  ?class a owl:Class.\n" +
+                 "  OPTIONAL { ?class rdfs:label ?label}\n" +
+                 "  OPTIONAL { ?class rdfs:comment ?description}\n}\n" +
+                 "LIMIT 25"
+      }
+    ]
+  };
+} );
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/routers/.svnkeep
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/routers/.svnkeep b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/routers/.svnkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/services/ping-service.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/services/ping-service.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/services/ping-service.js
new file mode 100644
index 0000000..75ef6a4
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/services/ping-service.js
@@ -0,0 +1,54 @@
+/**
+ * The ping service checks the status of the attached server and sets the light in the
+ * control bar accordingly.
+ */
+define( ['jquery', 'underscore', 'sprintf'],
+  function( $, _, sprintf ) {
+
+    var PING_URL = "$/ping"
+    var DEFAULT_PING_TIME = 500000;  // TODO slowed down during debugging phase
+    var _startTime = 0;
+
+    var onBeforeSend = function() {
+      _startTime = new Date().getTime();
+    };
+
+    var duration = function() {
+      return new Date().getTime() - _startTime;
+    };
+
+    var onPingSuccess = function( ) {
+      setPingStatus( "server-up", sprintf( "Last ping returned OK in %dms", duration() ) );
+    };
+
+    var onPingFail = function( jqXHR, msg, errorThrown ) {
+      setPingStatus( "server-down", sprintf( "Last ping returned '%s' in %dms", errorThrown || msg, duration() ) );
+    };
+
+    var setPingStatus = function( lampClass, statusText ) {
+      $( "a#server-status-light span").removeClass()
+                                      .addClass( lampClass )
+                                      .attr( "title", statusText );
+    };
+
+    /** Return a cache-defeating ping URL */
+    var ping_url = function() {
+      return PING_URL + "?_=" + Math.random();
+    };
+
+    var start = function( period ) {
+      ping( period || DEFAULT_PING_TIME );
+    };
+
+    var ping = function( period ) {
+      onBeforeSend();
+      $.get( ping_url() ).done( onPingSuccess )
+                         .fail( onPingFail );
+      setTimeout( function() {ping( period );}, period );
+    };
+
+    return {
+      start: start
+    }
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/services/validation-service.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/services/validation-service.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/services/validation-service.js
new file mode 100644
index 0000000..1a5d919
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/services/validation-service.js
@@ -0,0 +1,98 @@
+define( ['underscore', 'jquery', 'fui',
+         'lib/codemirror', 'mode/javascript/javascript', 'mode/sparql/sparql'],
+  function( _, $, fui, CodeMirror ) {
+
+    var ValidationService = function( editor_el, output_el ) {
+      this.editor_el = editor_el;
+      this.output_el = output_el;
+    };
+
+    _.extend( ValidationService.prototype, {
+      init: function() {
+        _.bindAll( this, "handleValidationOutput", "handleJsonValidationOutput" );
+        this.editorElement();
+      },
+
+      /** Return the DOM node representing the query editor */
+      editorElement: function() {
+        if (!this._editor) {
+          this._editor = new CodeMirror( $(this.editor_el).get(0), {
+            lineNumbers: true,
+            mode: "text"
+          } );
+        }
+        return this._editor;
+      },
+
+      /** Return the DOM node representing the output editor */
+      outputElement: function( mode, lineNumbers, data ) {
+        $(this.output_el).empty();
+
+        var cm = new CodeMirror( $(this.output_el).get(0), {
+          lineNumbers: lineNumbers,
+          mode: mode || "text",
+          readOnly: true,
+          value: data
+        } );
+
+        return cm;
+      },
+
+      /** Return the current code editor contents */
+      editorContent: function() {
+        return this.editorElement().getValue();
+      },
+
+      /** Perform the given action to validate the current content */
+      performValidation: function( optionsModel ) {
+        var context = {optionsModel: optionsModel};
+        var self = this;
+
+        var content = {};
+        content[optionsModel.payloadParam()] = this.editorContent();
+
+        var options = {
+            data: _.extend( optionsModel.toJSON(), content ),
+            type: "POST"
+        };
+
+        $.ajax( optionsModel.validationURL(), options )
+         .done( function( data, status, xhr ) {
+           self.handleValidationOutput( data, status, xhr, context );
+         } );
+      },
+
+      /** Respond to validation output from the server */
+      handleValidationOutput: function( data, status, xhr, context ) {
+        var ct = xhr.getResponseHeader("content-type") || "";
+        if (ct.match( /json/ )) {
+          this.handleJsonValidationOutput( data, context );
+        }
+        else {
+          // in HTML output, we look for a .error div
+          var errors = $(data).find( "div.error" ).text();
+          this.outputElement( "text", true, errors || "No warnings or errors reported." );
+        }
+      },
+
+      handleJsonValidationOutput: function( json, context ) {
+        var outputFormat = context.optionsModel.outputFormat();
+        console.log( "output format = " + outputFormat );
+        var jsonString = null;
+
+        if (outputFormat && json[outputFormat]) {
+          jsonString = json[outputFormat];
+        }
+        else {
+          jsonString = JSON.stringify( json, null, '  ' );
+        }
+
+        this.outputElement( "application/json", false, jsonString );
+      }
+
+    } );
+
+
+    return ValidationService;
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-edit.tpl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-edit.tpl b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-edit.tpl
new file mode 100644
index 0000000..8202831
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-edit.tpl
@@ -0,0 +1,58 @@
+<div class="row">
+  <div class="col-md-4">
+    <div class="bordered-box">
+      <span class="pull-right">
+        <button class="btn btn-sm btn-info action list-graphs">list current graphs</button>
+      </span>
+      <h3>Available graphs</h3>
+
+      <% if (countPerformed()) { %>
+        <ul class="nav nav-pills nav-stacked graphs">
+          <% _.each( counts(), function( n, g ) { %>
+            <li class="">
+              <a href="#" class="select-dataset" data-graph-name="<%= g %>" data-graph-size="<%= n %>">
+                <%= g %> (<%= n %> triples)
+              </a>
+            </li>
+          <% } ); %>
+        </ul>
+      <% } else { %>
+        <p class="text-muted text-sm">Click to list current graphs</p>
+      <% } %>
+    </div> <!-- /.bordered-box -->
+  </div> <!-- /.col-md-4 -->
+
+  <div class="col-md-8">
+    <div class="row">
+      <div class="col-md-12">
+        <div class="form-group">
+          <div class="input-group">
+            <div class="input-group-addon">graph:</div>
+            <input class="form-control graph-name" type="text" placeholder="">
+          </div>
+        </div>
+      </div>
+    </div> <!-- /.row -->
+
+    <div class="row">
+      <div class="col-md-12">
+        <div id="graph-editor" class="bordered-box"></div>
+      </div>
+    </div> <!-- /.row -->
+
+    <div class="row">
+      <div class="col-md-12">
+        <p class="feedback"></p>
+      </div>
+    </div> <!-- /.row -->
+
+    <div class="row">
+      <div class="col-md-12">
+        <span class="pull-right">
+          <button class="btn btn-default action cancel-edit"><i class="fa fa-times"></i> discard changes</button>
+          <button class="btn btn-info action save-edit"><i class="fa fa-check"></i> save</button>
+        </span>
+      </div>
+    </div> <!-- /.row -->
+  </div> <!-- /.col-md-8 -->
+</div>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-info.tpl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-info.tpl b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-info.tpl
new file mode 100644
index 0000000..c2c6891
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-info.tpl
@@ -0,0 +1,40 @@
+<h2>Available services</h2>
+
+<dl class="dl-horizontal">
+  <% _.each( servicesDescription(), function( serviceDescription ) { %>
+    <dt>
+      <%= serviceDescription.label %>:
+    </dt>
+    <dd>
+      <a href="<%= serviceDescription.url %>"><%= serviceDescription.url %></a>
+    </dd>
+  <% } ); %>
+</dl>
+
+<h2>Statistics</h2>
+<div id="statistics"></div>
+
+<h2>Dataset size</h2>
+<p>
+<strong>Note</strong> this may be slow and impose a significant load on large datasets:
+<button href="#" class="action count-graphs btn btn-primary">count triples in all graphs</button>
+</p>
+<% if (countPerformed()) { %>
+<dl class="dl-horizontal">
+  <dt><span class="heading">graph name:</span></dt><dd><span class="heading">triples:</span></dd>
+  <% _.each( counts(), function( n, g ) { %>
+    <dt class="font-weight-normal">
+      <%= g %>
+    </dt>
+    <dd>
+      <div class="numeric"><%= n %></div>
+    </dd>
+  <% } ); %>
+</dl>
+
+<% } %>
+
+<h2>Ongoing operations</h2>
+
+<p><em>TBD. Will list any long-lasting operations that are ongoing or recently completed,
+e.g. backups.</em></p>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-management.tpl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-management.tpl b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-management.tpl
new file mode 100644
index 0000000..5a2181a
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-management.tpl
@@ -0,0 +1,53 @@
+<% if (datasets.length === 0) { %>
+  <p>No datasets have been created yet.
+    <a class="btn btn-sm btn-primary" href="?tab=new-dataset">add one</a>
+  </p>
+<% } else { %>
+  <div class="row">
+    <div class="col-md-12">
+      <table class='table'>
+        <tr class="headings"><th>Name</th><th>Active?</th><th></th></tr>
+        <% _.each( datasets, function( ds ) { %>
+          <tr>
+            <td>
+              <%= ds.name() %>
+            </td>
+            <td><input type='checkbox' class='checkbox' checked /></td>
+            <td>
+              <div>
+                <a class="btn btn-sm action remove btn-primary" data-ds-id='<%= ds.name() %>'><i class='fa fa-times-circle'></i> remove</a>
+                <a class="btn btn-sm action backup btn-primary" data-ds-id='<%= ds.name() %>'><i class='fa fa-download'></i> backup</a>
+                <a class="btn btn-sm action add-data btn-primary" href="dataset.html?tab=upload&ds=<%= ds.name() %>"><i class='fa fa-upload'></i> upload data</a>
+              </div>
+              <div class="action feedback"></a>
+            </td>
+          </tr>
+        <% }) %>
+
+      </table>
+    </div>
+  </div>
+<% } %>
+
+<!-- Modal dialogs -->
+
+<div class="modal fade" id="actionConfirmModal" tabindex="-1" role="dialog" aria-labelledby="actionConfirmModalLabel" aria-hidden="true">
+  <div class="modal-dialog">
+    <div class="modal-content">
+      <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h4 class="modal-title" id="actionConfirmModalLabel">Confirm action</h4>
+      </div>
+      <div class="modal-body">
+        <p></p>
+      </div>
+      <div class="modal-footer">
+        <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-icon-remove"></i> Cancel</button>
+        <button type="button" class="btn btn-primary action confirm">
+          <i class="fa fa-icon-confirm"></i>
+          Confirm <span class="action-label">action</span>
+        </button>
+      </div>
+    </div><!-- /.modal-content -->
+  </div><!-- /.modal-dialog -->
+</div><!-- /.modal -->

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-selection-list.tpl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-selection-list.tpl b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-selection-list.tpl
new file mode 100644
index 0000000..7eda02d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-selection-list.tpl
@@ -0,0 +1,22 @@
+<div class="col-md-span-12">
+  <% if (datasets.length > 0) { %>
+    <table class='table ijd'>
+      <tr class="headings"><th>dataset name</th><th>actions</th></tr>
+      <% _.each( datasets, function( ds ) { %>
+        <tr>
+          <td>
+            <%= ds.name() %>
+          </td>
+          <td>
+            <a class="btn btn-sm action remove btn-primary" href="dataset.html?tab=query&ds=<%= ds.name() %>"><i class='fa fa-question-circle'></i> query</a>
+            <a class="btn btn-sm action remove btn-primary" href="dataset.html?tab=upload&ds=<%= ds.name() %>"><i class='fa fa-upload'></i> add data</a>
+            <a class="btn btn-sm action configure btn-primary" href="dataset.html?tab=info&ds=<%= ds.name() %>"><i class='fa fa-dashboard'></i> info</a>
+          </td>
+        </tr>
+      <% }) %>
+
+    </table>
+   <% } else { %>
+    <p>There are no datasets on this server yet. <a href="manage.html?tab=new-dataset">Add one.</a></p>
+   <% } %>
+</div>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-selector.tpl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-selector.tpl b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-selector.tpl
new file mode 100644
index 0000000..d684995
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-selector.tpl
@@ -0,0 +1,15 @@
+<div class='dataset-selector'>
+  <% if (datasets.length == 0) { %>
+  <% } else { %>
+    <label class="">
+      <div class="select-picker-label">Dataset:</div>
+      <select class='selectpicker show-tick'>
+        <% _.each( datasets, function( ds ) { %>
+          <option <%= (ds.name() === selectedDatasetName) ? "selected" : "" %>>
+            <%= ds.name() %>
+          </option>
+        <% } ); %>
+      </select>
+    </label>
+  <% } %>
+</div>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-simple-create.tpl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-simple-create.tpl b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-simple-create.tpl
new file mode 100644
index 0000000..2611908
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-simple-create.tpl
@@ -0,0 +1,79 @@
+<div class="row">
+  <div class="col-md-12">
+      <div class="" id="simple-edit">
+        <form class="form-horizontal" role="form">
+          <div class="form-group">
+            <label for="datasetName" class="col-sm-2 control-label">Dataset name</label>
+            <div class="col-sm-10">
+              <div class="validation-warning dbNameValidation">A name for the dataset is required</div>
+              <input type="text" class="form-control" name="dbName" placeholder="dataset name" />
+            </div>
+          </div>
+          <div class="form-group">
+            <label class="col-sm-2 control-label">Dataset type</label>
+            <div class="col-sm-10">
+              <div class="radio">
+                <label>
+                  <input type="radio" name="dbType" value="mem" checked>
+                  In-memory &ndash; dataset will be recreated when Fuseki restarts, but contents will be lost
+                </label>
+              </div>
+              <div class="radio">
+                <label>
+                  <input type="radio" name="dbType" value="tdb">
+                  Persistent &ndash; dataset will persist across Fuseki restarts
+                </label>
+              </div>
+            </div>
+          </div>
+
+          <div class="row">
+            <div class="col-md-12">
+              <div class="errorOutput bg-warning"></div>
+            </div>
+          </div>
+
+          <div class="row controls">
+            <div class="col-md-3 col-md-offset-9">
+              <a href="#" class="btn btn-sm btn-primary action commit simple"><i class="fa fa-check"></i> create dataset</a>
+            </div>
+          </div>
+        </form>
+      </div>
+
+      <!--
+      <div class="tab-pane" id="upload">
+        <p>&nbsp;</p>
+        <div class="row">
+          <p class="col-sm-12">If you have a Fuseki config file (i.e. a Jena assembler description),
+          you can upload it here:</p>
+        </div>
+        <div class="row controls">
+          <form id="uploadForm" method="post" action="$/datasets" class="form-horizontal col-sm-12">
+            <div class="form-group">
+              <label for="assemblerFile" class="col-sm-2 control-label">Configuration file</label>
+              <div class="col-sm-10">
+                <div class="validation-warning assemblerFileValidation">A file name is required</div>
+                <input type="file" class="form-control" name="assemblerFile" />
+              </div>
+            </div>
+          </form>
+        </div>
+
+        <div class="row">
+          <div class="errorOutput col-sm-12"></div>
+        </div>
+
+        <div class="row">
+          <div class="col-sm-12">
+            <a href="admin-data-management.html" class="btn btn-sm btn-default"><i class="fa fa-mail-reply"></i> cancel</a>
+            <a href="#" class="btn btn-sm btn-primary action upload"><i class="fa fa-upload"></i> upload config file</a>
+          </div>
+        </div>
+      </div>
+      -->
+
+  </div><!-- /.col-md-12 -->
+</div><!-- /.row -->
+
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-stats.tpl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-stats.tpl b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-stats.tpl
new file mode 100644
index 0000000..fc3d7d9
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/dataset-stats.tpl
@@ -0,0 +1,14 @@
+<table class="table">
+  <tr>
+    <% _.each( headings, function( h ) { %>
+      <th class="text-right"><%= h %></th>
+    <% } ); %>
+  </tr>
+  <% _.each( rows, function( row ) { %>
+    <tr>
+      <% _.each( row, function( cell ) { %>
+        <td class="text-right"><%= cell %></td>
+      <% } ); %>
+    </tr>
+  <% } ) %>
+</table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/file-upload.tpl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/file-upload.tpl b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/file-upload.tpl
new file mode 100644
index 0000000..03d7dcc
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/file-upload.tpl
@@ -0,0 +1,46 @@
+<div class="col-md-12 ful">
+  <h2>Upload files</h2>
+  <p class="text-muted">Load data into the default graph of the currently selected dataset,
+    or the given named graph.
+    You may upload any RDF format, such as Turtle, RDF/XML or TRiG.
+  </p>
+
+  <div class="row">
+      <div class="form-group2 graph-label">
+        <label for="uploadGraphName" class="col-sm-3 control-label">Destination graph name</label>
+        <span class="col-sm-9">
+          <p>
+            <input type="text" name="graph" id="graphName" placeholder="Leave blank for default graph" class="form-control">
+          </p>
+        </span>
+      </div> <!-- /.form-group -->
+  </div>
+
+  <div class="row">
+      <form id="fileuploadForm" class="form-horizontal" role="form" method="POST" enctype="multipart/form-data">
+        <div class="form-group2">
+          <label class="col-sm-3 control-label">Files to upload</label>
+          <div class="col-sm-9">
+            <span>
+              <span class="btn btn-success fileinput-button">
+                  <i class="fa fa-plus"></i>
+                  <span>select files...</span>
+                  <input id="fileupload" type="file" name="files[]" multiple>
+              </span>
+              <button type="submit" class="btn btn-primary start action-upload-all" disabled>
+                  <i class="fa fa-upload"></i>
+                  <span>upload all</span>
+              </button>
+            </span>
+          </div>
+        </div> <!-- /.form-group -->
+
+        <div class="form-group2">
+          <div class="col-sm-9 col-sm-offset-3">
+            <ul class="list-unstyled">
+            </ul>
+          </div>
+        </div> <!-- /.form-group -->
+      </form>
+  </div>
+ </div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/uploadable-file.tpl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/uploadable-file.tpl b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/uploadable-file.tpl
new file mode 100644
index 0000000..83b8449
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/templates/uploadable-file.tpl
@@ -0,0 +1,23 @@
+<div class="row file-description">
+  <div class="col-sm-3">
+    <%= file.name %>
+  </div>
+  <div class="col-sm-3">
+    <em>
+      <%= file.readableFileSize %>
+    </em>
+  </div>
+  <div class="col-sm-6">
+    <button class="btn btn-sm btn-default action action-upload-file"><i class="fa fa-upload"></i> upload now</button>
+    <button class="btn btn-sm btn-default action action-remove-upload"><i class="fa fa-minus-circle"></i> remove</button>
+  </div>
+  <div class="col-sm-12">
+    <div class="result"></div>
+  </div>
+  <div class="col-sm-12">
+    <div class="progress">
+      <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
+    </div>
+  </div>
+
+</div>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/util/page-utils.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/util/page-utils.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/util/page-utils.js
new file mode 100644
index 0000000..45b4ffc
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/util/page-utils.js
@@ -0,0 +1,33 @@
+/** Utilities for managing HTML pages */
+
+define(
+  function( require ) {
+    "use strict";
+
+    var _ = require( "underscore" );
+
+    /** Return true if a given query parameter is defined, otherwise null */
+    var hasQueryParam = function( param ) {
+      return !!queryParam( param );
+    };
+
+    /** Return the value of a query parameter, or null */
+    var queryParam = function( param ) {
+      var p = param && queryParams()[param];
+      return p ? p : null;
+    };
+
+    /** Return the current query params as a map */
+    var queryParams = function() {
+      return _.chain( document.location.search.slice(1).split('&') )
+              .invoke('split', '=')
+              .object()
+              .value();
+    };
+
+    return {
+      hasQueryParam: hasQueryParam,
+      queryParam: queryParam
+    };
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/.svnkeep
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/.svnkeep b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/.svnkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-edit.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-edit.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-edit.js
new file mode 100644
index 0000000..017e097
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-edit.js
@@ -0,0 +1,205 @@
+/** Component for showing detailed information about a dataset */
+
+define(
+  function( require ) {
+    var Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        DatasetEditTpl = require( "plugins/text!app/templates/dataset-edit.tpl" ),
+        CodeMirror = require( "lib/codemirror" ),
+        CodeMirrorTurtle = require( "mode/turtle/turtle" );
+
+    var MAX_EDITABLE_SIZE = 10000;
+
+    var DatasetEdit = Backbone.Marionette.ItemView.extend( {
+
+      initialize: function() {
+        _.bindAll( this, "onCountGraphs", "onModelChanged", "onSelectDataset",
+                         "onShownTab", "onShownEditTab", "onGraphContent",
+                         "onSaveEdit", "onCancelEdit" );
+
+        this.model.on( "change", this.onModelChanged );
+        this._editor = null;
+
+        fui.vent.on( "shown.bs.tab", this.onShownTab );
+      },
+
+      template: _.template( DatasetEditTpl ),
+
+      ui: {
+        listGraphs: ".action.list-graphs",
+        editor: "#graph-editor",
+        graphName: "input.graph-name",
+        saveButton: "button.save-edit",
+        cancelButton: "button.cancel-edit"
+      },
+
+      el: "#edit .with-dataset",
+
+      events: {
+        "click .list-graphs": "onCountGraphs",
+        "click .select-dataset": "onSelectDataset",
+        "click .save-edit": "onSaveEdit",
+        "click .cancel-edit": "onCancelEdit"
+      },
+
+      templateHelpers: {
+      },
+
+      serializeData: function() {
+        return this.model;
+      },
+
+      /** Alias for the model */
+      dataset: function() {
+        return this.model;
+      },
+
+      // event handlers
+
+      onModelChanged: function() {
+        if (!this.model.counting) {
+          this.render();
+        }
+      },
+
+      onCountGraphs: function( e ) {
+        e.preventDefault();
+        this.model.count();
+      },
+
+      /** Event that triggers when any tab is shown */
+      onShownTab: function( tab ) {
+        if (tab.attr("href") === "#edit") {
+          this.onShownEditTab();
+        }
+      },
+
+      /** When the tab is show, ensure the editor element is initialised */
+      onShownEditTab: function() {
+        this.showEditor();
+      },
+
+      /** When rendering, only show the code mirror editor if the tab is visible */
+      onRender: function() {
+        this.showEditor();
+      },
+
+      /** Ensure the code mirror element is visible */
+      showEditor: function() {
+        if (this.editorElementVisible() && this.editorNotYetInitialised()) {
+          this._editor = null;
+          this.editorElement();
+        }
+      },
+
+      /** Return true if the editor container element is visible */
+      editorElementVisible: function()  {
+        return this.ui.editor.is( ":visible" );
+      },
+
+      /** Return true if the CodeMirror element has not yet been initialised */
+      editorNotYetInitialised: function() {
+        return this.ui.editor.is( ":not(:has(.CodeMirror))" );
+      },
+
+      /** User has (attempted to) select a dataset */
+      onSelectDataset: function( e ) {
+        e.preventDefault();
+        var self = this;
+        var elem = $(e.currentTarget);
+        var graphName = elem.data( "graph-name" );
+        var graphSize = parseInt( elem.data( "graph-size" ));
+
+        if (graphSize > MAX_EDITABLE_SIZE) {
+          alert( "Sorry, that dataset is too large to load into the editor" );
+        }
+        else {
+          if (this.dirtyCheck()) {
+            $(".nav.graphs").find( ".active" ).removeClass( "active" );
+            elem.parent().addClass( "active" );
+
+            var gn = this.setGraphName( graphName );
+            this.dataset()
+                .fetchGraph( gn )
+                .done( self.onGraphContent );
+          }
+        }
+      },
+
+      /** Return true if the edit buffer is not dirty, or if the user says OK */
+      dirtyCheck: function() {
+        return true; // TODO
+      },
+
+      /** Return the DOM node representing the query editor */
+      editorElement: function() {
+        if (!this._editor) {
+          this._editor = new CodeMirror( this.ui.editor.get(0), {
+            lineNumbers: true,
+            mode: "turtle"
+          } );
+        }
+        return this._editor;
+      },
+
+      /** Set the graph name, return the actual name used */
+      setGraphName: function( name ) {
+        var text = (name === "default" || name === "default graph") ? "default" : name;
+
+        this.ui.graphName.val( text );
+
+        return text;
+      },
+
+      /** Get the graph name */
+      graphName: function() {
+        return this.ui.graphName.val();
+      },
+
+      /** Server has sent the content of the graph encoded as turtle */
+      onGraphContent: function( data ) {
+        this.editorElement().setValue( data );
+      },
+
+      /** User wants to save changes */
+      onSaveEdit: function( e ) {
+        e.preventDefault();
+        var self = this;
+
+        var turtle = this.editorElement().getValue();
+        this.dataset()
+            .putGraph( turtle, this.graphName() )
+            .done( function( data ) {
+              var nq = parseInt( data.quadCount );
+              var nt = parseInt( data.tripleCount );
+              var typ = (nq > nt) ? "quad" : "triple";
+              var s = (nq + nt) === 1 ? "" : "s";
+              var msg = sprintf( "Added %d %s%s", nq + nt, typ, s );
+
+              self.showFeedback( msg, "" );
+            } )
+            .error( function( jqhxr, msg, err ) {
+              self.showFeedback( err || msg, "text-warning" );
+            } );
+      },
+
+      /** User wants to discard changes */
+      onCancelEdit: function( e ) {
+        e.preventDefault();
+        this.ui.graphName.val( "" );
+        this.editorElement().setValue( "" );
+      },
+
+      /** Show feedback from operations */
+      showFeedback: function( msg, cls ) {
+        $(".feedback").html( sprintf( "<span class='%s'>%s</span>", cls, msg ) );
+      }
+
+
+    });
+
+
+    return DatasetEdit;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-info.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-info.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-info.js
new file mode 100644
index 0000000..665725f
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-info.js
@@ -0,0 +1,76 @@
+/** Component for showing detailed information about a dataset */
+
+define(
+  function( require ) {
+    var Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        DatasetInfoTpl = require( "plugins/text!app/templates/dataset-info.tpl" ),
+        DatasetStatsView = require( "app/views/dataset-stats" ),
+        DatasetStatsModel = require( "app/models/dataset-stats" );
+
+    var DatasetInfo = Backbone.Marionette.ItemView.extend( {
+
+      initialize: function() {
+        _.bindAll( this, "onModelChanged", "onCountGraphs" );
+
+        this.showStatistics( true );
+        this.model.on( "change", this.onModelChanged );
+      },
+
+      template: _.template( DatasetInfoTpl ),
+
+      ui: {
+        stats: "#statistics",
+        count: ".count-graphs"
+      },
+
+      el: "#info .with-dataset",
+
+      events: {
+        "click .count-graphs": "onCountGraphs"
+      },
+
+      templateHelpers: {
+      },
+
+      serializeData: function() {
+        return this.model;
+      },
+
+      /** Alias for the model */
+      dataset: function() {
+        return this.model;
+      },
+
+      // event handlers
+
+      onModelChanged: function() {
+        if (!this.model.counting) {
+          this.render();
+          this.showStatistics( false );
+        }
+      },
+
+      onCountGraphs: function( e ) {
+        e.preventDefault();
+        this.model.count();
+      },
+
+      showStatistics: function( keep ) {
+        var self = this;
+
+        this.model
+            .statistics( keep )
+            .done( function( data ) {
+                     var statsModel = new DatasetStatsModel( self.dataset(), data );
+                     new DatasetStatsView( {model: statsModel} ).render();
+                   } );
+      }
+
+    });
+
+
+    return DatasetInfo;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-management.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-management.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-management.js
new file mode 100644
index 0000000..b4405dd
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-management.js
@@ -0,0 +1,163 @@
+define(
+  function( require ) {
+    var Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        datasetManagementViewTpl = require( "plugins/text!app/templates/dataset-management.tpl" );
+
+    var DataManagementView = Backbone.Marionette.ItemView.extend( {
+
+      initialize: function(){
+        _.bindAll( this, "onRemoveDataset", "onConfirmAction",
+                         "onDatasetRemoveSuccess", "onDatasetRemoveFail",
+                         "onTaskStatus", "onTaskFailed" );
+
+        this.listenTo( this.model, "change", this.onModelChange, this );
+
+        fui.vent.on( "action.delete.confirm", this.onConfirmRemoveDataset, this );
+        fui.vent.on( "action.backup.confirm", this.onConfirmBackupDataset, this );
+
+        fui.vent.on( "task.status", this.onTaskStatus, this );
+        fui.vent.on( "task.failed", this.onTaskFailed, this );
+      },
+
+      template: _.template( datasetManagementViewTpl ),
+
+      ui: {
+        actionConfirmModal: "#actionConfirmModal"
+      },
+
+      el: "#dataset-management",
+
+      events: {
+        "click .action.remove": "onRemoveDataset",
+        "click .action.confirm": "onConfirmAction",
+        "click .action.backup": "onBackupDataset"
+      },
+
+      templateHelpers: {
+      },
+
+
+      /** If the model changes, update the summary */
+      onModelChange: function( event ) {
+        this.render();
+      },
+
+      /** User has requested a dataset be removed */
+      onRemoveDataset: function( e ) {
+        e.preventDefault();
+        var elem = $(e.currentTarget);
+        var dsId = elem.data( "ds-id" );
+        var msg = sprintf( "Are you sure you want to delete dataset <code>%s</code>? This action cannot be reversed.", dsId );
+
+        this.showConfirmationModal( msg, dsId, "action.delete.confirm" );
+      },
+
+      /** User has requested a dataset be backed up */
+      onBackupDataset: function( e ) {
+        e.preventDefault();
+        var elem = $(e.currentTarget);
+        var dsId = elem.data( "ds-id" );
+        var msg = sprintf( "Are you sure you want to create a backup of dataset <code>%s</code>? This action may take some time to complete", dsId );
+
+        this.showConfirmationModal( msg, dsId, "action.backup.confirm" );
+      },
+
+      /** Show a generic modal confirmation */
+      showConfirmationModal: function( msg, dsId, eventId ) {
+        this.ui.actionConfirmModal
+               .find( ".modal-body p" )
+               .html( msg );
+
+        this.ui.actionConfirmModal
+               .find( ".action.confirm" )
+               .data( "ds-id", dsId )
+               .data( "event-id", eventId );
+
+        this.clearFeedback();
+        this.ui.actionConfirmModal.modal( 'show' );
+      },
+
+      /** Generic response to confirming the current modal dialogue */
+      onConfirmAction: function( e ) {
+        e.preventDefault();
+        var elem = $(e.currentTarget);
+        var dsId = elem.data( "ds-id" );
+        var eventId = elem.data( "event-id" );
+
+        this.ui.actionConfirmModal.modal( 'hide' );
+        _.delay( function() {
+          fui.vent.trigger( eventId, dsId );
+        }, 100 );
+      },
+
+      /** User has confirmed that the dataset can be deleted */
+      onConfirmRemoveDataset: function( dsId ) {
+        var self = this;
+
+        fui.models
+           .fusekiServer
+           .dataset( dsId )
+           .deleteDataset()
+           .done( function( data ) {self.onDatasetRemoveSuccess( data, dsId );} )
+           .error( function( jqxhr, msg, err ) {self.onDatasetRemoveFail( jqxhr, msg, err, dsId );} );
+      },
+
+      /** Callback after successfully removing a dataset */
+      onDatasetRemoveSuccess: function( data, dsId ) {
+        this.model.loadServerDescription();
+      },
+
+      /** Removing the dataset did not work: notify the user */
+      onDatasetRemoveFail: function( jqxhr, msg, err, dsId ) {
+        this.feedbackArea( dsId )
+            .html( sprintf( "<p class='text-warning'>Sorry, removing dataset %s did not work, because: '%s'</p>", dsId, err || msg ) );
+      },
+
+      /** User has confirmed backing up the dataset */
+      onConfirmBackupDataset: function( dsId ) {
+        var self = this;
+
+        fui.models
+           .fusekiServer
+           .dataset( dsId )
+           .backupDataset();
+      },
+
+      /** Remove any current feedback content */
+      clearFeedback: function() {
+        $(".action.feedback").empty();
+      },
+
+      /** Long running task has updated status */
+      onTaskStatus: function( status ) {
+        var task = status.task;
+        var msg = sprintf( "<p>Task <strong>%s</strong> started at %s%s</p>",
+                           task.operationType,
+                           task.taskDescription.started,
+                           status.finished ? sprintf( ", finished at %s", status.finished ) : " &ndash; ongoing" );
+
+        this.feedbackArea( status.dsId )
+            .html( msg );
+      },
+
+      /** Long running task has failed to start */
+      onTaskFailed: function( status ) {
+        this.feedbackArea( status.dsId )
+            .html( sprintf( "<p class='text-danger'>Task %s failed: '%s'</p>", task.operationType, task.errorMessage ));
+      },
+
+      /** Find the feedback area for a particular dataset */
+      feedbackArea: function( dsId ) {
+        return $(sprintf( ".action[data-ds-id='%s']", dsId ) )
+               .parent()
+               .siblings(".action.feedback");
+      }
+
+    });
+
+
+    return DataManagementView;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-selection-list.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-selection-list.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-selection-list.js
new file mode 100644
index 0000000..ccad19d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-selection-list.js
@@ -0,0 +1,58 @@
+/**
+ * This view presents a list of the available datasets for the user to interact
+ * with.
+ */
+
+define(
+  function( require ) {
+    var Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        datasetSelectionListTemplate = require( "plugins/text!app/templates/dataset-selection-list.tpl" );
+
+    var DatasetSelectionListView = Backbone.Marionette.ItemView.extend( {
+      initialize: function(){
+//        _.bindAll(this, "onFilter", "onModelChange");
+        this.listenTo( this.model, "change", this.onModelChange, this );
+      },
+
+      template: _.template( datasetSelectionListTemplate ),
+
+      el: "#dataset-selection-list",
+
+      ui: {
+      },
+
+      events: {
+//        "change #independent-variable-selection": "selectVariable",
+//        "click a.action.filter": "onFilter"
+      },
+
+      templateHelpers: {
+      },
+
+//      /** Update the model when the user changes the selection */
+//      selectVariable: function( event ) {
+//        this.model.set( "independentVarSelection", this.ui.variableSelection.val() );
+//      },
+//
+//      /** User wants to open the filter dialog */
+//      onFilter: function( event ) {
+//        var varModel = bgViz.models.variablesConfig.independentVar();
+//        var rangeType = varModel.component.range().rangeType();
+//        var viewName = rangeType.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
+//
+//        bgViz.layouts.filterDialog.showFilter( viewName, varModel );
+//      },
+
+      /** If the model changes, update the summary */
+      onModelChange: function( event ) {
+//        this.ui.summary.html( this.model.independentVar().component.range().summarise() );
+      }
+
+    });
+
+
+    return DatasetSelectionListView;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-selector.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-selector.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-selector.js
new file mode 100644
index 0000000..f14a747
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-selector.js
@@ -0,0 +1,84 @@
+/**
+ * Reusable component that encapsulates selecting a dataset to work on in a given page.
+ * Takes the FusekiServer as a model, and populates a select control to choose one of the
+ * current datasets. If the dataset changes, this view will update the `selectedDatasetName`
+ * on the model, and trigger the event `dataset.changed`.
+ **/
+
+define(
+  function( require ) {
+    "use strict";
+
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        sprintf = require( "sprintf" ),
+        datasetSelectorTemplate = require( "plugins/text!app/templates/dataset-selector.tpl" );
+
+    var DatasetSelectorView = Backbone.Marionette.ItemView.extend( {
+
+      initialize: function(){
+        this.listenTo( this.model, "change", this.render, this );
+      },
+
+      template: _.template( datasetSelectorTemplate ),
+
+      el: ".dataset-selector-container",
+
+      ui: {
+        select: ".dataset-selector select"
+      },
+
+      events: {
+        "change .dataset-selector select": "onChangeDataset"
+      },
+
+      /**
+       * After rendering, set up the dataset picker and notify the rest of the
+       * app if the default dataset name is known.
+       */
+      onRender: function() {
+        var selector = $('.selectpicker');
+        selector.selectpicker('refresh');
+
+        if (selector.val()) {
+          this.unHideDatasetElements();
+          this.onChangeDataset();
+        }
+      },
+
+      /**
+       * Respond to a change in the dataset name selection by updating
+       * the underlying model. TODO: should also update the application
+       * URL.
+       */
+      onChangeDataset: function( e ) {
+        var newDatasetName = this.ui.select.val();
+        this.model.set( "selectedDatasetName", newDatasetName );
+        this.notifyDatasetName( newDatasetName );
+      },
+
+      /**
+       * Ensure that elements that should be visible when a dataset is known
+       * are not hidden, and vice-versa.
+       */
+      unHideDatasetElements: function() {
+        $(".no-dataset").addClass( "hidden" );
+        $(".with-dataset").removeClass( "hidden" );
+      },
+
+      /** Trigger an event to notify other components that the dataset
+       * name has been selected.
+       */
+      notifyDatasetName: function( dsName ) {
+        fui.vent.trigger( "dataset.changed", dsName || this.ui.select.val() );
+      }
+
+
+    });
+
+
+    return DatasetSelectorView;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-simple-create.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-simple-create.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-simple-create.js
new file mode 100644
index 0000000..dd189c1
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-simple-create.js
@@ -0,0 +1,100 @@
+/** Component for creating a new dataset with a few simple options */
+
+define(
+  function( require ) {
+    var Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        DatasetSimpleCreateTpl = require( "plugins/text!app/templates/dataset-simple-create.tpl" );
+
+    var DatasetSimpleCreate = Backbone.Marionette.ItemView.extend( {
+
+      initialize: function() {
+        _.bindAll( this, "onCommitSimple", "clearWarnings" );
+      },
+
+      template: _.template( DatasetSimpleCreateTpl ),
+
+      ui: {
+      },
+
+      el: "#dataset-simple-create",
+
+      events: {
+        "click a.action.commit.simple": "onCommitSimple",
+        "submit form": "onCommitSimple",
+        "keydown input[name=dbName]": "clearWarnings"
+      },
+
+      templateHelpers: {
+      },
+
+      serializeData: function() {
+        return this.model;
+      },
+
+      // event handlers
+
+      onCommitSimple: function( e ) {
+        e.preventDefault();
+
+        if (this.validateSimpleForm()) {
+          var options = $("#simple-edit form").serializeArray();
+          fui.models.fusekiServer.updateOrCreateDataset( null, options )
+                                 .done( this.showDataManagementPage )
+                                 .fail( this.showFailureMessage );
+        }
+      },
+
+//      onCommitUpload: function( e ) {
+//        e.preventDefault();
+//
+//        if (this.validateUploadForm()) {
+//          $("#uploadForm").ajaxSubmit( {
+//                            success: this.showDataManagementPage,
+//                            error: this.showFailureMessage
+//                           });
+//        }
+//      },
+//
+      showDataManagementPage: function( e ) {
+        location = "?tab=datasets";
+      },
+
+      /** Todo: need to do a better job of responding to errors */
+      showFailureMessage: function( jqXHR, textStatus, errorThrown ) {
+        $(".errorOutput").html( sprintf( "<p class='has-error'>Sorry, that didn't work because:</p><pre>%s</pre>", errorThrown || textStatus ) );
+      },
+
+      /** Clear current warning states */
+      clearWarnings: function() {
+        this.clearValidation();
+        $(".errorOutput").empty();
+      },
+
+      // validation
+
+      validateSimpleForm: function() {
+        this.clearValidation();
+
+        if (! $("input[name=dbName]").val()) {
+          $(".dbNameValidation").removeClass("hidden")
+                                .parents(".form-group" )
+                                .addClass( "has-error" );
+          return false;
+        }
+
+        return true;
+      },
+
+      clearValidation: function() {
+        $(".has-error").removeClass( "has-error" );
+        $(".has-warning").removeClass( "has-warning" );
+      }
+
+    });
+
+
+    return DatasetSimpleCreate;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-stats.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-stats.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-stats.js
new file mode 100644
index 0000000..f2dc198
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/dataset-stats.js
@@ -0,0 +1,41 @@
+define(
+  function( require ) {
+    var Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        datasetStatsViewTpl = require( "plugins/text!app/templates/dataset-stats.tpl" );
+
+    var DatasetStatsView = Backbone.Marionette.ItemView.extend( {
+      initialize: function() {
+        _.bindAll( this, "onShowTab" );
+
+        fui.vent.on( "shown.bs.tab", this.onShowTab );
+      },
+
+      template: _.template( datasetStatsViewTpl ),
+
+      ui: {
+      },
+
+      el: "#statistics",
+
+      modelEvents: {
+        'change': "modelChanged"
+      },
+
+      modelChanged: function() {
+          this.render();
+      },
+
+      onShowTab: function( tab ) {
+        if (tab.attr("href") === "#info") {
+          this.model.refresh();
+        }
+      }
+
+    });
+
+
+    return DatasetStatsView;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/datasets-dropdown-list.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/datasets-dropdown-list.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/datasets-dropdown-list.js
new file mode 100644
index 0000000..92b2bf4
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/datasets-dropdown-list.js
@@ -0,0 +1,43 @@
+define(
+  function( require ) {
+    var Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" );
+
+    var DatasetDropDownListView = Backbone.Marionette.ItemView.extend( {
+      initialize: function(){
+      },
+
+      template:"",
+
+      el: "ul.dropdown-menu.dataset-list",
+
+      ui: {
+      },
+
+      events: {
+      },
+
+      render: function() {
+        var e = $(this.el).empty();
+        _.each( this.model, function( ds ) {
+          e.append( sprintf( "<li><a class='action select-dataset'href='?ds=%s'>%s</a></li>", ds.name(), ds.name() ));
+        } );
+      },
+
+      /** Change the currently selected dataset name. If required, notify other units via an event */
+      setCurrentDatasetName: function( dsName, notify ) {
+        if (dsName) {
+          $(".current-dataset").text( dsName );
+        }
+
+        if (notify) {
+          fui.vent.trigger( "views.datasets-dropdown-list.dataset-changed", dsName )
+        }
+      }
+    });
+
+
+    return DatasetDropDownListView;
+  }
+);


[35/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.svg
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.svg b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.svg
new file mode 100755
index 0000000..a9f8469
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.svg
@@ -0,0 +1,504 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="fontawesomeregular" horiz-adv-x="1536" >
+<font-face units-per-em="1792" ascent="1536" descent="-256" />
+<missing-glyph horiz-adv-x="448" />
+<glyph unicode=" "  horiz-adv-x="448" />
+<glyph unicode="&#x09;" horiz-adv-x="448" />
+<glyph unicode="&#xa0;" horiz-adv-x="448" />
+<glyph unicode="&#xa8;" horiz-adv-x="1792" />
+<glyph unicode="&#xa9;" horiz-adv-x="1792" />
+<glyph unicode="&#xae;" horiz-adv-x="1792" />
+<glyph unicode="&#xb4;" horiz-adv-x="1792" />
+<glyph unicode="&#xc6;" horiz-adv-x="1792" />
+<glyph unicode="&#xd8;" horiz-adv-x="1792" />
+<glyph unicode="&#x2000;" horiz-adv-x="768" />
+<glyph unicode="&#x2001;" horiz-adv-x="1537" />
+<glyph unicode="&#x2002;" horiz-adv-x="768" />
+<glyph unicode="&#x2003;" horiz-adv-x="1537" />
+<glyph unicode="&#x2004;" horiz-adv-x="512" />
+<glyph unicode="&#x2005;" horiz-adv-x="384" />
+<glyph unicode="&#x2006;" horiz-adv-x="256" />
+<glyph unicode="&#x2007;" horiz-adv-x="256" />
+<glyph unicode="&#x2008;" horiz-adv-x="192" />
+<glyph unicode="&#x2009;" horiz-adv-x="307" />
+<glyph unicode="&#x200a;" horiz-adv-x="85" />
+<glyph unicode="&#x202f;" horiz-adv-x="307" />
+<glyph unicode="&#x205f;" horiz-adv-x="384" />
+<glyph unicode="&#x2122;" horiz-adv-x="1792" />
+<glyph unicode="&#x221e;" horiz-adv-x="1792" />
+<glyph unicode="&#x2260;" horiz-adv-x="1792" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#xf000;" horiz-adv-x="1792" d="M93 1350q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78z" />
+<glyph unicode="&#xf001;" d="M0 -64q0 50 34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5 q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89z" />
+<glyph unicode="&#xf002;" horiz-adv-x="1664" d="M0 704q0 143 55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5z M256 704q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5z" />
+<glyph unicode="&#xf003;" horiz-adv-x="1792" d="M0 32v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113zM128 32q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5 t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768zM128 1120q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317 q54 43 100.5 115.5t46.5 131.5v11v13.5t-0.5 13t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5z" />
+<glyph unicode="&#xf004;" horiz-adv-x="1792" d="M0 940q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138z " />
+<glyph unicode="&#xf005;" horiz-adv-x="1664" d="M0 889q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48z" />
+<glyph unicode="&#xf006;" horiz-adv-x="1664" d="M0 889q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354 q-25 27 -25 48zM221 829l306 -297l-73 -421l378 199l377 -199l-72 421l306 297l-422 62l-189 382l-189 -382z" />
+<glyph unicode="&#xf007;" horiz-adv-x="1408" d="M0 131q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5q0 -120 -73 -189.5t-194 -69.5 h-874q-121 0 -194 69.5t-73 189.5zM320 1024q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5z" />
+<glyph unicode="&#xf008;" horiz-adv-x="1920" d="M0 -96v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113zM128 64v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45zM128 320q0 -26 19 -45t45 -19h128 q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128zM128 704q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128zM128 1088q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19 h-128q-26 0 -45 -19t-19 -45v-128zM512 -64q0 -26 19 -45t45 -19h768q26 0 45 19t19 45v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512zM512 704q0 -26 19 -45t45 -19h768q26 0 45 19t19 45v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512zM1536 64 v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45zM1536 320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19
  -45v-128zM1536 704q0 -26 19 -45t45 -19h128q26 0 45 19t19 45 v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128zM1536 1088q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128z" />
+<glyph unicode="&#xf009;" horiz-adv-x="1664" d="M0 128v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90zM0 896v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90zM896 128v384q0 52 38 90t90 38h512q52 0 90 -38 t38 -90v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90zM896 896v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90z" />
+<glyph unicode="&#xf00a;" horiz-adv-x="1792" d="M0 96v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM0 608v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM0 1120v192q0 40 28 68t68 28h320q40 0 68 -28 t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM640 96v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM640 608v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68zM640 1120v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM1280 96v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM1280 608v192 q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM1280 1120v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68z" />
+<glyph unicode="&#xf00b;" horiz-adv-x="1792" d="M0 96v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM0 608v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM0 1120v192q0 40 28 68t68 28h320q40 0 68 -28 t28 -68v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68zM640 96v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68zM640 608v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68zM640 1120v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68z" />
+<glyph unicode="&#xf00c;" horiz-adv-x="1792" d="M121 608q0 40 28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68t-28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68z" />
+<glyph unicode="&#xf00d;" horiz-adv-x="1408" d="M110 214q0 40 28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68t-28 -68l-294 -294l294 -294q28 -28 28 -68t-28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294 q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68z" />
+<glyph unicode="&#xf00e;" horiz-adv-x="1664" d="M0 704q0 143 55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90t-37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5z M256 704q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5zM384 672v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224q13 0 22.5 -9.5t9.5 -22.5v-64 q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5z" />
+<glyph unicode="&#xf010;" horiz-adv-x="1664" d="M0 704q0 143 55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90t-37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5z M256 704q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5zM384 672v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5z" />
+<glyph unicode="&#xf011;" d="M0 640q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181 q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298zM640 768v640q0 52 38 90t90 38t90 -38t38 -90v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90z" />
+<glyph unicode="&#xf012;" horiz-adv-x="1792" d="M0 -96v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23zM384 -96v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23zM768 -96v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576 q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23zM1152 -96v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23zM1536 -96v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23z" />
+<glyph unicode="&#xf013;" d="M0 531v222q0 12 8 23t19 13l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10 q129 -119 165 -170q7 -8 7 -22q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108 q-44 -23 -91 -38q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5z M512 640q0 -106 75 -181t181 -75t181 75t75 181t-75 181t-181 75t-181 -75t-75 -181z" />
+<glyph unicode="&#xf014;" horiz-adv-x="1408" d="M0 1056v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23zM256 76q0 -22 7 -40.5 t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5v948h-896v-948zM384 224v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM640 224v576q0 14 9 23t23 9h64 q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23zM896 224v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23z" />
+<glyph unicode="&#xf015;" horiz-adv-x="1664" d="M26 636.5q1 13.5 11 21.5l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5zM256 64 v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf016;" d="M0 -160v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48l312 -312q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68zM128 -128h1280v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536zM1024 1024h376q-10 29 -22 41l-313 313q-12 12 -41 22 v-376z" />
+<glyph unicode="&#xf017;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM512 544v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23z" />
+<glyph unicode="&#xf018;" horiz-adv-x="1920" d="M50 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256 q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73zM809 540q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4z" />
+<glyph unicode="&#xf019;" horiz-adv-x="1664" d="M0 96v320q0 40 28 68t68 28h465l135 -136q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68zM325 985q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39q17 -41 -14 -70 l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70zM1152 192q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45zM1408 192q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
+<glyph unicode="&#xf01a;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM418 620q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35z" />
+<glyph unicode="&#xf01b;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM416 672q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23z" />
+<glyph unicode="&#xf01c;" d="M0 64v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552q25 -61 25 -123v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45zM197 576h316l95 -192h320l95 192h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8 t-2.5 -8z" />
+<glyph unicode="&#xf01d;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM512 320v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55t-32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56z" />
+<glyph unicode="&#xf01e;" d="M0 640q0 156 61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5 t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298z" />
+<glyph unicode="&#xf021;" d="M0 0v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129 q-19 -19 -45 -19t-45 19t-19 45zM18 800v7q65 268 270 434.5t480 166.5q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179 q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5z" />
+<glyph unicode="&#xf022;" horiz-adv-x="1792" d="M0 160v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113zM128 160q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832z M256 288v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5zM256 544v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5z M256 800v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5zM512 288v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5z M512 544v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5zM512 800v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5v-64q0 -
 13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5z " />
+<glyph unicode="&#xf023;" horiz-adv-x="1152" d="M0 96v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68zM320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192z" />
+<glyph unicode="&#xf024;" horiz-adv-x="1792" d="M64 1280q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110zM320 320v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19 q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf025;" horiz-adv-x="1664" d="M0 650q0 151 67 291t179 242.5t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32 q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32 q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314z" />
+<glyph unicode="&#xf026;" horiz-adv-x="768" d="M0 448v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf027;" horiz-adv-x="1152" d="M0 448v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45zM908 464q0 21 12 35.5t29 25t34 23t29 35.5t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5 q15 0 25 -5q70 -27 112.5 -93t42.5 -142t-42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5z" />
+<glyph unicode="&#xf028;" horiz-adv-x="1664" d="M0 448v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45zM908 464q0 21 12 35.5t29 25t34 23t29 35.5t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5 q15 0 25 -5q70 -27 112.5 -93t42.5 -142t-42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5zM1008 228q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5 q140 -59 225 -188.5t85 -282.5t-85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45zM1109 -7q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19 q13 0 26 -5q211 -91 338 -283.5t127 -422.5t-127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf029;" horiz-adv-x="1408" d="M0 0v640h640v-640h-640zM0 768v640h640v-640h-640zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM256 256v128h128v-128h-128zM256 1024v128h128v-128h-128zM768 0v640h384v-128h128v128h128v-384h-384v128h-128v-384h-128zM768 768v640h640v-640h-640z M896 896h384v384h-384v-384zM1024 0v128h128v-128h-128zM1024 1024v128h128v-128h-128zM1280 0v128h128v-128h-128z" />
+<glyph unicode="&#xf02a;" horiz-adv-x="1792" d="M0 0v1408h63v-1408h-63zM94 1v1407h32v-1407h-32zM189 1v1407h31v-1407h-31zM346 1v1407h31v-1407h-31zM472 1v1407h62v-1407h-62zM629 1v1407h31v-1407h-31zM692 1v1407h31v-1407h-31zM755 1v1407h31v-1407h-31zM880 1v1407h63v-1407h-63zM1037 1v1407h63v-1407h-63z M1163 1v1407h63v-1407h-63zM1289 1v1407h63v-1407h-63zM1383 1v1407h63v-1407h-63zM1541 1v1407h94v-1407h-94zM1666 1v1407h32v-1407h-32zM1729 0v1408h63v-1408h-63z" />
+<glyph unicode="&#xf02b;" d="M0 864v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117zM192 1088q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5z" />
+<glyph unicode="&#xf02c;" horiz-adv-x="1920" d="M0 864v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117zM192 1088q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5zM704 1408h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5z" />
+<glyph unicode="&#xf02d;" horiz-adv-x="1664" d="M10 184q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23 t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57 q38 -15 59 -43q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5zM575 1056 q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
+<glyph unicode="&#xf02e;" horiz-adv-x="1280" d="M0 7v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62z" />
+<glyph unicode="&#xf02f;" horiz-adv-x="1664" d="M0 160v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v160h-224 q-13 0 -22.5 9.5t-9.5 22.5zM384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1408 576q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
+<glyph unicode="&#xf030;" horiz-adv-x="1920" d="M0 128v896q0 106 75 181t181 75h224l51 136q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181zM512 576q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5 t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5zM672 576q0 119 84.5 203.5t203.5 84.5t203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5z" />
+<glyph unicode="&#xf031;" horiz-adv-x="1664" d="M0 -128l2 79q23 7 56 12.5t57 10.5t49.5 14.5t44.5 29t31 50.5l237 616l280 724h75h53q8 -14 11 -21l205 -480q33 -78 106 -257.5t114 -274.5q15 -34 58 -144.5t72 -168.5q20 -45 35 -57q19 -15 88 -29.5t84 -20.5q6 -38 6 -57q0 -4 -0.5 -13t-0.5 -13q-63 0 -190 8 t-191 8q-76 0 -215 -7t-178 -8q0 43 4 78l131 28q1 0 12.5 2.5t15.5 3.5t14.5 4.5t15 6.5t11 8t9 11t2.5 14q0 16 -31 96.5t-72 177.5t-42 100l-450 2q-26 -58 -76.5 -195.5t-50.5 -162.5q0 -22 14 -37.5t43.5 -24.5t48.5 -13.5t57 -8.5t41 -4q1 -19 1 -58q0 -9 -2 -27 q-58 0 -174.5 10t-174.5 10q-8 0 -26.5 -4t-21.5 -4q-80 -14 -188 -14zM555 527q33 0 136.5 -2t160.5 -2q19 0 57 2q-87 253 -184 452z" />
+<glyph unicode="&#xf032;" horiz-adv-x="1408" d="M0 -128l2 94q15 4 85 16t106 27q7 12 12.5 27t8.5 33.5t5.5 32.5t3 37.5t0.5 34v35.5v30q0 982 -22 1025q-4 8 -22 14.5t-44.5 11t-49.5 7t-48.5 4.5t-30.5 3l-4 83q98 2 340 11.5t373 9.5q23 0 68.5 -0.5t67.5 -0.5q70 0 136.5 -13t128.5 -42t108 -71t74 -104.5 t28 -137.5q0 -52 -16.5 -95.5t-39 -72t-64.5 -57.5t-73 -45t-84 -40q154 -35 256.5 -134t102.5 -248q0 -100 -35 -179.5t-93.5 -130.5t-138 -85.5t-163.5 -48.5t-176 -14q-44 0 -132 3t-132 3q-106 0 -307 -11t-231 -12zM533 1292q0 -50 4 -151t4 -152q0 -27 -0.5 -80 t-0.5 -79q0 -46 1 -69q42 -7 109 -7q82 0 143 13t110 44.5t74.5 89.5t25.5 142q0 70 -29 122.5t-79 82t-108 43.5t-124 14q-50 0 -130 -13zM538.5 165q0.5 -37 4.5 -83.5t12 -66.5q74 -32 140 -32q376 0 376 335q0 114 -41 180q-27 44 -61.5 74t-67.5 46.5t-80.5 25 t-84 10.5t-94.5 2q-73 0 -101 -10q0 -53 -0.5 -159t-0.5 -158q0 -8 -1 -67.5t-0.5 -96.5z" />
+<glyph unicode="&#xf033;" horiz-adv-x="1024" d="M0 -126l17 85q6 2 81.5 21.5t111.5 37.5q28 35 41 101q1 7 62 289t114 543.5t52 296.5v25q-24 13 -54.5 18.5t-69.5 8t-58 5.5l19 103q33 -2 120 -6.5t149.5 -7t120.5 -2.5q48 0 98.5 2.5t121 7t98.5 6.5q-5 -39 -19 -89q-30 -10 -101.5 -28.5t-108.5 -33.5 q-8 -19 -14 -42.5t-9 -40t-7.5 -45.5t-6.5 -42q-27 -148 -87.5 -419.5t-77.5 -355.5q-2 -9 -13 -58t-20 -90t-16 -83.5t-6 -57.5l1 -18q17 -4 185 -31q-3 -44 -16 -99q-11 0 -32.5 -1.5t-32.5 -1.5q-29 0 -87 10t-86 10q-138 2 -206 2q-51 0 -143 -9t-121 -11z" />
+<glyph unicode="&#xf034;" horiz-adv-x="1792" d="M0 1023v383l81 1l54 -27q12 -5 211 -5q44 0 132 2t132 2q36 0 107.5 -0.5t107.5 -0.5h293q6 0 21 -0.5t20.5 0t16 3t17.5 9t15 17.5l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 48t-14.5 73.5t-7.5 35.5 q-6 8 -12 12.5t-15.5 6t-13 2.5t-18 0.5t-16.5 -0.5q-17 0 -66.5 0.5t-74.5 0.5t-64 -2t-71 -6q-9 -81 -8 -136q0 -94 2 -388t2 -455q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9 t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27q19 42 19 383q0 101 -3 303t-3 303v117q0 2 0.5 15.5t0.5 25t-1 25.5t-3 24t-5 14q-11 12 -162 12q-33 0 -93 -12t-80 -26q-19 -13 -34 -72.5t-31.5 -111t-42.5 -53.5q-42 26 -56 44zM1414 109.5q9 18.5 42 18.5h80v1024 h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80q33 0 42 -18.5t-11 -44.5l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5z" />
+<glyph unicode="&#xf035;" d="M0 1023v383l81 1l54 -27q12 -5 211 -5q44 0 132 2t132 2q70 0 246.5 1t304.5 0.5t247 -4.5q33 -1 56 31l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 47.5t-15 73.5t-7 36q-10 13 -27 19q-5 2 -66 2q-30 0 -93 1 t-103 1t-94 -2t-96 -7q-9 -81 -8 -136l1 -152v52q0 -55 1 -154t1.5 -180t0.5 -153q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29 t78 27q7 16 11.5 74t6 145.5t1.5 155t-0.5 153.5t-0.5 89q0 7 -2.5 21.5t-2.5 22.5q0 7 0.5 44t1 73t0 76.5t-3 67.5t-6.5 32q-11 12 -162 12q-41 0 -163 -13.5t-138 -24.5q-19 -12 -34 -71.5t-31.5 -111.5t-42.5 -54q-42 26 -56 44zM5 -64q0 28 26 49q4 3 36 30t59.5 49 t57.5 41.5t42 19.5q13 0 20.5 -10.5t10 -28.5t2.5 -33.5t-1.5 -33t-1.5 -19.5h1024q0 2 -1.5 19.5t-1.5 33t2.5 33.5t10 28.5t20.5 10.5q12 0 42 -19.5t57.5 -41.5t59.5 -49t36 -30q26 -21 26 -49t-26 -49q-4 -3 -36 -30t-59.5 -49t-5
 7.5 -41.5t-42 -19.5q-13 0 -20.5 10.5 t-10 28.5t-2.5 33.5t1.5 33t1.5 19.5h-1024q0 -2 1.5 -19.5t1.5 -33t-2.5 -33.5t-10 -28.5t-20.5 -10.5q-12 0 -42 19.5t-57.5 41.5t-59.5 49t-36 30q-26 21 -26 49z" />
+<glyph unicode="&#xf036;" horiz-adv-x="1792" d="M0 64v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM0 448v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45zM0 832v128q0 26 19 45t45 19h1536 q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1536q-26 0 -45 19t-19 45zM0 1216v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf037;" horiz-adv-x="1792" d="M0 64v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM128 832v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45zM384 448v128q0 26 19 45t45 19h896 q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45zM512 1216v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf038;" horiz-adv-x="1792" d="M0 64v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM128 832v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1536q-26 0 -45 19t-19 45zM384 448v128q0 26 19 45t45 19h1280 q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45zM512 1216v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf039;" horiz-adv-x="1792" d="M0 64v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM0 448v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM0 832v128q0 26 19 45t45 19h1664 q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45zM0 1216v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf03a;" horiz-adv-x="1792" d="M0 32v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5zM0 416v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5 t-9.5 22.5zM0 800v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5zM0 1184v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192 q-13 0 -22.5 9.5t-9.5 22.5zM384 32v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5zM384 416v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5 t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5zM384 800v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5zM384 1184v192q0 13 9.5 22.5t22.5 9.5h1344q13 0
  22.5 -9.5t9.5 -22.5v-192 q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5z" />
+<glyph unicode="&#xf03b;" horiz-adv-x="1792" d="M0 32v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5zM0 1184v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5 t-9.5 22.5zM32 704q0 14 9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23zM640 416v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088 q-13 0 -22.5 9.5t-9.5 22.5zM640 800v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5z" />
+<glyph unicode="&#xf03c;" horiz-adv-x="1792" d="M0 32v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5zM0 416v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23t-9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5z M0 1184v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5zM640 416v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5 t-9.5 22.5zM640 800v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5z" />
+<glyph unicode="&#xf03d;" horiz-adv-x="1792" d="M0 288v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5q39 -17 39 -59v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5 t-84.5 203.5z" />
+<glyph unicode="&#xf03e;" horiz-adv-x="1920" d="M0 32v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113zM128 32q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216z M256 128v192l320 320l160 -160l512 512l416 -416v-448h-1408zM256 960q0 80 56 136t136 56t136 -56t56 -136t-56 -136t-136 -56t-136 56t-56 136z" />
+<glyph unicode="&#xf040;" d="M0 -128v416l832 832l416 -416l-832 -832h-416zM128 128h128v-128h107l91 91l-235 235l-91 -91v-107zM298 384q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17zM896 1184l166 165q36 38 90 38q53 0 91 -38l235 -234 q37 -39 37 -91q0 -53 -37 -90l-166 -166z" />
+<glyph unicode="&#xf041;" horiz-adv-x="1024" d="M0 896q0 212 150 362t362 150t362 -150t150 -362q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179zM256 896q0 -106 75 -181t181 -75t181 75t75 181t-75 181t-181 75t-181 -75t-75 -181z" />
+<glyph unicode="&#xf042;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73v1088q-148 0 -273 -73t-198 -198t-73 -273z" />
+<glyph unicode="&#xf043;" horiz-adv-x="1024" d="M0 512q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275q0 -212 -150 -362t-362 -150t-362 150t-150 362zM256 384q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5 t37.5 90.5q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69z" />
+<glyph unicode="&#xf044;" horiz-adv-x="1792" d="M0 288v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29v-190 q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5zM640 256v288l672 672l288 -288l-672 -672h-288zM736 448h96v-96h56l116 116l-152 152l-116 -116v-56zM944 688q16 -16 33 1l350 350q17 17 1 33t-33 -1l-350 -350q-17 -17 -1 -33zM1376 1280l92 92 q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68l-92 -92z" />
+<glyph unicode="&#xf045;" horiz-adv-x="1664" d="M0 288v832q0 119 84.5 203.5t203.5 84.5h255q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29v-259 q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5zM256 704q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45l-384 -384 q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5t-38.5 114t-17.5 122z" />
+<glyph unicode="&#xf046;" horiz-adv-x="1664" d="M0 288v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3 q20 -8 20 -29v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5zM257 768q0 33 24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110q24 -24 24 -57t-24 -57l-814 -814q-24 -24 -57 -24t-57 24l-430 430 q-24 24 -24 57z" />
+<glyph unicode="&#xf047;" horiz-adv-x="1792" d="M0 640q0 26 19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45t-19 -45l-256 -256 q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45z" />
+<glyph unicode="&#xf048;" horiz-adv-x="1024" d="M0 -64v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf049;" horiz-adv-x="1792" d="M0 -64v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710q19 19 32 13t13 -32v-710q4 11 13 19l710 710q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45 t-45 -19h-128q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf04a;" horiz-adv-x="1664" d="M122 640q0 26 19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19l710 710q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45z" />
+<glyph unicode="&#xf04b;" horiz-adv-x="1408" d="M0 -96v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31l-1328 -738q-23 -13 -39.5 -3t-16.5 36z" />
+<glyph unicode="&#xf04c;" d="M0 -64v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45zM896 -64v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf04d;" d="M0 -64v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf04e;" horiz-adv-x="1664" d="M0 -96v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19l-710 -710q-19 -19 -32 -13t-13 32z" />
+<glyph unicode="&#xf050;" horiz-adv-x="1792" d="M0 -96v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710q-19 -19 -32 -13t-13 32v710 q-5 -10 -13 -19l-710 -710q-19 -19 -32 -13t-13 32z" />
+<glyph unicode="&#xf051;" horiz-adv-x="1024" d="M0 -96v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710q-19 -19 -32 -13t-13 32z" />
+<glyph unicode="&#xf052;" horiz-adv-x="1538" d="M1 64v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45zM1 525q-6 13 13 32l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13z" />
+<glyph unicode="&#xf053;" horiz-adv-x="1280" d="M154 704q0 26 19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45z" />
+<glyph unicode="&#xf054;" horiz-adv-x="1280" d="M90 128q0 26 19 45l531 531l-531 531q-19 19 -19 45t19 45l166 166q19 19 45 19t45 -19l742 -742q19 -19 19 -45t-19 -45l-742 -742q-19 -19 -45 -19t-45 19l-166 166q-19 19 -19 45z" />
+<glyph unicode="&#xf055;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM320 576q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19 t19 45v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128z" />
+<glyph unicode="&#xf056;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM320 576q0 -26 19 -45t45 -19h768q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19 t-19 -45v-128z" />
+<glyph unicode="&#xf057;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM387 414q0 -27 19 -46l90 -90q19 -19 46 -19q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19 l90 90q19 19 19 46q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45z" />
+<glyph unicode="&#xf058;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM252 621q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45q0 28 -18 46l-91 90 q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46z" />
+<glyph unicode="&#xf059;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM417 939q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26 t37.5 -59q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213zM640 160q0 -14 9 -23t23 -9 h192q14 0 23 9t9 23v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192z" />
+<glyph unicode="&#xf05a;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM512 160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320 q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160zM640 1056q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160z" />
+<glyph unicode="&#xf05b;" d="M0 576v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143 q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45zM339 512q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5h-109q-26 0 -45 19 t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109z" />
+<glyph unicode="&#xf05c;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM429 480q0 13 10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23l-137 -137l137 -137q10 -10 10 -23t-10 -23l-146 -146q-10 -10 -23 -10t-23 10l-137 137 l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23z" />
+<glyph unicode="&#xf05d;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM224 640q0 -148 73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73 t-198 -198t-73 -273zM346 640q0 26 19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45z" />
+<glyph unicode="&#xf05e;" d="M0 643q0 157 61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5t-61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61t-245 164t-163.5 246t-61 300zM224 643q0 -162 89 -299l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199 t-73 -274zM471 185q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5q0 161 -87 295z" />
+<glyph unicode="&#xf060;" d="M64 576q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5t32.5 -90.5v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90 z" />
+<glyph unicode="&#xf061;" d="M0 512v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5z" />
+<glyph unicode="&#xf062;" horiz-adv-x="1664" d="M53 565q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651q37 -39 37 -91q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75 q-38 38 -38 90z" />
+<glyph unicode="&#xf063;" horiz-adv-x="1664" d="M53 704q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90z" />
+<glyph unicode="&#xf064;" horiz-adv-x="1792" d="M0 416q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45t-19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123 q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22t-13.5 30t-10.5 24q-127 285 -127 451z" />
+<glyph unicode="&#xf065;" d="M0 -64v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23t-10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45zM781 800q0 13 10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448 q26 0 45 -19t19 -45v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23z" />
+<glyph unicode="&#xf066;" d="M13 32q0 13 10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23zM768 704v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10 t23 -10l114 -114q10 -10 10 -23t-10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf067;" horiz-adv-x="1408" d="M0 608v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68z" />
+<glyph unicode="&#xf068;" horiz-adv-x="1408" d="M0 608v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68z" />
+<glyph unicode="&#xf069;" horiz-adv-x="1664" d="M122.5 408.5q13.5 51.5 59.5 77.5l266 154l-266 154q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5 l-266 -154l266 -154q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5z" />
+<glyph unicode="&#xf06a;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM624 1126l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5l18 621q0 12 -10 18 q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18zM640 161q0 -13 10 -23t23 -10h192q13 0 22 9.5t9 23.5v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190z" />
+<glyph unicode="&#xf06b;" d="M0 544v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23v-320q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68 t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23zM376 1120q0 -40 28 -68t68 -28h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68zM608 180q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5v56v468v192h-320v-192v-468v-56zM870 1024h194q40 0 68 28 t28 68t-28 68t-68 28q-43 0 -69 -31z" />
+<glyph unicode="&#xf06c;" horiz-adv-x="1792" d="M0 121q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96 q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5zM384 448q0 -26 19 -45t45 -19q24 0 45 19 q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45t-19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45z" />
+<glyph unicode="&#xf06d;" horiz-adv-x="1408" d="M0 -160q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64zM256 640q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100 t113.5 -122.5t72.5 -150.5t27.5 -184q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184z" />
+<glyph unicode="&#xf06e;" horiz-adv-x="1792" d="M0 576q0 34 20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69t-20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69zM128 576q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5q-152 236 -381 353 q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353zM592 704q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34t-14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5z" />
+<glyph unicode="&#xf070;" horiz-adv-x="1792" d="M0 576q0 38 20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5q16 -10 16 -27q0 -7 -1 -9q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87 q-143 65 -263.5 173t-208.5 245q-20 31 -20 69zM128 576q167 -258 427 -375l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353zM592 704q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34t-14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5zM896 0l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69t-20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95zM1056 286l280 502q8 -45 8 -84q0 -139 -79 -253.5t-209 -164.5z" />
+<glyph unicode="&#xf071;" horiz-adv-x="1792" d="M16 61l768 1408q17 31 47 49t65 18t65 -18t47 -49l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126zM752 992l17 -457q0 -10 10 -16.5t24 -6.5h185q14 0 23.5 6.5t10.5 16.5l18 459q0 12 -10 19q-13 11 -24 11h-220 q-11 0 -24 -11q-10 -7 -10 -21zM768 161q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190z" />
+<glyph unicode="&#xf072;" horiz-adv-x="1408" d="M0 477q-1 13 9 25l96 97q9 9 23 9q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16 l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23z" />
+<glyph unicode="&#xf073;" horiz-adv-x="1664" d="M0 -128v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90zM128 -128h288v288h-288v-288zM128 224 h288v320h-288v-320zM128 608h288v288h-288v-288zM384 1088q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288zM480 -128h320v288h-320v-288zM480 224h320v320h-320v-320zM480 608h320v288h-320 v-288zM864 -128h320v288h-320v-288zM864 224h320v320h-320v-320zM864 608h320v288h-320v-288zM1152 1088q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288zM1248 -128h288v288h-288v-288z M1248 224h288v320h-288v-320zM1248 608h288v288h-288v-288z" />
+<glyph unicode="&#xf074;" horiz-adv-x="1792" d="M0 160v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23t-9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192 h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23zM0 1056v192q0 14 9 23t23 9h224q250 0 410 -225q-60 -92 -137 -273q-22 45 -37 72.5 t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23zM743 353q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23t-9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192 q-32 0 -85 -0.5t-81 -1t-73 1t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5z" />
+<glyph unicode="&#xf075;" horiz-adv-x="1792" d="M0 640q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5t-120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5 t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281z" />
+<glyph unicode="&#xf076;" d="M0 576v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5 t-98.5 362zM0 960v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45zM1024 960v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf077;" horiz-adv-x="1792" d="M90 250.5q0 26.5 19 45.5l742 741q19 19 45 19t45 -19l742 -741q19 -19 19 -45.5t-19 -45.5l-166 -165q-19 -19 -45 -19t-45 19l-531 531l-531 -531q-19 -19 -45 -19t-45 19l-166 165q-19 19 -19 45.5z" />
+<glyph unicode="&#xf078;" horiz-adv-x="1792" d="M90 773.5q0 26.5 19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5z" />
+<glyph unicode="&#xf079;" horiz-adv-x="1920" d="M0 704q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45z M640 1120q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20z " />
+<glyph unicode="&#xf07a;" horiz-adv-x="1664" d="M0 1216q0 26 19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024 q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45zM384 0q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5zM1280 0q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5t-37.5 -90.5 t-90.5 -37.5t-90.5 37.5t-37.5 90.5z" />
+<glyph unicode="&#xf07b;" horiz-adv-x="1664" d="M0 224v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158z" />
+<glyph unicode="&#xf07c;" horiz-adv-x="1920" d="M0 224v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5t-0.5 12.5zM73 56q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43 q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43z" />
+<glyph unicode="&#xf07d;" horiz-adv-x="768" d="M64 64q0 26 19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45z" />
+<glyph unicode="&#xf07e;" horiz-adv-x="1792" d="M0 640q0 26 19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45z" />
+<glyph unicode="&#xf080;" horiz-adv-x="1920" d="M0 32v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113zM128 32q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216z M256 128v384h256v-384h-256zM640 128v896h256v-896h-256zM1024 128v640h256v-640h-256zM1408 128v1024h256v-1024h-256z" />
+<glyph unicode="&#xf081;" d="M0 160v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5zM256 286q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109 q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4q21 -63 74.5 -104 t121.5 -42q-116 -90 -261 -90q-26 0 -50 3z" />
+<glyph unicode="&#xf082;" d="M0 160v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-192v608h203l30 224h-233v143q0 54 28 83t96 29l132 1v207q-96 9 -180 9q-136 0 -218 -80.5t-82 -225.5v-166h-224v-224h224v-608h-544 q-119 0 -203.5 84.5t-84.5 203.5z" />
+<glyph unicode="&#xf083;" horiz-adv-x="1792" d="M0 0v1280q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5zM128 0h1536v128h-1536v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM256 1216h384v128h-384v-128zM512 574 q0 -159 112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5zM640 574q0 106 75 181t181 75t181 -75t75 -181t-75 -181t-181 -75t-181 75t-75 181zM736 576q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9 t9 23t-9 23t-23 9q-66 0 -113 -47t-47 -113z" />
+<glyph unicode="&#xf084;" horiz-adv-x="1792" d="M0 752q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41q0 -17 -49 -66t-66 -49 q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5zM192 768q0 -80 56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56 t56 136t-56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136z" />
+<glyph unicode="&#xf085;" horiz-adv-x="1920" d="M0 549v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8 q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90 q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5zM384 640q0 -106 75 -181t181 -75 t181 75t75 181t-75 181t-181 75t-181 -75t-75 -181zM1152 58v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 
 -25 -51 -138q17 -23 30 -52q149 -15 149 -31 v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31zM1152 1082v140q0 16 149 31q13 29 30 52 q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71 q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31zM1408 128q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5q0 52 -38 90t-90 38t-90 -38t-38 -90zM1408 1152q0 -53 37.5 -90.5 t90.5 -37.5t90.5 37.5t37.5 90.5q0 52 -38 90t-90 38t-90 -38t-38 -90z" />
+<glyph unicode="&#xf086;" horiz-adv-x="1792" d="M0 768q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257t-94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25 t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224zM616 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5 t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132z" />
+<glyph unicode="&#xf087;" d="M0 128v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5zM128 192q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45zM384 128h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5 t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85 t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640z" />
+<glyph unicode="&#xf088;" d="M0 512v640q0 53 37.5 90.5t90.5 37.5h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186 q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5zM128 1088q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45zM384 512h32q16 0 35.5 -9 t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5 t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640z" />
+<glyph unicode="&#xf089;" horiz-adv-x="896" d="M0 889q0 37 56 46l502 73l225 455q19 41 49 41v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48z" />
+<glyph unicode="&#xf08a;" horiz-adv-x="1792" d="M0 940q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138z M128 940q0 -168 187 -355l581 -560l580 559q188 188 188 356q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5 t-21.5 -143z" />
+<glyph unicode="&#xf08b;" horiz-adv-x="1664" d="M0 288v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5q0 -4 1 -20t0.5 -26.5t-3 -23.5 t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5zM384 448v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45t-19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45z" />
+<glyph unicode="&#xf08c;" d="M0 160v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5zM223 1030q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86z M237 122h231v694h-231v-694zM595 122h231v388q0 38 7 56q15 35 45 59.5t74 24.5q116 0 116 -157v-371h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694z" />
+<glyph unicode="&#xf08d;" horiz-adv-x="1152" d="M0 320q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19 t-19 45zM416 672q0 -14 9 -23t23 -9t23 9t9 23v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448z" />
+<glyph unicode="&#xf08e;" horiz-adv-x="1792" d="M0 288v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832 q-119 0 -203.5 84.5t-84.5 203.5zM685 576q0 13 10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23z" />
+<glyph unicode="&#xf090;" d="M0 448v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45t-19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45zM894.5 78.5q0.5 10.5 3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113 t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5q0 4 -1 20t-0.5 26.5z" />
+<glyph unicode="&#xf091;" horiz-adv-x="1664" d="M0 928v128q0 40 28 68t68 28h288v96q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91t97.5 -37q75 0 133.5 -45.5 t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143zM128 928q0 -78 94.5 -162t235.5 -113q-74 162 -74 371 h-256v-96zM1206 653q141 29 235.5 113t94.5 162v96h-256q0 -209 -74 -371z" />
+<glyph unicode="&#xf092;" d="M0 160v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-224q-16 0 -24.5 1t-19.5 5t-16 14.5t-5 27.5v239q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204 q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52 t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -103t0.5 -68q0 -22 -11 -33.5t-22 -13t-33 -1.5h-224q-119 0 -203.5 84.5t-84.5 203.5zM271 315q3 5 13 2 q10 -5 7 -12q-5 -7 -13 -2q-10 5 -7 12zM304 290q6 6 16 -3q9 -11 2 -16q-6 -7 -16 3q-9 11 -2 16zM335 233q-9 13 0 18q9 7 17 -6q9 -12 0 -19q-8 -6 -17 7zM370 206q8 9 20 -3q12 -11 4 -19q-8 -9 -20 3q-13 11 -4 19zM419 168q4 11 19 7q
 16 -5 13 -16q-4 -12 -19 -6 q-17 4 -13 15zM481 154q0 11 16 11q17 2 17 -11q0 -11 -16 -11q-17 -2 -17 11zM540 158q-2 12 14 15q16 2 18 -9q2 -10 -14 -14t-18 8z" />
+<glyph unicode="&#xf093;" horiz-adv-x="1664" d="M0 -32v320q0 40 28 68t68 28h427q21 -56 70.5 -92t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68zM325 936q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69q-17 -40 -59 -40 h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40zM1152 64q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45zM1408 64q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
+<glyph unicode="&#xf094;" d="M0 433q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5q0 -165 -70 -327.5 t-196 -288t-281 -180.5q-124 -44 -326 -44q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5zM128 434q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5 q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24 q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5z" />
+<glyph unicode="&#xf095;" horiz-adv-x="1408" d="M0 1069q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235 t235 -174q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5 t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5z" />
+<glyph unicode="&#xf096;" horiz-adv-x="1408" d="M0 288v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5zM128 288q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47 t-47 -113v-832z" />
+<glyph unicode="&#xf097;" horiz-adv-x="1280" d="M0 7v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62zM128 38l423 406l89 85l89 -85l423 -406 v1242h-1024v-1242z" />
+<glyph unicode="&#xf098;" d="M0 160v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5zM256 905q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5 q6 -2 30 -11t33 -12.5t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5 t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5z" />
+<glyph unicode="&#xf099;" horiz-adv-x="1664" d="M44 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5 q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145z" />
+<glyph unicode="&#xf09a;" horiz-adv-x="1024" d="M95 631v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255z" />
+<glyph unicode="&#xf09b;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -39.5 7t-12.5 30v211q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44 l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3 q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -89t0.5 -54q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5z" />
+<glyph unicode="&#xf09c;" horiz-adv-x="1664" d="M0 96v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68z" />
+<glyph unicode="&#xf09d;" horiz-adv-x="1920" d="M0 32v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113zM128 32q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v608h-1664v-608zM128 1024h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600 q-13 0 -22.5 -9.5t-9.5 -22.5v-224zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
+<glyph unicode="&#xf09e;" horiz-adv-x="1408" d="M0 192q0 80 56 136t136 56t136 -56t56 -136t-56 -136t-136 -56t-136 56t-56 136zM0 697v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5t259 -181.5q114 -113 181.5 -259t80.5 -306q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5 t-391.5 184.5q-25 2 -41.5 20t-16.5 43zM0 1201v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294q187 -186 294 -425.5t120 -501.5q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102 q-25 1 -42.5 19.5t-17.5 43.5z" />
+<glyph unicode="&#xf0a0;" d="M0 160v320q0 25 16 75l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113zM128 160q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5v320q0 13 -9.5 22.5t-22.5 9.5h-1216 q-13 0 -22.5 -9.5t-9.5 -22.5v-320zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM880 320q0 33 23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5t-23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5zM1136 320q0 33 23.5 56.5t56.5 23.5 t56.5 -23.5t23.5 -56.5t-23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5z" />
+<glyph unicode="&#xf0a1;" horiz-adv-x="1792" d="M0 672v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50 t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113zM768 633q377 -42 768 -341v954q-394 -302 -768 -343v-270z" />
+<glyph unicode="&#xf0a2;" horiz-adv-x="1664" d="M0 128q190 161 287 397.5t97 498.5q0 165 96 262t264 117q-8 18 -8 37q0 40 28 68t68 28t68 -28t28 -68q0 -19 -8 -37q168 -20 264 -117t96 -262q0 -262 97 -498.5t287 -397.5q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38 t-38 90zM183 128h1298q-164 181 -246.5 411.5t-82.5 484.5q0 256 -320 256t-320 -256q0 -254 -82.5 -484.5t-246.5 -411.5zM656 0q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16t-16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16z" />
+<glyph unicode="&#xf0a3;" d="M2 435q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70l-53 -186l188 -48 q40 -10 52 -51q10 -42 -20 -70l-138 -135l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53 q-41 -12 -70 19q-31 29 -19 70l53 186l-188 48q-40 10 -52 51z" />
+<glyph unicode="&#xf0a4;" horiz-adv-x="1792" d="M0 128v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179q0 -105 -75.5 -181 t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5zM128 192q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45zM384 128h32q72 0 167 -32 t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139 q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106q-69 -57 -140 -57h-32v-640z" />
+<glyph unicode="&#xf0a5;" horiz-adv-x="1792" d="M0 769q0 103 76 179t180 76h374q-22 60 -22 128q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5v-640 q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181zM128 768q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119 q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5 t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576q-50 0 -89 -38.5t-39 -89.5zM1536 192q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
+<glyph unicode="&#xf0a6;" d="M0 640q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5t-90.5 -37.5h-640 q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5zM128 640q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140 v-32h640v32q0 72 32 167t64 193.5t32 179.5q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576q-20 0 -48.5 15t-55 33t-68 33t-84.5 15 q-67 0 -97.5 -44.5t-30.5 -115.5zM1152 -64q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
+<glyph unicode="&#xf0a7;" d="M0 640q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317q0 -142 -77.5 -230t-217.5 -87 l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5zM128 640q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33t55 33t48.5 15v-576q0 -50 38.5 -89 t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112 q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5zM1152 1344q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45z" />
+<glyph unicode="&#xf0a8;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM251 640q0 -27 18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502 q26 0 45 19t19 45v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45z" />
+<glyph unicode="&#xf0a9;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM256 576q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18 l362 362l91 91q18 18 18 45t-18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128z" />
+<glyph unicode="&#xf0aa;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM252 641q0 -27 18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19 t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45t-18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45z" />
+<glyph unicode="&#xf0ab;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM252 639q0 -27 18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45t-18 45l-91 91 q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45z" />
+<glyph unicode="&#xf0ac;" d="M0 640q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM226 979q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18 q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13 q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5 t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.
 5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13 q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25 t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5 t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4 q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5q15 10 -7 16q-17 5 -43 -12q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.
 5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8 q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5 q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26 q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5 q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -
 4.5t-6 -4q-3 -4 0 -14t-2 -14 q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5 q-16 0 -22 -1q-146 -80 -235 -222zM877 26q0 -6 2 -16q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7 t-10 1.5t-11.5 -7q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5z" />
+<glyph unicode="&#xf0ad;" horiz-adv-x="1664" d="M21 0q0 53 38 91l681 681q39 -98 114.5 -173.5t173.5 -114.5l-682 -682q-37 -37 -90 -37q-52 0 -91 37l-106 108q-38 36 -38 90zM256 64q0 -26 19 -45t45 -19t45 19t19 45t-19 45t-45 19t-45 -19t-19 -45zM768 960q0 

<TRUNCATED>

[75/93] [abbrv] jena git commit: Name server and war files without version

Posted by rv...@apache.org.
Name server and war files without version


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/9daed3a9
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/9daed3a9
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/9daed3a9

Branch: refs/heads/hadoop-rdf
Commit: 9daed3a9e0c3ab292c4adc6a7c70eb8c52ffdc48
Parents: 51eb576
Author: Andy Seaborne <an...@apache.org>
Authored: Wed Jan 7 15:32:54 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Wed Jan 7 15:32:54 2015 +0000

----------------------------------------------------------------------
 jena-fuseki2/jena-fuseki-dist/assembly-dist.xml | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/9daed3a9/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml b/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml
index e7ae2d5..d1c22b5 100644
--- a/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml
+++ b/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml
@@ -35,12 +35,23 @@ Assumes jar made and onejar has been assembled.
   <baseDirectory>${project.artifactId}-${project.version}</baseDirectory>
 
   <dependencySets>
+    <!-- Standalone JAR -->
     <dependencySet>
       <useProjectArtifact>false</useProjectArtifact>
       <includes>
 	<include>org.apache.jena:jena-fuseki-server:jar</include>
+      </includes>
+      <outputFileNameMapping>fuseki-server.jar</outputFileNameMapping>
+
+    </dependencySet>
+    <!-- WAR file -->
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <includes>
 	<include>org.apache.jena:jena-fuseki-war:war</include>
       </includes>
+      <outputFileNameMapping>fuseki.war</outputFileNameMapping>
+
     </dependencySet>
   </dependencySets>
 


[15/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/require.min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/require.min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/require.min.js
new file mode 100644
index 0000000..be103a7
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/require.min.js
@@ -0,0 +1,36 @@
+/*
+ RequireJS 2.1.15 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
+ Available via the MIT or new BSD license.
+ see: http://github.com/jrburke/requirejs for details
+*/
+var requirejs,require,define;
+(function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function T(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function t(b,c){return fa.call(b,c)}function m(b,c){return t(b,c)&&b[c]}function B(b,c){for(var d in b)if(t(b,d)&&c(b[d],d))break}function U(b,c,d,e){c&&B(c,function(c,g){if(d||!t(b,g))e&&"object"===typeof c&&c&&!H(c)&&!G(c)&&!(c instanceof
+RegExp)?(b[g]||(b[g]={}),U(b[g],c,d,e)):b[g]=c});return b}function u(b,c){return function(){return c.apply(b,arguments)}}function ca(b){throw b;}function da(b){if(!b)return b;var c=ba;v(b.split("."),function(b){c=c[b]});return c}function C(b,c,d,e){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=e;d&&(c.originalError=d);return c}function ga(b){function c(a,k,b){var f,l,c,d,e,g,i,p,k=k&&k.split("/"),h=j.map,n=h&&h["*"];if(a){a=a.split("/");l=a.length-1;j.nodeIdCompat&&
+Q.test(a[l])&&(a[l]=a[l].replace(Q,""));"."===a[0].charAt(0)&&k&&(l=k.slice(0,k.length-1),a=l.concat(a));l=a;for(c=0;c<l.length;c++)if(d=l[c],"."===d)l.splice(c,1),c-=1;else if(".."===d&&!(0===c||1==c&&".."===l[2]||".."===l[c-1])&&0<c)l.splice(c-1,2),c-=2;a=a.join("/")}if(b&&h&&(k||n)){l=a.split("/");c=l.length;a:for(;0<c;c-=1){e=l.slice(0,c).join("/");if(k)for(d=k.length;0<d;d-=1)if(b=m(h,k.slice(0,d).join("/")))if(b=m(b,e)){f=b;g=c;break a}!i&&(n&&m(n,e))&&(i=m(n,e),p=c)}!f&&i&&(f=i,g=p);f&&(l.splice(0,
+g,f),a=l.join("/"))}return(f=m(j.pkgs,a))?f:a}function d(a){z&&v(document.getElementsByTagName("script"),function(k){if(k.getAttribute("data-requiremodule")===a&&k.getAttribute("data-requirecontext")===i.contextName)return k.parentNode.removeChild(k),!0})}function e(a){var k=m(j.paths,a);if(k&&H(k)&&1<k.length)return k.shift(),i.require.undef(a),i.makeRequire(null,{skipMap:!0})([a]),!0}function n(a){var k,c=a?a.indexOf("!"):-1;-1<c&&(k=a.substring(0,c),a=a.substring(c+1,a.length));return[k,a]}function p(a,
+k,b,f){var l,d,e=null,g=k?k.name:null,j=a,p=!0,h="";a||(p=!1,a="_@r"+(K+=1));a=n(a);e=a[0];a=a[1];e&&(e=c(e,g,f),d=m(r,e));a&&(e?h=d&&d.normalize?d.normalize(a,function(a){return c(a,g,f)}):-1===a.indexOf("!")?c(a,g,f):a:(h=c(a,g,f),a=n(h),e=a[0],h=a[1],b=!0,l=i.nameToUrl(h)));b=e&&!d&&!b?"_unnormalized"+(O+=1):"";return{prefix:e,name:h,parentMap:k,unnormalized:!!b,url:l,originalName:j,isDefine:p,id:(e?e+"!"+h:h)+b}}function s(a){var k=a.id,b=m(h,k);b||(b=h[k]=new i.Module(a));return b}function q(a,
+k,b){var f=a.id,c=m(h,f);if(t(r,f)&&(!c||c.defineEmitComplete))"defined"===k&&b(r[f]);else if(c=s(a),c.error&&"error"===k)b(c.error);else c.on(k,b)}function w(a,b){var c=a.requireModules,f=!1;if(b)b(a);else if(v(c,function(b){if(b=m(h,b))b.error=a,b.events.error&&(f=!0,b.emit("error",a))}),!f)g.onError(a)}function x(){R.length&&(ha.apply(A,[A.length,0].concat(R)),R=[])}function y(a){delete h[a];delete V[a]}function F(a,b,c){var f=a.map.id;a.error?a.emit("error",a.error):(b[f]=!0,v(a.depMaps,function(f,
+d){var e=f.id,g=m(h,e);g&&(!a.depMatched[d]&&!c[e])&&(m(b,e)?(a.defineDep(d,r[e]),a.check()):F(g,b,c))}),c[f]=!0)}function D(){var a,b,c=(a=1E3*j.waitSeconds)&&i.startTime+a<(new Date).getTime(),f=[],l=[],g=!1,h=!0;if(!W){W=!0;B(V,function(a){var i=a.map,j=i.id;if(a.enabled&&(i.isDefine||l.push(a),!a.error))if(!a.inited&&c)e(j)?g=b=!0:(f.push(j),d(j));else if(!a.inited&&(a.fetched&&i.isDefine)&&(g=!0,!i.prefix))return h=!1});if(c&&f.length)return a=C("timeout","Load timeout for modules: "+f,null,
+f),a.contextName=i.contextName,w(a);h&&v(l,function(a){F(a,{},{})});if((!c||b)&&g)if((z||ea)&&!X)X=setTimeout(function(){X=0;D()},50);W=!1}}function E(a){t(r,a[0])||s(p(a[0],null,!0)).init(a[1],a[2])}function I(a){var a=a.currentTarget||a.srcElement,b=i.onScriptLoad;a.detachEvent&&!Y?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=i.onScriptError;(!a.detachEvent||Y)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function J(){var a;
+for(x();A.length;){a=A.shift();if(null===a[0])return w(C("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));E(a)}}var W,Z,i,L,X,j={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},h={},V={},$={},A=[],r={},S={},aa={},K=1,O=1;L={require:function(a){return a.require?a.require:a.require=i.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?r[a.map.id]=a.exports:a.exports=r[a.map.id]={}},module:function(a){return a.module?
+a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return m(j.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};Z=function(a){this.events=m($,a.id)||{};this.map=a;this.shim=m(j.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};Z.prototype={init:function(a,b,c,f){f=f||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=u(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=
+c;this.inited=!0;this.ignore=f.ignore;f.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;i.startTime=(new Date).getTime();var a=this.map;if(this.shim)i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],u(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=
+this.map.url;S[a]||(S[a]=!0,i.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var f=this.exports,l=this.factory;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&&
+(f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=
+this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f);
+if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval",
+"fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.defineDep(b,
+a);this.check()}));this.errback&&q(a,"error",u(this,this.errback))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:j,contextName:b,registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p,
+nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b,
+a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,e){function j(c,d,m){var n,q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild=
+!0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,{isBrowser:z,toUrl:function(b){var d,e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!==
+e&&(!("."===k||".."===k)||1<e))d=b.substring(e,b.length),b=b.substring(0,e);return i.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return t(r,p(b,a,!1,!0).id)},specified:function(b){b=p(b,a,!1,!0).id;return t(r,b)||t(h,b)}});a||(j.undef=function(b){x();var c=p(b,a,!0),e=m(h,b);d(b);delete r[b];delete S[c.url];delete $[b];T(A,function(a,c){a[0]===b&&A.splice(c,1)});e&&(e.events.defined&&($[b]=e.events),y(b))});return j},enable:function(a){m(h,a.id)&&s(a).enable()},completeLoad:function(a){var b,
+c,d=m(j.shim,a)||{},g=d.exports;for(x();A.length;){c=A.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);E(c)}c=m(h,a);if(!b&&!t(r,a)&&c&&!c.inited){if(j.enforceDefine&&(!g||!da(g)))return e(a)?void 0:w(C("nodefine","No define call for "+a,null,[a]));E([a,d.deps||[],d.exportsFn])}D()},nameToUrl:function(a,b,c){var d,e,h;(d=m(j.pkgs,a))&&(a=d);if(d=m(aa,a))return i.nameToUrl(d,b,c);if(g.jsExtRegExp.test(a))d=a+(b||"");else{d=j.paths;a=a.split("/");for(e=a.length;0<e;e-=1)if(h=a.slice(0,
+e).join("/"),h=m(d,h)){H(h)&&(h=h[0]);a.splice(0,e,h);break}d=a.join("/");d+=b||(/^data\:|\?/.test(d)||c?"":".js");d=("/"===d.charAt(0)||d.match(/^[\w\+\.\-]+:/)?"":j.baseUrl)+d}return j.urlArgs?d+((-1===d.indexOf("?")?"?":"&")+j.urlArgs):d},load:function(a,b){g.load(i,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||ja.test((a.currentTarget||a.srcElement).readyState))N=null,a=I(a),i.completeLoad(a.id)},onScriptError:function(a){var b=I(a);if(!e(b.id))return w(C("scripterror",
+"Script error for: "+b.id,a,[b.id]))}};i.require=i.makeRequire();return i}var g,x,y,D,I,E,N,J,s,O,ka=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,la=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,Q=/\.js$/,ia=/^\.\//;x=Object.prototype;var K=x.toString,fa=x.hasOwnProperty,ha=Array.prototype.splice,z=!!("undefined"!==typeof window&&"undefined"!==typeof navigator&&window.document),ea=!z&&"undefined"!==typeof importScripts,ja=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,
+Y="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),F={},q={},R=[],M=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(G(requirejs))return;q=requirejs;requirejs=void 0}"undefined"!==typeof require&&!G(require)&&(q=require,require=void 0);g=requirejs=function(b,c,d,e){var n,p="_";!H(b)&&"string"!==typeof b&&(n=b,H(c)?(b=c,c=d,d=e):b=[]);n&&n.context&&(p=n.context);(e=m(F,p))||(e=F[p]=g.s.newContext(p));n&&e.configure(n);return e.require(b,c,d)};g.config=function(b){return g(b)};
+g.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=g);g.version="2.1.15";g.jsExtRegExp=/^\/|:|\?|\.js$/;g.isBrowser=z;x=g.s={contexts:F,newContext:ga};g({});v(["toUrl","undef","defined","specified"],function(b){g[b]=function(){var c=F._;return c.require[b].apply(c,arguments)}});if(z&&(y=x.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0]))y=x.head=D.parentNode;g.onError=ca;g.createNode=function(b){var c=
+b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};g.load=function(b,c,d){var e=b&&b.config||{};if(z)return e=g.createNode(e,c,d),e.setAttribute("data-requirecontext",b.contextName),e.setAttribute("data-requiremodule",c),e.attachEvent&&!(e.attachEvent.toString&&0>e.attachEvent.toString().indexOf("[native code"))&&!Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)):
+(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=I,q.baseUrl||(E=s.split("/"),s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl=
+O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return N=b}),e=N;e&&(b||
+(b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/respond.min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/respond.min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/respond.min.js
new file mode 100644
index 0000000..56418a2
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/respond.min.js
@@ -0,0 +1,6 @@
+/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
+/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
+window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document);
+
+/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs  */
+(function(a){"use strict";function x(){u(!0)}var b={};a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,b.mediaQueriesSupported;var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var a=m.shift();v(a.href,function(b){p(b,a.href,a.media),h[a.href]=!0,setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()
 ['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(a){var b="clientWidth",h=d[b],k="CSS1Compat"===c.compatMo
 de&&h||c.body[b]||h,m={},n=l[l.length-1],o=(new Date).getTime();if(a&&q&&i>o-q)return clearTimeout(r),r=setTimeout(u,i),void 0;q=o;for(var p in e)if(e.hasOwnProperty(p)){var v=e[p],w=v.minw,x=v.maxw,y=null===w,z=null===x,A="em";w&&(w=parseFloat(w)*(w.indexOf(A)>-1?t||s():1)),x&&(x=parseFloat(x)*(x.indexOf(A)>-1?t||s():1)),v.hasquery&&(y&&z||!(y||k>=w)||!(z||x>=k))||(m[v.media]||(m[v.media]=[]),m[v.media].push(f[v.rules]))}for(var B in g)g.hasOwnProperty(B)&&g[B]&&g[B].parentNode===j&&j.removeChild(g[B]);for(var C in m)if(m.hasOwnProperty(C)){var D=c.createElement("style"),E=m[C].join("\n");D.type="text/css",D.media=C,j.insertBefore(D,n.nextSibling),D.styleSheet?D.styleSheet.cssText=E:D.appendChild(c.createTextNode(E)),g.push(D)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXO
 bject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)})(this);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/sprintf-0.7-beta1.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/sprintf-0.7-beta1.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/sprintf-0.7-beta1.js
new file mode 100644
index 0000000..0e8d02c
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/sprintf-0.7-beta1.js
@@ -0,0 +1,183 @@
+/**
+sprintf() for JavaScript 0.7-beta1
+http://www.diveintojavascript.com/projects/javascript-sprintf
+
+Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of sprintf() for JavaScript nor the
+      names of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Changelog:
+2010.09.06 - 0.7-beta1
+  - features: vsprintf, support for named placeholders
+  - enhancements: format cache, reduced global namespace pollution
+
+2010.05.22 - 0.6:
+ - reverted to 0.4 and fixed the bug regarding the sign of the number 0
+ Note:
+ Thanks to Raphael Pigulla <raph (at] n3rd [dot) org> (http://www.n3rd.org/)
+ who warned me about a bug in 0.5, I discovered that the last update was
+ a regress. I appologize for that.
+
+2010.05.09 - 0.5:
+ - bug fix: 0 is now preceeded with a + sign
+ - bug fix: the sign was not at the right position on padded results (Kamal Abdali)
+ - switched from GPL to BSD license
+
+2007.10.21 - 0.4:
+ - unit test and patch (David Baird)
+
+2007.09.17 - 0.3:
+ - bug fix: no longer throws exception on empty paramenters (Hans Pufal)
+
+2007.09.11 - 0.2:
+ - feature: added argument swapping
+
+2007.04.03 - 0.1:
+ - initial release
+**/
+
+var sprintf = (function() {
+	function get_type(variable) {
+		return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase();
+	}
+	function str_repeat(input, multiplier) {
+		for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */}
+		return output.join('');
+	}
+
+	var str_format = function() {
+		if (!str_format.cache.hasOwnProperty(arguments[0])) {
+			str_format.cache[arguments[0]] = str_format.parse(arguments[0]);
+		}
+		return str_format.format.call(null, str_format.cache[arguments[0]], arguments);
+	};
+
+	str_format.format = function(parse_tree, argv) {
+		var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length;
+		for (i = 0; i < tree_length; i++) {
+			node_type = get_type(parse_tree[i]);
+			if (node_type === 'string') {
+				output.push(parse_tree[i]);
+			}
+			else if (node_type === 'array') {
+				match = parse_tree[i]; // convenience purposes only
+				if (match[2]) { // keyword argument
+					arg = argv[cursor];
+					for (k = 0; k < match[2].length; k++) {
+						if (!arg.hasOwnProperty(match[2][k])) {
+							throw(sprintf('[sprintf] property "%s" does not exist', match[2][k]));
+						}
+						arg = arg[match[2][k]];
+					}
+				}
+				else if (match[1]) { // positional argument (explicit)
+					arg = argv[match[1]];
+				}
+				else { // positional argument (implicit)
+					arg = argv[cursor++];
+				}
+
+				if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) {
+					throw(sprintf('[sprintf] expecting number but found %s', get_type(arg)));
+				}
+				switch (match[8]) {
+					case 'b': arg = arg.toString(2); break;
+					case 'c': arg = String.fromCharCode(arg); break;
+					case 'd': arg = parseInt(arg, 10); break;
+					case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break;
+					case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break;
+					case 'o': arg = arg.toString(8); break;
+					case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break;
+					case 'u': arg = Math.abs(arg); break;
+					case 'x': arg = arg.toString(16); break;
+					case 'X': arg = arg.toString(16).toUpperCase(); break;
+				}
+				arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg);
+				pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' ';
+				pad_length = match[6] - String(arg).length;
+				pad = match[6] ? str_repeat(pad_character, pad_length) : '';
+				output.push(match[5] ? arg + pad : pad + arg);
+			}
+		}
+		return output.join('');
+	};
+
+	str_format.cache = {};
+
+	str_format.parse = function(fmt) {
+		var _fmt = fmt, match = [], parse_tree = [], arg_names = 0;
+		while (_fmt) {
+			if ((match = /^[^\x25]+/.exec(_fmt)) !== null) {
+				parse_tree.push(match[0]);
+			}
+			else if ((match = /^\x25{2}/.exec(_fmt)) !== null) {
+				parse_tree.push('%');
+			}
+			else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) {
+				if (match[2]) {
+					arg_names |= 1;
+					var field_list = [], replacement_field = match[2], field_match = [];
+					if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
+						field_list.push(field_match[1]);
+						while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
+							if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
+								field_list.push(field_match[1]);
+							}
+							else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) {
+								field_list.push(field_match[1]);
+							}
+							else {
+								throw('[sprintf] huh?');
+							}
+						}
+					}
+					else {
+						throw('[sprintf] huh?');
+					}
+					match[2] = field_list;
+				}
+				else {
+					arg_names |= 2;
+				}
+				if (arg_names === 3) {
+					throw('[sprintf] mixing positional and named placeholders is not (yet) supported');
+				}
+				parse_tree.push(match);
+			}
+			else {
+				throw('[sprintf] huh?');
+			}
+			_fmt = _fmt.substring(match[0].length);
+		}
+		return parse_tree;
+	};
+
+	return str_format;
+})();
+
+var vsprintf = function(fmt, argv) {
+	argv.unshift(fmt);
+	return sprintf.apply(null, argv);
+};

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/underscore.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/underscore.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/underscore.js
new file mode 100644
index 0000000..b50115d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/underscore.js
@@ -0,0 +1,1276 @@
+//     Underscore.js 1.5.2
+//     http://underscorejs.org
+//     (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+//     Underscore may be freely distributed under the MIT license.
+
+(function() {
+
+  // Baseline setup
+  // --------------
+
+  // Establish the root object, `window` in the browser, or `exports` on the server.
+  var root = this;
+
+  // Save the previous value of the `_` variable.
+  var previousUnderscore = root._;
+
+  // Establish the object that gets returned to break out of a loop iteration.
+  var breaker = {};
+
+  // Save bytes in the minified (but not gzipped) version:
+  var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
+
+  // Create quick reference variables for speed access to core prototypes.
+  var
+    push             = ArrayProto.push,
+    slice            = ArrayProto.slice,
+    concat           = ArrayProto.concat,
+    toString         = ObjProto.toString,
+    hasOwnProperty   = ObjProto.hasOwnProperty;
+
+  // All **ECMAScript 5** native function implementations that we hope to use
+  // are declared here.
+  var
+    nativeForEach      = ArrayProto.forEach,
+    nativeMap          = ArrayProto.map,
+    nativeReduce       = ArrayProto.reduce,
+    nativeReduceRight  = ArrayProto.reduceRight,
+    nativeFilter       = ArrayProto.filter,
+    nativeEvery        = ArrayProto.every,
+    nativeSome         = ArrayProto.some,
+    nativeIndexOf      = ArrayProto.indexOf,
+    nativeLastIndexOf  = ArrayProto.lastIndexOf,
+    nativeIsArray      = Array.isArray,
+    nativeKeys         = Object.keys,
+    nativeBind         = FuncProto.bind;
+
+  // Create a safe reference to the Underscore object for use below.
+  var _ = function(obj) {
+    if (obj instanceof _) return obj;
+    if (!(this instanceof _)) return new _(obj);
+    this._wrapped = obj;
+  };
+
+  // Export the Underscore object for **Node.js**, with
+  // backwards-compatibility for the old `require()` API. If we're in
+  // the browser, add `_` as a global object via a string identifier,
+  // for Closure Compiler "advanced" mode.
+  if (typeof exports !== 'undefined') {
+    if (typeof module !== 'undefined' && module.exports) {
+      exports = module.exports = _;
+    }
+    exports._ = _;
+  } else {
+    root._ = _;
+  }
+
+  // Current version.
+  _.VERSION = '1.5.2';
+
+  // Collection Functions
+  // --------------------
+
+  // The cornerstone, an `each` implementation, aka `forEach`.
+  // Handles objects with the built-in `forEach`, arrays, and raw objects.
+  // Delegates to **ECMAScript 5**'s native `forEach` if available.
+  var each = _.each = _.forEach = function(obj, iterator, context) {
+    if (obj == null) return;
+    if (nativeForEach && obj.forEach === nativeForEach) {
+      obj.forEach(iterator, context);
+    } else if (obj.length === +obj.length) {
+      for (var i = 0, length = obj.length; i < length; i++) {
+        if (iterator.call(context, obj[i], i, obj) === breaker) return;
+      }
+    } else {
+      var keys = _.keys(obj);
+      for (var i = 0, length = keys.length; i < length; i++) {
+        if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return;
+      }
+    }
+  };
+
+  // Return the results of applying the iterator to each element.
+  // Delegates to **ECMAScript 5**'s native `map` if available.
+  _.map = _.collect = function(obj, iterator, context) {
+    var results = [];
+    if (obj == null) return results;
+    if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
+    each(obj, function(value, index, list) {
+      results.push(iterator.call(context, value, index, list));
+    });
+    return results;
+  };
+
+  var reduceError = 'Reduce of empty array with no initial value';
+
+  // **Reduce** builds up a single result from a list of values, aka `inject`,
+  // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
+  _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
+    var initial = arguments.length > 2;
+    if (obj == null) obj = [];
+    if (nativeReduce && obj.reduce === nativeReduce) {
+      if (context) iterator = _.bind(iterator, context);
+      return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
+    }
+    each(obj, function(value, index, list) {
+      if (!initial) {
+        memo = value;
+        initial = true;
+      } else {
+        memo = iterator.call(context, memo, value, index, list);
+      }
+    });
+    if (!initial) throw new TypeError(reduceError);
+    return memo;
+  };
+
+  // The right-associative version of reduce, also known as `foldr`.
+  // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
+  _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
+    var initial = arguments.length > 2;
+    if (obj == null) obj = [];
+    if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
+      if (context) iterator = _.bind(iterator, context);
+      return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
+    }
+    var length = obj.length;
+    if (length !== +length) {
+      var keys = _.keys(obj);
+      length = keys.length;
+    }
+    each(obj, function(value, index, list) {
+      index = keys ? keys[--length] : --length;
+      if (!initial) {
+        memo = obj[index];
+        initial = true;
+      } else {
+        memo = iterator.call(context, memo, obj[index], index, list);
+      }
+    });
+    if (!initial) throw new TypeError(reduceError);
+    return memo;
+  };
+
+  // Return the first value which passes a truth test. Aliased as `detect`.
+  _.find = _.detect = function(obj, iterator, context) {
+    var result;
+    any(obj, function(value, index, list) {
+      if (iterator.call(context, value, index, list)) {
+        result = value;
+        return true;
+      }
+    });
+    return result;
+  };
+
+  // Return all the elements that pass a truth test.
+  // Delegates to **ECMAScript 5**'s native `filter` if available.
+  // Aliased as `select`.
+  _.filter = _.select = function(obj, iterator, context) {
+    var results = [];
+    if (obj == null) return results;
+    if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
+    each(obj, function(value, index, list) {
+      if (iterator.call(context, value, index, list)) results.push(value);
+    });
+    return results;
+  };
+
+  // Return all the elements for which a truth test fails.
+  _.reject = function(obj, iterator, context) {
+    return _.filter(obj, function(value, index, list) {
+      return !iterator.call(context, value, index, list);
+    }, context);
+  };
+
+  // Determine whether all of the elements match a truth test.
+  // Delegates to **ECMAScript 5**'s native `every` if available.
+  // Aliased as `all`.
+  _.every = _.all = function(obj, iterator, context) {
+    iterator || (iterator = _.identity);
+    var result = true;
+    if (obj == null) return result;
+    if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
+    each(obj, function(value, index, list) {
+      if (!(result = result && iterator.call(context, value, index, list))) return breaker;
+    });
+    return !!result;
+  };
+
+  // Determine if at least one element in the object matches a truth test.
+  // Delegates to **ECMAScript 5**'s native `some` if available.
+  // Aliased as `any`.
+  var any = _.some = _.any = function(obj, iterator, context) {
+    iterator || (iterator = _.identity);
+    var result = false;
+    if (obj == null) return result;
+    if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
+    each(obj, function(value, index, list) {
+      if (result || (result = iterator.call(context, value, index, list))) return breaker;
+    });
+    return !!result;
+  };
+
+  // Determine if the array or object contains a given value (using `===`).
+  // Aliased as `include`.
+  _.contains = _.include = function(obj, target) {
+    if (obj == null) return false;
+    if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
+    return any(obj, function(value) {
+      return value === target;
+    });
+  };
+
+  // Invoke a method (with arguments) on every item in a collection.
+  _.invoke = function(obj, method) {
+    var args = slice.call(arguments, 2);
+    var isFunc = _.isFunction(method);
+    return _.map(obj, function(value) {
+      return (isFunc ? method : value[method]).apply(value, args);
+    });
+  };
+
+  // Convenience version of a common use case of `map`: fetching a property.
+  _.pluck = function(obj, key) {
+    return _.map(obj, function(value){ return value[key]; });
+  };
+
+  // Convenience version of a common use case of `filter`: selecting only objects
+  // containing specific `key:value` pairs.
+  _.where = function(obj, attrs, first) {
+    if (_.isEmpty(attrs)) return first ? void 0 : [];
+    return _[first ? 'find' : 'filter'](obj, function(value) {
+      for (var key in attrs) {
+        if (attrs[key] !== value[key]) return false;
+      }
+      return true;
+    });
+  };
+
+  // Convenience version of a common use case of `find`: getting the first object
+  // containing specific `key:value` pairs.
+  _.findWhere = function(obj, attrs) {
+    return _.where(obj, attrs, true);
+  };
+
+  // Return the maximum element or (element-based computation).
+  // Can't optimize arrays of integers longer than 65,535 elements.
+  // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797)
+  _.max = function(obj, iterator, context) {
+    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+      return Math.max.apply(Math, obj);
+    }
+    if (!iterator && _.isEmpty(obj)) return -Infinity;
+    var result = {computed : -Infinity, value: -Infinity};
+    each(obj, function(value, index, list) {
+      var computed = iterator ? iterator.call(context, value, index, list) : value;
+      computed > result.computed && (result = {value : value, computed : computed});
+    });
+    return result.value;
+  };
+
+  // Return the minimum element (or element-based computation).
+  _.min = function(obj, iterator, context) {
+    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+      return Math.min.apply(Math, obj);
+    }
+    if (!iterator && _.isEmpty(obj)) return Infinity;
+    var result = {computed : Infinity, value: Infinity};
+    each(obj, function(value, index, list) {
+      var computed = iterator ? iterator.call(context, value, index, list) : value;
+      computed < result.computed && (result = {value : value, computed : computed});
+    });
+    return result.value;
+  };
+
+  // Shuffle an array, using the modern version of the 
+  // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
+  _.shuffle = function(obj) {
+    var rand;
+    var index = 0;
+    var shuffled = [];
+    each(obj, function(value) {
+      rand = _.random(index++);
+      shuffled[index - 1] = shuffled[rand];
+      shuffled[rand] = value;
+    });
+    return shuffled;
+  };
+
+  // Sample **n** random values from an array.
+  // If **n** is not specified, returns a single random element from the array.
+  // The internal `guard` argument allows it to work with `map`.
+  _.sample = function(obj, n, guard) {
+    if (arguments.length < 2 || guard) {
+      return obj[_.random(obj.length - 1)];
+    }
+    return _.shuffle(obj).slice(0, Math.max(0, n));
+  };
+
+  // An internal function to generate lookup iterators.
+  var lookupIterator = function(value) {
+    return _.isFunction(value) ? value : function(obj){ return obj[value]; };
+  };
+
+  // Sort the object's values by a criterion produced by an iterator.
+  _.sortBy = function(obj, value, context) {
+    var iterator = lookupIterator(value);
+    return _.pluck(_.map(obj, function(value, index, list) {
+      return {
+        value: value,
+        index: index,
+        criteria: iterator.call(context, value, index, list)
+      };
+    }).sort(function(left, right) {
+      var a = left.criteria;
+      var b = right.criteria;
+      if (a !== b) {
+        if (a > b || a === void 0) return 1;
+        if (a < b || b === void 0) return -1;
+      }
+      return left.index - right.index;
+    }), 'value');
+  };
+
+  // An internal function used for aggregate "group by" operations.
+  var group = function(behavior) {
+    return function(obj, value, context) {
+      var result = {};
+      var iterator = value == null ? _.identity : lookupIterator(value);
+      each(obj, function(value, index) {
+        var key = iterator.call(context, value, index, obj);
+        behavior(result, key, value);
+      });
+      return result;
+    };
+  };
+
+  // Groups the object's values by a criterion. Pass either a string attribute
+  // to group by, or a function that returns the criterion.
+  _.groupBy = group(function(result, key, value) {
+    (_.has(result, key) ? result[key] : (result[key] = [])).push(value);
+  });
+
+  // Indexes the object's values by a criterion, similar to `groupBy`, but for
+  // when you know that your index values will be unique.
+  _.indexBy = group(function(result, key, value) {
+    result[key] = value;
+  });
+
+  // Counts instances of an object that group by a certain criterion. Pass
+  // either a string attribute to count by, or a function that returns the
+  // criterion.
+  _.countBy = group(function(result, key) {
+    _.has(result, key) ? result[key]++ : result[key] = 1;
+  });
+
+  // Use a comparator function to figure out the smallest index at which
+  // an object should be inserted so as to maintain order. Uses binary search.
+  _.sortedIndex = function(array, obj, iterator, context) {
+    iterator = iterator == null ? _.identity : lookupIterator(iterator);
+    var value = iterator.call(context, obj);
+    var low = 0, high = array.length;
+    while (low < high) {
+      var mid = (low + high) >>> 1;
+      iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
+    }
+    return low;
+  };
+
+  // Safely create a real, live array from anything iterable.
+  _.toArray = function(obj) {
+    if (!obj) return [];
+    if (_.isArray(obj)) return slice.call(obj);
+    if (obj.length === +obj.length) return _.map(obj, _.identity);
+    return _.values(obj);
+  };
+
+  // Return the number of elements in an object.
+  _.size = function(obj) {
+    if (obj == null) return 0;
+    return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
+  };
+
+  // Array Functions
+  // ---------------
+
+  // Get the first element of an array. Passing **n** will return the first N
+  // values in the array. Aliased as `head` and `take`. The **guard** check
+  // allows it to work with `_.map`.
+  _.first = _.head = _.take = function(array, n, guard) {
+    if (array == null) return void 0;
+    return (n == null) || guard ? array[0] : slice.call(array, 0, n);
+  };
+
+  // Returns everything but the last entry of the array. Especially useful on
+  // the arguments object. Passing **n** will return all the values in
+  // the array, excluding the last N. The **guard** check allows it to work with
+  // `_.map`.
+  _.initial = function(array, n, guard) {
+    return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
+  };
+
+  // Get the last element of an array. Passing **n** will return the last N
+  // values in the array. The **guard** check allows it to work with `_.map`.
+  _.last = function(array, n, guard) {
+    if (array == null) return void 0;
+    if ((n == null) || guard) {
+      return array[array.length - 1];
+    } else {
+      return slice.call(array, Math.max(array.length - n, 0));
+    }
+  };
+
+  // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
+  // Especially useful on the arguments object. Passing an **n** will return
+  // the rest N values in the array. The **guard**
+  // check allows it to work with `_.map`.
+  _.rest = _.tail = _.drop = function(array, n, guard) {
+    return slice.call(array, (n == null) || guard ? 1 : n);
+  };
+
+  // Trim out all falsy values from an array.
+  _.compact = function(array) {
+    return _.filter(array, _.identity);
+  };
+
+  // Internal implementation of a recursive `flatten` function.
+  var flatten = function(input, shallow, output) {
+    if (shallow && _.every(input, _.isArray)) {
+      return concat.apply(output, input);
+    }
+    each(input, function(value) {
+      if (_.isArray(value) || _.isArguments(value)) {
+        shallow ? push.apply(output, value) : flatten(value, shallow, output);
+      } else {
+        output.push(value);
+      }
+    });
+    return output;
+  };
+
+  // Flatten out an array, either recursively (by default), or just one level.
+  _.flatten = function(array, shallow) {
+    return flatten(array, shallow, []);
+  };
+
+  // Return a version of the array that does not contain the specified value(s).
+  _.without = function(array) {
+    return _.difference(array, slice.call(arguments, 1));
+  };
+
+  // Produce a duplicate-free version of the array. If the array has already
+  // been sorted, you have the option of using a faster algorithm.
+  // Aliased as `unique`.
+  _.uniq = _.unique = function(array, isSorted, iterator, context) {
+    if (_.isFunction(isSorted)) {
+      context = iterator;
+      iterator = isSorted;
+      isSorted = false;
+    }
+    var initial = iterator ? _.map(array, iterator, context) : array;
+    var results = [];
+    var seen = [];
+    each(initial, function(value, index) {
+      if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
+        seen.push(value);
+        results.push(array[index]);
+      }
+    });
+    return results;
+  };
+
+  // Produce an array that contains the union: each distinct element from all of
+  // the passed-in arrays.
+  _.union = function() {
+    return _.uniq(_.flatten(arguments, true));
+  };
+
+  // Produce an array that contains every item shared between all the
+  // passed-in arrays.
+  _.intersection = function(array) {
+    var rest = slice.call(arguments, 1);
+    return _.filter(_.uniq(array), function(item) {
+      return _.every(rest, function(other) {
+        return _.indexOf(other, item) >= 0;
+      });
+    });
+  };
+
+  // Take the difference between one array and a number of other arrays.
+  // Only the elements present in just the first array will remain.
+  _.difference = function(array) {
+    var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
+    return _.filter(array, function(value){ return !_.contains(rest, value); });
+  };
+
+  // Zip together multiple lists into a single array -- elements that share
+  // an index go together.
+  _.zip = function() {
+    var length = _.max(_.pluck(arguments, "length").concat(0));
+    var results = new Array(length);
+    for (var i = 0; i < length; i++) {
+      results[i] = _.pluck(arguments, '' + i);
+    }
+    return results;
+  };
+
+  // Converts lists into objects. Pass either a single array of `[key, value]`
+  // pairs, or two parallel arrays of the same length -- one of keys, and one of
+  // the corresponding values.
+  _.object = function(list, values) {
+    if (list == null) return {};
+    var result = {};
+    for (var i = 0, length = list.length; i < length; i++) {
+      if (values) {
+        result[list[i]] = values[i];
+      } else {
+        result[list[i][0]] = list[i][1];
+      }
+    }
+    return result;
+  };
+
+  // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
+  // we need this function. Return the position of the first occurrence of an
+  // item in an array, or -1 if the item is not included in the array.
+  // Delegates to **ECMAScript 5**'s native `indexOf` if available.
+  // If the array is large and already in sort order, pass `true`
+  // for **isSorted** to use binary search.
+  _.indexOf = function(array, item, isSorted) {
+    if (array == null) return -1;
+    var i = 0, length = array.length;
+    if (isSorted) {
+      if (typeof isSorted == 'number') {
+        i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted);
+      } else {
+        i = _.sortedIndex(array, item);
+        return array[i] === item ? i : -1;
+      }
+    }
+    if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
+    for (; i < length; i++) if (array[i] === item) return i;
+    return -1;
+  };
+
+  // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
+  _.lastIndexOf = function(array, item, from) {
+    if (array == null) return -1;
+    var hasIndex = from != null;
+    if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
+      return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
+    }
+    var i = (hasIndex ? from : array.length);
+    while (i--) if (array[i] === item) return i;
+    return -1;
+  };
+
+  // Generate an integer Array containing an arithmetic progression. A port of
+  // the native Python `range()` function. See
+  // [the Python documentation](http://docs.python.org/library/functions.html#range).
+  _.range = function(start, stop, step) {
+    if (arguments.length <= 1) {
+      stop = start || 0;
+      start = 0;
+    }
+    step = arguments[2] || 1;
+
+    var length = Math.max(Math.ceil((stop - start) / step), 0);
+    var idx = 0;
+    var range = new Array(length);
+
+    while(idx < length) {
+      range[idx++] = start;
+      start += step;
+    }
+
+    return range;
+  };
+
+  // Function (ahem) Functions
+  // ------------------
+
+  // Reusable constructor function for prototype setting.
+  var ctor = function(){};
+
+  // Create a function bound to a given object (assigning `this`, and arguments,
+  // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
+  // available.
+  _.bind = function(func, context) {
+    var args, bound;
+    if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+    if (!_.isFunction(func)) throw new TypeError;
+    args = slice.call(arguments, 2);
+    return bound = function() {
+      if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
+      ctor.prototype = func.prototype;
+      var self = new ctor;
+      ctor.prototype = null;
+      var result = func.apply(self, args.concat(slice.call(arguments)));
+      if (Object(result) === result) return result;
+      return self;
+    };
+  };
+
+  // Partially apply a function by creating a version that has had some of its
+  // arguments pre-filled, without changing its dynamic `this` context.
+  _.partial = function(func) {
+    var args = slice.call(arguments, 1);
+    return function() {
+      return func.apply(this, args.concat(slice.call(arguments)));
+    };
+  };
+
+  // Bind all of an object's methods to that object. Useful for ensuring that
+  // all callbacks defined on an object belong to it.
+  _.bindAll = function(obj) {
+    var funcs = slice.call(arguments, 1);
+    if (funcs.length === 0) throw new Error("bindAll must be passed function names");
+    each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
+    return obj;
+  };
+
+  // Memoize an expensive function by storing its results.
+  _.memoize = function(func, hasher) {
+    var memo = {};
+    hasher || (hasher = _.identity);
+    return function() {
+      var key = hasher.apply(this, arguments);
+      return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
+    };
+  };
+
+  // Delays a function for the given number of milliseconds, and then calls
+  // it with the arguments supplied.
+  _.delay = function(func, wait) {
+    var args = slice.call(arguments, 2);
+    return setTimeout(function(){ return func.apply(null, args); }, wait);
+  };
+
+  // Defers a function, scheduling it to run after the current call stack has
+  // cleared.
+  _.defer = function(func) {
+    return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
+  };
+
+  // Returns a function, that, when invoked, will only be triggered at most once
+  // during a given window of time. Normally, the throttled function will run
+  // as much as it can, without ever going more than once per `wait` duration;
+  // but if you'd like to disable the execution on the leading edge, pass
+  // `{leading: false}`. To disable execution on the trailing edge, ditto.
+  _.throttle = function(func, wait, options) {
+    var context, args, result;
+    var timeout = null;
+    var previous = 0;
+    options || (options = {});
+    var later = function() {
+      previous = options.leading === false ? 0 : new Date;
+      timeout = null;
+      result = func.apply(context, args);
+    };
+    return function() {
+      var now = new Date;
+      if (!previous && options.leading === false) previous = now;
+      var remaining = wait - (now - previous);
+      context = this;
+      args = arguments;
+      if (remaining <= 0) {
+        clearTimeout(timeout);
+        timeout = null;
+        previous = now;
+        result = func.apply(context, args);
+      } else if (!timeout && options.trailing !== false) {
+        timeout = setTimeout(later, remaining);
+      }
+      return result;
+    };
+  };
+
+  // Returns a function, that, as long as it continues to be invoked, will not
+  // be triggered. The function will be called after it stops being called for
+  // N milliseconds. If `immediate` is passed, trigger the function on the
+  // leading edge, instead of the trailing.
+  _.debounce = function(func, wait, immediate) {
+    var timeout, args, context, timestamp, result;
+    return function() {
+      context = this;
+      args = arguments;
+      timestamp = new Date();
+      var later = function() {
+        var last = (new Date()) - timestamp;
+        if (last < wait) {
+          timeout = setTimeout(later, wait - last);
+        } else {
+          timeout = null;
+          if (!immediate) result = func.apply(context, args);
+        }
+      };
+      var callNow = immediate && !timeout;
+      if (!timeout) {
+        timeout = setTimeout(later, wait);
+      }
+      if (callNow) result = func.apply(context, args);
+      return result;
+    };
+  };
+
+  // Returns a function that will be executed at most one time, no matter how
+  // often you call it. Useful for lazy initialization.
+  _.once = function(func) {
+    var ran = false, memo;
+    return function() {
+      if (ran) return memo;
+      ran = true;
+      memo = func.apply(this, arguments);
+      func = null;
+      return memo;
+    };
+  };
+
+  // Returns the first function passed as an argument to the second,
+  // allowing you to adjust arguments, run code before and after, and
+  // conditionally execute the original function.
+  _.wrap = function(func, wrapper) {
+    return function() {
+      var args = [func];
+      push.apply(args, arguments);
+      return wrapper.apply(this, args);
+    };
+  };
+
+  // Returns a function that is the composition of a list of functions, each
+  // consuming the return value of the function that follows.
+  _.compose = function() {
+    var funcs = arguments;
+    return function() {
+      var args = arguments;
+      for (var i = funcs.length - 1; i >= 0; i--) {
+        args = [funcs[i].apply(this, args)];
+      }
+      return args[0];
+    };
+  };
+
+  // Returns a function that will only be executed after being called N times.
+  _.after = function(times, func) {
+    return function() {
+      if (--times < 1) {
+        return func.apply(this, arguments);
+      }
+    };
+  };
+
+  // Object Functions
+  // ----------------
+
+  // Retrieve the names of an object's properties.
+  // Delegates to **ECMAScript 5**'s native `Object.keys`
+  _.keys = nativeKeys || function(obj) {
+    if (obj !== Object(obj)) throw new TypeError('Invalid object');
+    var keys = [];
+    for (var key in obj) if (_.has(obj, key)) keys.push(key);
+    return keys;
+  };
+
+  // Retrieve the values of an object's properties.
+  _.values = function(obj) {
+    var keys = _.keys(obj);
+    var length = keys.length;
+    var values = new Array(length);
+    for (var i = 0; i < length; i++) {
+      values[i] = obj[keys[i]];
+    }
+    return values;
+  };
+
+  // Convert an object into a list of `[key, value]` pairs.
+  _.pairs = function(obj) {
+    var keys = _.keys(obj);
+    var length = keys.length;
+    var pairs = new Array(length);
+    for (var i = 0; i < length; i++) {
+      pairs[i] = [keys[i], obj[keys[i]]];
+    }
+    return pairs;
+  };
+
+  // Invert the keys and values of an object. The values must be serializable.
+  _.invert = function(obj) {
+    var result = {};
+    var keys = _.keys(obj);
+    for (var i = 0, length = keys.length; i < length; i++) {
+      result[obj[keys[i]]] = keys[i];
+    }
+    return result;
+  };
+
+  // Return a sorted list of the function names available on the object.
+  // Aliased as `methods`
+  _.functions = _.methods = function(obj) {
+    var names = [];
+    for (var key in obj) {
+      if (_.isFunction(obj[key])) names.push(key);
+    }
+    return names.sort();
+  };
+
+  // Extend a given object with all the properties in passed-in object(s).
+  _.extend = function(obj) {
+    each(slice.call(arguments, 1), function(source) {
+      if (source) {
+        for (var prop in source) {
+          obj[prop] = source[prop];
+        }
+      }
+    });
+    return obj;
+  };
+
+  // Return a copy of the object only containing the whitelisted properties.
+  _.pick = function(obj) {
+    var copy = {};
+    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+    each(keys, function(key) {
+      if (key in obj) copy[key] = obj[key];
+    });
+    return copy;
+  };
+
+   // Return a copy of the object without the blacklisted properties.
+  _.omit = function(obj) {
+    var copy = {};
+    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+    for (var key in obj) {
+      if (!_.contains(keys, key)) copy[key] = obj[key];
+    }
+    return copy;
+  };
+
+  // Fill in a given object with default properties.
+  _.defaults = function(obj) {
+    each(slice.call(arguments, 1), function(source) {
+      if (source) {
+        for (var prop in source) {
+          if (obj[prop] === void 0) obj[prop] = source[prop];
+        }
+      }
+    });
+    return obj;
+  };
+
+  // Create a (shallow-cloned) duplicate of an object.
+  _.clone = function(obj) {
+    if (!_.isObject(obj)) return obj;
+    return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+  };
+
+  // Invokes interceptor with the obj, and then returns obj.
+  // The primary purpose of this method is to "tap into" a method chain, in
+  // order to perform operations on intermediate results within the chain.
+  _.tap = function(obj, interceptor) {
+    interceptor(obj);
+    return obj;
+  };
+
+  // Internal recursive comparison function for `isEqual`.
+  var eq = function(a, b, aStack, bStack) {
+    // Identical objects are equal. `0 === -0`, but they aren't identical.
+    // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
+    if (a === b) return a !== 0 || 1 / a == 1 / b;
+    // A strict comparison is necessary because `null == undefined`.
+    if (a == null || b == null) return a === b;
+    // Unwrap any wrapped objects.
+    if (a instanceof _) a = a._wrapped;
+    if (b instanceof _) b = b._wrapped;
+    // Compare `[[Class]]` names.
+    var className = toString.call(a);
+    if (className != toString.call(b)) return false;
+    switch (className) {
+      // Strings, numbers, dates, and booleans are compared by value.
+      case '[object String]':
+        // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+        // equivalent to `new String("5")`.
+        return a == String(b);
+      case '[object Number]':
+        // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
+        // other numeric values.
+        return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
+      case '[object Date]':
+      case '[object Boolean]':
+        // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+        // millisecond representations. Note that invalid dates with millisecond representations
+        // of `NaN` are not equivalent.
+        return +a == +b;
+      // RegExps are compared by their source patterns and flags.
+      case '[object RegExp]':
+        return a.source == b.source &&
+               a.global == b.global &&
+               a.multiline == b.multiline &&
+               a.ignoreCase == b.ignoreCase;
+    }
+    if (typeof a != 'object' || typeof b != 'object') return false;
+    // Assume equality for cyclic structures. The algorithm for detecting cyclic
+    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+    var length = aStack.length;
+    while (length--) {
+      // Linear search. Performance is inversely proportional to the number of
+      // unique nested structures.
+      if (aStack[length] == a) return bStack[length] == b;
+    }
+    // Objects with different constructors are not equivalent, but `Object`s
+    // from different frames are.
+    var aCtor = a.constructor, bCtor = b.constructor;
+    if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
+                             _.isFunction(bCtor) && (bCtor instanceof bCtor))) {
+      return false;
+    }
+    // Add the first object to the stack of traversed objects.
+    aStack.push(a);
+    bStack.push(b);
+    var size = 0, result = true;
+    // Recursively compare objects and arrays.
+    if (className == '[object Array]') {
+      // Compare array lengths to determine if a deep comparison is necessary.
+      size = a.length;
+      result = size == b.length;
+      if (result) {
+        // Deep compare the contents, ignoring non-numeric properties.
+        while (size--) {
+          if (!(result = eq(a[size], b[size], aStack, bStack))) break;
+        }
+      }
+    } else {
+      // Deep compare objects.
+      for (var key in a) {
+        if (_.has(a, key)) {
+          // Count the expected number of properties.
+          size++;
+          // Deep compare each member.
+          if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
+        }
+      }
+      // Ensure that both objects contain the same number of properties.
+      if (result) {
+        for (key in b) {
+          if (_.has(b, key) && !(size--)) break;
+        }
+        result = !size;
+      }
+    }
+    // Remove the first object from the stack of traversed objects.
+    aStack.pop();
+    bStack.pop();
+    return result;
+  };
+
+  // Perform a deep comparison to check if two objects are equal.
+  _.isEqual = function(a, b) {
+    return eq(a, b, [], []);
+  };
+
+  // Is a given array, string, or object empty?
+  // An "empty" object has no enumerable own-properties.
+  _.isEmpty = function(obj) {
+    if (obj == null) return true;
+    if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
+    for (var key in obj) if (_.has(obj, key)) return false;
+    return true;
+  };
+
+  // Is a given value a DOM element?
+  _.isElement = function(obj) {
+    return !!(obj && obj.nodeType === 1);
+  };
+
+  // Is a given value an array?
+  // Delegates to ECMA5's native Array.isArray
+  _.isArray = nativeIsArray || function(obj) {
+    return toString.call(obj) == '[object Array]';
+  };
+
+  // Is a given variable an object?
+  _.isObject = function(obj) {
+    return obj === Object(obj);
+  };
+
+  // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
+  each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
+    _['is' + name] = function(obj) {
+      return toString.call(obj) == '[object ' + name + ']';
+    };
+  });
+
+  // Define a fallback version of the method in browsers (ahem, IE), where
+  // there isn't any inspectable "Arguments" type.
+  if (!_.isArguments(arguments)) {
+    _.isArguments = function(obj) {
+      return !!(obj && _.has(obj, 'callee'));
+    };
+  }
+
+  // Optimize `isFunction` if appropriate.
+  if (typeof (/./) !== 'function') {
+    _.isFunction = function(obj) {
+      return typeof obj === 'function';
+    };
+  }
+
+  // Is a given object a finite number?
+  _.isFinite = function(obj) {
+    return isFinite(obj) && !isNaN(parseFloat(obj));
+  };
+
+  // Is the given value `NaN`? (NaN is the only number which does not equal itself).
+  _.isNaN = function(obj) {
+    return _.isNumber(obj) && obj != +obj;
+  };
+
+  // Is a given value a boolean?
+  _.isBoolean = function(obj) {
+    return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
+  };
+
+  // Is a given value equal to null?
+  _.isNull = function(obj) {
+    return obj === null;
+  };
+
+  // Is a given variable undefined?
+  _.isUndefined = function(obj) {
+    return obj === void 0;
+  };
+
+  // Shortcut function for checking if an object has a given property directly
+  // on itself (in other words, not on a prototype).
+  _.has = function(obj, key) {
+    return hasOwnProperty.call(obj, key);
+  };
+
+  // Utility Functions
+  // -----------------
+
+  // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
+  // previous owner. Returns a reference to the Underscore object.
+  _.noConflict = function() {
+    root._ = previousUnderscore;
+    return this;
+  };
+
+  // Keep the identity function around for default iterators.
+  _.identity = function(value) {
+    return value;
+  };
+
+  // Run a function **n** times.
+  _.times = function(n, iterator, context) {
+    var accum = Array(Math.max(0, n));
+    for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
+    return accum;
+  };
+
+  // Return a random integer between min and max (inclusive).
+  _.random = function(min, max) {
+    if (max == null) {
+      max = min;
+      min = 0;
+    }
+    return min + Math.floor(Math.random() * (max - min + 1));
+  };
+
+  // List of HTML entities for escaping.
+  var entityMap = {
+    escape: {
+      '&': '&amp;',
+      '<': '&lt;',
+      '>': '&gt;',
+      '"': '&quot;',
+      "'": '&#x27;'
+    }
+  };
+  entityMap.unescape = _.invert(entityMap.escape);
+
+  // Regexes containing the keys and values listed immediately above.
+  var entityRegexes = {
+    escape:   new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
+    unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
+  };
+
+  // Functions for escaping and unescaping strings to/from HTML interpolation.
+  _.each(['escape', 'unescape'], function(method) {
+    _[method] = function(string) {
+      if (string == null) return '';
+      return ('' + string).replace(entityRegexes[method], function(match) {
+        return entityMap[method][match];
+      });
+    };
+  });
+
+  // If the value of the named `property` is a function then invoke it with the
+  // `object` as context; otherwise, return it.
+  _.result = function(object, property) {
+    if (object == null) return void 0;
+    var value = object[property];
+    return _.isFunction(value) ? value.call(object) : value;
+  };
+
+  // Add your own custom functions to the Underscore object.
+  _.mixin = function(obj) {
+    each(_.functions(obj), function(name) {
+      var func = _[name] = obj[name];
+      _.prototype[name] = function() {
+        var args = [this._wrapped];
+        push.apply(args, arguments);
+        return result.call(this, func.apply(_, args));
+      };
+    });
+  };
+
+  // Generate a unique integer id (unique within the entire client session).
+  // Useful for temporary DOM ids.
+  var idCounter = 0;
+  _.uniqueId = function(prefix) {
+    var id = ++idCounter + '';
+    return prefix ? prefix + id : id;
+  };
+
+  // By default, Underscore uses ERB-style template delimiters, change the
+  // following template settings to use alternative delimiters.
+  _.templateSettings = {
+    evaluate    : /<%([\s\S]+?)%>/g,
+    interpolate : /<%=([\s\S]+?)%>/g,
+    escape      : /<%-([\s\S]+?)%>/g
+  };
+
+  // When customizing `templateSettings`, if you don't want to define an
+  // interpolation, evaluation or escaping regex, we need one that is
+  // guaranteed not to match.
+  var noMatch = /(.)^/;
+
+  // Certain characters need to be escaped so that they can be put into a
+  // string literal.
+  var escapes = {
+    "'":      "'",
+    '\\':     '\\',
+    '\r':     'r',
+    '\n':     'n',
+    '\t':     't',
+    '\u2028': 'u2028',
+    '\u2029': 'u2029'
+  };
+
+  var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
+
+  // JavaScript micro-templating, similar to John Resig's implementation.
+  // Underscore templating handles arbitrary delimiters, preserves whitespace,
+  // and correctly escapes quotes within interpolated code.
+  _.template = function(text, data, settings) {
+    var render;
+    settings = _.defaults({}, settings, _.templateSettings);
+
+    // Combine delimiters into one regular expression via alternation.
+    var matcher = new RegExp([
+      (settings.escape || noMatch).source,
+      (settings.interpolate || noMatch).source,
+      (settings.evaluate || noMatch).source
+    ].join('|') + '|$', 'g');
+
+    // Compile the template source, escaping string literals appropriately.
+    var index = 0;
+    var source = "__p+='";
+    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+      source += text.slice(index, offset)
+        .replace(escaper, function(match) { return '\\' + escapes[match]; });
+
+      if (escape) {
+        source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+      }
+      if (interpolate) {
+        source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+      }
+      if (evaluate) {
+        source += "';\n" + evaluate + "\n__p+='";
+      }
+      index = offset + match.length;
+      return match;
+    });
+    source += "';\n";
+
+    // If a variable is not specified, place data values in local scope.
+    if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+    source = "var __t,__p='',__j=Array.prototype.join," +
+      "print=function(){__p+=__j.call(arguments,'');};\n" +
+      source + "return __p;\n";
+
+    try {
+      render = new Function(settings.variable || 'obj', '_', source);
+    } catch (e) {
+      e.source = source;
+      throw e;
+    }
+
+    if (data) return render(data, _);
+    var template = function(data) {
+      return render.call(this, data, _);
+    };
+
+    // Provide the compiled function source as a convenience for precompilation.
+    template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
+
+    return template;
+  };
+
+  // Add a "chain" function, which will delegate to the wrapper.
+  _.chain = function(obj) {
+    return _(obj).chain();
+  };
+
+  // OOP
+  // ---------------
+  // If Underscore is called as a function, it returns a wrapped object that
+  // can be used OO-style. This wrapper holds altered versions of all the
+  // underscore functions. Wrapped objects may be chained.
+
+  // Helper function to continue chaining intermediate results.
+  var result = function(obj) {
+    return this._chain ? _(obj).chain() : obj;
+  };
+
+  // Add all of the Underscore functions to the wrapper object.
+  _.mixin(_);
+
+  // Add all mutator Array functions to the wrapper.
+  each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+    var method = ArrayProto[name];
+    _.prototype[name] = function() {
+      var obj = this._wrapped;
+      method.apply(obj, arguments);
+      if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
+      return result.call(this, obj);
+    };
+  });
+
+  // Add all accessor Array functions to the wrapper.
+  each(['concat', 'join', 'slice'], function(name) {
+    var method = ArrayProto[name];
+    _.prototype[name] = function() {
+      return result.call(this, method.apply(this._wrapped, arguments));
+    };
+  });
+
+  _.extend(_.prototype, {
+
+    // Start chaining a wrapped Underscore object.
+    chain: function() {
+      this._chain = true;
+      return this;
+    },
+
+    // Extracts the result from a wrapped and chained object.
+    value: function() {
+      return this._wrapped;
+    }
+
+  });
+
+}).call(this);


[73/93] [abbrv] jena git commit: Make template substitution Lang sensitive.

Posted by rv...@apache.org.
Make template substitution Lang sensitive.


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/51eb5768
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/51eb5768
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/51eb5768

Branch: refs/heads/hadoop-rdf
Commit: 51eb5768db68b189a55fab52b3016151a387151b
Parents: 19fc55c
Author: Andy Seaborne <an...@apache.org>
Authored: Wed Jan 7 12:12:19 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Wed Jan 7 12:52:23 2015 +0000

----------------------------------------------------------------------
 .../jena/fuseki/build/DataServiceDesc.java      |  2 +-
 .../jena/fuseki/build/TemplateFunctions.java    | 34 ++++++++++++++------
 .../apache/jena/fuseki/mgt/ActionDatasets.java  |  4 +--
 .../apache/jena/fuseki/server/FusekiServer.java |  2 +-
 4 files changed, 29 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/51eb5768/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
index 2b85c99..8fa2edf 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
@@ -44,7 +44,7 @@ public abstract class DataServiceDesc
         Map<String, String> params = new HashMap<>() ;
         params.put(Template.NAME, dbName) ;
         FusekiServer.addGlobals(params); 
-        String template = TemplateFunctions.templateFile(templateFile, params) ;
+        String template = TemplateFunctions.templateFile(templateFile, params, Lang.TTL) ;
         Lang lang = RDFLanguages.filenameToLang(templateFile, Lang.TTL) ;
         StringReader sr = new StringReader(template) ;
         return create(sr, lang) ;

http://git-wip-us.apache.org/repos/asf/jena/blob/51eb5768/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
index 61c4b68..5c12dbc 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
@@ -22,17 +22,17 @@ import java.io.IOException ;
 import java.io.InputStream ;
 import java.util.Map ;
 import java.util.Map.Entry ;
-import java.util.regex.Matcher ;
 
 import org.apache.jena.atlas.io.IO ;
 import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.riot.Lang ;
 
 import com.hp.hpl.jena.util.FileUtils ;
 
 public class TemplateFunctions
 {
     /** Read in a template from a file, substitute for {NAME} and return the string. */
-    public static String templateFile(String templateName, Map<String, String> params) {
+    public static String templateFile(String templateName, Map<String, String> params, Lang lang) {
         String templateFilename = Template.getPath(templateName).toString() ;
         String template ;
         try { template = FileUtils.readWholeFileAsUTF8(templateFilename) ; }
@@ -40,11 +40,11 @@ public class TemplateFunctions
             Fuseki.serverLog.error("File not found: "+templateFilename);
             IO.exception(ex); return null ;
         }
-        return templateString(template, params) ;
+        return templateString(template, params, lang) ;
     }
     
     /** Read a template file, substitute for {NAME} and return the model. */
-    public static String templateResource(String resourceName, Map<String, String> params) {
+    public static String templateResource(String resourceName, Map<String, String> params, Lang lang) {
         String template ;
         try {
             InputStream in = TemplateFunctions.class.getClassLoader().getResourceAsStream(resourceName) ;
@@ -56,15 +56,31 @@ public class TemplateFunctions
             Fuseki.serverLog.error("Error reading resource: "+resourceName);
             IO.exception(ex); return null ;
         }
-        return templateString(template, params) ;
+        return templateString(template, params, lang) ;
     }
 
     /** Create a template from a String */ 
-    public static String templateString(String template, Map<String, String> params) {
+    public static String templateString(String template, Map<String, String> params, Lang lang) {
         for ( Entry<String, String> e : params.entrySet() ) {
-            // Backslashes (\) and dollar signs ($) in the replacement string have special meaning.
-            String x = Matcher.quoteReplacement(e.getValue()) ; 
-            template = template.replaceAll("\\{"+e.getKey()+"\\}", x) ;
+            // Literal string replacement.
+            // If using .replaceAll, need to use Match.quoteReplacement on the value.
+            String x = e.getValue() ;
+            String k = "{"+e.getKey()+"}" ;
+            
+            if ( lang != null ) {
+                if ( Lang.TTL.equals(lang)     ||
+                     Lang.TRIG.equals(lang)    ||
+                     Lang.NT.equals(lang)      ||
+                     Lang.NQ.equals(lang)      ||
+                     Lang.JSONLD.equals(lang)  ||
+                     Lang.RDFJSON.equals(lang) 
+                    ) {
+                    // Make safe for a RDF language ""-string - especially MS Windows \ path separators.
+                    x = x.replace("\\", "\\\\") ;
+                    x = x.replace("\"", "\\\"") ;
+                }
+            }
+            template = template.replace(k, x) ;
         }
         return template ;
     }

http://git-wip-us.apache.org/repos/asf/jena/blob/51eb5768/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
index ea3d44e..4e9c916 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
@@ -261,9 +261,9 @@ public class ActionDatasets extends ActionContainerItem {
         
         String template = null ;
         if ( dbType.equalsIgnoreCase(tDatabasetTDB))
-            template = TemplateFunctions.templateFile(Template.templateTDBFN, params) ;
+            template = TemplateFunctions.templateFile(Template.templateTDBFN, params, Lang.TTL) ;
         if ( dbType.equalsIgnoreCase(tDatabasetMem))
-            template = TemplateFunctions.templateFile(Template.templateMemFN, params) ;
+            template = TemplateFunctions.templateFile(Template.templateMemFN, params, Lang.TTL) ;
         RDFDataMgr.parse(dest, new StringReader(template), "http://base/", Lang.TTL) ;
     }
 

http://git-wip-us.apache.org/repos/asf/jena/blob/51eb5768/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
index 83d5523..a466b8b 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
@@ -290,7 +290,7 @@ public class FusekiServer
         
         addGlobals(params); 
 
-        String str = TemplateFunctions.templateFile(templateFile, params) ;
+        String str = TemplateFunctions.templateFile(templateFile, params, Lang.TTL) ;
         Lang lang = RDFLanguages.filenameToLang(str, Lang.TTL) ;
         StringReader sr =  new StringReader(str) ;
         Model model = ModelFactory.createDefaultModel() ;


[30/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone.marionette.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone.marionette.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone.marionette.js
new file mode 100644
index 0000000..a4f6ccf
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone.marionette.js
@@ -0,0 +1,2385 @@
+// MarionetteJS (Backbone.Marionette)
+// ----------------------------------
+// v1.2.2
+//
+// Copyright (c)2013 Derick Bailey, Muted Solutions, LLC.
+// Distributed under MIT license
+//
+// http://marionettejs.com
+
+
+
+/*!
+ * Includes BabySitter
+ * https://github.com/marionettejs/backbone.babysitter/
+ *
+ * Includes Wreqr
+ * https://github.com/marionettejs/backbone.wreqr/
+ */
+
+// Backbone.BabySitter
+// -------------------
+// v0.0.6
+//
+// Copyright (c)2013 Derick Bailey, Muted Solutions, LLC.
+// Distributed under MIT license
+//
+// http://github.com/babysitterjs/backbone.babysitter
+
+// Backbone.ChildViewContainer
+// ---------------------------
+//
+// Provide a container to store, retrieve and
+// shut down child views.
+
+Backbone.ChildViewContainer = (function(Backbone, _){
+
+  // Container Constructor
+  // ---------------------
+
+  var Container = function(views){
+    this._views = {};
+    this._indexByModel = {};
+    this._indexByCustom = {};
+    this._updateLength();
+
+    _.each(views, this.add, this);
+  };
+
+  // Container Methods
+  // -----------------
+
+  _.extend(Container.prototype, {
+
+    // Add a view to this container. Stores the view
+    // by `cid` and makes it searchable by the model
+    // cid (and model itself). Optionally specify
+    // a custom key to store an retrieve the view.
+    add: function(view, customIndex){
+      var viewCid = view.cid;
+
+      // store the view
+      this._views[viewCid] = view;
+
+      // index it by model
+      if (view.model){
+        this._indexByModel[view.model.cid] = viewCid;
+      }
+
+      // index by custom
+      if (customIndex){
+        this._indexByCustom[customIndex] = viewCid;
+      }
+
+      this._updateLength();
+    },
+
+    // Find a view by the model that was attached to
+    // it. Uses the model's `cid` to find it.
+    findByModel: function(model){
+      return this.findByModelCid(model.cid);
+    },
+
+    // Find a view by the `cid` of the model that was attached to
+    // it. Uses the model's `cid` to find the view `cid` and
+    // retrieve the view using it.
+    findByModelCid: function(modelCid){
+      var viewCid = this._indexByModel[modelCid];
+      return this.findByCid(viewCid);
+    },
+
+    // Find a view by a custom indexer.
+    findByCustom: function(index){
+      var viewCid = this._indexByCustom[index];
+      return this.findByCid(viewCid);
+    },
+
+    // Find by index. This is not guaranteed to be a
+    // stable index.
+    findByIndex: function(index){
+      return _.values(this._views)[index];
+    },
+
+    // retrieve a view by it's `cid` directly
+    findByCid: function(cid){
+      return this._views[cid];
+    },
+
+    // Remove a view
+    remove: function(view){
+      var viewCid = view.cid;
+
+      // delete model index
+      if (view.model){
+        delete this._indexByModel[view.model.cid];
+      }
+
+      // delete custom index
+      _.any(this._indexByCustom, function(cid, key) {
+        if (cid === viewCid) {
+          delete this._indexByCustom[key];
+          return true;
+        }
+      }, this);
+
+      // remove the view from the container
+      delete this._views[viewCid];
+
+      // update the length
+      this._updateLength();
+    },
+
+    // Call a method on every view in the container,
+    // passing parameters to the call method one at a
+    // time, like `function.call`.
+    call: function(method){
+      this.apply(method, _.tail(arguments));
+    },
+
+    // Apply a method on every view in the container,
+    // passing parameters to the call method one at a
+    // time, like `function.apply`.
+    apply: function(method, args){
+      _.each(this._views, function(view){
+        if (_.isFunction(view[method])){
+          view[method].apply(view, args || []);
+        }
+      });
+    },
+
+    // Update the `.length` attribute on this container
+    _updateLength: function(){
+      this.length = _.size(this._views);
+    }
+  });
+
+  // Borrowing this code from Backbone.Collection:
+  // http://backbonejs.org/docs/backbone.html#section-106
+  //
+  // Mix in methods from Underscore, for iteration, and other
+  // collection related features.
+  var methods = ['forEach', 'each', 'map', 'find', 'detect', 'filter',
+    'select', 'reject', 'every', 'all', 'some', 'any', 'include',
+    'contains', 'invoke', 'toArray', 'first', 'initial', 'rest',
+    'last', 'without', 'isEmpty', 'pluck'];
+
+  _.each(methods, function(method) {
+    Container.prototype[method] = function() {
+      var views = _.values(this._views);
+      var args = [views].concat(_.toArray(arguments));
+      return _[method].apply(_, args);
+    };
+  });
+
+  // return the public API
+  return Container;
+})(Backbone, _);
+
+// Backbone.Wreqr (Backbone.Marionette)
+// ----------------------------------
+// v0.2.0
+//
+// Copyright (c)2013 Derick Bailey, Muted Solutions, LLC.
+// Distributed under MIT license
+//
+// http://github.com/marionettejs/backbone.wreqr
+
+
+Backbone.Wreqr = (function(Backbone, Marionette, _){
+  "use strict";
+  var Wreqr = {};
+
+  // Handlers
+// --------
+// A registry of functions to call, given a name
+
+Wreqr.Handlers = (function(Backbone, _){
+  "use strict";
+
+  // Constructor
+  // -----------
+
+  var Handlers = function(options){
+    this.options = options;
+    this._wreqrHandlers = {};
+
+    if (_.isFunction(this.initialize)){
+      this.initialize(options);
+    }
+  };
+
+  Handlers.extend = Backbone.Model.extend;
+
+  // Instance Members
+  // ----------------
+
+  _.extend(Handlers.prototype, Backbone.Events, {
+
+    // Add multiple handlers using an object literal configuration
+    setHandlers: function(handlers){
+      _.each(handlers, function(handler, name){
+        var context = null;
+
+        if (_.isObject(handler) && !_.isFunction(handler)){
+          context = handler.context;
+          handler = handler.callback;
+        }
+
+        this.setHandler(name, handler, context);
+      }, this);
+    },
+
+    // Add a handler for the given name, with an
+    // optional context to run the handler within
+    setHandler: function(name, handler, context){
+      var config = {
+        callback: handler,
+        context: context
+      };
+
+      this._wreqrHandlers[name] = config;
+
+      this.trigger("handler:add", name, handler, context);
+    },
+
+    // Determine whether or not a handler is registered
+    hasHandler: function(name){
+      return !! this._wreqrHandlers[name];
+    },
+
+    // Get the currently registered handler for
+    // the specified name. Throws an exception if
+    // no handler is found.
+    getHandler: function(name){
+      var config = this._wreqrHandlers[name];
+
+      if (!config){
+        throw new Error("Handler not found for '" + name + "'");
+      }
+
+      return function(){
+        var args = Array.prototype.slice.apply(arguments);
+        return config.callback.apply(config.context, args);
+      };
+    },
+
+    // Remove a handler for the specified name
+    removeHandler: function(name){
+      delete this._wreqrHandlers[name];
+    },
+
+    // Remove all handlers from this registry
+    removeAllHandlers: function(){
+      this._wreqrHandlers = {};
+    }
+  });
+
+  return Handlers;
+})(Backbone, _);
+
+  // Wreqr.CommandStorage
+// --------------------
+//
+// Store and retrieve commands for execution.
+Wreqr.CommandStorage = (function(){
+  "use strict";
+
+  // Constructor function
+  var CommandStorage = function(options){
+    this.options = options;
+    this._commands = {};
+
+    if (_.isFunction(this.initialize)){
+      this.initialize(options);
+    }
+  };
+
+  // Instance methods
+  _.extend(CommandStorage.prototype, Backbone.Events, {
+
+    // Get an object literal by command name, that contains
+    // the `commandName` and the `instances` of all commands
+    // represented as an array of arguments to process
+    getCommands: function(commandName){
+      var commands = this._commands[commandName];
+
+      // we don't have it, so add it
+      if (!commands){
+
+        // build the configuration
+        commands = {
+          command: commandName,
+          instances: []
+        };
+
+        // store it
+        this._commands[commandName] = commands;
+      }
+
+      return commands;
+    },
+
+    // Add a command by name, to the storage and store the
+    // args for the command
+    addCommand: function(commandName, args){
+      var command = this.getCommands(commandName);
+      command.instances.push(args);
+    },
+
+    // Clear all commands for the given `commandName`
+    clearCommands: function(commandName){
+      var command = this.getCommands(commandName);
+      command.instances = [];
+    }
+  });
+
+  return CommandStorage;
+})();
+
+  // Wreqr.Commands
+// --------------
+//
+// A simple command pattern implementation. Register a command
+// handler and execute it.
+Wreqr.Commands = (function(Wreqr){
+  "use strict";
+
+  return Wreqr.Handlers.extend({
+    // default storage type
+    storageType: Wreqr.CommandStorage,
+
+    constructor: function(options){
+      this.options = options || {};
+
+      this._initializeStorage(this.options);
+      this.on("handler:add", this._executeCommands, this);
+
+      var args = Array.prototype.slice.call(arguments);
+      Wreqr.Handlers.prototype.constructor.apply(this, args);
+    },
+
+    // Execute a named command with the supplied args
+    execute: function(name, args){
+      name = arguments[0];
+      args = Array.prototype.slice.call(arguments, 1);
+
+      if (this.hasHandler(name)){
+        this.getHandler(name).apply(this, args);
+      } else {
+        this.storage.addCommand(name, args);
+      }
+
+    },
+
+    // Internal method to handle bulk execution of stored commands
+    _executeCommands: function(name, handler, context){
+      var command = this.storage.getCommands(name);
+
+      // loop through and execute all the stored command instances
+      _.each(command.instances, function(args){
+        handler.apply(context, args);
+      });
+
+      this.storage.clearCommands(name);
+    },
+
+    // Internal method to initialize storage either from the type's
+    // `storageType` or the instance `options.storageType`.
+    _initializeStorage: function(options){
+      var storage;
+
+      var StorageType = options.storageType || this.storageType;
+      if (_.isFunction(StorageType)){
+        storage = new StorageType();
+      } else {
+        storage = StorageType;
+      }
+
+      this.storage = storage;
+    }
+  });
+
+})(Wreqr);
+
+  // Wreqr.RequestResponse
+// ---------------------
+//
+// A simple request/response implementation. Register a
+// request handler, and return a response from it
+Wreqr.RequestResponse = (function(Wreqr){
+  "use strict";
+
+  return Wreqr.Handlers.extend({
+    request: function(){
+      var name = arguments[0];
+      var args = Array.prototype.slice.call(arguments, 1);
+
+      return this.getHandler(name).apply(this, args);
+    }
+  });
+
+})(Wreqr);
+
+  // Event Aggregator
+// ----------------
+// A pub-sub object that can be used to decouple various parts
+// of an application through event-driven architecture.
+
+Wreqr.EventAggregator = (function(Backbone, _){
+  "use strict";
+  var EA = function(){};
+
+  // Copy the `extend` function used by Backbone's classes
+  EA.extend = Backbone.Model.extend;
+
+  // Copy the basic Backbone.Events on to the event aggregator
+  _.extend(EA.prototype, Backbone.Events);
+
+  return EA;
+})(Backbone, _);
+
+
+  return Wreqr;
+})(Backbone, Backbone.Marionette, _);
+
+var Marionette = (function(global, Backbone, _){
+  "use strict";
+
+  // Define and export the Marionette namespace
+  var Marionette = {};
+  Backbone.Marionette = Marionette;
+
+  // Get the DOM manipulator for later use
+  Marionette.$ = Backbone.$;
+
+// Helpers
+// -------
+
+// For slicing `arguments` in functions
+var protoSlice = Array.prototype.slice;
+function slice(args) {
+  return protoSlice.call(args);
+}
+
+function throwError(message, name) {
+  var error = new Error(message);
+  error.name = name || 'Error';
+  throw error;
+}
+
+// Marionette.extend
+// -----------------
+
+// Borrow the Backbone `extend` method so we can use it as needed
+Marionette.extend = Backbone.Model.extend;
+
+// Marionette.getOption
+// --------------------
+
+// Retrieve an object, function or other value from a target
+// object or its `options`, with `options` taking precedence.
+Marionette.getOption = function(target, optionName){
+  if (!target || !optionName){ return; }
+  var value;
+
+  if (target.options && (optionName in target.options) && (target.options[optionName] !== undefined)){
+    value = target.options[optionName];
+  } else {
+    value = target[optionName];
+  }
+
+  return value;
+};
+
+// Trigger an event and/or a corresponding method name. Examples:
+//
+// `this.triggerMethod("foo")` will trigger the "foo" event and
+// call the "onFoo" method.
+//
+// `this.triggerMethod("foo:bar") will trigger the "foo:bar" event and
+// call the "onFooBar" method.
+Marionette.triggerMethod = (function(){
+
+  // split the event name on the :
+  var splitter = /(^|:)(\w)/gi;
+
+  // take the event section ("section1:section2:section3")
+  // and turn it in to uppercase name
+  function getEventName(match, prefix, eventName) {
+    return eventName.toUpperCase();
+  }
+
+  // actual triggerMethod name
+  var triggerMethod = function(event) {
+    // get the method name from the event name
+    var methodName = 'on' + event.replace(splitter, getEventName);
+    var method = this[methodName];
+
+    // trigger the event, if a trigger method exists
+    if(_.isFunction(this.trigger)) {
+      this.trigger.apply(this, arguments);
+    }
+
+    // call the onMethodName if it exists
+    if (_.isFunction(method)) {
+      // pass all arguments, except the event name
+      return method.apply(this, _.tail(arguments));
+    }
+  };
+
+  return triggerMethod;
+})();
+
+// DOMRefresh
+// ----------
+//
+// Monitor a view's state, and after it has been rendered and shown
+// in the DOM, trigger a "dom:refresh" event every time it is
+// re-rendered.
+
+Marionette.MonitorDOMRefresh = (function(){
+  // track when the view has been shown in the DOM,
+  // using a Marionette.Region (or by other means of triggering "show")
+  function handleShow(view){
+    view._isShown = true;
+    triggerDOMRefresh(view);
+  }
+
+  // track when the view has been rendered
+  function handleRender(view){
+    view._isRendered = true;
+    triggerDOMRefresh(view);
+  }
+
+  // Trigger the "dom:refresh" event and corresponding "onDomRefresh" method
+  function triggerDOMRefresh(view){
+    if (view._isShown && view._isRendered){
+      if (_.isFunction(view.triggerMethod)){
+        view.triggerMethod("dom:refresh");
+      }
+    }
+  }
+
+  // Export public API
+  return function(view){
+    view.listenTo(view, "show", function(){
+      handleShow(view);
+    });
+
+    view.listenTo(view, "render", function(){
+      handleRender(view);
+    });
+  };
+})();
+
+
+// Marionette.bindEntityEvents & unbindEntityEvents
+// ---------------------------
+//
+// These methods are used to bind/unbind a backbone "entity" (collection/model)
+// to methods on a target object.
+//
+// The first parameter, `target`, must have a `listenTo` method from the
+// EventBinder object.
+//
+// The second parameter is the entity (Backbone.Model or Backbone.Collection)
+// to bind the events from.
+//
+// The third parameter is a hash of { "event:name": "eventHandler" }
+// configuration. Multiple handlers can be separated by a space. A
+// function can be supplied instead of a string handler name.
+
+(function(Marionette){
+  "use strict";
+
+  // Bind the event to handlers specified as a string of
+  // handler names on the target object
+  function bindFromStrings(target, entity, evt, methods){
+    var methodNames = methods.split(/\s+/);
+
+    _.each(methodNames,function(methodName) {
+
+      var method = target[methodName];
+      if(!method) {
+        throwError("Method '"+ methodName +"' was configured as an event handler, but does not exist.");
+      }
+
+      target.listenTo(entity, evt, method, target);
+    });
+  }
+
+  // Bind the event to a supplied callback function
+  function bindToFunction(target, entity, evt, method){
+      target.listenTo(entity, evt, method, target);
+  }
+
+  // Bind the event to handlers specified as a string of
+  // handler names on the target object
+  function unbindFromStrings(target, entity, evt, methods){
+    var methodNames = methods.split(/\s+/);
+
+    _.each(methodNames,function(methodName) {
+      var method = target[methodName];
+      target.stopListening(entity, evt, method, target);
+    });
+  }
+
+  // Bind the event to a supplied callback function
+  function unbindToFunction(target, entity, evt, method){
+      target.stopListening(entity, evt, method, target);
+  }
+
+
+  // generic looping function
+  function iterateEvents(target, entity, bindings, functionCallback, stringCallback){
+    if (!entity || !bindings) { return; }
+
+    // allow the bindings to be a function
+    if (_.isFunction(bindings)){
+      bindings = bindings.call(target);
+    }
+
+    // iterate the bindings and bind them
+    _.each(bindings, function(methods, evt){
+
+      // allow for a function as the handler,
+      // or a list of event names as a string
+      if (_.isFunction(methods)){
+        functionCallback(target, entity, evt, methods);
+      } else {
+        stringCallback(target, entity, evt, methods);
+      }
+
+    });
+  }
+
+  // Export Public API
+  Marionette.bindEntityEvents = function(target, entity, bindings){
+    iterateEvents(target, entity, bindings, bindToFunction, bindFromStrings);
+  };
+
+  Marionette.unbindEntityEvents = function(target, entity, bindings){
+    iterateEvents(target, entity, bindings, unbindToFunction, unbindFromStrings);
+  };
+
+})(Marionette);
+
+
+// Callbacks
+// ---------
+
+// A simple way of managing a collection of callbacks
+// and executing them at a later point in time, using jQuery's
+// `Deferred` object.
+Marionette.Callbacks = function(){
+  this._deferred = Marionette.$.Deferred();
+  this._callbacks = [];
+};
+
+_.extend(Marionette.Callbacks.prototype, {
+
+  // Add a callback to be executed. Callbacks added here are
+  // guaranteed to execute, even if they are added after the
+  // `run` method is called.
+  add: function(callback, contextOverride){
+    this._callbacks.push({cb: callback, ctx: contextOverride});
+
+    this._deferred.done(function(context, options){
+      if (contextOverride){ context = contextOverride; }
+      callback.call(context, options);
+    });
+  },
+
+  // Run all registered callbacks with the context specified.
+  // Additional callbacks can be added after this has been run
+  // and they will still be executed.
+  run: function(options, context){
+    this._deferred.resolve(context, options);
+  },
+
+  // Resets the list of callbacks to be run, allowing the same list
+  // to be run multiple times - whenever the `run` method is called.
+  reset: function(){
+    var callbacks = this._callbacks;
+    this._deferred = Marionette.$.Deferred();
+    this._callbacks = [];
+
+    _.each(callbacks, function(cb){
+      this.add(cb.cb, cb.ctx);
+    }, this);
+  }
+});
+
+
+// Marionette Controller
+// ---------------------
+//
+// A multi-purpose object to use as a controller for
+// modules and routers, and as a mediator for workflow
+// and coordination of other objects, views, and more.
+Marionette.Controller = function(options){
+  this.triggerMethod = Marionette.triggerMethod;
+  this.options = options || {};
+
+  if (_.isFunction(this.initialize)){
+    this.initialize(this.options);
+  }
+};
+
+Marionette.Controller.extend = Marionette.extend;
+
+// Controller Methods
+// --------------
+
+// Ensure it can trigger events with Backbone.Events
+_.extend(Marionette.Controller.prototype, Backbone.Events, {
+  close: function(){
+    this.stopListening();
+    this.triggerMethod("close");
+    this.unbind();
+  }
+});
+
+// Region
+// ------
+//
+// Manage the visual regions of your composite application. See
+// http://lostechies.com/derickbailey/2011/12/12/composite-js-apps-regions-and-region-managers/
+
+Marionette.Region = function(options){
+  this.options = options || {};
+
+  this.el = Marionette.getOption(this, "el");
+
+  if (!this.el){
+    var err = new Error("An 'el' must be specified for a region.");
+    err.name = "NoElError";
+    throw err;
+  }
+
+  if (this.initialize){
+    var args = Array.prototype.slice.apply(arguments);
+    this.initialize.apply(this, args);
+  }
+};
+
+
+// Region Type methods
+// -------------------
+
+_.extend(Marionette.Region, {
+
+  // Build an instance of a region by passing in a configuration object
+  // and a default region type to use if none is specified in the config.
+  //
+  // The config object should either be a string as a jQuery DOM selector,
+  // a Region type directly, or an object literal that specifies both
+  // a selector and regionType:
+  //
+  // ```js
+  // {
+  //   selector: "#foo",
+  //   regionType: MyCustomRegion
+  // }
+  // ```
+  //
+  buildRegion: function(regionConfig, defaultRegionType){
+
+    var regionIsString = (typeof regionConfig === "string");
+    var regionSelectorIsString = (typeof regionConfig.selector === "string");
+    var regionTypeIsUndefined = (typeof regionConfig.regionType === "undefined");
+    var regionIsType = (typeof regionConfig === "function");
+
+    if (!regionIsType && !regionIsString && !regionSelectorIsString) {
+      throw new Error("Region must be specified as a Region type, a selector string or an object with selector property");
+    }
+
+    var selector, RegionType;
+
+    // get the selector for the region
+
+    if (regionIsString) {
+      selector = regionConfig;
+    }
+
+    if (regionConfig.selector) {
+      selector = regionConfig.selector;
+    }
+
+    // get the type for the region
+
+    if (regionIsType){
+      RegionType = regionConfig;
+    }
+
+    if (!regionIsType && regionTypeIsUndefined) {
+      RegionType = defaultRegionType;
+    }
+
+    if (regionConfig.regionType) {
+      RegionType = regionConfig.regionType;
+    }
+
+    // build the region instance
+    var region = new RegionType({
+      el: selector
+    });
+
+    // override the `getEl` function if we have a parentEl
+    // this must be overridden to ensure the selector is found
+    // on the first use of the region. if we try to assign the
+    // region's `el` to `parentEl.find(selector)` in the object
+    // literal to build the region, the element will not be
+    // guaranteed to be in the DOM already, and will cause problems
+    if (regionConfig.parentEl){
+
+      region.getEl = function(selector) {
+        var parentEl = regionConfig.parentEl;
+        if (_.isFunction(parentEl)){
+          parentEl = parentEl();
+        }
+        return parentEl.find(selector);
+      };
+    }
+
+    return region;
+  }
+
+});
+
+// Region Instance Methods
+// -----------------------
+
+_.extend(Marionette.Region.prototype, Backbone.Events, {
+
+  // Displays a backbone view instance inside of the region.
+  // Handles calling the `render` method for you. Reads content
+  // directly from the `el` attribute. Also calls an optional
+  // `onShow` and `close` method on your view, just after showing
+  // or just before closing the view, respectively.
+  show: function(view){
+
+    this.ensureEl();
+
+    var isViewClosed = view.isClosed || _.isUndefined(view.$el);
+
+    var isDifferentView = view !== this.currentView;
+
+    if (isDifferentView) {
+      this.close();
+    }
+
+    view.render();
+
+    if (isDifferentView || isViewClosed) {
+      this.open(view);
+    }
+
+    this.currentView = view;
+
+    Marionette.triggerMethod.call(this, "show", view);
+    Marionette.triggerMethod.call(view, "show");
+  },
+
+  ensureEl: function(){
+    if (!this.$el || this.$el.length === 0){
+      this.$el = this.getEl(this.el);
+    }
+  },
+
+  // Override this method to change how the region finds the
+  // DOM element that it manages. Return a jQuery selector object.
+  getEl: function(selector){
+    return Marionette.$(selector);
+  },
+
+  // Override this method to change how the new view is
+  // appended to the `$el` that the region is managing
+  open: function(view){
+    this.$el.empty().append(view.el);
+  },
+
+  // Close the current view, if there is one. If there is no
+  // current view, it does nothing and returns immediately.
+  close: function(){
+    var view = this.currentView;
+    if (!view || view.isClosed){ return; }
+
+    // call 'close' or 'remove', depending on which is found
+    if (view.close) { view.close(); }
+    else if (view.remove) { view.remove(); }
+
+    Marionette.triggerMethod.call(this, "close");
+
+    delete this.currentView;
+  },
+
+  // Attach an existing view to the region. This
+  // will not call `render` or `onShow` for the new view,
+  // and will not replace the current HTML for the `el`
+  // of the region.
+  attachView: function(view){
+    this.currentView = view;
+  },
+
+  // Reset the region by closing any existing view and
+  // clearing out the cached `$el`. The next time a view
+  // is shown via this region, the region will re-query the
+  // DOM for the region's `el`.
+  reset: function(){
+    this.close();
+    delete this.$el;
+  }
+});
+
+// Copy the `extend` function used by Backbone's classes
+Marionette.Region.extend = Marionette.extend;
+
+// Marionette.RegionManager
+// ------------------------
+//
+// Manage one or more related `Marionette.Region` objects.
+Marionette.RegionManager = (function(Marionette){
+
+  var RegionManager = Marionette.Controller.extend({
+    constructor: function(options){
+      this._regions = {};
+      Marionette.Controller.prototype.constructor.call(this, options);
+    },
+
+    // Add multiple regions using an object literal, where
+    // each key becomes the region name, and each value is
+    // the region definition.
+    addRegions: function(regionDefinitions, defaults){
+      var regions = {};
+
+      _.each(regionDefinitions, function(definition, name){
+        if (typeof definition === "string"){
+          definition = { selector: definition };
+        }
+
+        if (definition.selector){
+          definition = _.defaults({}, definition, defaults);
+        }
+
+        var region = this.addRegion(name, definition);
+        regions[name] = region;
+      }, this);
+
+      return regions;
+    },
+
+    // Add an individual region to the region manager,
+    // and return the region instance
+    addRegion: function(name, definition){
+      var region;
+
+      var isObject = _.isObject(definition);
+      var isString = _.isString(definition);
+      var hasSelector = !!definition.selector;
+
+      if (isString || (isObject && hasSelector)){
+        region = Marionette.Region.buildRegion(definition, Marionette.Region);
+      } else if (_.isFunction(definition)){
+        region = Marionette.Region.buildRegion(definition, Marionette.Region);
+      } else {
+        region = definition;
+      }
+
+      this._store(name, region);
+      this.triggerMethod("region:add", name, region);
+      return region;
+    },
+
+    // Get a region by name
+    get: function(name){
+      return this._regions[name];
+    },
+
+    // Remove a region by name
+    removeRegion: function(name){
+      var region = this._regions[name];
+      this._remove(name, region);
+    },
+
+    // Close all regions in the region manager, and
+    // remove them
+    removeRegions: function(){
+      _.each(this._regions, function(region, name){
+        this._remove(name, region);
+      }, this);
+    },
+
+    // Close all regions in the region manager, but
+    // leave them attached
+    closeRegions: function(){
+      _.each(this._regions, function(region, name){
+        region.close();
+      }, this);
+    },
+
+    // Close all regions and shut down the region
+    // manager entirely
+    close: function(){
+      this.removeRegions();
+      var args = Array.prototype.slice.call(arguments);
+      Marionette.Controller.prototype.close.apply(this, args);
+    },
+
+    // internal method to store regions
+    _store: function(name, region){
+      this._regions[name] = region;
+      this._setLength();
+    },
+
+    // internal method to remove a region
+    _remove: function(name, region){
+      region.close();
+      delete this._regions[name];
+      this._setLength();
+      this.triggerMethod("region:remove", name, region);
+    },
+
+    // set the number of regions current held
+    _setLength: function(){
+      this.length = _.size(this._regions);
+    }
+
+  });
+
+  // Borrowing this code from Backbone.Collection:
+  // http://backbonejs.org/docs/backbone.html#section-106
+  //
+  // Mix in methods from Underscore, for iteration, and other
+  // collection related features.
+  var methods = ['forEach', 'each', 'map', 'find', 'detect', 'filter',
+    'select', 'reject', 'every', 'all', 'some', 'any', 'include',
+    'contains', 'invoke', 'toArray', 'first', 'initial', 'rest',
+    'last', 'without', 'isEmpty', 'pluck'];
+
+  _.each(methods, function(method) {
+    RegionManager.prototype[method] = function() {
+      var regions = _.values(this._regions);
+      var args = [regions].concat(_.toArray(arguments));
+      return _[method].apply(_, args);
+    };
+  });
+
+  return RegionManager;
+})(Marionette);
+
+
+// Template Cache
+// --------------
+
+// Manage templates stored in `<script>` blocks,
+// caching them for faster access.
+Marionette.TemplateCache = function(templateId){
+  this.templateId = templateId;
+};
+
+// TemplateCache object-level methods. Manage the template
+// caches from these method calls instead of creating
+// your own TemplateCache instances
+_.extend(Marionette.TemplateCache, {
+  templateCaches: {},
+
+  // Get the specified template by id. Either
+  // retrieves the cached version, or loads it
+  // from the DOM.
+  get: function(templateId){
+    var cachedTemplate = this.templateCaches[templateId];
+
+    if (!cachedTemplate){
+      cachedTemplate = new Marionette.TemplateCache(templateId);
+      this.templateCaches[templateId] = cachedTemplate;
+    }
+
+    return cachedTemplate.load();
+  },
+
+  // Clear templates from the cache. If no arguments
+  // are specified, clears all templates:
+  // `clear()`
+  //
+  // If arguments are specified, clears each of the
+  // specified templates from the cache:
+  // `clear("#t1", "#t2", "...")`
+  clear: function(){
+    var i;
+    var args = slice(arguments);
+    var length = args.length;
+
+    if (length > 0){
+      for(i=0; i<length; i++){
+        delete this.templateCaches[args[i]];
+      }
+    } else {
+      this.templateCaches = {};
+    }
+  }
+});
+
+// TemplateCache instance methods, allowing each
+// template cache object to manage its own state
+// and know whether or not it has been loaded
+_.extend(Marionette.TemplateCache.prototype, {
+
+  // Internal method to load the template
+  load: function(){
+    // Guard clause to prevent loading this template more than once
+    if (this.compiledTemplate){
+      return this.compiledTemplate;
+    }
+
+    // Load the template and compile it
+    var template = this.loadTemplate(this.templateId);
+    this.compiledTemplate = this.compileTemplate(template);
+
+    return this.compiledTemplate;
+  },
+
+  // Load a template from the DOM, by default. Override
+  // this method to provide your own template retrieval
+  // For asynchronous loading with AMD/RequireJS, consider
+  // using a template-loader plugin as described here:
+  // https://github.com/marionettejs/backbone.marionette/wiki/Using-marionette-with-requirejs
+  loadTemplate: function(templateId){
+    var template = Marionette.$(templateId).html();
+
+    if (!template || template.length === 0){
+      throwError("Could not find template: '" + templateId + "'", "NoTemplateError");
+    }
+
+    return template;
+  },
+
+  // Pre-compile the template before caching it. Override
+  // this method if you do not need to pre-compile a template
+  // (JST / RequireJS for example) or if you want to change
+  // the template engine used (Handebars, etc).
+  compileTemplate: function(rawTemplate){
+    return _.template(rawTemplate);
+  }
+});
+
+
+// Renderer
+// --------
+
+// Render a template with data by passing in the template
+// selector and the data to render.
+Marionette.Renderer = {
+
+  // Render a template with data. The `template` parameter is
+  // passed to the `TemplateCache` object to retrieve the
+  // template function. Override this method to provide your own
+  // custom rendering and template handling for all of Marionette.
+  render: function(template, data){
+
+    if (!template) {
+      var error = new Error("Cannot render the template since it's false, null or undefined.");
+      error.name = "TemplateNotFoundError";
+      throw error;
+    }
+
+    var templateFunc;
+    if (typeof template === "function"){
+      templateFunc = template;
+    } else {
+      templateFunc = Marionette.TemplateCache.get(template);
+    }
+
+    return templateFunc(data);
+  }
+};
+
+
+
+// Marionette.View
+// ---------------
+
+// The core view type that other Marionette views extend from.
+Marionette.View = Backbone.View.extend({
+
+  constructor: function(options){
+    _.bindAll(this, "render");
+
+    var args = Array.prototype.slice.apply(arguments);
+
+    // this exposes view options to the view initializer
+    // this is a backfill since backbone removed the assignment
+    // of this.options
+    // at some point however this may be removed
+    this.options = options || {};
+    Backbone.View.prototype.constructor.apply(this, args);
+
+    Marionette.MonitorDOMRefresh(this);
+    this.listenTo(this, "show", this.onShowCalled, this);
+  },
+
+  // import the "triggerMethod" to trigger events with corresponding
+  // methods if the method exists
+  triggerMethod: Marionette.triggerMethod,
+
+  // Get the template for this view
+  // instance. You can set a `template` attribute in the view
+  // definition or pass a `template: "whatever"` parameter in
+  // to the constructor options.
+  getTemplate: function(){
+    return Marionette.getOption(this, "template");
+  },
+
+  // Mix in template helper methods. Looks for a
+  // `templateHelpers` attribute, which can either be an
+  // object literal, or a function that returns an object
+  // literal. All methods and attributes from this object
+  // are copies to the object passed in.
+  mixinTemplateHelpers: function(target){
+    target = target || {};
+    var templateHelpers = Marionette.getOption(this, "templateHelpers");
+    if (_.isFunction(templateHelpers)){
+      templateHelpers = templateHelpers.call(this);
+    }
+    return _.extend(target, templateHelpers);
+  },
+
+  // Configure `triggers` to forward DOM events to view
+  // events. `triggers: {"click .foo": "do:foo"}`
+  configureTriggers: function(){
+    if (!this.triggers) { return; }
+
+    var triggerEvents = {};
+
+    // Allow `triggers` to be configured as a function
+    var triggers = _.result(this, "triggers");
+
+    // Configure the triggers, prevent default
+    // action and stop propagation of DOM events
+    _.each(triggers, function(value, key){
+
+      var hasOptions = _.isObject(value);
+      var eventName = hasOptions ? value.event : value;
+
+      // build the event handler function for the DOM event
+      triggerEvents[key] = function(e){
+
+        // stop the event in its tracks
+        if (e) {
+          var prevent = e.preventDefault;
+          var stop = e.stopPropagation;
+
+          var shouldPrevent = hasOptions ? value.preventDefault : prevent;
+          var shouldStop = hasOptions ? value.stopPropagation : stop;
+
+          if (shouldPrevent && prevent) { prevent.apply(e); }
+          if (shouldStop && stop) { stop.apply(e); }
+        }
+
+        // build the args for the event
+        var args = {
+          view: this,
+          model: this.model,
+          collection: this.collection
+        };
+
+        // trigger the event
+        this.triggerMethod(eventName, args);
+      };
+
+    }, this);
+
+    return triggerEvents;
+  },
+
+  // Overriding Backbone.View's delegateEvents to handle
+  // the `triggers`, `modelEvents`, and `collectionEvents` configuration
+  delegateEvents: function(events){
+    this._delegateDOMEvents(events);
+    Marionette.bindEntityEvents(this, this.model, Marionette.getOption(this, "modelEvents"));
+    Marionette.bindEntityEvents(this, this.collection, Marionette.getOption(this, "collectionEvents"));
+  },
+
+  // internal method to delegate DOM events and triggers
+  _delegateDOMEvents: function(events){
+    events = events || this.events;
+    if (_.isFunction(events)){ events = events.call(this); }
+
+    var combinedEvents = {};
+    var triggers = this.configureTriggers();
+    _.extend(combinedEvents, events, triggers);
+
+    Backbone.View.prototype.delegateEvents.call(this, combinedEvents);
+  },
+
+  // Overriding Backbone.View's undelegateEvents to handle unbinding
+  // the `triggers`, `modelEvents`, and `collectionEvents` config
+  undelegateEvents: function(){
+    var args = Array.prototype.slice.call(arguments);
+    Backbone.View.prototype.undelegateEvents.apply(this, args);
+
+    Marionette.unbindEntityEvents(this, this.model, Marionette.getOption(this, "modelEvents"));
+    Marionette.unbindEntityEvents(this, this.collection, Marionette.getOption(this, "collectionEvents"));
+  },
+
+  // Internal method, handles the `show` event.
+  onShowCalled: function(){},
+
+  // Default `close` implementation, for removing a view from the
+  // DOM and unbinding it. Regions will call this method
+  // for you. You can specify an `onClose` method in your view to
+  // add custom code that is called after the view is closed.
+  close: function(){
+    if (this.isClosed) { return; }
+
+    // allow the close to be stopped by returning `false`
+    // from the `onBeforeClose` method
+    var shouldClose = this.triggerMethod("before:close");
+    if (shouldClose === false){
+      return;
+    }
+
+    // mark as closed before doing the actual close, to
+    // prevent infinite loops within "close" event handlers
+    // that are trying to close other views
+    this.isClosed = true;
+    this.triggerMethod("close");
+
+    // unbind UI elements
+    this.unbindUIElements();
+
+    // remove the view from the DOM
+    this.remove();
+  },
+
+  // This method binds the elements specified in the "ui" hash inside the view's code with
+  // the associated jQuery selectors.
+  bindUIElements: function(){
+    if (!this.ui) { return; }
+
+    // store the ui hash in _uiBindings so they can be reset later
+    // and so re-rendering the view will be able to find the bindings
+    if (!this._uiBindings){
+      this._uiBindings = this.ui;
+    }
+
+    // get the bindings result, as a function or otherwise
+    var bindings = _.result(this, "_uiBindings");
+
+    // empty the ui so we don't have anything to start with
+    this.ui = {};
+
+    // bind each of the selectors
+    _.each(_.keys(bindings), function(key) {
+      var selector = bindings[key];
+      this.ui[key] = this.$(selector);
+    }, this);
+  },
+
+  // This method unbinds the elements specified in the "ui" hash
+  unbindUIElements: function(){
+    if (!this.ui || !this._uiBindings){ return; }
+
+    // delete all of the existing ui bindings
+    _.each(this.ui, function($el, name){
+      delete this.ui[name];
+    }, this);
+
+    // reset the ui element to the original bindings configuration
+    this.ui = this._uiBindings;
+    delete this._uiBindings;
+  }
+});
+
+// Item View
+// ---------
+
+// A single item view implementation that contains code for rendering
+// with underscore.js templates, serializing the view's model or collection,
+// and calling several methods on extended views, such as `onRender`.
+Marionette.ItemView = Marionette.View.extend({
+
+  // Setting up the inheritance chain which allows changes to
+  // Marionette.View.prototype.constructor which allows overriding
+  constructor: function(){
+    Marionette.View.prototype.constructor.apply(this, slice(arguments));
+  },
+
+  // Serialize the model or collection for the view. If a model is
+  // found, `.toJSON()` is called. If a collection is found, `.toJSON()`
+  // is also called, but is used to populate an `items` array in the
+  // resulting data. If both are found, defaults to the model.
+  // You can override the `serializeData` method in your own view
+  // definition, to provide custom serialization for your view's data.
+  serializeData: function(){
+    var data = {};
+
+    if (this.model) {
+      data = this.model.toJSON();
+    }
+    else if (this.collection) {
+      data = { items: this.collection.toJSON() };
+    }
+
+    return data;
+  },
+
+  // Render the view, defaulting to underscore.js templates.
+  // You can override this in your view definition to provide
+  // a very specific rendering for your view. In general, though,
+  // you should override the `Marionette.Renderer` object to
+  // change how Marionette renders views.
+  render: function(){
+    this.isClosed = false;
+
+    this.triggerMethod("before:render", this);
+    this.triggerMethod("item:before:render", this);
+
+    var data = this.serializeData();
+    data = this.mixinTemplateHelpers(data);
+
+    var template = this.getTemplate();
+    var html = Marionette.Renderer.render(template, data);
+
+    this.$el.html(html);
+    this.bindUIElements();
+
+    this.triggerMethod("render", this);
+    this.triggerMethod("item:rendered", this);
+
+    return this;
+  },
+
+  // Override the default close event to add a few
+  // more events that are triggered.
+  close: function(){
+    if (this.isClosed){ return; }
+
+    this.triggerMethod('item:before:close');
+
+    Marionette.View.prototype.close.apply(this, slice(arguments));
+
+    this.triggerMethod('item:closed');
+  }
+});
+
+// Collection View
+// ---------------
+
+// A view that iterates over a Backbone.Collection
+// and renders an individual ItemView for each model.
+Marionette.CollectionView = Marionette.View.extend({
+  // used as the prefix for item view events
+  // that are forwarded through the collectionview
+  itemViewEventPrefix: "itemview",
+
+  // constructor
+  constructor: function(options){
+    this._initChildViewStorage();
+
+    Marionette.View.prototype.constructor.apply(this, slice(arguments));
+
+    this._initialEvents();
+  },
+
+  // Configured the initial events that the collection view
+  // binds to. Override this method to prevent the initial
+  // events, or to add your own initial events.
+  _initialEvents: function(){
+    if (this.collection){
+      this.listenTo(this.collection, "add", this.addChildView, this);
+      this.listenTo(this.collection, "remove", this.removeItemView, this);
+      this.listenTo(this.collection, "reset", this.render, this);
+    }
+  },
+
+  // Handle a child item added to the collection
+  addChildView: function(item, collection, options){
+    this.closeEmptyView();
+    var ItemView = this.getItemView(item);
+    var index = this.collection.indexOf(item);
+    this.addItemView(item, ItemView, index);
+  },
+
+  // Override from `Marionette.View` to guarantee the `onShow` method
+  // of child views is called.
+  onShowCalled: function(){
+    this.children.each(function(child){
+      Marionette.triggerMethod.call(child, "show");
+    });
+  },
+
+  // Internal method to trigger the before render callbacks
+  // and events
+  triggerBeforeRender: function(){
+    this.triggerMethod("before:render", this);
+    this.triggerMethod("collection:before:render", this);
+  },
+
+  // Internal method to trigger the rendered callbacks and
+  // events
+  triggerRendered: function(){
+    this.triggerMethod("render", this);
+    this.triggerMethod("collection:rendered", this);
+  },
+
+  // Render the collection of items. Override this method to
+  // provide your own implementation of a render function for
+  // the collection view.
+  render: function(){
+    this.isClosed = false;
+    this.triggerBeforeRender();
+    this._renderChildren();
+    this.triggerRendered();
+    return this;
+  },
+
+  // Internal method. Separated so that CompositeView can have
+  // more control over events being triggered, around the rendering
+  // process
+  _renderChildren: function(){
+    this.closeEmptyView();
+    this.closeChildren();
+
+    if (this.collection && this.collection.length > 0) {
+      this.showCollection();
+    } else {
+      this.showEmptyView();
+    }
+  },
+
+  // Internal method to loop through each item in the
+  // collection view and show it
+  showCollection: function(){
+    var ItemView;
+    this.collection.each(function(item, index){
+      ItemView = this.getItemView(item);
+      this.addItemView(item, ItemView, index);
+    }, this);
+  },
+
+  // Internal method to show an empty view in place of
+  // a collection of item views, when the collection is
+  // empty
+  showEmptyView: function(){
+    var EmptyView = this.getEmptyView();
+
+    if (EmptyView && !this._showingEmptyView){
+      this._showingEmptyView = true;
+      var model = new Backbone.Model();
+      this.addItemView(model, EmptyView, 0);
+    }
+  },
+
+  // Internal method to close an existing emptyView instance
+  // if one exists. Called when a collection view has been
+  // rendered empty, and then an item is added to the collection.
+  closeEmptyView: function(){
+    if (this._showingEmptyView){
+      this.closeChildren();
+      delete this._showingEmptyView;
+    }
+  },
+
+  // Retrieve the empty view type
+  getEmptyView: function(){
+    return Marionette.getOption(this, "emptyView");
+  },
+
+  // Retrieve the itemView type, either from `this.options.itemView`
+  // or from the `itemView` in the object definition. The "options"
+  // takes precedence.
+  getItemView: function(item){
+    var itemView = Marionette.getOption(this, "itemView");
+
+    if (!itemView){
+      throwError("An `itemView` must be specified", "NoItemViewError");
+    }
+
+    return itemView;
+  },
+
+  // Render the child item's view and add it to the
+  // HTML for the collection view.
+  addItemView: function(item, ItemView, index){
+    // get the itemViewOptions if any were specified
+    var itemViewOptions = Marionette.getOption(this, "itemViewOptions");
+    if (_.isFunction(itemViewOptions)){
+      itemViewOptions = itemViewOptions.call(this, item, index);
+    }
+
+    // build the view
+    var view = this.buildItemView(item, ItemView, itemViewOptions);
+
+    // set up the child view event forwarding
+    this.addChildViewEventForwarding(view);
+
+    // this view is about to be added
+    this.triggerMethod("before:item:added", view);
+
+    // Store the child view itself so we can properly
+    // remove and/or close it later
+    this.children.add(view);
+
+    // Render it and show it
+    this.renderItemView(view, index);
+
+    // call the "show" method if the collection view
+    // has already been shown
+    if (this._isShown){
+      Marionette.triggerMethod.call(view, "show");
+    }
+
+    // this view was added
+    this.triggerMethod("after:item:added", view);
+  },
+
+  // Set up the child view event forwarding. Uses an "itemview:"
+  // prefix in front of all forwarded events.
+  addChildViewEventForwarding: function(view){
+    var prefix = Marionette.getOption(this, "itemViewEventPrefix");
+
+    // Forward all child item view events through the parent,
+    // prepending "itemview:" to the event name
+    this.listenTo(view, "all", function(){
+      var args = slice(arguments);
+      args[0] = prefix + ":" + args[0];
+      args.splice(1, 0, view);
+
+      Marionette.triggerMethod.apply(this, args);
+    }, this);
+  },
+
+  // render the item view
+  renderItemView: function(view, index) {
+    view.render();
+    this.appendHtml(this, view, index);
+  },
+
+  // Build an `itemView` for every model in the collection.
+  buildItemView: function(item, ItemViewType, itemViewOptions){
+    var options = _.extend({model: item}, itemViewOptions);
+    return new ItemViewType(options);
+  },
+
+  // get the child view by item it holds, and remove it
+  removeItemView: function(item){
+    var view = this.children.findByModel(item);
+    this.removeChildView(view);
+    this.checkEmpty();
+  },
+
+  // Remove the child view and close it
+  removeChildView: function(view){
+
+    // shut down the child view properly,
+    // including events that the collection has from it
+    if (view){
+      this.stopListening(view);
+
+      // call 'close' or 'remove', depending on which is found
+      if (view.close) { view.close(); }
+      else if (view.remove) { view.remove(); }
+
+      this.children.remove(view);
+    }
+
+    this.triggerMethod("item:removed", view);
+  },
+
+  // helper to show the empty view if the collection is empty
+  checkEmpty: function() {
+    // check if we're empty now, and if we are, show the
+    // empty view
+    if (!this.collection || this.collection.length === 0){
+      this.showEmptyView();
+    }
+  },
+
+  // Append the HTML to the collection's `el`.
+  // Override this method to do something other
+  // then `.append`.
+  appendHtml: function(collectionView, itemView, index){
+    collectionView.$el.append(itemView.el);
+  },
+
+  // Internal method to set up the `children` object for
+  // storing all of the child views
+  _initChildViewStorage: function(){
+    this.children = new Backbone.ChildViewContainer();
+  },
+
+  // Handle cleanup and other closing needs for
+  // the collection of views.
+  close: function(){
+    if (this.isClosed){ return; }
+
+    this.triggerMethod("collection:before:close");
+    this.closeChildren();
+    this.triggerMethod("collection:closed");
+
+    Marionette.View.prototype.close.apply(this, slice(arguments));
+  },
+
+  // Close the child views that this collection view
+  // is holding on to, if any
+  closeChildren: function(){
+    this.children.each(function(child){
+      this.removeChildView(child);
+    }, this);
+    this.checkEmpty();
+  }
+});
+
+
+// Composite View
+// --------------
+
+// Used for rendering a branch-leaf, hierarchical structure.
+// Extends directly from CollectionView and also renders an
+// an item view as `modelView`, for the top leaf
+Marionette.CompositeView = Marionette.CollectionView.extend({
+
+  // Setting up the inheritance chain which allows changes to
+  // Marionette.CollectionView.prototype.constructor which allows overriding
+  constructor: function(){
+    Marionette.CollectionView.prototype.constructor.apply(this, slice(arguments));
+  },
+
+  // Configured the initial events that the composite view
+  // binds to. Override this method to prevent the initial
+  // events, or to add your own initial events.
+  _initialEvents: function(){
+    if (this.collection){
+      this.listenTo(this.collection, "add", this.addChildView, this);
+      this.listenTo(this.collection, "remove", this.removeItemView, this);
+      this.listenTo(this.collection, "reset", this._renderChildren, this);
+    }
+  },
+
+  // Retrieve the `itemView` to be used when rendering each of
+  // the items in the collection. The default is to return
+  // `this.itemView` or Marionette.CompositeView if no `itemView`
+  // has been defined
+  getItemView: function(item){
+    var itemView = Marionette.getOption(this, "itemView") || this.constructor;
+
+    if (!itemView){
+      throwError("An `itemView` must be specified", "NoItemViewError");
+    }
+
+    return itemView;
+  },
+
+  // Serialize the collection for the view.
+  // You can override the `serializeData` method in your own view
+  // definition, to provide custom serialization for your view's data.
+  serializeData: function(){
+    var data = {};
+
+    if (this.model){
+      data = this.model.toJSON();
+    }
+
+    return data;
+  },
+
+  // Renders the model once, and the collection once. Calling
+  // this again will tell the model's view to re-render itself
+  // but the collection will not re-render.
+  render: function(){
+    this.isRendered = true;
+    this.isClosed = false;
+    this.resetItemViewContainer();
+
+    this.triggerBeforeRender();
+    var html = this.renderModel();
+    this.$el.html(html);
+    // the ui bindings is done here and not at the end of render since they
+    // will not be available until after the model is rendered, but should be
+    // available before the collection is rendered.
+    this.bindUIElements();
+    this.triggerMethod("composite:model:rendered");
+
+    this._renderChildren();
+
+    this.triggerMethod("composite:rendered");
+    this.triggerRendered();
+    return this;
+  },
+
+  _renderChildren: function(){
+    if (this.isRendered){
+      Marionette.CollectionView.prototype._renderChildren.call(this);
+      this.triggerMethod("composite:collection:rendered");
+    }
+  },
+
+  // Render an individual model, if we have one, as
+  // part of a composite view (branch / leaf). For example:
+  // a treeview.
+  renderModel: function(){
+    var data = {};
+    data = this.serializeData();
+    data = this.mixinTemplateHelpers(data);
+
+    var template = this.getTemplate();
+    return Marionette.Renderer.render(template, data);
+  },
+
+  // Appends the `el` of itemView instances to the specified
+  // `itemViewContainer` (a jQuery selector). Override this method to
+  // provide custom logic of how the child item view instances have their
+  // HTML appended to the composite view instance.
+  appendHtml: function(cv, iv, index){
+    var $container = this.getItemViewContainer(cv);
+    $container.append(iv.el);
+  },
+
+  // Internal method to ensure an `$itemViewContainer` exists, for the
+  // `appendHtml` method to use.
+  getItemViewContainer: function(containerView){
+    if ("$itemViewContainer" in containerView){
+      return containerView.$itemViewContainer;
+    }
+
+    var container;
+    var itemViewContainer = Marionette.getOption(containerView, "itemViewContainer");
+    if (itemViewContainer){
+
+      var selector = _.isFunction(itemViewContainer) ? itemViewContainer() : itemViewContainer;
+      container = containerView.$(selector);
+      if (container.length <= 0) {
+        throwError("The specified `itemViewContainer` was not found: " + containerView.itemViewContainer, "ItemViewContainerMissingError");
+      }
+
+    } else {
+      container = containerView.$el;
+    }
+
+    containerView.$itemViewContainer = container;
+    return container;
+  },
+
+  // Internal method to reset the `$itemViewContainer` on render
+  resetItemViewContainer: function(){
+    if (this.$itemViewContainer){
+      delete this.$itemViewContainer;
+    }
+  }
+});
+
+
+// Layout
+// ------
+
+// Used for managing application layouts, nested layouts and
+// multiple regions within an application or sub-application.
+//
+// A specialized view type that renders an area of HTML and then
+// attaches `Region` instances to the specified `regions`.
+// Used for composite view management and sub-application areas.
+Marionette.Layout = Marionette.ItemView.extend({
+  regionType: Marionette.Region,
+
+  // Ensure the regions are available when the `initialize` method
+  // is called.
+  constructor: function (options) {
+    options = options || {};
+
+    this._firstRender = true;
+    this._initializeRegions(options);
+
+    Marionette.ItemView.prototype.constructor.call(this, options);
+  },
+
+  // Layout's render will use the existing region objects the
+  // first time it is called. Subsequent calls will close the
+  // views that the regions are showing and then reset the `el`
+  // for the regions to the newly rendered DOM elements.
+  render: function(){
+
+    if (this.isClosed){
+      // a previously closed layout means we need to
+      // completely re-initialize the regions
+      this._initializeRegions();
+    }
+    if (this._firstRender) {
+      // if this is the first render, don't do anything to
+      // reset the regions
+      this._firstRender = false;
+    } else if (!this.isClosed){
+      // If this is not the first render call, then we need to
+      // re-initializing the `el` for each region
+      this._reInitializeRegions();
+    }
+
+    var args = Array.prototype.slice.apply(arguments);
+    var result = Marionette.ItemView.prototype.render.apply(this, args);
+
+    return result;
+  },
+
+  // Handle closing regions, and then close the view itself.
+  close: function () {
+    if (this.isClosed){ return; }
+    this.regionManager.close();
+    var args = Array.prototype.slice.apply(arguments);
+    Marionette.ItemView.prototype.close.apply(this, args);
+  },
+
+  // Add a single region, by name, to the layout
+  addRegion: function(name, definition){
+    var regions = {};
+    regions[name] = definition;
+    return this._buildRegions(regions)[name];
+  },
+
+  // Add multiple regions as a {name: definition, name2: def2} object literal
+  addRegions: function(regions){
+    this.regions = _.extend({}, this.regions, regions);
+    return this._buildRegions(regions);
+  },
+
+  // Remove a single region from the Layout, by name
+  removeRegion: function(name){
+    delete this.regions[name];
+    return this.regionManager.removeRegion(name);
+  },
+
+  // internal method to build regions
+  _buildRegions: function(regions){
+    var that = this;
+
+    var defaults = {
+      regionType: Marionette.getOption(this, "regionType"),
+      parentEl: function(){ return that.$el; }
+    };
+
+    return this.regionManager.addRegions(regions, defaults);
+  },
+
+  // Internal method to initialize the regions that have been defined in a
+  // `regions` attribute on this layout.
+  _initializeRegions: function (options) {
+    var regions;
+    this._initRegionManager();
+
+    if (_.isFunction(this.regions)) {
+      regions = this.regions(options);
+    } else {
+      regions = this.regions || {};
+    }
+
+    this.addRegions(regions);
+  },
+
+  // Internal method to re-initialize all of the regions by updating the `el` that
+  // they point to
+  _reInitializeRegions: function(){
+    this.regionManager.closeRegions();
+    this.regionManager.each(function(region){
+      region.reset();
+    });
+  },
+
+  // Internal method to initialize the region manager
+  // and all regions in it
+  _initRegionManager: function(){
+    this.regionManager = new Marionette.RegionManager();
+
+    this.listenTo(this.regionManager, "region:add", function(name, region){
+      this[name] = region;
+      this.trigger("region:add", name, region);
+    });
+
+    this.listenTo(this.regionManager, "region:remove", function(name, region){
+      delete this[name];
+      this.trigger("region:remove", name, region);
+    });
+  }
+});
+
+
+// AppRouter
+// ---------
+
+// Reduce the boilerplate code of handling route events
+// and then calling a single method on another object.
+// Have your routers configured to call the method on
+// your object, directly.
+//
+// Configure an AppRouter with `appRoutes`.
+//
+// App routers can only take one `controller` object.
+// It is recommended that you divide your controller
+// objects in to smaller pieces of related functionality
+// and have multiple routers / controllers, instead of
+// just one giant router and controller.
+//
+// You can also add standard routes to an AppRouter.
+
+Marionette.AppRouter = Backbone.Router.extend({
+
+  constructor: function(options){
+    Backbone.Router.prototype.constructor.apply(this, slice(arguments));
+
+    this.options = options || {};
+
+    var appRoutes = Marionette.getOption(this, "appRoutes");
+    var controller = this._getController();
+    this.processAppRoutes(controller, appRoutes);
+  },
+
+  // Similar to route method on a Backbone Router but
+  // method is called on the controller
+  appRoute: function(route, methodName) {
+    var controller = this._getController();
+    this._addAppRoute(controller, route, methodName);
+  },
+
+  // Internal method to process the `appRoutes` for the
+  // router, and turn them in to routes that trigger the
+  // specified method on the specified `controller`.
+  processAppRoutes: function(controller, appRoutes) {
+    if (!appRoutes){ return; }
+
+    var routeNames = _.keys(appRoutes).reverse(); // Backbone requires reverted order of routes
+
+    _.each(routeNames, function(route) {
+      this._addAppRoute(controller, route, appRoutes[route]);
+    }, this);
+  },
+
+  _getController: function(){
+    return Marionette.getOption(this, "controller");
+  },
+
+  _addAppRoute: function(controller, route, methodName){
+    var method = controller[methodName];
+
+    if (!method) {
+      throw new Error("Method '" + methodName + "' was not found on the controller");
+    }
+
+    this.route(route, methodName, _.bind(method, controller));
+  }
+});
+
+
+// Application
+// -----------
+
+// Contain and manage the composite application as a whole.
+// Stores and starts up `Region` objects, includes an
+// event aggregator as `app.vent`
+Marionette.Application = function(options){
+  this._initRegionManager();
+  this._initCallbacks = new Marionette.Callbacks();
+  this.vent = new Backbone.Wreqr.EventAggregator();
+  this.commands = new Backbone.Wreqr.Commands();
+  this.reqres = new Backbone.Wreqr.RequestResponse();
+  this.submodules = {};
+
+  _.extend(this, options);
+
+  this.triggerMethod = Marionette.triggerMethod;
+};
+
+_.extend(Marionette.Application.prototype, Backbone.Events, {
+  // Command execution, facilitated by Backbone.Wreqr.Commands
+  execute: function(){
+    var args = Array.prototype.slice.apply(arguments);
+    this.commands.execute.apply(this.commands, args);
+  },
+
+  // Request/response, facilitated by Backbone.Wreqr.RequestResponse
+  request: function(){
+    var args = Array.prototype.slice.apply(arguments);
+    return this.reqres.request.apply(this.reqres, args);
+  },
+
+  // Add an initializer that is either run at when the `start`
+  // method is called, or run immediately if added after `start`
+  // has already been called.
+  addInitializer: function(initializer){
+    this._initCallbacks.add(initializer);
+  },
+
+  // kick off all of the application's processes.
+  // initializes all of the regions that have been added
+  // to the app, and runs all of the initializer functions
+  start: function(options){
+    this.triggerMethod("initialize:before", options);
+    this._initCallbacks.run(options, this);
+    this.triggerMethod("initialize:after", options);
+
+    this.triggerMethod("start", options);
+  },
+
+  // Add regions to your app.
+  // Accepts a hash of named strings or Region objects
+  // addRegions({something: "#someRegion"})
+  // addRegions({something: Region.extend({el: "#someRegion"}) });
+  addRegions: function(regions){
+    return this._regionManager.addRegions(regions);
+  },
+
+  // Close all regions in the app, without removing them
+  closeRegions: function(){
+    this._regionManager.closeRegions();
+  },
+
+  // Removes a region from your app, by name
+  // Accepts the regions name
+  // removeRegion('myRegion')
+  removeRegion: function(region) {
+    this._regionManager.removeRegion(region);
+  },
+
+  // Provides alternative access to regions
+  // Accepts the region name
+  // getRegion('main')
+  getRegion: function(region) {
+    return this._regionManager.get(region);
+  },
+
+  // Create a module, attached to the application
+  module: function(moduleNames, moduleDefinition){
+    // slice the args, and add this application object as the
+    // first argument of the array
+    var args = slice(arguments);
+    args.unshift(this);
+
+    // see the Marionette.Module object for more information
+    return Marionette.Module.create.apply(Marionette.Module, args);
+  },
+
+  // Internal method to set up the region manager
+  _initRegionManager: function(){
+    this._regionManager = new Marionette.RegionManager();
+
+    this.listenTo(this._regionManager, "region:add", function(name, region){
+      this[name] = region;
+    });
+
+    this.listenTo(this._regionManager, "region:remove", function(name, region){
+      delete this[name];
+    });
+  }
+});
+
+// Copy the `extend` function used by Backbone's classes
+Marionette.Application.extend = Marionette.extend;
+
+// Module
+// ------
+
+// A simple module system, used to create privacy and encapsulation in
+// Marionette applications
+Marionette.Module = function(moduleName, app){
+  this.moduleName = moduleName;
+
+  // store sub-modules
+  this.submodules = {};
+
+  this._setupInitializersAndFinalizers();
+
+  // store the configuration for this module
+  this.app = app;
+  this.startWithParent = true;
+
+  this.triggerMethod = Marionette.triggerMethod;
+};
+
+// Extend the Module prototype with events / listenTo, so that the module
+// can be used as an event aggregator or pub/sub.
+_.extend(Marionette.Module.prototype, Backbone.Events, {
+
+  // Initializer for a specific module. Initializers are run when the
+  // module's `start` method is called.
+  addInitializer: function(callback){
+    this._initializerCallbacks.add(callback);
+  },
+
+  // Finalizers are run when a module is stopped. They are used to teardown
+  // and finalize any variables, references, events and other code that the
+  // module had set up.
+  addFinalizer: function(callback){
+    this._finalizerCallbacks.add(callback);
+  },
+
+  // Start the module, and run all of its initializers
+  start: function(options){
+    // Prevent re-starting a module that is already started
+    if (this._isInitialized){ return; }
+
+    // start the sub-modules (depth-first hierarchy)
+    _.each(this.submodules, function(mod){
+      // check to see if we should start the sub-module with this parent
+      if (mod.startWithParent){
+        mod.start(options);
+      }
+    });
+
+    // run the callbacks to "start" the current module
+    this.triggerMethod("before:start", options);
+
+    this._initializerCallbacks.run(options, this);
+    this._isInitialized = true;
+
+    this.triggerMethod("start", options);
+  },
+
+  // Stop this module by running its finalizers and then stop all of
+  // the sub-modules for this module
+  stop: function(){
+    // if we are not initialized, don't bother finalizing
+    if (!this._isInitialized){ return; }
+    this._isInitialized = false;
+
+    Marionette.triggerMethod.call(this, "before:stop");
+
+    // stop the sub-modules; depth-first, to make sure the
+    // sub-modules are stopped / finalized before parents
+    _.each(this.submodules, function(mod){ mod.stop(); });
+
+    // run the finalizers
+    this._finalizerCallbacks.run(undefined,this);
+
+    // reset the initializers and finalizers
+    this._initializerCallbacks.reset();
+    this._finalizerCallbacks.reset();
+
+    Marionette.triggerMethod.call(this, "stop");
+  },
+
+  // Configure the module with a definition function and any custom args
+  // that are to be passed in to the definition function
+  addDefinition: function(moduleDefinition, customArgs){
+    this._runModuleDefinition(moduleDefinition, customArgs);
+  },
+
+  // Internal method: run the module definition function with the correct
+  // arguments
+  _runModuleDefinition: function(definition, customArgs){
+    if (!definition){ return; }
+
+    // build the correct list of arguments for the module definition
+    var args = _.flatten([
+      this,
+      this.app,
+      Backbone,
+      Marionette,
+      Marionette.$, _,
+      customArgs
+    ]);
+
+    definition.apply(this, args);
+  },
+
+  // Internal method: set up new copies of initializers and finalizers.
+  // Calling this method will wipe out all existing initializers and
+  // finalizers.
+  _setupInitializersAndFinalizers: function(){
+    this._initializerCallbacks = new Marionette.Callbacks();
+    this._finalizerCallbacks = new Marionette.Callbacks();
+  }
+});
+
+// Type methods to create modules
+_.extend(Marionette.Module, {
+
+  // Create a module, hanging off the app parameter as the parent object.
+  create: function(app, moduleNames, moduleDefinition){
+    var module = app;
+
+    // get the custom args passed in after the module definition and
+    // get rid of the module name and definition function
+    var customArgs = slice(arguments);
+    customArgs.splice(0, 3);
+
+    // split the module names and get the length
+    moduleNames = moduleNames.split(".");
+    var length = moduleNames.length;
+
+    // store the module definition for the last module in the chain
+    var moduleDefinitions = [];
+    moduleDefinitions[length-1] = moduleDefinition;
+
+    // Loop through all the parts of the module definition
+    _.each(moduleNames, function(moduleName, i){
+      var parentModule = module;
+      module = this._getModule(parentModule, moduleName, app);
+      this._addModuleDefinition(parentModule, module, moduleDefinitions[i], customArgs);
+    }, this);
+
+    // Return the last module in the definition chain
+    return module;
+  },
+
+  _getModule: function(parentModule, moduleName, app, def, args){
+    // Get an existing module of this name if we have one
+    var module = parentModule[moduleName];
+
+    if (!module){
+      // Create a new module if we don't have one
+      module = new Marionette.Module(moduleName, app);
+      parentModule[moduleName] = module;
+      // store the module on the parent
+      parentModule.submodules[moduleName] = module;
+    }
+
+    return module;
+  },
+
+  _addModuleDefinition: function(parentModule, module, def, args){
+    var fn;
+    var startWithParent;
+
+    if (_.isFunction(def)){
+      // if a function is supplied for the module definition
+      fn = def;
+      startWithParent = true;
+
+    } else if (_.isObject(def)){
+      // if an object is supplied
+      fn = def.define;
+      startWithParent = def.startWithParent;
+
+    } else {
+      // if nothing is supplied
+      startWithParent = true;
+    }
+
+    // add module definition if needed
+    if (fn){
+      module.addDefinition(fn, args);
+    }
+
+    // `and` the two together, ensuring a single `false` will prevent it
+    // from starting with the parent
+    module.startWithParent = module.startWithParent && startWithParent;
+
+    // setup auto-start if needed
+    if (module.startWithParent && !module.startWithParentIsConfigured){
+
+      // only configure this once
+      module.startWithParentIsConfigured = true;
+
+      // add the module initializer config
+      parentModule.addInitializer(function(options){
+        if (module.startWithParent){
+          module.start(options);
+        }
+      });
+
+    }
+
+  }
+});
+
+
+
+  return Marionette;
+})(this, Backbone, _);


[41/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/QueryValidator.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/QueryValidator.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/QueryValidator.java
new file mode 100644
index 0000000..2b9aec2
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/QueryValidator.java
@@ -0,0 +1,154 @@
+/*
+ * 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.jena.fuseki.validation ;
+
+import org.apache.jena.atlas.io.IndentedLineBuffer ;
+import org.apache.jena.atlas.json.JsonBuilder ;
+import org.apache.jena.atlas.json.JsonObject ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+
+import com.hp.hpl.jena.query.Query ;
+import com.hp.hpl.jena.query.QueryFactory ;
+import com.hp.hpl.jena.query.QueryParseException ;
+import com.hp.hpl.jena.query.Syntax ;
+import com.hp.hpl.jena.sparql.algebra.Algebra ;
+import com.hp.hpl.jena.sparql.algebra.Op ;
+import com.hp.hpl.jena.sparql.serializer.SerializationContext ;
+
+public class QueryValidator extends ValidatorBaseJson {
+    public QueryValidator() {}
+
+    @Override
+    protected String validatorName() {
+        return "SPARQL Query" ;
+    }
+
+    static final String paramQuery       = "query" ;
+    static final String paramSyntax      = "languageSyntax" ;
+    
+    static final String jInput           = "input" ;
+    
+    static final String jFormatted       = "formatted" ;
+    static final String jAlgebra         = "algebra" ;
+    static final String jAlgebraQuads    = "algebra-quads" ;
+    static final String jAlgebraOpt      = "algebra-opt" ;
+    static final String jAlgebraOptQuads = "algebra-opt-quads" ;
+
+    @Override
+    protected JsonObject execute(ValidationAction action) {
+        JsonBuilder obj = new JsonBuilder() ;
+        obj.startObject() ;
+
+        final String queryString = getArg(action, paramQuery) ;
+
+        String querySyntax = getArgOrNull(action, paramSyntax) ;
+        if ( querySyntax == null || querySyntax.equals("") )
+            querySyntax = "SPARQL" ;
+
+        Syntax language = Syntax.lookup(querySyntax) ;
+        if ( language == null ) {
+            ServletOps.errorBadRequest("Unknown syntax: " + querySyntax) ;
+            return null ;
+        }
+
+        boolean outputSPARQL = true ;
+        boolean outputAlgebra = true ;
+        boolean outputQuads = true ;
+        boolean outputOptimized = true ;
+        boolean outputOptimizedQuads = true ;
+
+        obj.key(jInput).value(queryString) ;
+
+        // Attempt to parse it.
+        Query query = null ;
+        try {
+            query = QueryFactory.create(queryString, "http://example/base/", language) ;
+        } catch (QueryParseException ex) {
+            obj.key(jErrors) ;
+            obj.startArray() ;      // Errors array
+            obj.startObject() ;
+            obj.key(jParseError).value(ex.getMessage()) ;
+            obj.key(jParseErrorLine).value(ex.getLine()) ;
+            obj.key(jParseErrorCol).value(ex.getColumn()) ;
+            obj.finishObject() ;
+            obj.finishArray() ;
+            
+            obj.finishObject() ; // Outer object
+            return obj.build().getAsObject() ;
+        }
+
+        if ( query != null ) {
+            
+            if ( outputSPARQL )
+                formatted(obj, query) ;
+
+            if ( outputAlgebra )
+                algebra(obj, query) ;
+
+            if ( outputQuads )
+                algebraQuads(obj, query) ;
+
+            if ( outputOptimized )
+                algebraOpt(obj, query) ;
+
+            if ( outputOptimizedQuads )
+                algebraOptQuads(obj, query) ;
+        }
+        
+        obj.finishObject() ;
+        return obj.build().getAsObject() ;
+    }
+
+    private void formatted(JsonBuilder obj, Query query) {
+        IndentedLineBuffer out = new IndentedLineBuffer() ;
+        query.serialize(out) ;
+        obj.key(jFormatted).value(out.asString()) ;
+    }
+
+    private void algebra(JsonBuilder obj, Query query) {
+        Op op = Algebra.compile(query) ;
+        obj.key(jAlgebra).value(string(query, op)) ;
+    }
+
+    private void algebraQuads(JsonBuilder obj, Query query) {
+        Op op = Algebra.compile(query) ;
+        op = Algebra.toQuadForm(op) ;
+        obj.key(jAlgebraQuads).value(string(query, op)) ;
+    }
+
+    private void algebraOpt(JsonBuilder obj, Query query) {
+        Op op = Algebra.compile(query) ;
+        op = Algebra.optimize(op) ;
+        obj.key(jAlgebraOpt).value(string(query, op)) ;
+    }
+
+    private void algebraOptQuads(JsonBuilder obj, Query query) {
+        Op op = Algebra.compile(query) ;
+        op = Algebra.toQuadForm(op) ;
+        op = Algebra.optimize(op) ;
+        obj.key(jAlgebraOptQuads).value(string(query, op)) ;
+    }
+
+    private String string(Query query, Op op) {
+        final SerializationContext sCxt = new SerializationContext(query) ;
+        IndentedLineBuffer out = new IndentedLineBuffer() ;
+        op.output(out, sCxt) ;
+        return out.asString() ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/UpdateValidator.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/UpdateValidator.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/UpdateValidator.java
new file mode 100644
index 0000000..4e93438
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/UpdateValidator.java
@@ -0,0 +1,91 @@
+/**
+ * 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.jena.fuseki.validation;
+
+import org.apache.jena.atlas.io.IndentedLineBuffer ;
+import org.apache.jena.atlas.json.JsonBuilder ;
+import org.apache.jena.atlas.json.JsonObject ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+
+import com.hp.hpl.jena.query.QueryParseException ;
+import com.hp.hpl.jena.query.Syntax ;
+import com.hp.hpl.jena.update.UpdateFactory ;
+import com.hp.hpl.jena.update.UpdateRequest ;
+
+public class UpdateValidator extends ValidatorBaseJson {
+    public UpdateValidator() {}
+    
+    static final String paramUpdate           = "update" ;
+    static final String paramSyntax           = "languageSyntax" ;
+    
+    static final String jInput           = "input" ;
+    static final String jFormatted       = "formatted" ;
+
+    @Override
+    protected JsonObject execute(ValidationAction action) {
+        JsonBuilder obj = new JsonBuilder() ;
+        obj.startObject() ;
+        
+        final String updateString = getArg(action, paramUpdate) ;
+        String updateSyntax = getArgOrNull(action, paramSyntax) ;
+        if ( updateSyntax == null || updateSyntax.equals("") )
+            updateSyntax = "SPARQL" ;
+        
+        Syntax language = Syntax.lookup(updateSyntax) ;
+        if ( language == null ) {
+            ServletOps.errorBadRequest("Unknown syntax: " + updateSyntax) ;
+            return null ;
+        }
+        
+        obj.key(jInput).value(updateString) ;
+        UpdateRequest request = null ;
+        try {
+            request = UpdateFactory.create(updateString, "http://example/base/", language) ;
+        } catch (QueryParseException ex) {
+            obj.key(jErrors) ;
+            obj.startArray() ;      // Errors array
+            obj.startObject() ;
+            obj.key(jParseError).value(ex.getMessage()) ;
+            obj.key(jParseErrorLine).value(ex.getLine()) ;
+            obj.key(jParseErrorCol).value(ex.getColumn()) ;
+            obj.finishObject() ;
+            obj.finishArray() ;
+            
+            obj.finishObject() ; // Outer object
+            return obj.build().getAsObject() ;
+        }
+        
+        formatted(obj, request) ;
+        
+        obj.finishObject() ;
+        return obj.build().getAsObject() ;
+    }
+
+    private void formatted(JsonBuilder obj, UpdateRequest updateRequest) {
+        IndentedLineBuffer out = new IndentedLineBuffer() ;
+        updateRequest.output(out) ;
+        obj.key(jFormatted).value(out.asString()) ;
+    }
+    
+    @Override
+    protected String validatorName() {
+        return "SPARQL Update" ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidationAction.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidationAction.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidationAction.java
new file mode 100644
index 0000000..a51233d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidationAction.java
@@ -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.
+ */
+
+package org.apache.jena.fuseki.validation;
+
+import java.util.HashMap ;
+import java.util.Map ;
+
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.logging.Log ;
+import org.slf4j.Logger ;
+
+public class ValidationAction
+{
+    public final boolean verbose ;
+    public final long id ;
+    public final Logger log ;
+    private boolean startTimeIsSet = false ;
+    private boolean finishTimeIsSet = false ;
+
+    private long startTime = -2 ;
+    private long finishTime = -2 ;
+    
+    // Outcome.
+    int statusCode = -1 ;
+    String message = null ;
+    int contentLength = -1 ;
+    String contentType = null ;
+    
+    Map <String, String> headers = new HashMap<>() ;
+    public HttpServletRequest request;
+    public HttpServletResponse response ;
+    
+    public ValidationAction(long id, Logger log, HttpServletRequest request, HttpServletResponse response, boolean verbose) {
+        this.id = id ;
+        this.log = log ;
+        this.request = request ;
+        this.response = response ;
+        this.verbose = false ;
+    }
+
+    /** Reduce to a size that can be kept around for sometime */
+    public void minimize() {
+        this.request = null ;
+        this.response = null ;
+    }
+
+    public void setStartTime() {
+        if ( startTimeIsSet ) 
+            Log.warn(this,  "Start time reset") ;
+        startTimeIsSet = true ;
+        this.startTime = System.nanoTime() ;
+    }
+
+    public void setFinishTime() {
+        if ( finishTimeIsSet ) 
+            Log.warn(this,  "Finish time reset") ;
+        finishTimeIsSet = true ;
+        this.finishTime = System.nanoTime() ;
+    }
+
+    public HttpServletRequest getRequest()          { return request ; }
+
+    public HttpServletResponse getResponse()        { return response ; }
+    
+    /** Return the recorded time taken in milliseconds. 
+     *  {@link #setStartTime} and {@link #setFinishTime}
+     *  must have been called.
+     */
+    public long getTime()
+    {
+        if ( ! startTimeIsSet ) 
+            Log.warn(this,  "Start time not set") ;
+        if ( ! finishTimeIsSet ) 
+            Log.warn(this,  "Finish time not set") ;
+        return (finishTime-startTime)/(1000*1000) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidationError.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidationError.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidationError.java
new file mode 100644
index 0000000..6b173a7
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidationError.java
@@ -0,0 +1,24 @@
+/**
+ * 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.jena.fuseki.validation;
+
+public class ValidationError {
+
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBaseJson.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBaseJson.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBaseJson.java
new file mode 100644
index 0000000..98cf258
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBaseJson.java
@@ -0,0 +1,201 @@
+/*
+ * 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.jena.fuseki.validation;
+
+import static java.lang.String.format ;
+
+import java.io.OutputStream ;
+import java.util.Enumeration ;
+
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.json.JSON ;
+import org.apache.jena.atlas.json.JsonObject ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.riot.web.HttpNames ;
+import org.apache.jena.fuseki.servlets.ActionErrorException ;
+import org.apache.jena.fuseki.servlets.ActionLib ;
+import org.apache.jena.fuseki.servlets.ServletBase ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+import static org.apache.jena.riot.WebContent.* ;
+import org.apache.jena.web.HttpSC ;
+import org.slf4j.Logger ;
+
+import com.hp.hpl.jena.query.ARQ ;
+import com.hp.hpl.jena.sparql.util.Context ;
+
+/** ValidationBase for JSON out */ 
+public abstract class ValidatorBaseJson extends ServletBase
+{
+    private static Logger vLog = Fuseki.validationLog ;
+    public static final String jErrors          = "errors" ;
+    public static final String jWarnings        = "warning" ;
+
+    public static final String jParseError      = "parse-error" ;
+    public static final String jParseErrorLine  = "parse-error-line" ;
+    public static final String jParseErrorCol   = "parse-error-column" ;
+
+    public static final String respService      = "X-Service" ;
+    
+    @Override
+    public void doGet(HttpServletRequest httpRequest, HttpServletResponse httpResponse)
+    { execute(httpRequest, httpResponse) ; }
+
+    @Override
+    public void doPost(HttpServletRequest httpRequest, HttpServletResponse httpResponse)
+    { execute(httpRequest, httpResponse) ; }
+    
+    protected void execute(HttpServletRequest request, HttpServletResponse response) {
+        long id = allocRequestId(request, response) ;
+        ValidationAction action = new ValidationAction(id, vLog, request, response, false) ;
+        printRequest(action) ;
+        action.setStartTime() ;
+        
+        response = action.response ;
+        initResponse(request, response) ;
+        Context cxt = ARQ.getContext() ;
+        
+        try {
+            JsonObject obj = execute(action) ;
+            action.statusCode = HttpSC.OK_200 ;
+            action.message = "OK" ;
+            response.setCharacterEncoding(charsetUTF8);
+            response.setContentType(contentTypeJSON);
+            //response.setContentType(WebContent.contentTypeTextPlain);
+            action.response.setStatus(HttpSC.OK_200) ;
+            OutputStream out = response.getOutputStream() ; 
+            JSON.write(out, obj);
+        } catch (ActionErrorException ex) {
+            if ( ex.exception != null )
+                ex.exception.printStackTrace(System.err) ;
+            if ( ex.message != null )
+                ServletOps.responseSendError(response, ex.rc, ex.message) ;
+            else
+                ServletOps.responseSendError(response, ex.rc) ;
+        } catch (Throwable th) {
+            ServletOps.responseSendError(response, HttpSC.INTERNAL_SERVER_ERROR_500, "Internal Error") ;
+        }
+        action.setFinishTime() ;
+        printResponse(action) ;
+    }
+    
+    private void initResponse(HttpServletRequest request, HttpServletResponse response)
+    {
+        setCommonHeaders(response) ;
+        String method = request.getMethod() ;
+        // All GET and HEAD operations are sensitive to conneg so ...
+        if ( HttpNames.METHOD_GET.equalsIgnoreCase(method) || HttpNames.METHOD_HEAD.equalsIgnoreCase(method) )
+            setVaryHeader(response) ;
+    }
+    
+    private void printRequest(ValidationAction action)
+    {
+        String url = ActionLib.wholeRequestURL(action.request) ;
+        String method = action.request.getMethod() ;
+
+        action.log.info(format("[%d] %s %s", action.id, method, url)) ;
+        if ( action.verbose ) {
+            Enumeration<String> en = action.request.getHeaderNames() ;
+            for (; en.hasMoreElements();) {
+                String h = en.nextElement() ;
+                Enumeration<String> vals = action.request.getHeaders(h) ;
+                if (!vals.hasMoreElements())
+                    action.log.info(format("[%d]   ", action.id, h)) ;
+                else {
+                    for (; vals.hasMoreElements();)
+                        action.log.info(format("[%d]   %-20s %s", action.id, h, vals.nextElement())) ;
+                }
+            }
+        }
+    }
+    
+    private void printResponse(ValidationAction action)
+    {
+        long time = action.getTime() ;
+        
+        HttpServletResponse response = action.response ;
+        if ( action.verbose )
+        {
+//            if ( action.contentType != null )
+//                log.info(format("[%d]   %-20s %s", action.id, HttpNames.hContentType, action.contentType)) ;
+//            if ( action.contentLength != -1 )
+//                log.info(format("[%d]   %-20s %d", action.id, HttpNames.hContentLengh, action.contentLength)) ;
+//            for ( Map.Entry<String, String> e: action.headers.entrySet() )
+//                log.info(format("[%d]   %-20s %s", action.id, e.getKey(), e.getValue())) ;
+        }
+
+        String timeStr = fmtMillis(time) ;
+
+        if ( action.message == null )
+            action.log.info(String.format("[%d] %d %s (%s) ", action.id, action.statusCode, HttpSC.getMessage(action.statusCode), timeStr)) ;
+        else
+            action.log.info(String.format("[%d] %d %s (%s) ", action.id, action.statusCode, action.message, timeStr)) ;
+    }
+    
+    private static String fmtMillis(long time)
+    {
+        // Millis only? seconds only?
+        if ( time < 1000 )
+            return String.format("%,d ms", time) ;
+        return String.format("%,.3f s", time/1000.0) ;
+    }
+    
+    protected abstract JsonObject execute(ValidationAction action) ;
+    
+    protected abstract String validatorName() ;
+
+    protected void setHeaders(HttpServletResponse httpResponse)
+    {
+        httpResponse.setCharacterEncoding(charsetUTF8) ;
+        httpResponse.setContentType(contentTypeJSON) ;
+        httpResponse.setHeader(respService, "Jena Fuseki Validator / "+validatorName()+": http://jena.apache.org/") ;
+    }
+
+    protected static String getArg(ValidationAction action, String paramName) {
+        String arg = getArgOrNull(action, paramName) ;
+        if ( arg == null ) {
+            ServletOps.error(HttpSC.BAD_REQUEST_400, "No parameter given: " + paramName) ;
+            return null ;
+        }
+        return arg ;
+    }
+
+    protected static String getArgOrNull(ValidationAction action, String paramName) {
+        String[] args = getArgs(action, paramName) ;
+
+        if ( args == null || args.length == 0 )
+            return null ;
+
+        if ( args.length > 1 ) {
+            ServletOps.error(HttpSC.BAD_REQUEST_400, "Too many ("+args.length+") parameter values: "+paramName) ;
+            return null ;
+        }
+        
+        return args[0] ;
+    }
+    
+    protected static String[] getArgs(ValidationAction action, String paramName) {
+        String[] args = action.request.getParameterValues(paramName) ;
+        if ( args == null || args.length == 0 )
+            return null ;
+        return args ;
+    }
+}    
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/DEPENDENCIES
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/DEPENDENCIES b/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/DEPENDENCIES
new file mode 100644
index 0000000..910b788
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/DEPENDENCIES
@@ -0,0 +1,24 @@
+This file lists the dependences for Apache Jena Fuseki.
+  Version numbers are given in the POM file for a particular distribution. 
+
+Apache Projects:   Apache Software License
+  Apache Jena, including the Jena IRI library
+  Apache Xerces-J
+  Apache log4j
+  Apache HttpComponents (HTTP Client)
+  Apache Commons Codec
+  Apache Common FileUpload
+
+ICU4J : http://icu-project.org/
+   IBM X License (to version ICU4J 3.4.4)
+
+SLF4J : http://www.slf4j.org/
+  Copyright (c) 2004-2008 QOS.ch
+  MIT License
+
+JUnit : http://junit.org/
+  Common Public License - v 1.0
+
+Jetty: http://www.eclipse.org/jetty/
+  Apache License 2.0 
+  (also avilable under Eclipse Public License 1.0)

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/LICENSE b/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/LICENSE
new file mode 100644
index 0000000..23519cd
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/LICENSE
@@ -0,0 +1,253 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+- - - - - - - - - - - - - - - - - - - - - - - 
+
+==============================================================
+ Jetty Web Container
+ Copyright 1995-2012 Mort Bay Consulting Pty Ltd.
+==============================================================
+
+The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd
+unless otherwise noted.
+
+Jetty is dual licensed under both
+
+  * The Apache 2.0 License
+    http://www.apache.org/licenses/LICENSE-2.0.html
+
+      and
+
+  * The Eclipse Public 1.0 License
+    http://www.eclipse.org/legal/epl-v10.html
+
+Jetty may be distributed under either license.
+
+- - - - - - - - - - - - - - - - - - - - - - - 
+
+This product bundles "Bootstrap", which is available under an
+MIT license.  See: https://github.com/twbs/bootstrap/blob/master/LICENSE
+
+This product bundles "codemirror", which is available under an
+MIT license.  See http://codemirror.net/LICENSE
+
+This product bundles "jquery", which is available under an
+MIT license.  See https://jquery.org/license/
+
+This product bundles "DataTables", which is available under a
+"BSD 3-clause" license.  See http://datatables.net/license_bsd
+
+This product bundles "jquery.form", which is available under an
+MIT license.  See http://malsup.github.io/mit-license.txt
+
+This product bundles "jquery.xdomainrequest", which is available under an
+MIT license.  See https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest/blob/master/LICENSE.txt
+
+This product bundles "backbone.js", which is available under an
+MIT license.  See https://github.com/jashkenas/backbone/blob/master/LICENSE
+
+This product bundles "backbone.marionette", which is available under an
+MIT license. See http://mutedsolutions.mit-license.org/
+   "backbone.marionette" includes "Backbone.BabySitter" and 
+   "Backbone.Wreqr" also available under the same MIT license.
+
+This product bundles "html5shiv", which is available under an
+MIT license.  See https://code.google.com/p/html5shiv/
+
+This product bundles "RequireJS", which is available under an
+MIT license. 
+https://github.com/jrburke/requirejs/blob/master/LICENSE
+  "RequireJS" is also available with a "30clause BSD license"
+
+This product bundles "Respond", which is available under an
+MIT license. See https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
+
+This product bundles "sprintf.js", which is available under a
+"3 clause BSD" license. 
+  https://github.com/alexei/sprintf.js/blob/master/LICENSE
+
+This product bundles "underscore", which is available under an
+MIT license.  See https://github.com/jashkenas/underscore/blob/master/LICENSE
+
+This product bundles "FontAwesome"
+  "Font Awesome by Dave Gandy - http://fontawesome.io"
+The font is available under an SIL Open Font License 1.1
+and the CSS files under an MIT License.
+See http://fontawesome.io/license/
+
+This product bundles "jQuery File Upload Plugin" 
+which is available under an MIT License.
+See https://github.com/blueimp/jQuery-File-Upload.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/NOTICE b/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..6c51c3c
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,16 @@
+Apache Jena - module Fuseki
+Copyright 2011-2014 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of this software were originally based on the following:
+  - Copyright 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+  - Copyright 2010, 2011 Epimorphics Ltd.
+  - Copyright 2010, 2011 Talis Systems Ltd.
+These have been licensed to the Apache Software Foundation under a software grant.
+
+- - - - - - - - - - - - - - - - - - - - - - - 
+
+Portions of this software include software from  Mort Bay Consulting Pty. Ltd.
+ - Copyright (c) 2004-2009 Mort Bay Consulting Pty. Ltd.

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/fuseki-properties.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/fuseki-properties.xml b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/fuseki-properties.xml
new file mode 100644
index 0000000..34082eb
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/fuseki-properties.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<!-- Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0" -->
+<properties version="1.0">
+  <comment>Fuseki System Properties</comment>
+  <entry key="org.apache.jena.fuseki.version">${project.version}</entry>
+  <entry key="org.apache.jena.fuseki.build.datetime">${build.time.xsd}</entry>
+</properties>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/log4j.properties
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/log4j.properties b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/log4j.properties
new file mode 100644
index 0000000..933d20b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/log4j.properties
@@ -0,0 +1,42 @@
+# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+# Plain output to stdout
+log4j.appender.jena.plainstdout=org.apache.log4j.ConsoleAppender
+log4j.appender.jena.plainstdout.target=System.out
+log4j.appender.jena.plainstdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.jena.plainstdout.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %-10c{1} %-5p %m%n
+## %d{ISO8601} -- includes "ss,sss"
+## log4j.appender.jena.plainstdout.layout.ConversionPattern=[%d{ISO8601}] %-10c{1} %-5p %m%n
+
+# Unadorned, for the NCSA requests log.
+log4j.appender.fuseki.plain=org.apache.log4j.ConsoleAppender
+log4j.appender.fuseki.plain.target=System.out
+log4j.appender.fuseki.plain.layout=org.apache.log4j.PatternLayout
+log4j.appender.fuseki.plain.layout.ConversionPattern=%m%n
+
+log4j.rootLogger=INFO, jena.plainstdout
+log4j.logger.com.hp.hpl.jena=WARN
+log4j.logger.org.apache.jena=WARN
+log4j.logger.org.apache.jena.fuseki=INFO
+
+# Others
+log4j.logger.org.eclipse.jetty=WARN
+log4j.logger.org.apache.shiro=WARN
+org.eclipse.jetty.webapp
+
+# Fuseki System logs.
+log4j.logger.org.apache.jena.fuseki.Server=INFO
+log4j.logger.org.apache.jena.fuseki.Fuseki=INFO
+log4j.logger.org.apache.jena.fuseki.Admin=INFO
+log4j.logger.org.apache.jena.fuseki.Validate=INFO
+log4j.logger.org.apache.jena.fuseki.Config=INFO
+
+# NCSA Request log.
+log4j.additivity.org.apache.jena.fuseki.Request=false
+log4j.logger.org.apache.jena.fuseki.Request=OFF, fuseki.plain
+
+# TDB
+log4j.logger.org.apache.jena.tdb.loader=INFO
+## Parser output
+log4j.additivity.org.apache.jena.riot=false
+log4j.logger.org.apache.jena.riot=INFO, jena.plainstdout

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/config.ttl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/config.ttl b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/config.ttl
new file mode 100644
index 0000000..7b9ac5b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/config.ttl
@@ -0,0 +1,30 @@
+# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+## Fuseki Server configuration file.
+
+@prefix :        <#> .
+@prefix fuseki:  <http://jena.apache.org/fuseki#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+[] rdf:type fuseki:Server ;
+   # Example::
+   # Server-wide query timeout.   
+   # 
+   # Timeout - server-wide default: milliseconds.
+   # Format 1: "1000" -- 1 second timeout
+   # Format 2: "10000,60000" -- 10s timeout to first result, 
+   #                            then 60s timeout for the rest of query.
+   #
+   # See javadoc for ARQ.queryTimeout for details.
+   # This can also be set on a per dataset basis in the dataset assembler.
+   #
+   # ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "30000" ] ;
+
+   # Add any custom classes you want to load.
+   # Must have a "public static void init()" method.
+   # ja:loadClass "your.code.Class" ;   
+
+   # End triples.
+   .

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/shiro.ini
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/shiro.ini b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/shiro.ini
new file mode 100644
index 0000000..1bec1cc
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/shiro.ini
@@ -0,0 +1,39 @@
+# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+[main]
+# Development
+ssl.enabled = false 
+
+plainMatcher=org.apache.shiro.authc.credential.SimpleCredentialsMatcher
+#iniRealm=org.apache.shiro.realm.text.IniRealm 
+iniRealm.credentialsMatcher = $plainMatcher
+
+localhost=org.apache.jena.fuseki.authz.LocalhostFilter
+
+[users]
+# Implicitly adds "iniRealm =  org.apache.shiro.realm.text.IniRealm"
+admin=pw
+
+[roles]
+
+[urls]
+## Control functions open to anyone
+/$/status = anon
+/$/ping   = anon
+
+## and the rest are restricted
+/$/** = localhost
+
+
+## If you want simple, basic authentication user/password
+## on the operations, 
+##    1 - set a password in [users]
+##    2 - change the line above to:
+## /$/** = authcBasic,user[admin]
+## and set a better 
+
+## or to allow any access.
+##/$/** = anon
+
+# Everything else
+/**=anon

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-mem
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-mem b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-mem
new file mode 100644
index 0000000..06dcf1e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-mem
@@ -0,0 +1,27 @@
+# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+@prefix :        <#> .
+@prefix fuseki:  <http://jena.apache.org/fuseki#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+## ---------------------------------------------------------------
+## Updatable in-memory dataset.
+
+<#service1> rdf:type fuseki:Service ;
+    # URI of the dataset -- http://host:port/ds
+    fuseki:name                        "{NAME}" ;
+    fuseki:serviceQuery                "sparql" ;
+    fuseki:serviceQuery                "query" ;
+    fuseki:serviceUpdate               "update" ;
+    fuseki:serviceUpload               "upload" ;
+    fuseki:serviceReadWriteGraphStore  "data" ;     
+    fuseki:serviceReadGraphStore       "get" ;
+    fuseki:dataset                     <#dataset> ;
+    .
+
+## In-memory, initially empty.
+<#dataset> rdf:type ja:RDFDataset .

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-service
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-service b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-service
new file mode 100644
index 0000000..a019496
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-service
@@ -0,0 +1,23 @@
+# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+@prefix :        <#> .
+@prefix fuseki:  <http://jena.apache.org/fuseki#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+## ---------------------------------------------------------------
+## Read-only in-memory dataset - used as a default, dummy datasets
+
+<#service1> rdf:type fuseki:Service ;
+    fuseki:name                        "" ;
+    fuseki:serviceQuery                "sparql" ;
+    fuseki:serviceQuery                "query" ;
+    fuseki:serviceReadGraphStore       "get" ;
+    fuseki:dataset                     <#dataset> ;
+    .
+
+## In-memory, empty.
+<#dataset> rdf:type ja:RDFDataset .

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb
new file mode 100644
index 0000000..40f3d22
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb
@@ -0,0 +1,36 @@
+# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+@prefix :        <#> .
+@prefix fuseki:  <http://jena.apache.org/fuseki#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+# TDB
+[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
+tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
+tdb:GraphTDB    rdfs:subClassOf  ja:Model .
+
+## ---------------------------------------------------------------
+## Updatable TDB dataset with all services enabled.
+
+<#service_tdb_all> rdf:type fuseki:Service ;
+    rdfs:label                      "TDB {NAME}" ;
+    fuseki:name                     "{NAME}" ;
+    fuseki:serviceQuery             "query" ;
+    fuseki:serviceQuery             "sparql" ;
+    fuseki:serviceUpdate            "update" ;
+    fuseki:serviceUpload            "upload" ;
+    fuseki:serviceReadWriteGraphStore      "data" ;
+    # A separate read-only graph store endpoint:
+    fuseki:serviceReadGraphStore       "get" ;
+    fuseki:dataset           <#tdb_dataset_readwrite> ;
+    
+    .
+
+<#tdb_dataset_readwrite> rdf:type      tdb:DatasetTDB ;
+    tdb:location "{FUSEKI_BASE}/databases/{NAME}" ;
+    ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "3000" ] ;
+    ##tdb:unionDefaultGraph true ;
+    .

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb-dir
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb-dir b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb-dir
new file mode 100644
index 0000000..9706eee
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb-dir
@@ -0,0 +1,35 @@
+# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+@prefix :        <#> .
+@prefix fuseki:  <http://jena.apache.org/fuseki#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+# TDB
+[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
+tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
+tdb:GraphTDB    rdfs:subClassOf  ja:Model .
+
+## ---------------------------------------------------------------
+## Updatable TDB dataset with all services enabled.
+
+<#service_tdb_all> rdf:type fuseki:Service ;
+    rdfs:label                      "TDB {NAME}" ;
+    fuseki:name                     "{NAME}" ;
+    fuseki:serviceQuery             "query" ;
+    fuseki:serviceQuery             "sparql" ;
+    fuseki:serviceUpdate            "update" ;
+    fuseki:serviceUpload            "upload" ;
+    fuseki:serviceReadWriteGraphStore      "data" ;
+    # A separate read-only graph store endpoint:
+    fuseki:serviceReadGraphStore       "get" ;
+    fuseki:dataset           <#tdb_dataset_readwrite> ;
+    
+    .
+
+<#tdb_dataset_readwrite> rdf:type      tdb:DatasetTDB ;
+    tdb:location "{DIR}" ;
+    ##tdb:unionDefaultGraph true ;
+    .

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb-mem
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb-mem b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb-mem
new file mode 100644
index 0000000..8e3e0cc
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/org/apache/jena/fuseki/server/templates/config-tdb-mem
@@ -0,0 +1,36 @@
+# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+@prefix :        <#> .
+@prefix fuseki:  <http://jena.apache.org/fuseki#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+# TDB
+[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
+tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
+tdb:GraphTDB    rdfs:subClassOf  ja:Model .
+
+## ---------------------------------------------------------------
+## Updatable TDB dataset with all services enabled.
+
+<#service_tdb_all> rdf:type fuseki:Service ;
+    rdfs:label                      "TDB {NAME}" ;
+    fuseki:name                     "{NAME}" ;
+    fuseki:serviceQuery             "query" ;
+    fuseki:serviceQuery             "sparql" ;
+    fuseki:serviceUpdate            "update" ;
+    fuseki:serviceUpload            "upload" ;
+    fuseki:serviceReadWriteGraphStore      "data" ;
+    # A separate read-only graph store endpoint:
+    fuseki:serviceReadGraphStore       "get" ;
+    fuseki:dataset           <#tdb_dataset_readwrite> ;
+    
+    .
+
+<#tdb_dataset_readwrite> rdf:type      tdb:DatasetTDB ;
+    tdb:location "--mem--" ;
+    ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "1000" ] ;
+    # tdb:unionDefaultGraph true ;
+    .

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/WEB-INF/web.xml b/jena-fuseki2/jena-fuseki-core/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..be68117
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,269 @@
+<?xml version="1.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.
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+	 version="3.0">
+
+  <display-name>Apache Jena Fuseki Server</display-name>
+
+  <listener>
+    <!-- Basic server initialiation, including logging -->
+    <listener-class>org.apache.jena.fuseki.server.FusekiServerEnvironmentInit</listener-class>
+  </listener>
+
+  <!-- Apache Shiro setup -->
+  <listener>
+    <!--<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>-->
+    <!-- Support multiple locations, looks in Fuseki-relevant places -->
+    <listener-class>org.apache.jena.fuseki.server.ShiroEnvironmentLoader</listener-class>
+  </listener>
+
+  <!-- First filter -->
+  <filter>
+    <filter-name>ShiroFilter</filter-name>
+    <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>ShiroFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+    <dispatcher>REQUEST</dispatcher>
+    <dispatcher>FORWARD</dispatcher>
+    <dispatcher>INCLUDE</dispatcher>
+    <dispatcher>ERROR</dispatcher>
+  </filter-mapping>
+
+  <context-param>
+    <param-name>shiroConfigLocations</param-name>
+    <!-- Try a path name in: FUSEKI_BASE, FUSEKI_HOME, war resource
+	 If a "file:" then look there and there only.
+    -->
+    <param-value>shiro.ini</param-value>
+  </context-param>
+
+  <!-- Apache Jena Fuseki setup -->
+
+  <listener>
+    <listener-class>org.apache.jena.fuseki.server.FusekiServerListener</listener-class>
+  </listener>
+
+  <filter>
+    <filter-name>Fuseki</filter-name>
+    <filter-class>org.apache.jena.fuseki.servlets.FusekiFilter</filter-class>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>Fuseki</filter-name>
+    <url-pattern>/*</url-pattern>
+    <dispatcher>REQUEST</dispatcher>
+    <dispatcher>FORWARD</dispatcher>
+    <dispatcher>INCLUDE</dispatcher>
+    <dispatcher>ERROR</dispatcher>
+  </filter-mapping>
+
+  <!-- Validators -->
+  <servlet>
+    <servlet-name>QueryValidator</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.validation.QueryValidator</servlet-class>
+  </servlet>
+
+  <servlet>
+    <servlet-name>UpdateValidator</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.validation.UpdateValidator</servlet-class>
+  </servlet>
+
+  <servlet>
+    <servlet-name>DataValidator</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.validation.DataValidator</servlet-class>
+  </servlet>
+
+  <servlet>
+    <servlet-name>IRIValidator</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.validation.IRIValidator</servlet-class>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>QueryValidator</servlet-name>
+    <url-pattern>/validate/query</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>UpdateValidator</servlet-name>
+    <url-pattern>/validate/update</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>IRIValidator</servlet-name>
+    <url-pattern>/validate/iri</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>DataValidator</servlet-name>
+    <url-pattern>/validate/data</url-pattern>
+  </servlet-mapping>
+
+  <!-- Admin controls-->
+  
+  <servlet>
+    <servlet-name>DumpServlet</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.mgt.DumpServlet</servlet-class>
+  </servlet>
+
+  <servlet>
+    <servlet-name>ServerStatusServlet</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.mgt.ActionServerStatus</servlet-class>
+  </servlet>
+
+  <servlet>
+    <servlet-name>PingServlet</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.mgt.ActionPing</servlet-class>
+  </servlet>
+
+  <servlet-mapping>
+   <servlet-name>DumpServlet</servlet-name>
+   <url-pattern>/$/dump</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>ServerStatusServlet</servlet-name>
+    <url-pattern>/$/server</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>PingServlet</servlet-name>
+    <url-pattern>/$/ping</url-pattern>
+  </servlet-mapping>
+  
+  <servlet>
+    <servlet-name>ActionDatasets</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.mgt.ActionDatasets</servlet-class>
+  </servlet>
+  
+  <servlet>
+    <servlet-name>ActionStats</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.mgt.ActionStats</servlet-class>
+  </servlet>
+
+  <servlet>
+    <servlet-name>ActionLogs</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.mgt.ActionLogs</servlet-class>
+  </servlet>
+
+  <servlet>
+    <servlet-name>ActionBackup</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.mgt.ActionBackup</servlet-class>
+  </servlet>
+
+  <servlet>
+    <servlet-name>ActionTasks</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.mgt.ActionTasks</servlet-class>
+  </servlet>
+
+  <!-- A management action that only creates a background task that sleeps.
+       Useful for writing tests for managegemt tools that exercise the
+        background task functionality.
+  -->
+  <servlet>
+    <servlet-name>ActionSleep</servlet-name>
+    <servlet-class>org.apache.jena.fuseki.mgt.ActionSleep</servlet-class>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>ActionDatasets</servlet-name>
+    <url-pattern>/$/datasets/*</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>ActionStats</servlet-name>
+    <url-pattern>/$/stats/*</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>ActionLogs</servlet-name>
+    <url-pattern>/$/logs</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>ActionBackup</servlet-name>
+    <url-pattern>/$/backup/*</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>ActionBackup</servlet-name>
+    <url-pattern>/$/backups/*</url-pattern>         <!-- Alt spelling -->
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>ActionTasks</servlet-name>
+    <url-pattern>/$/tasks/*</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>ActionSleep</servlet-name>
+    <url-pattern>/$/sleep/*</url-pattern>
+  </servlet-mapping>
+
+  <welcome-file-list>
+    <welcome-file>index.html</welcome-file>
+  </welcome-file-list>
+
+  <mime-mapping>
+    <extension>rdf</extension>
+    <mime-type>application/rdf+xml;charset=utf-8</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>ttl</extension>
+    <mime-type>text/turtle;charset=utf-8</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>nt</extension>
+    <mime-type>text/plain;charset=utf-8</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>nq</extension>
+    <mime-type>text/nquads;charset=utf-8</mime-type>
+  </mime-mapping>
+  <mime-mapping>
+    <extension>trig</extension>
+    <mime-type>application/trig;charset=utf-8</mime-type>
+  </mime-mapping>
+
+  <!-- If using security via Shiro - ->
+
+  <listener>
+    <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
+  </listener>
+
+  <filter>
+    <filter-name>ShiroFilter</filter-name>
+    <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>ShiroFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+    <dispatcher>REQUEST</dispatcher>
+    <dispatcher>FORWARD</dispatcher>
+    <dispatcher>INCLUDE</dispatcher>
+    <dispatcher>ERROR</dispatcher>
+  </filter-mapping>
+  -->
+
+</web-app>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/admin-logs.html
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/admin-logs.html b/jena-fuseki2/jena-fuseki-core/src/main/webapp/admin-logs.html
new file mode 100644
index 0000000..1db765e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/admin-logs.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Apache Jena Fuseki</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
+    <link href="../css/font-awesome.min.css" rel="stylesheet" media="screen">
+    <link href="../css/codemirror.css" rel="stylesheet" media="screen">
+    <link href="../css/qonsole.css" rel="stylesheet" media="screen">
+    <link href="../css/jquery.dataTables.css" rel="stylesheet" media="screen">
+    <link href="../css/fui.css" rel="stylesheet" media="screen">
+
+    <!--[if lt IE 9]>
+      <script src="../js/lib/html5shiv.js"></script>
+      <script src="../js/lib/respond.min.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <nav class="navbar navbar-default" role="navigation">
+      <div class="container">
+        <div class="row">
+          <!-- Brand and toggle get grouped for better mobile display -->
+          <div class="navbar-header">
+            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
+              <span class="sr-only">Toggle navigation</span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+            </button>
+            <a class="navbar-brand" href="index.html">
+              <img src="images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" />
+              <div>Apache<br />Jena<br /><strong>Fuseki</strong></div>
+            </a>
+          </div>
+
+          <!-- Collect the nav links, forms, and other content for toggling -->
+          <div class="collapse navbar-collapse navbar-ex1-collapse">
+            <ul class="nav navbar-nav">
+              <li class=""><a href="index.html"><i class="fa fa-home"></i></a></li>
+              <li class=""><a href="query.html"><i class="fa fa-question-circle"></i> query</a></li>
+              <li class=""><a href="validate.html"><i class="fa fa-check-circle"></i> validate</a></li>
+              <li class="admin"><a href="admin-data-management.html"><i class="fa fa-cogs"></i> administer</a></li>
+              <li class="admin"><a href="admin-stats.html"><i class="fa fa-dashboard"></i> stats</a></li>
+              <li class="admin active"><a href="admin-logs.html"><i class="fa fa-book"></i> logs</a></li>
+              <li class=""><a href="documentation.html"><i class="fa fa-info-circle"></i> help</a></li>
+            </ul>
+            <ul class="nav navbar-nav navbar-right">
+              <li class="status-indicator">
+                <div>Server<br />status:</div>
+              </li>
+              <li class="status-indicator">
+                <a class="" href="admin/server-log.html" id="server-status-light" title="current server status">
+                  <span class="server-up"></span>
+                </a>
+              </li>
+            </ul>
+          </div><!-- /.navbar-collapse -->
+        </div><!-- /row -->
+      </div><!-- /container -->
+    </nav>
+
+    <div class="container">
+      <div class="row">
+        <h1>Server logs</h1>
+        <p class="text-danger">Forthcoming feature. Show some or all of the recent log file, assuming it is in the usual place.</p>
+      </div>
+    </div>
+
+    <script src="../js/lib/jquery-1.10.2.min.js"></script>
+    <script src="../js/lib/bootstrap.min.js"></script>
+  </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-select.min.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-select.min.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-select.min.css
new file mode 100644
index 0000000..edb090c
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap-select.min.css
@@ -0,0 +1,7 @@
+/*!
+ * bootstrap-select v1.5.4
+ * http://silviomoreto.github.io/bootstrap-select/
+ *
+ * Copyright 2013 bootstrap-select
+ * Licensed under the MIT license
+ */.bootstrap-select.btn-group:not(.input-group-btn),.bootstrap-select.btn-group[class*="span"]{float:none;display:inline-block;margin-bottom:10px;margin-left:0}.form-search .bootstrap-select.btn-group,.form-inline .bootstrap-select.btn-group,.form-horizontal .bootstrap-select.btn-group{margin-bottom:0}.bootstrap-select.form-control{margin-bottom:0;padding:0;border:0}.bootstrap-select.btn-group.pull-right,.bootstrap-select.btn-group[class*="span"].pull-right,.row-fluid .bootstrap-select.btn-group[class*="span"].pull-right{float:right}.input-append .bootstrap-select.btn-group{margin-left:-1px}.input-prepend .bootstrap-select.btn-group{margin-right:-1px}.bootstrap-select:not([class*="span"]):not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn){width:220px}.bootstrap-select{width:220px\0}.bootstrap-select.form-control:not([class*="span"]){width:100%}.bootstrap-select>.btn{width:100%;padding-right:25px}.error .bootstrap-select .btn{border:1px solid #b94a48}.bootstrap-
 select.show-menu-arrow.open>.btn{z-index:2051}.bootstrap-select .btn:focus{outline:thin dotted #333 !important;outline:5px auto -webkit-focus-ring-color !important;outline-offset:-2px}.bootstrap-select.btn-group .btn .filter-option{display:inline-block;overflow:hidden;width:100%;float:left;text-align:left}.bootstrap-select.btn-group .btn .caret{position:absolute;top:50%;right:12px;margin-top:-2px;vertical-align:middle}.bootstrap-select.btn-group>.disabled,.bootstrap-select.btn-group .dropdown-menu li.disabled>a{cursor:not-allowed}.bootstrap-select.btn-group>.disabled:focus{outline:none !important}.bootstrap-select.btn-group[class*="span"] .btn{width:100%}.bootstrap-select.btn-group .dropdown-menu{min-width:100%;z-index:2000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .dropdown-menu.inner{position:static;border:0;padding:0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-b
 ox-shadow:none;box-shadow:none}.bootstrap-select.btn-group .dropdown-menu dt{display:block;padding:3px 20px;cursor:default}.bootstrap-select.btn-group .div-contain{overflow:hidden}.bootstrap-select.btn-group .dropdown-menu li{position:relative}.bootstrap-select.btn-group .dropdown-menu li>a.opt{position:relative;padding-left:35px}.bootstrap-select.btn-group .dropdown-menu li>a{cursor:pointer}.bootstrap-select.btn-group .dropdown-menu li>dt small{font-weight:normal}.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a i.check-mark{position:absolute;display:inline-block;right:15px;margin-top:2.5px}.bootstrap-select.btn-group .dropdown-menu li a i.check-mark{display:none}.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text{margin-right:34px}.bootstrap-select.btn-group .dropdown-menu li small{padding-left:.5em}.bootstrap-select.btn-group .dropdown-menu li:not(.disabled)>a:hover small,.bootstrap-select.btn-group .dropdown-menu li:not(.disabled)>a:focus small,.
 bootstrap-select.btn-group .dropdown-menu li.active:not(.disabled)>a small{color:#64b1d8;color:rgba(255,255,255,0.4)}.bootstrap-select.btn-group .dropdown-menu li>dt small{font-weight:normal}.bootstrap-select.show-menu-arrow .dropdown-toggle:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #CCC;border-bottom-color:rgba(0,0,0,0.2);position:absolute;bottom:-4px;left:9px;display:none}.bootstrap-select.show-menu-arrow .dropdown-toggle:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid white;position:absolute;bottom:-4px;left:10px;display:none}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before{bottom:auto;top:-3px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after{bottom:auto;top:-3px;border-top:6px solid #fff;border-bottom:0}.
 bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before{right:12px;left:auto}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after{right:13px;left:auto}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:before,.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:after{display:block}.bootstrap-select.btn-group .no-results{padding:3px;background:#f5f5f5;margin:0 5px}.bootstrap-select.btn-group .dropdown-menu .notify{position:absolute;bottom:5px;width:96%;margin:0 2%;min-height:26px;padding:3px 5px;background:#f5f5f5;border:1px solid #e3e3e3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);pointer-events:none;opacity:.9;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mobile-device{position:absolute;top:0;left:0;display:block !important;width:100%;height:100% !important;opacity:0}.bootstrap-select.fit-width{width:auto !important}.bootstrap-select.btn-group.fit-width .btn .filter-option{position:static}.bootstrap-select.btn-gro
 up.fit-width .btn .caret{position:static;top:auto;margin-top:-1px}.control-group.error .bootstrap-select .dropdown-toggle{border-color:#b94a48}.bootstrap-select-searchbox,.bootstrap-select .bs-actionsbox{padding:4px 8px}.bootstrap-select .bs-actionsbox{float:left;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select-searchbox+.bs-actionsbox{padding:0 8px 4px}.bootstrap-select-searchbox input{margin-bottom:0}.bootstrap-select .bs-actionsbox .btn-group button{width:50%}
\ No newline at end of file


[10/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/manage.html
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/manage.html b/jena-fuseki2/jena-fuseki-core/src/main/webapp/manage.html
new file mode 100644
index 0000000..3ee53f4
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/manage.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Apache Jena Fuseki - manage dataset</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
+    <link href="css/font-awesome.min.css" rel="stylesheet" media="screen">
+    <link href="css/codemirror.css" rel="stylesheet" media="screen">
+    <link href="css/qonsole.css" rel="stylesheet" media="screen">
+    <link href="css/jquery.dataTables.css" rel="stylesheet" media="screen">
+    <link href="css/fui.css" rel="stylesheet" media="screen">
+
+    <script data-main="js/app/main.manage.js" src="js/lib/require.min.js"></script>
+
+    <!--[if lt IE 9]>
+      <script src="js/lib/html5shiv.js"></script>
+      <script src="js/lib/respond.min.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <nav class="navbar navbar-default" role="navigation">
+      <div class="container">
+        <div class="row">
+          <!-- Brand and toggle get grouped for better mobile display -->
+          <div class="navbar-header">
+            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
+              <span class="sr-only">Toggle navigation</span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+            </button>
+            <a class="navbar-brand" href="index.html">
+              <img src="images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" />
+              <div>Apache<br />Jena<br /><strong>Fuseki</strong></div>
+            </a>
+          </div>
+
+          <!-- Collect the nav links, forms, and other content for toggling -->
+          <div class="collapse navbar-collapse navbar-ex1-collapse">
+            <ul class="nav navbar-nav">
+              <li class=""><a href="index.html"><i class="fa fa-home"></i></a></li>
+              <li class=""><a href="dataset.html"><i class="fa fa-database"></i> dataset</a></li>
+              <li class="active"><a href="manage.html"><i class="fa fa-cogs"></i> manage datasets</a></li>
+              <li class=""><a href="services.html"><i class="fa fa-wrench"></i> services</a></li>
+              <li class=""><a href="documentation.html"><i class="fa fa-info-circle"></i> help</a></li>
+            </ul>
+            <ul class="nav navbar-nav navbar-right">
+              <li class="status-indicator">
+                <div>Server<br />status:</div>
+              </li>
+              <li class="status-indicator">
+                <a class="" href="admin/server-log.html" id="server-status-light" title="current server status">
+                  <span class="server-up"></span>
+                </a>
+              </li>
+            </ul>
+          </div><!-- /.navbar-collapse -->
+        </div><!-- /row -->
+      </div><!-- /container -->
+    </nav>
+
+    <div class="container">
+
+      <div class="row">
+        <div class="col-md-12">
+          <h2>
+            Manage datasets
+          </h2>
+          <p>Perform management actions on existing datasets, including backup,
+          or add a new dataset.
+          </p>
+        </div>
+      </div> <!-- /.row -->
+
+      <div class="row">
+        <div class="col-md-12">
+          <div class="dataset-selector-container"></div>
+        </div>
+      </div>
+
+      <div class="row">
+        <div class="col-md-12">
+          <div class="content-frame">
+            <ul class="nav nav-tabs">
+              <li><a href="#datasets" data-toggle="tab"><i class='fa fa-database'></i> existing datasets</a></li>
+              <li><a href="#new-dataset" data-toggle="tab"><i class='fa fa-plus-circle'></i> add new dataset</a></li>
+            </ul>
+
+            <!-- Tab panes -->
+            <div class="tab-content">
+              <div class="tab-pane" id="datasets">
+                <div id="dataset-management"></div>
+              </div> <!-- /.tab-pane -->
+
+              <div class="tab-pane" id="new-dataset">
+                <div id="dataset-simple-create"></div>
+              </div> <!-- /.tab-pane -->
+            </div> <!-- /.tab-content -->
+          </div> <!-- /.content-frame -->
+
+        </div> <!-- /.col-md-12 -->
+      </div> <!-- /.row -->
+    </div> <!--/.container -->
+
+
+  </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/services.html
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/services.html b/jena-fuseki2/jena-fuseki-core/src/main/webapp/services.html
new file mode 100644
index 0000000..b0020fb
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/services.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Apache Jena Fuseki - services</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
+    <link href="css/font-awesome.min.css" rel="stylesheet" media="screen">
+    <link href="css/codemirror.css" rel="stylesheet" media="screen">
+    <link href="css/qonsole.css" rel="stylesheet" media="screen">
+    <link href="css/jquery.dataTables.css" rel="stylesheet" media="screen">
+    <link href="css/fui.css" rel="stylesheet" media="screen">
+
+    <script data-main="js/app/main.index.js" src="js/lib/require.min.js"></script>
+
+    <!--[if lt IE 9]>
+      <script src="js/lib/html5shiv.js"></script>
+      <script src="js/lib/respond.min.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <nav class="navbar navbar-default" role="navigation">
+      <div class="container">
+        <div class="row">
+          <!-- Brand and toggle get grouped for better mobile display -->
+          <div class="navbar-header">
+            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
+              <span class="sr-only">Toggle navigation</span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+            </button>
+            <a class="navbar-brand" href="index.html">
+              <img src="images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" />
+              <div>Apache<br />Jena<br /><strong>Fuseki</strong></div>
+            </a>
+          </div>
+
+          <!-- Collect the nav links, forms, and other content for toggling -->
+          <div class="collapse navbar-collapse navbar-ex1-collapse">
+            <ul class="nav navbar-nav">
+              <li class=""><a href="index.html"><i class="fa fa-home"></i></a></li>
+              <li class=""><a href="dataset.html"><i class="fa fa-database"></i> dataset</a></li>
+              <li class=""><a href="manage.html"><i class="fa fa-cogs"></i> manage datasets</a></li>
+              <li class="active"><a href="services.html"><i class="fa fa-wrench"></i> services</a></li>
+              <li class=""><a href="documentation.html"><i class="fa fa-info-circle"></i> help</a></li>
+            </ul>
+            <ul class="nav navbar-nav navbar-right">
+              <li class="status-indicator">
+                <div>Server<br />status:</div>
+              </li>
+              <li class="status-indicator">
+                <a class="" href="admin/server-log.html" id="server-status-light" title="current server status">
+                  <span class="server-up"></span>
+                </a>
+              </li>
+            </ul>
+          </div><!-- /.navbar-collapse -->
+        </div><!-- /row -->
+      </div><!-- /container -->
+    </nav>
+
+    <div class="container">
+
+      <div class="row">
+        <div class="col-md-12">
+          <h2>
+            Inspect dataset
+          </h2>
+        </div>
+      </div>
+
+    </div>
+
+  </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/test/test-fuseki-config.ttl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/test/test-fuseki-config.ttl b/jena-fuseki2/jena-fuseki-core/src/main/webapp/test/test-fuseki-config.ttl
new file mode 100644
index 0000000..190676a
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/test/test-fuseki-config.ttl
@@ -0,0 +1,27 @@
+# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+@prefix :        <#> .
+@prefix fuseki:  <http://jena.apache.org/fuseki#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+## ---------------------------------------------------------------
+## Updatable in-memory dataset.
+
+<#service1> rdf:type fuseki:Service ;
+    # URI of the dataset -- http://host:port/ds
+    fuseki:name                        "test-service" ;
+    fuseki:serviceQuery                "sparql" ;
+    fuseki:serviceQuery                "query" ;
+    fuseki:serviceUpdate               "update" ;
+    fuseki:serviceUpload               "upload" ;
+    fuseki:serviceReadWriteGraphStore  "data" ;
+    fuseki:serviceReadGraphStore       "get" ;
+    fuseki:dataset                     <#dataset> ;
+    .
+
+## In-memory, initially empty.
+<#dataset> rdf:type ja:RDFDataset .

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/validate.html
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/validate.html b/jena-fuseki2/jena-fuseki-core/src/main/webapp/validate.html
new file mode 100644
index 0000000..82b13e2
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/validate.html
@@ -0,0 +1,146 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Apache Jena Fuseki - validation</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
+    <link href="css/font-awesome.min.css" rel="stylesheet" media="screen">
+    <link href="css/codemirror.css" rel="stylesheet" media="screen">
+    <link href="css/qonsole.css" rel="stylesheet" media="screen">
+    <link href="css/jquery.dataTables.css" rel="stylesheet" media="screen">
+    <link href="css/fui.css" rel="stylesheet" media="screen">
+
+    <script data-main="js/app/main.validation.js" src="js/lib/require.min.js"></script>
+
+    <!--[if lt IE 9]>
+      <script src="../js/lib/html5shiv.js"></script>
+      <script src="../js/lib/respond.min.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <nav class="navbar navbar-default" role="navigation">
+      <div class="container">
+        <div class="row">
+          <!-- Brand and toggle get grouped for better mobile display -->
+          <div class="navbar-header">
+            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
+              <span class="sr-only">Toggle navigation</span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+            </button>
+            <a class="navbar-brand" href="index.html">
+              <img src="images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" />
+              <div>Apache<br />Jena<br /><strong>Fuseki</strong></div>
+            </a>
+          </div>
+
+          <!-- Collect the nav links, forms, and other content for toggling -->
+          <div class="collapse navbar-collapse navbar-ex1-collapse">
+            <ul class="nav navbar-nav">
+              <li class=""><a href="index.html"><i class="fa fa-home"></i></a></li>
+              <li class=""><a href="query.html"><i class="fa fa-question-circle"></i> query</a></li>
+              <li class="active"><a href="validate.html"><i class="fa fa-check-circle"></i> validate</a></li>
+              <li class="admin"><a href="admin-data-management.html"><i class="fa fa-cogs"></i> administer</a></li>
+              <li class="admin"><a href="admin-stats.html"><i class="fa fa-dashboard"></i> stats</a></li>
+              <li class="admin"><a href="admin-logs.html"><i class="fa fa-book"></i> logs</a></li>
+              <li class=""><a href="documentation.html"><i class="fa fa-info-circle"></i> help</a></li>
+            </ul>
+            <ul class="nav navbar-nav navbar-right">
+              <li class="status-indicator">
+                <div>Server<br />status:</div>
+              </li>
+              <li class="status-indicator">
+                <a class="" href="admin/server-log.html" id="server-status-light" title="current server status">
+                  <span class="server-up"></span>
+                </a>
+              </li>
+            </ul>
+          </div><!-- /.navbar-collapse -->
+        </div><!-- /row -->
+      </div><!-- /container -->
+    </nav>
+
+    <div class="container">
+      <div class="row">
+        <h1>Fuseki &ndash; validation</h1>
+        <p>Use this page to validate SPARQL queries or RDF data.</p>
+        <p class="text-danger">Forthcoming feature &ndash; not yet working.</p>
+
+
+        <div class="validation qonsole">
+          <div class="col-md-12 well">
+            <div class="query-edit">
+              <div id="query-edit-cm" class=""></div>
+            </div>
+            <div class="query-chrome">
+              <form class="form-inline" role="form">
+                <div class="validate-as-options options-list">
+                  <h2>Validate as:</h2>
+                  <ul class="list-inline">
+                    <li><a class="btn btn-custom2 btn-sm active validate-as-option" data-toggle="button" data-validate-as="sparql">SPARQL</a></li>
+                    <li><a class="btn btn-custom2 btn-sm  validate-as-option" data-toggle="button" data-validate-as="arq">SPARQL extended syntax</a></li>
+                    <li><a class="btn btn-custom2 btn-sm validate-as-option" data-toggle="button" data-validate-as="Turtle">Turtle</a></li>
+                    <li><a class="btn btn-custom2 btn-sm validate-as-option" data-toggle="button" data-validate-as="TriG">TriG</a></li>
+                    <li><a class="btn btn-custom2 btn-sm validate-as-option" data-toggle="button" data-validate-as="N-Triples">N-Triples</a></li>
+                    <li><a class="btn btn-custom2 btn-sm validate-as-option" data-toggle="button" data-validate-as="N-Quads">N-Quads</a></li>
+                  </ul>
+                </div><!-- /.validate-as-options -->
+
+                <div class="output-format-options options-list">
+                  <h2>Output format:</h2>
+                  <ul class="list-inline">
+                    <li><a class="btn btn-custom2 btn-sm" data-toggle="button" data-output-format="formatted">SPARQL</a></li>
+                    <li><a class="btn btn-custom2 btn-sm active" data-toggle="button" data-output-format="algebra">SPARQL algebra</a></li>
+                    <li><a class="btn btn-custom2 btn-sm" data-toggle="button" data-output-format="algebra-quads">SPARQL algebra (quads)</a></li>
+                    <li><a class="btn btn-custom2 btn-sm" data-toggle="button" data-output-format="algebra-opt">SPARQL algebra (with optimizations)</a></li>
+                    <li><a class="btn btn-custom2 btn-sm" data-toggle="button" data-output-format="algebra-opt-quads">SPARQL algebra (quads, with optimizations)</a></li>
+                  </ul>
+                </div><!-- /.output-format-options -->
+
+                <div class="row">
+                  <div class="col-md-3 col-md-offset-1">
+                    <a href="#" class="btn btn-success perform-validation">perform validation</a>
+                  </div>
+                </div>
+
+              </form>
+            </div>
+          </div>
+
+          <!-- results -->
+          <div id="results-block" class="row validation-output">
+            <div class="col-md-12">
+              <div class="well">
+                <div class="row">
+                  <div class="col-md-12">
+                    <span class="loadingSpinner hidden">
+                      <img src="images/wait30.gif" alt="waiting for server action to complete" />
+                    </span>
+                    <span class="timeTaken hidden"></span>
+                  </div>
+                </div>
+                <div class="row">
+                  <div class="col-md-12" id="results">
+                    <h2 class="col-md-12">Validation output</h2>
+                    <div class="query-edit">
+                      <div id="validation-output-cm" class=""></div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+
+          <div class="row clearfix"></div>
+
+          <footer>
+          </footer>
+        </div><!-- /.validation-->
+      </div><!-- /.row -->
+    </div><!-- /.container -->
+
+    <script src="../js/lib/jquery-1.10.2.min.js"></script>
+    <script src="../js/lib/bootstrap.min.js"></script>
+  </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/AbstractFusekiTest.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/AbstractFusekiTest.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/AbstractFusekiTest.java
new file mode 100644
index 0000000..3f1aa17
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/AbstractFusekiTest.java
@@ -0,0 +1,47 @@
+/**
+ * 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.jena.fuseki;
+
+import org.apache.jena.atlas.junit.BaseTest ;
+import org.junit.AfterClass ;
+import org.junit.Before ;
+import org.junit.BeforeClass ;
+
+/** Framework for tests using client-side operation onto a forked Fuseki server.
+ *  Not general - some test sets set up their own environment for 
+ *  different, additional requirements.
+ */
+
+public class AbstractFusekiTest extends BaseTest
+{
+    @BeforeClass
+    public static void allocServerForSuite() {
+        ServerTest.allocServer() ;
+    }
+
+    @AfterClass
+    public static void freeServerForSuite() {
+        ServerTest.freeServer() ;
+    }
+    
+    @Before public void resetServer() {
+        ServerTest.resetServer() ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/FileSender.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/FileSender.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/FileSender.java
new file mode 100644
index 0000000..8381ab5
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/FileSender.java
@@ -0,0 +1,87 @@
+/**
+ * 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.jena.fuseki;
+
+import java.io.IOException ;
+import java.io.PrintStream ;
+import java.net.HttpURLConnection ;
+import java.net.URL ;
+import java.util.ArrayList ;
+import java.util.List ;
+import java.util.UUID ;
+
+import org.apache.jena.atlas.io.IO ;
+
+public class FileSender {
+    // HttpClient 4.3 has MultipartEntity but the 4.2->4.3 change is less
+    // than trivial (and it seems some environment fix the HttpClient) 
+    // so here's some code for testing support.
+//    MultipartEntity entity = new MultipartEntity();
+//    entity.addPart(...)
+//    HttpPost request = new HttpPost(url);
+//    request.setEntity(entity);
+//    HttpClient client = new DefaultHttpClient();
+//    HttpResponse response = client.execute(request);
+    
+    class Entry {
+        String fileName ;
+        String content ;
+        String contentType ;
+    }
+    
+    private List<Entry> items = new ArrayList<Entry>() ;
+    
+    private String url ;  
+    
+    public FileSender(String url ) { this.url = url ; }
+    
+    public void add(String filename, String content, String type) {
+        Entry e = new Entry() ;
+        e.fileName = filename ;
+        e.content = content ;
+        e.contentType = type ;
+        items.add(e) ;
+    }
+    
+    public void send(String method) {
+        try {
+            String WNL = "\r\n" ;   // Web newline
+            String boundary = UUID.randomUUID().toString() ;
+            
+            HttpURLConnection connection = (HttpURLConnection)new URL(url).openConnection();
+            connection.setRequestMethod(method);
+            connection.setDoOutput(true) ;
+            connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
+            try ( PrintStream ps = new PrintStream(connection.getOutputStream()) ; ) {
+                for ( Entry e : items ) {
+                    ps.print("--" + boundary+WNL) ;
+                    ps.print("Content-Disposition: form-data; name=\"FILE\"; filename=\""+e.fileName+"\""+WNL) ;
+                    ps.print("Content-Type: "+e.contentType+";charset=UTF-8"+WNL) ;
+                    ps.print(WNL);
+                    ps.print(e.content) ;
+                    ps.print(WNL);
+                }
+                ps.print("--" + boundary + "--"+WNL);
+            } 
+            connection.connect(); 
+            int responseCode = connection.getResponseCode();
+        } catch (IOException ex) { IO.exception(ex); }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerTest.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerTest.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerTest.java
new file mode 100644
index 0000000..1a70869
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerTest.java
@@ -0,0 +1,157 @@
+/*
+ * 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.jena.fuseki ;
+
+import java.nio.file.Paths ;
+import java.util.Collection ;
+
+import org.apache.jena.atlas.iterator.Iter ;
+import org.apache.jena.atlas.lib.FileOps ;
+import org.apache.jena.fuseki.server.* ;
+import org.apache.jena.fuseki.jetty.JettyServerConfig ;
+import org.apache.jena.fuseki.jetty.JettyFuseki ;
+
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.NodeFactory ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.ModelFactory ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
+import com.hp.hpl.jena.sparql.modify.request.Target ;
+import com.hp.hpl.jena.sparql.modify.request.UpdateDrop ;
+import com.hp.hpl.jena.sparql.sse.SSE ;
+import com.hp.hpl.jena.tdb.base.file.Location ;
+import com.hp.hpl.jena.update.Update ;
+import com.hp.hpl.jena.update.UpdateExecutionFactory ;
+import com.hp.hpl.jena.update.UpdateProcessor ;
+
+/**
+ * Manage a server for testing. Example for one server per test suite:
+ * 
+ * <pre>
+ *     \@BeforeClass public static void beforeClass() { ServerTest.allocServer() ; }
+ *     \@AfterClass  public static void afterClass()  { ServerTest.freeServer() ; }
+ *     \@Before      public void beforeTest()         { ServerTest.resetServer() ; }
+ * </pre>
+ */
+public class ServerTest {
+    // Abstraction that runs a SPARQL server for tests.
+
+    public static final int     port          = 3535 ;
+    public static final String  urlRoot       = "http://localhost:" + port + "/" ;
+    public static final String  datasetPath   = "/dataset" ;
+    public static final String  urlDataset    = "http://localhost:" + port + datasetPath ;
+    public static final String  serviceUpdate = urlDataset + "/update" ;
+    public static final String  serviceQuery  = urlDataset + "/query" ;
+    public static final String  serviceREST   = urlDataset + "/data" ;
+
+    public static final String  gn1           = "http://graph/1" ;
+    public static final String  gn2           = "http://graph/2" ;
+    public static final String  gn99          = "http://graph/99" ;
+
+    public static final Node    n1            = NodeFactory.createURI("http://graph/1") ;
+    public static final Node    n2            = NodeFactory.createURI("http://graph/2") ;
+    public static final Node    n99           = NodeFactory.createURI("http://graph/99") ;
+
+    public static final Graph   graph1        = SSE.parseGraph("(base <http://example/> (graph (<x> <p> 1)))") ;
+    public static final Graph   graph2        = SSE.parseGraph("(base <http://example/> (graph (<x> <p> 2)))") ;
+
+    public static final Model   model1        = ModelFactory.createModelForGraph(graph1) ;
+    public static final Model   model2        = ModelFactory.createModelForGraph(graph2) ;
+
+    private static JettyFuseki server        = null ;
+
+    // reference count of start/stop server
+    private static int          countServer   = 0 ;
+
+    // This will cause there to be one server over all tests.
+    // Must be after initialization of counters
+    // static { allocServer() ; }
+
+    static public void allocServer() {
+        if ( countServer == 0 )
+            setupServer() ;
+        countServer++ ;
+    }
+
+    static public void freeServer() {
+        if ( countServer >= 0 ) {
+            countServer-- ;
+            if ( countServer == 0 )
+                teardownServer() ;
+        }
+    }
+
+    protected static void setupServer() {
+        FusekiEnv.FUSEKI_HOME = Paths.get(TS_Fuseki.FusekiTestHome).toAbsolutePath() ;
+        FileOps.ensureDir("target");
+        FileOps.ensureDir(TS_Fuseki.FusekiTestHome);
+        FileOps.ensureDir(TS_Fuseki.FusekiTestBase) ;
+        FusekiEnv.FUSEKI_BASE = Paths.get(TS_Fuseki.FusekiTestBase).toAbsolutePath() ;
+        setupServer(null) ;
+    }
+    
+    protected static void setupServer(String authConfigFile) {
+        SystemState.location = Location.mem() ;
+        SystemState.init$() ;
+        
+        ServerInitialConfig params = new ServerInitialConfig() ;
+        DatasetGraph dsg = DatasetGraphFactory.createMem() ;
+        params.dsg = dsg ;
+        params.datasetPath = ServerTest.datasetPath ;
+        params.allowUpdate = true ;
+        FusekiServerListener.initialSetup = params ;
+        
+        JettyServerConfig config = make(true, true) ;
+        config.authConfigFile = authConfigFile ;
+        JettyFuseki.initializeServer(config);
+        JettyFuseki.instance.start() ;
+        server = JettyFuseki.instance ;
+    }
+
+    public static JettyServerConfig make(boolean allowUpdate, boolean listenLocal) {
+        JettyServerConfig config = new JettyServerConfig() ;
+        // Avoid any persistent record.
+        config.port = ServerTest.port ;
+        config.contextPath = "/" ;
+        config.loopback = listenLocal ;
+        config.jettyConfigFile = null ;
+        config.pages = Fuseki.PagesStatic ;
+        config.enableCompression = true ;
+        config.verboseLogging = false ;
+        return config ;
+    }
+
+    protected static void teardownServer() {
+        if ( server != null )
+            server.stop() ;
+        server = null ;
+        // Clear out the registry.
+        Collection<String> keys = Iter.toList(DataAccessPointRegistry.get().keys()) ;
+        for (String k : keys)
+            DataAccessPointRegistry.get().remove(k) ;
+    }
+
+    public static void resetServer() {
+        Update clearRequest = new UpdateDrop(Target.ALL) ;
+        UpdateProcessor proc = UpdateExecutionFactory.createRemote(clearRequest, ServerTest.serviceUpdate) ;
+        proc.execute() ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java
new file mode 100644
index 0000000..db8a4aa
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java
@@ -0,0 +1,75 @@
+/*
+ * 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.jena.fuseki;
+
+import org.apache.jena.atlas.lib.FileOps ;
+import org.apache.jena.atlas.logging.LogCtl ;
+import org.apache.jena.fuseki.http.TestDatasetAccessorHTTP ;
+import org.apache.jena.fuseki.http.TestDatasetGraphAccessorHTTP ;
+import org.apache.jena.fuseki.http.TestHttpOp ;
+import org.apache.jena.fuseki.server.FusekiEnv ;
+import org.junit.BeforeClass ;
+import org.junit.runner.RunWith ;
+import org.junit.runners.Suite ;
+
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses( {
+    TestHttpOp.class
+    , TestSPARQLProtocol.class
+    , TestDatasetGraphAccessorHTTP.class
+    , TestDatasetAccessorHTTP.class
+    , TestQuery.class
+    , TestAuth.class
+    , TestDatasetOps.class
+    , TestFileUpload.class
+    , TestAdmin.class
+})
+
+
+
+
+public class TS_Fuseki extends ServerTest
+{
+    public static final String FusekiTestHome = "target/FusekiHome" ;
+    public static final String FusekiTestBase = FusekiTestHome+"/run" ;
+    
+    @BeforeClass public static void setupForFusekiServer() {
+        FileOps.ensureDir(FusekiTestHome);
+        FileOps.clearDirectory(FusekiTestHome);
+        System.setProperty("FUSEKI_HOME", FusekiTestHome) ;
+        FusekiEnv.setEnvironment() ;
+        FusekiLogging.setLogging();
+        
+        org.apache.log4j.Level WARN1 = org.apache.log4j.Level.WARN ; 
+        java.util.logging.Level WARN2 = java.util.logging.Level.WARNING ;
+
+        // Occasionally log4j.properties gets out of step.
+        LogCtl.logLevel("org.apache.shiro",    WARN1, WARN2);
+        LogCtl.logLevel("org.eclipse.jetty",    WARN1, WARN2);
+        
+        LogCtl.logLevel(Fuseki.serverLogName,   WARN1, WARN2);
+        LogCtl.logLevel(Fuseki.configLogName,   WARN1, WARN2);
+        LogCtl.logLevel(Fuseki.adminLogName,    WARN1, WARN2);
+        LogCtl.logLevel(Fuseki.builderLogName,  WARN1, WARN2);
+        LogCtl.logLevel(Fuseki.actionLogName,   WARN1, WARN2);
+        LogCtl.logLevel(Fuseki.requestLogName,  WARN1, WARN2);
+        LogCtl.logLevel(Fuseki.servletRequestLogName,   WARN1, WARN2);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java
new file mode 100644
index 0000000..d5e6ddb
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java
@@ -0,0 +1,538 @@
+/**
+ * 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.jena.fuseki;
+
+import static org.apache.jena.fuseki.ServerTest.datasetPath ;
+import static org.apache.jena.fuseki.ServerTest.urlRoot ;
+import static org.apache.jena.fuseki.mgt.MgtConst.opDatasets ;
+import static org.apache.jena.fuseki.mgt.MgtConst.opPing ;
+import static org.apache.jena.fuseki.mgt.MgtConst.opServer ;
+import static org.apache.jena.fuseki.mgt.MgtConst.opStats ;
+import static org.apache.jena.riot.web.HttpOp.execHttpDelete ;
+import static org.apache.jena.riot.web.HttpOp.execHttpGet ;
+import static org.apache.jena.riot.web.HttpOp.execHttpPost ;
+
+import java.io.File ;
+import java.io.IOException ;
+import java.io.InputStream ;
+import java.util.ArrayList ;
+import java.util.List ;
+
+import org.apache.http.HttpEntity ;
+import org.apache.http.HttpResponse ;
+import org.apache.http.NameValuePair ;
+import org.apache.http.client.entity.UrlEncodedFormEntity ;
+import org.apache.http.entity.FileEntity ;
+import org.apache.http.message.BasicNameValuePair ;
+import org.apache.jena.atlas.json.JSON ;
+import org.apache.jena.atlas.json.JsonArray ;
+import org.apache.jena.atlas.json.JsonObject ;
+import org.apache.jena.atlas.json.JsonValue ;
+import org.apache.jena.atlas.junit.BaseTest ;
+import org.apache.jena.atlas.lib.Lib ;
+import org.apache.jena.atlas.web.HttpException ;
+import org.apache.jena.atlas.web.TypedInputStream ;
+import org.apache.jena.fuseki.mgt.JsonConst ;
+import org.apache.jena.riot.WebContent ;
+import org.apache.jena.riot.web.HttpOp ;
+import org.apache.jena.riot.web.HttpResponseHandler ;
+import org.apache.jena.web.HttpSC ;
+import org.junit.AfterClass ;
+import org.junit.Before ;
+import org.junit.BeforeClass ;
+import org.junit.Test ;
+
+/** Tests of the admin functionality */
+public class TestAdmin extends BaseTest {
+    
+    // Name of the dataset in the assembler file.
+    static String dsTest = "test-ds2" ;
+    
+    @BeforeClass
+    public static void beforeClass() {
+        ServerTest.allocServer() ;
+        ServerTest.resetServer() ;
+    }
+
+    @AfterClass
+    public static void afterClass() {
+        ServerTest.freeServer() ;
+    }
+    
+    @Before public void beforeTest() {
+        ServerTest.resetServer() ;
+    }
+    
+    // --- Ping 
+    
+    @Test public void ping_1() {
+        execHttpGet(ServerTest.urlRoot+"$/"+opPing) ;
+    }
+    
+    @Test public void ping_2() {
+        execHttpPost(ServerTest.urlRoot+"$/"+opPing, null) ;
+    }
+    
+    // --- Server status 
+    
+    @Test public void server_1() {
+        JsonValue jv = httpGetJson(ServerTest.urlRoot+"$/"+opServer) ;
+        JsonObject obj = jv.getAsObject() ;
+        assertTrue(obj.hasKey(JsonConst.admin)) ;
+        assertTrue(obj.hasKey(JsonConst.datasets)) ;
+        assertTrue(obj.hasKey(JsonConst.uptime)) ;
+        assertTrue(obj.hasKey(JsonConst.startDT)) ;
+    }
+
+    @Test public void server_2() {
+        execHttpPost(ServerTest.urlRoot+"$/"+opServer, null) ;
+    }
+    
+    // --- List all datasets
+    
+    @Test public void list_datasets_1() {
+        try ( TypedInputStream in = execHttpGet(urlRoot+"$/"+opDatasets) ; ) { }
+    }
+    
+    @Test public void list_datasets_2() {
+        try ( TypedInputStream in = execHttpGet(urlRoot+"$/"+opDatasets) ) {
+            assertEqualsIgnoreCase(WebContent.contentTypeJSON, in.getContentType()) ;
+            JsonValue v = JSON.parseAny(in) ;
+            assertNotNull(v.getAsObject().get("datasets")) ; 
+            checkJsonDatasetsAll(v);
+        }
+    }
+    
+    // Specific dataset
+    @Test public void list_datasets_3() {
+        checkExists(datasetPath) ;
+    }
+    
+    // Specific dataset
+    @Test public void list_datasets_4() {
+        try {
+            getDatasetDescription("does-not-exist") ;
+        } catch (HttpException ex) {
+            assertEquals(HttpSC.NOT_FOUND_404, ex.getResponseCode()) ;
+        }
+    }
+    
+    // Specific dataset
+    @Test public void list_datasets_5() {
+        JsonValue v = getDatasetDescription(datasetPath) ;
+        checkJsonDatasetsOne(v.getAsObject()) ;
+    }
+
+    private static JsonValue getDatasetDescription(String dsName) {
+        try ( TypedInputStream in = execHttpGet(urlRoot+"$/"+opDatasets+"/"+dsName) ) {
+            assertEqualsIgnoreCase(WebContent.contentTypeJSON, in.getContentType()) ;
+            JsonValue v = JSON.parse(in) ;
+            return v ;
+        }
+    }
+
+    // -- Add
+    
+    private static void addTestDataset() {
+        File f = new File("testing/config-ds-1.ttl") ;
+        org.apache.http.entity.ContentType ct = org.apache.http.entity.ContentType.parse(WebContent.contentTypeTurtle+"; charset="+WebContent.charsetUTF8) ;
+        HttpEntity e = new FileEntity(f, ct) ;
+        execHttpPost(ServerTest.urlRoot+"$/"+opDatasets, e) ;
+    }
+    
+    private static void deleteDataset(String name) {
+        execHttpDelete(ServerTest.urlRoot+"$/"+opDatasets+"/"+name) ;
+    }
+
+    // Specific dataset
+    @Test public void add_delete_dataset_1() {
+        checkNotThere(dsTest) ;
+
+        addTestDataset() ;
+        
+        // Check exists.
+        checkExists(dsTest) ;
+        
+        // Remove it.
+        deleteDataset(dsTest) ;
+        checkNotThere(dsTest) ;
+    }
+
+    // Try to add twice
+    @Test public void add_delete_dataset_2() {
+        checkNotThere(dsTest) ;
+
+        File f = new File("testing/config-ds-1.ttl") ;
+        { 
+            org.apache.http.entity.ContentType ct = org.apache.http.entity.ContentType.parse(WebContent.contentTypeTurtle+"; charset="+WebContent.charsetUTF8) ;
+            HttpEntity e = new FileEntity(f, ct) ;
+            execHttpPost(ServerTest.urlRoot+"$/"+opDatasets, e) ;
+        }
+        // Check exists.
+        checkExists(dsTest) ;
+        try {
+            org.apache.http.entity.ContentType ct = org.apache.http.entity.ContentType.parse(WebContent.contentTypeTurtle+"; charset="+WebContent.charsetUTF8) ;
+            HttpEntity e = new FileEntity(f, ct) ;
+            execHttpPost(ServerTest.urlRoot+"$/"+opDatasets, e) ;
+        } catch (HttpException ex) {
+            assertEquals(HttpSC.CONFLICT_409, ex.getResponseCode()) ;
+        }
+        // Check exists.
+        checkExists(dsTest) ;
+        deleteDataset(dsTest) ;
+    }
+    
+    @Test public void add_delete_dataset_3() throws Exception {
+        String name = "MEMTEST" ;
+        //String args = "dbType=mem&dbName="+name ;
+        
+        List<NameValuePair> args = new ArrayList<NameValuePair>() ;
+        args.add(new BasicNameValuePair("dbType", "mem")) ;
+        args.add(new BasicNameValuePair("dbName", name)) ;
+        
+        HttpEntity e = new UrlEncodedFormEntity(args) ;
+        execHttpPost(ServerTest.urlRoot+"$/"+opDatasets, e) ;
+        checkExists(name) ;
+        deleteDataset(name) ;
+    }
+    
+    @Test public void delete_dataset_1() {
+        String name = "NoSuchDataset" ;
+        try {
+            execHttpDelete(ServerTest.urlRoot+"$/"+opDatasets+"/"+name) ;
+            fail("delete did not cause an Http Exception") ;
+        } catch ( HttpException ex ) {
+            assertEquals(HttpSC.NOT_FOUND_404, ex.getResponseCode()) ;
+        }
+    }
+
+    // ---- Active/Offline.
+
+    @Test public void state_1() {
+        // Add one
+        addTestDataset() ;
+        checkExists(dsTest) ;
+
+        execHttpPost(ServerTest.urlRoot+"$/"+opDatasets+"/"+dsTest+"?state=offline", null) ;
+
+        checkExistsNotActive(dsTest); 
+        
+        execHttpPost(ServerTest.urlRoot+"$/"+opDatasets+"/"+dsTest+"?state=active", null) ;
+        
+        checkExists(dsTest) ;
+        deleteDataset(dsTest) ;
+    }
+    
+    @Test public void state_2() {
+        addTestDataset() ;
+        execHttpPost(ServerTest.urlRoot+"$/"+opDatasets+"/"+dsTest+"?state=offline", null) ;
+        deleteDataset(dsTest) ;
+        checkNotThere(dsTest) ;
+    }
+
+    @Test public void state_3() {
+        addTestDataset() ;
+        try {
+            execHttpPost(ServerTest.urlRoot+"$/"+opDatasets+"/DoesNotExist?state=offline", null) ;
+        } catch (HttpException ex) { assertEquals(HttpSC.NOT_FOUND_404, ex.getResponseCode()) ; }
+        deleteDataset(dsTest) ;
+    }
+    
+    // ---- Backup
+
+    // ---- Server
+    
+    // ---- Stats
+    
+    @Test public void stats_1() {
+        JsonValue v = execGetJSON(urlRoot+"$/"+opStats) ;
+        checkJsonStatsAll(v); 
+    }
+    
+    @Test public void stats_2() {
+        addTestDataset() ;
+        JsonValue v = execGetJSON(urlRoot+"$/"+opStats+datasetPath) ;
+        checkJsonStatsAll(v); 
+        deleteDataset(dsTest) ;
+    }
+
+    @Test public void stats_3() {
+        addTestDataset() ;
+        try {
+            JsonValue v = execGetJSON(urlRoot+"$/"+opStats+"/DoesNotExist") ;
+            checkJsonStatsAll(v);
+        } catch (HttpException ex) { assertEquals(HttpSC.NOT_FOUND_404, ex.getResponseCode()); }
+        deleteDataset(dsTest) ;
+    }
+
+    // Sync task testing
+    
+    @Test public void task_1() {
+        String x = execSleepTask(null, 10) ;
+        assertNotNull(x) ;
+        Integer.parseInt(x) ;
+    }
+    
+    @Test public void task_2() {
+        String x = "NoSuchTask" ;
+        String url = urlRoot+"$/tasks/"+x ;
+        try {
+            httpGetJson(url) ;
+        } catch (HttpException ex) {
+            assertEquals(404, ex.getResponseCode()) ;
+        }
+        try { 
+            checkInTasks(x) ;
+            fail("No failure!") ;
+        } catch (AssertionError ex) {}
+    }
+
+    
+    @Test public void task_3() {
+        // Timing dependent.
+        // Create a "long" running task so we can find it.  
+        String x = execSleepTask(null, 100) ;
+        checkTask(x) ;
+        checkInTasks(x) ;
+        assertNotNull(x) ;
+        Integer.parseInt(x) ;
+    }
+
+    @Test public void task_4() {
+        // Timing dependent.
+        // Create a "short" running task  
+        String x = execSleepTask(null, 1) ;
+        // Check exists in the list of all tasks (should be "finished")
+        checkInTasks(x) ;
+        String url = urlRoot+"$/tasks/"+x ;
+        
+        boolean finished = false ; 
+        for ( int i = 0 ; i < 10 ; i++ ) {
+            if ( i != 0 )
+                Lib.sleep(25) ;
+            JsonValue v = httpGetJson(url) ;
+            checkTask(v) ;
+            if ( v.getAsObject().hasKey("finished") ) {
+                finished = true ;
+                break ;
+            }
+        }
+        if ( ! finished )
+            fail("Task has not finished") ;
+    }
+    
+    @Test public void task_5() {
+        // Short ruuning task - still in info API call.
+        String x = execSleepTask(null, 1) ;
+        checkInTasks(x) ;
+    }
+
+    private JsonValue getTask(String taskId) {
+        String url = urlRoot+"$/tasks/"+taskId ;
+        return httpGetJson(url) ;
+    }
+    
+
+    static class JsonResponseHandler implements HttpResponseHandler {
+
+        private JsonValue result = null ;
+        
+        public JsonValue getJSON() {
+            return result ;
+        }
+        
+        @Override
+        public void handle(String baseIRI, HttpResponse response) throws IOException {
+            try ( InputStream in = response.getEntity().getContent() ) {
+                result = JSON.parseAny(in) ;
+            }
+        }
+        
+    }
+    
+    
+    
+    private String execSleepTask(String name, int millis) {
+        String url = urlRoot+"$/sleep" ;
+        if ( name != null ) {
+            if ( name.startsWith("/") )
+                name = name.substring(1) ;
+            url = url + "/"+name ; 
+        }
+        
+        JsonResponseHandler x = new JsonResponseHandler() ; 
+        HttpOp.execHttpPost(url+"?interval="+millis, null, WebContent.contentTypeJSON, x) ;
+        JsonValue v = x.getJSON() ;
+        String id = v.getAsObject().get("taskId").getAsString().value() ;
+        return id ;
+    }
+
+    private JsonValue httpGetJson(String url) {
+        JsonResponseHandler x = new JsonResponseHandler() ; 
+        HttpOp.execHttpGet(url, WebContent.contentTypeJSON, x) ;
+        return x.getJSON() ;
+    }
+    
+    private void checkTask(String x) {
+        String url = urlRoot+"$/tasks/"+x ;
+        JsonValue v = httpGetJson(url) ;
+        checkTask(v) ;
+    }    
+    
+    private void checkTask(JsonValue v) {
+        assertNotNull(v) ;
+        assertTrue(v.isObject()) ;
+        //System.out.println(v) ;
+        JsonObject obj = v.getAsObject() ;
+        try {
+            assertTrue(obj.hasKey("task")) ;
+            assertTrue(obj.hasKey("taskId")) ;
+            // Not present until it runs : "started"
+        } catch (AssertionError ex) { 
+            System.out.println(obj) ;
+            throw ex ; 
+        }
+    }
+        
+   private void checkInTasks(String x) {
+       String url = urlRoot+"$/tasks" ;
+       JsonValue v = httpGetJson(url) ;
+       assertTrue(v.isArray()) ;
+       JsonArray array = v.getAsArray() ; 
+       int found = 0 ;
+       for ( int i = 0 ; i < array.size() ; i++ ) {
+           JsonValue jv = array.get(i) ;
+           assertTrue(jv.isObject()) ;
+           JsonObject obj = jv.getAsObject() ;
+           checkTask(obj) ;
+           if ( obj.get("taskId").getAsString().value().equals(x) ) {
+               found++ ;
+           }
+        }
+       assertEquals("Occurence of taskId count", 1, found) ;
+    }
+
+    // Auxilary
+    
+    private static void askPing(String name) {
+        if ( name.startsWith("/") )
+            name = name.substring(1) ;
+        try ( TypedInputStream in = execHttpGet(urlRoot+name+"/sparql?query=ASK%7B%7D") ) {}  
+    }
+    
+    private static void adminPing(String name) {
+        try ( TypedInputStream in = execHttpGet(urlRoot+"$/"+opDatasets+"/"+name) ) {} 
+    }
+
+    private static void checkExists(String name)  {
+        adminPing(name) ;
+        askPing(name) ;
+    }
+    
+    private static void checkExistsNotActive(String name)  {
+        adminPing(name) ;
+        try { askPing(name) ; 
+            fail("askPing did not cause an Http Exception") ;
+        } catch ( HttpException ex ) {}
+        JsonValue v = getDatasetDescription(name) ;
+        assertFalse(v.getAsObject().get("ds.state").getAsBoolean().value()) ;
+    }
+
+    private static void checkNotThere(String name) {
+        if ( name.startsWith("/") )
+            name = name.substring(1) ;
+        // Check gone exists.
+        try { adminPing(name) ; }
+        catch (HttpException ex) {
+            assertEquals(HttpSC.NOT_FOUND_404, ex.getResponseCode()) ;
+        }
+        
+        try { askPing(name) ; }
+        catch (HttpException ex) {
+            assertEquals(HttpSC.NOT_FOUND_404, ex.getResponseCode()) ;
+        }
+    }
+
+    private static void checkJsonDatasetsAll(JsonValue v) {
+        assertNotNull(v.getAsObject().get("datasets")) ; 
+        JsonArray a = v.getAsObject().get("datasets").getAsArray() ;
+        for ( JsonValue v2 : a )
+            checkJsonDatasetsOne(v2) ;
+    }
+    
+    private static void checkJsonDatasetsOne(JsonValue v) {
+        assertTrue(v.isObject()) ;
+        JsonObject obj = v.getAsObject() ;
+        assertNotNull(obj.get("ds.name")) ;
+        assertNotNull(obj.get("ds.services")) ;
+        assertNotNull(obj.get("ds.state")) ;
+        assertTrue(obj.get("ds.services").isArray()) ;
+    }
+    
+    private static void checkJsonStatsAll(JsonValue v) {
+        assertNotNull(v.getAsObject().get("datasets")) ; 
+        JsonObject a = v.getAsObject().get("datasets").getAsObject() ;
+        for ( String dsname : a.keys() ) {
+            JsonValue obj = a.get(dsname).getAsObject() ;
+            checkJsonStatsOne(obj);
+        }
+    }
+    
+    private static void checkJsonStatsOne(JsonValue v) {
+        checkJsonStatsCounters(v) ;
+        JsonObject obj1 = v.getAsObject().get("endpoints").getAsObject() ;
+        for ( String srvName : obj1.keys() ) {
+            JsonObject obj2 = obj1.get(srvName).getAsObject() ; 
+            assertTrue(obj2.hasKey("description"));
+            assertTrue(obj2.hasKey("operation"));
+            checkJsonStatsCounters(obj2);
+        }
+    }
+
+    private static void checkJsonStatsCounters(JsonValue v) {
+        JsonObject obj = v.getAsObject() ;
+        assertTrue(obj.hasKey("Requests")) ;
+        assertTrue(obj.hasKey("RequestsGood")) ;
+        assertTrue(obj.hasKey("RequestsBad")) ;
+    }
+    
+    private static JsonValue execGetJSON(String url) {
+        try ( TypedInputStream in = execHttpGet(url) ) {
+            assertEqualsIgnoreCase(WebContent.contentTypeJSON, in.getContentType()) ;
+            return JSON.parse(in) ; 
+        }
+    }
+    
+    /*
+        GET     /$/ping 
+        POST    /$/ping 
+        POST    /$/datasets/    
+        GET     /$/datasets/
+        DELETE  /$/datasets/*{name}*    
+        GET     /$/datasets/*{name}*    
+        POST    /$/datasets/*{name}*?state=offline  
+        POST    /$/datasets/*{name}*?state=active   
+        POST    /$/backup/*{name}*  
+        GET     /$/server   
+        POST    /$/server/shutdown  
+        GET     /$/stats/   
+        GET     /$/stats/*{name}*
+     */
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAuth.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAuth.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAuth.java
new file mode 100644
index 0000000..0deb01d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAuth.java
@@ -0,0 +1,405 @@
+/*
+ * 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.jena.fuseki;
+
+import java.io.File ;
+import java.io.FileWriter ;
+import java.io.IOException ;
+import java.net.URI ;
+import java.net.URISyntaxException ;
+import java.util.HashMap ;
+import java.util.Map ;
+
+import org.apache.jena.atlas.logging.LogCtl ;
+import org.apache.jena.atlas.web.HttpException ;
+import org.apache.jena.atlas.web.auth.PreemptiveBasicAuthenticator ;
+import org.apache.jena.atlas.web.auth.ScopedAuthenticator ;
+import org.apache.jena.atlas.web.auth.ServiceAuthenticator ;
+import org.apache.jena.atlas.web.auth.SimpleAuthenticator ;
+import org.junit.AfterClass ;
+import org.junit.Assert ;
+import org.junit.BeforeClass ;
+import org.junit.Test ;
+
+import com.hp.hpl.jena.query.ARQ ;
+import com.hp.hpl.jena.query.DatasetAccessor ;
+import com.hp.hpl.jena.query.DatasetAccessorFactory ;
+import com.hp.hpl.jena.query.QueryExecutionFactory ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP ;
+import com.hp.hpl.jena.sparql.engine.http.QueryExceptionHTTP ;
+import com.hp.hpl.jena.sparql.engine.http.Service ;
+import com.hp.hpl.jena.sparql.modify.UpdateProcessRemoteBase ;
+import com.hp.hpl.jena.sparql.util.Context ;
+import com.hp.hpl.jena.update.UpdateExecutionFactory ;
+import com.hp.hpl.jena.update.UpdateFactory ;
+import com.hp.hpl.jena.update.UpdateRequest ;
+
+/**
+ * Tests Fuseki operation with authentication enabled
+ */
+public class TestAuth extends ServerTest {
+
+    private static File realmFile;
+
+    /**
+     * Sets up the authentication for tests
+     * @throws IOException
+     */
+    @BeforeClass
+    public static void setup() throws IOException {
+        realmFile = File.createTempFile("realm", ".properties");
+
+        try ( FileWriter writer = new FileWriter(realmFile); ) {
+            writer.write("allowed: password, fuseki\n");
+            writer.write("forbidden: password, other");
+        }
+
+        LogCtl.logLevel(Fuseki.serverLog.getName(), org.apache.log4j.Level.WARN, java.util.logging.Level.WARNING);
+        LogCtl.logLevel(Fuseki.actionLog.getName(), org.apache.log4j.Level.WARN, java.util.logging.Level.WARNING);
+        LogCtl.logLevel("org.eclipse.jetty", org.apache.log4j.Level.WARN, java.util.logging.Level.WARNING);
+
+        ServerTest.setupServer(realmFile.getAbsolutePath());
+    }
+
+    /**
+     * Tears down authentication test setup
+     */
+    @AfterClass
+    public static void teardown() {
+        ServerTest.teardownServer(); 
+        realmFile.delete();
+    }
+
+    @Test(expected = QueryExceptionHTTP.class)
+    public void query_with_auth_01() {
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+        // No auth credentials should result in an error
+        qe.execAsk();
+    }
+
+    @Test(expected = QueryExceptionHTTP.class)
+    public void query_with_auth_02() {
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+        // Auth credentials for valid user with bad password
+        qe.setBasicAuthentication("allowed", "incorrect".toCharArray());
+        qe.execAsk();
+    }
+
+    @Test
+    public void query_with_auth_03() {
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+        // Auth credentials for valid user with correct password
+        qe.setBasicAuthentication("allowed", "password".toCharArray());
+        Assert.assertTrue(qe.execAsk());
+    }
+
+    @Test(expected = QueryExceptionHTTP.class)
+    public void query_with_auth_04() {
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+        // Auth credentials for valid user with correct password BUT not in
+        // correct role
+        qe.setBasicAuthentication("forbidden", "password".toCharArray());
+        qe.execAsk();
+    }
+
+    @Test
+    public void query_with_auth_05() {
+        // Uses auth and enables compression
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+        qe.setAllowDeflate(true);
+        qe.setAllowGZip(true);
+
+        // Auth credentials for valid user with correct password
+        qe.setBasicAuthentication("allowed", "password".toCharArray());
+        Assert.assertTrue(qe.execAsk());
+    }
+
+    @Test(expected = QueryExceptionHTTP.class)
+    public void query_with_auth_06() {
+        // Uses auth and enables compression
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+        qe.setAllowDeflate(true);
+        qe.setAllowGZip(true);
+
+        // Auth credentials for valid user with bad password
+        qe.setBasicAuthentication("allowed", "incorrect".toCharArray());
+        qe.execAsk();
+    }
+
+    @Test(expected = QueryExceptionHTTP.class)
+    public void query_with_auth_07() throws URISyntaxException {
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+
+        // Auth credentials for valid user with correct password but scoped to
+        // wrong URI
+        ScopedAuthenticator authenticator = new ScopedAuthenticator(new URI("http://example"), "allowed",
+                "password".toCharArray());
+        qe.setAuthenticator(authenticator);
+        qe.execAsk();
+    }
+
+    @Test
+    public void query_with_auth_08() throws URISyntaxException {
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+
+        // Auth credentials for valid user with correct password and scoped to
+        // correct URI
+        ScopedAuthenticator authenticator = new ScopedAuthenticator(new URI(serviceQuery), "allowed", "password".toCharArray());
+        qe.setAuthenticator(authenticator);
+        Assert.assertTrue(qe.execAsk());
+    }
+
+    @Test
+    public void query_with_auth_09() throws URISyntaxException {
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+
+        // Auth credentials for valid user with correct password using
+        // pre-emptive auth
+        ScopedAuthenticator authenticator = new ScopedAuthenticator(new URI(serviceQuery), "allowed", "password".toCharArray());
+        qe.setAuthenticator(new PreemptiveBasicAuthenticator(authenticator));
+        Assert.assertTrue(qe.execAsk());
+    }
+
+    @Test
+    public void query_with_auth_10() {
+        Context ctx = ARQ.getContext();
+        try {
+            QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+
+            // Auth credentials for valid user with correct password and scoped
+            // to correct URI
+            // Provided via Service Context and its associated authenticator
+            Map<String, Context> serviceContext = new HashMap<String, Context>();
+            Context authContext = new Context();
+            authContext.put(Service.queryAuthUser, "allowed");
+            authContext.put(Service.queryAuthPwd, "password");
+            serviceContext.put(serviceQuery, authContext);
+            ctx.put(Service.serviceContext, serviceContext);
+
+            qe.setAuthenticator(new ServiceAuthenticator());
+            Assert.assertTrue(qe.execAsk());
+        } finally {
+            ctx.remove(Service.serviceContext);
+        }
+    }
+    
+    @Test
+    public void query_with_auth_11() {
+        Context ctx = ARQ.getContext();
+        try {
+            QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+
+            // Auth credentials for valid user with correct password and scoped
+            // to base URI of the actual service URL
+            // Provided via Service Context and its associated authenticator
+            Map<String, Context> serviceContext = new HashMap<String, Context>();
+            Context authContext = new Context();
+            authContext.put(Service.queryAuthUser, "allowed");
+            authContext.put(Service.queryAuthPwd, "password");
+            serviceContext.put(urlRoot, authContext);
+            ctx.put(Service.serviceContext, serviceContext);
+
+            qe.setAuthenticator(new ServiceAuthenticator());
+            Assert.assertTrue(qe.execAsk());
+        } finally {
+            ctx.remove(Service.serviceContext);
+        }
+    }
+    
+    @Test
+    public void query_with_auth_12() {
+        ARQ.getContext().remove(Service.serviceContext);
+
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+
+        // Auth credentials for valid user with correct password
+        // Use service authenticator with fallback credentials.
+        qe.setAuthenticator(new ServiceAuthenticator("allowed", "password".toCharArray()));
+        Assert.assertTrue(qe.execAsk());
+     }
+    
+    @Test
+    public void query_with_auth_13() throws URISyntaxException {
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+
+        // Auth credentials for valid user with correct password and scoped to
+        // base URI of the actual service URL
+        ScopedAuthenticator authenticator = new ScopedAuthenticator(new URI(urlRoot), "allowed", "password".toCharArray());
+        qe.setAuthenticator(authenticator);
+        Assert.assertTrue(qe.execAsk());
+    }
+    
+    @Test
+    public void query_with_auth_14() throws URISyntaxException {
+        QueryEngineHTTP qe = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(serviceQuery, "ASK { }");
+
+        // Auth credentials for valid user with correct password and scoped to
+        // base URI of the actual service URL
+        ScopedAuthenticator authenticator = new ScopedAuthenticator(new URI("http://localhost:" + port), "allowed", "password".toCharArray());
+        qe.setAuthenticator(authenticator);
+        Assert.assertTrue(qe.execAsk());
+    }
+
+    @Test(expected = HttpException.class)
+    public void update_with_auth_01() {
+        UpdateRequest updates = UpdateFactory.create("CREATE SILENT GRAPH <http://graph>");
+        UpdateProcessRemoteBase ue = (UpdateProcessRemoteBase) UpdateExecutionFactory.createRemote(updates, serviceUpdate);
+        // No auth credentials should result in an error
+        ue.execute();
+    }
+
+    @Test(expected = HttpException.class)
+    public void update_with_auth_02() {
+        UpdateRequest updates = UpdateFactory.create("CREATE SILENT GRAPH <http://graph>");
+        UpdateProcessRemoteBase ue = (UpdateProcessRemoteBase) UpdateExecutionFactory.createRemote(updates, serviceUpdate);
+        // Auth credentials for valid user with bad password
+        ue.setAuthentication("allowed", "incorrect".toCharArray());
+        ue.execute();
+    }
+
+    @Test
+    public void update_with_auth_03() {
+        UpdateRequest updates = UpdateFactory.create("CREATE SILENT GRAPH <http://graph>");
+        UpdateProcessRemoteBase ue = (UpdateProcessRemoteBase) UpdateExecutionFactory.createRemote(updates, serviceUpdate);
+        // Auth credentials for valid user with correct password
+        ue.setAuthentication("allowed", "password".toCharArray());
+        ue.execute();
+    }
+
+    @Test(expected = HttpException.class)
+    public void update_with_auth_04() {
+        UpdateRequest updates = UpdateFactory.create("CREATE SILENT GRAPH <http://graph>");
+        UpdateProcessRemoteBase ue = (UpdateProcessRemoteBase) UpdateExecutionFactory.createRemote(updates, serviceUpdate);
+        // Auth credentials for valid user with correct password BUT not in
+        // correct role
+        ue.setAuthentication("forbidden", "password".toCharArray());
+        ue.execute();
+    }
+
+    @Test(expected = HttpException.class)
+    public void update_with_auth_05() {
+        UpdateRequest updates = UpdateFactory.create("CREATE SILENT GRAPH <http://graph>");
+        UpdateProcessRemoteBase ue = (UpdateProcessRemoteBase) UpdateExecutionFactory.createRemoteForm(updates, serviceUpdate);
+        // No auth credentials should result in an error
+        ue.execute();
+    }
+
+    @Test(expected = HttpException.class)
+    public void update_with_auth_06() {
+        UpdateRequest updates = UpdateFactory.create("CREATE SILENT GRAPH <http://graph>");
+        UpdateProcessRemoteBase ue = (UpdateProcessRemoteBase) UpdateExecutionFactory.createRemoteForm(updates, serviceUpdate);
+        // Auth credentials for valid user with bad password
+        ue.setAuthentication("allowed", "incorrect".toCharArray());
+        ue.execute();
+    }
+
+    @Test
+    public void update_with_auth_07() {
+        UpdateRequest updates = UpdateFactory.create("CREATE SILENT GRAPH <http://graph>");
+        UpdateProcessRemoteBase ue = (UpdateProcessRemoteBase) UpdateExecutionFactory.createRemoteForm(updates, serviceUpdate);
+        // Auth credentials for valid user with correct password
+        ue.setAuthentication("allowed", "password".toCharArray());
+        ue.execute();
+    }
+
+    @Test(expected = HttpException.class)
+    public void update_with_auth_08() {
+        UpdateRequest updates = UpdateFactory.create("CREATE SILENT GRAPH <http://graph>");
+        UpdateProcessRemoteBase ue = (UpdateProcessRemoteBase) UpdateExecutionFactory.createRemoteForm(updates, serviceUpdate);
+        // Auth credentials for valid user with correct password BUT not in
+        // correct role
+        ue.setAuthentication("forbidden", "password".toCharArray());
+        ue.execute();
+    }
+
+    @Test(expected = HttpException.class)
+    public void update_with_auth_09() throws URISyntaxException {
+        UpdateRequest updates = UpdateFactory.create("CREATE SILENT GRAPH <http://graph>");
+        UpdateProcessRemoteBase ue = (UpdateProcessRemoteBase) UpdateExecutionFactory.createRemote(updates, serviceUpdate);
+
+        // Auth credentials for valid user with correct password but scoped to
+        // wrong URI
+        ScopedAuthenticator authenticator = new ScopedAuthenticator(new URI("http://example"), "allowed",
+                "password".toCharArray());
+        ue.setAuthenticator(authenticator);
+        ue.execute();
+    }
+
+    @Test
+    public void update_with_auth_10() throws URISyntaxException {
+        UpdateRequest updates = UpdateFactory.create("CREATE SILENT GRAPH <http://graph>");
+        UpdateProcessRemoteBase ue = (UpdateProcessRemoteBase) UpdateExecutionFactory.createRemote(updates, serviceUpdate);
+
+        // Auth credentials for valid user with correct password scoped to
+        // correct URI
+        ScopedAuthenticator authenticator = new ScopedAuthenticator(new URI(serviceUpdate), "allowed", "password".toCharArray());
+        ue.setAuthenticator(authenticator);
+        ue.execute();
+    }
+
+    @Test
+    public void update_with_auth_11() throws URISyntaxException {
+        UpdateRequest updates = UpdateFactory.create("CREATE SILENT GRAPH <http://graph>");
+        UpdateProcessRemoteBase ue = (UpdateProcessRemoteBase) UpdateExecutionFactory.createRemote(updates, serviceUpdate);
+
+        // Auth credentials for valid user with correct password scoped to
+        // correct URI
+        // Also using pre-emptive auth
+        ScopedAuthenticator authenticator = new ScopedAuthenticator(new URI(serviceUpdate), "allowed", "password".toCharArray());
+        ue.setAuthenticator(new PreemptiveBasicAuthenticator(authenticator));
+        ue.execute();
+    }
+    
+    @Test(expected = HttpException.class)
+    public void graphstore_with_auth_01() {       
+        // No auth credentials
+        DatasetAccessor accessor = DatasetAccessorFactory.createHTTP(serviceREST);
+        accessor.getModel();
+    }
+    
+    @Test(expected = HttpException.class)
+    public void graphstore_with_auth_02() {
+        // Incorrect auth credentials
+        DatasetAccessor accessor = DatasetAccessorFactory.createHTTP(serviceREST, new SimpleAuthenticator("allowed", "incorrect".toCharArray()));
+        accessor.getModel();
+    }
+    
+    @Test
+    public void graphstore_with_auth_03() {
+        // Correct auth credentials
+        DatasetAccessor accessor = DatasetAccessorFactory.createHTTP(serviceREST, new SimpleAuthenticator("allowed", "password".toCharArray()));
+        Model m = accessor.getModel();
+        Assert.assertTrue(m.isEmpty());
+    }
+    
+    @Test(expected = HttpException.class)
+    public void graphstore_with_auth_04() throws URISyntaxException {
+        // Correct auth credentials scoped to wrong URI
+        DatasetAccessor accessor = DatasetAccessorFactory.createHTTP(serviceREST, new ScopedAuthenticator(new URI("http://example.org/"), "allowed", "password".toCharArray()));
+        accessor.getModel();
+    }
+    
+    @Test
+    public void graphstore_with_auth_05() throws URISyntaxException {
+        // Correct auth credentials scoped to correct URI
+        DatasetAccessor accessor = DatasetAccessorFactory.createHTTP(serviceREST, new ScopedAuthenticator(new URI(serviceREST), "allowed", "password".toCharArray()));
+        accessor.getModel();
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestDatasetOps.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestDatasetOps.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestDatasetOps.java
new file mode 100644
index 0000000..a5c2fc6
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestDatasetOps.java
@@ -0,0 +1,154 @@
+/*
+ * 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.jena.fuseki;
+
+import static org.apache.jena.fuseki.ServerTest.serviceQuery ;
+import static org.apache.jena.fuseki.ServerTest.serviceREST ;
+import static org.apache.jena.fuseki.ServerTest.urlDataset ;
+
+import java.io.IOException ;
+import java.io.OutputStream ;
+
+import org.apache.http.HttpEntity ;
+import org.apache.http.entity.ContentProducer ;
+import org.apache.http.entity.EntityTemplate ;
+import org.apache.jena.atlas.lib.StrUtils ;
+import org.apache.jena.atlas.web.HttpException ;
+import org.apache.jena.atlas.web.TypedInputStream ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.RDFFormat ;
+import org.apache.jena.riot.WebContent ;
+import org.apache.jena.riot.system.StreamRDF ;
+import org.apache.jena.riot.system.StreamRDFLib ;
+import org.apache.jena.riot.web.HttpOp ;
+import org.apache.jena.web.HttpSC ;
+import org.junit.Test ;
+
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
+import com.hp.hpl.jena.sparql.sse.SSE ;
+
+/** TestDatasetAccessorHTTP does most of the GSP testing.
+ *  This class adds the testing of Fuseki extras.
+ */
+public class TestDatasetOps extends AbstractFusekiTest 
+{
+    static DatasetGraph data = SSE.parseDatasetGraph(StrUtils.strjoinNL
+        ("(prefix ((: <http://example/>))",
+         "  (dataset",
+         "    (graph (_:x :p 1) (_:x :p 2))" ,
+         "    (graph :g (_:x :p 3))",
+         "))"
+         )) ;
+    
+    /** Create an HttpEntity for the graph */  
+    protected HttpEntity datasetToHttpEntity(final DatasetGraph dsg) {
+
+        final RDFFormat syntax = RDFFormat.NQUADS ;
+        ContentProducer producer = new ContentProducer() {
+            @Override
+            public void writeTo(OutputStream out) throws IOException {
+                RDFDataMgr.write(out, dsg, syntax) ;
+            }
+        } ;
+        EntityTemplate entity = new EntityTemplate(producer) ;
+        String ct = syntax.getLang().getContentType().getContentType() ;
+        entity.setContentType(ct) ;
+        return entity ;
+    }
+    
+    @Test public void gsp_x_01() {
+        gsp_x(urlDataset, urlDataset) ;
+    }
+
+    @Test public void gsp_x_02() {
+        gsp_x(urlDataset, serviceREST) ;
+    }
+
+    @Test public void gsp_x_03() {
+        gsp_x(serviceREST, urlDataset) ;
+    }
+
+    @Test public void gsp_x_04() {
+        gsp_x(serviceREST, urlDataset) ;
+    }
+
+    private void gsp_x(String outward, String inward) {
+        HttpEntity e = datasetToHttpEntity(data) ;
+        HttpOp.execHttpPut(outward, e);
+        DatasetGraph dsg = DatasetGraphFactory.createMem() ;
+        RDFDataMgr.read(dsg, inward) ;
+//        String x = HttpOp.execHttpGetString(inward, "application/n-quads") ;
+//        RDFDataMgr.read(dsg, new StringReader(x), null, Lang.NQUADS) ;
+        assertEquals(2, dsg.getDefaultGraph().size()) ;
+    }
+
+    // Get dataset.  Tests conneg.
+    @Test 
+    public void gsp_x_10() {
+        gsp_x_ct(urlDataset, WebContent.contentTypeNQuads, WebContent.contentTypeNQuads) ;
+    }
+
+    @Test 
+    public void gsp_x_11() {
+        gsp_x_ct(urlDataset, WebContent.contentTypeNQuadsAlt1, WebContent.contentTypeNQuads) ;
+    }
+
+    @Test 
+    public void gsp_x_12() {
+        gsp_x_ct(urlDataset, WebContent.contentTypeTriG, WebContent.contentTypeTriG) ;
+    }
+
+    @Test 
+    public void gsp_x_13() {
+        gsp_x_ct(urlDataset, WebContent.contentTypeTriGAlt1, WebContent.contentTypeTriG) ;
+    }
+
+    @Test 
+    public void gsp_x_14() {
+        gsp_x_ct(urlDataset, WebContent.defaultDatasetAcceptHeader, WebContent.contentTypeTriG) ;
+    }
+
+    @Test 
+    public void gsp_x_15() {
+        // Anything!
+        gsp_x_ct(urlDataset, WebContent.defaultRDFAcceptHeader, WebContent.contentTypeTriG) ;
+    }
+    
+    private void gsp_x_ct(String urldataset, String acceptheader, String contentTypeResponse) {
+        HttpEntity e = datasetToHttpEntity(data) ;
+        HttpOp.execHttpPut(urlDataset, e);
+        TypedInputStream in = HttpOp.execHttpGet(urlDataset, acceptheader) ;
+        assertEqualsIgnoreCase(in.getContentType(), contentTypeResponse) ;
+        DatasetGraph dsg = DatasetGraphFactory.createMem() ;
+        StreamRDF dest = StreamRDFLib.dataset(dsg) ;
+        RDFDataMgr.parse(dest, in) ;
+    }
+
+    @Test 
+    public void gsp_x_20()
+    {
+        HttpEntity e = datasetToHttpEntity(data) ;
+        try { 
+            HttpOp.execHttpPost(serviceQuery, e);
+        } catch (HttpException ex) {
+            assertTrue(HttpSC.isClientError(ex.getResponseCode())) ;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestFileUpload.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestFileUpload.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestFileUpload.java
new file mode 100644
index 0000000..4fa95d9
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestFileUpload.java
@@ -0,0 +1,128 @@
+/*
+ * 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.jena.fuseki;
+
+import static org.apache.jena.fuseki.ServerTest.serviceREST ;
+import org.apache.jena.atlas.web.TypedInputStream ;
+import org.apache.jena.fuseki.http.TestDatasetAccessorHTTP ;
+import org.apache.jena.fuseki.http.TestHttpOp ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.RDFLanguages ;
+import org.apache.jena.riot.web.HttpOp ;
+import org.junit.Test ;
+
+import com.hp.hpl.jena.query.DatasetAccessor ;
+import com.hp.hpl.jena.query.DatasetAccessorFactory ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.ModelFactory ;
+
+/** Additional tests for the SPARQL Graph Store protocol, 
+ * mainly for HTTP file upload. See {@linkplain TestDatasetAccessorHTTP}
+ * and {@linkplain TestHttpOp} for tests that exercise direct GSp functionality
+ *  
+ * @see TestDatasetAccessorHTTP  
+ * @see TestHttpOp  
+ */
+public class TestFileUpload extends AbstractFusekiTest  
+{
+    @Test public void upload_gsp_01()
+    {
+        FileSender x = new FileSender(ServerTest.serviceREST+"?default") ;
+        x.add("D.ttl", "<http://example/s> <http://example/p> <http://example/o> .", "text/turtle") ;
+        x.send("POST") ;
+        
+        Model m = ModelFactory.createDefaultModel() ;
+        TypedInputStream in = HttpOp.execHttpGet(serviceREST, "text/turtle") ;
+        RDFDataMgr.read(m, in, RDFLanguages.contentTypeToLang(in.getMediaType()) ) ;
+        // which is is effectively :
+//        DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
+//        Model m = du.getModel() ;
+        assertEquals(1, m.size()) ;
+    }
+    
+    @Test public void upload_gsp_02()
+    {
+        FileSender x = new FileSender(ServerTest.serviceREST+"?default") ;
+        x.add("D.ttl", "<http://example/s> <http://example/p> 123 .", "text/turtle") ;
+        x.add("D.nt", "<http://example/s> <http://example/p> <http://example/o-456> .", "application/n-triples") ;
+        x.send("PUT") ;
+        
+        // BUG
+        DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
+        Model m = du.getModel() ;
+        assertEquals(2, m.size()) ;
+    }
+    
+    // Extension of GSP - no graph selector => dataset
+    @Test public void upload_gsp_03()
+    {
+        FileSender x = new FileSender(ServerTest.serviceREST) ;
+        x.add("D.ttl", "<http://example/s> <http://example/p> <http://example/o> .", "text/turtle") ;
+        x.add("D.trig", "<http://example/g> { <http://example/s> <http://example/p> <http://example/o> }", "text/trig") ;
+        x.send("POST") ;
+        
+        DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
+        Model m = du.getModel() ;
+        assertEquals(1, m.size()) ;
+    }
+
+    @Test public void upload_gsp_04()
+    {
+        {
+            DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
+            Model m = du.getModel() ;
+            assertEquals(0, m.size()) ;
+        }
+        FileSender x = new FileSender(ServerTest.urlDataset) ;
+        x.add("D.ttl", "<http://example/s> <http://example/p> <http://example/o> .", "text/plain") ;
+        x.add("D.trig", "<http://example/g> { <http://example/s> <http://example/p> 123,456 }", "text/plain") ;
+        x.send("POST") ;
+        
+        DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
+        Model m = du.getModel() ;
+        assertEquals(1, m.size()) ;
+        m = du.getModel("http://example/g") ;
+        assertEquals(2, m.size()) ;
+    }
+
+    // Via DatasetAccessor
+    
+    @Test public void dataset_accessor_01() {
+        FileSender x = new FileSender(ServerTest.urlDataset) ;
+        x.add("D.nq", "", "application/-n-quads") ;
+        x.send("PUT") ;
+        
+        DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
+        Model m = du.getModel() ;
+        assertEquals(0, m.size()) ;
+    }
+    
+    @Test public void dataset_accessor_02() {
+        FileSender x = new FileSender(ServerTest.urlDataset) ;
+        x.add("D.nq", "<http://example/s> <http://example/p> <http://example/o-456> <http://example/g> .", "application/n-quads") ;
+        x.send("PUT") ;
+        
+        DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
+        Model m = du.getModel("http://example/g") ;
+        assertEquals(1, m.size()) ;
+        m = du.getModel() ;
+        assertEquals(0, m.size()) ;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java
new file mode 100644
index 0000000..7b021f4
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java
@@ -0,0 +1,115 @@
+/*
+ * 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.jena.fuseki;
+
+import java.io.IOException ;
+import java.net.HttpURLConnection ;
+import java.net.URL ;
+
+import static org.apache.jena.fuseki.ServerTest.* ;
+
+import org.junit.AfterClass ;
+import org.junit.Assert ;
+import org.junit.BeforeClass ;
+import org.junit.Test ;
+import org.apache.jena.atlas.junit.BaseTest ;
+import com.hp.hpl.jena.query.* ;
+import com.hp.hpl.jena.sparql.core.Var ;
+import com.hp.hpl.jena.sparql.engine.binding.Binding ;
+import com.hp.hpl.jena.sparql.resultset.ResultSetCompare ;
+import com.hp.hpl.jena.sparql.sse.Item ;
+import com.hp.hpl.jena.sparql.sse.SSE ;
+import com.hp.hpl.jena.sparql.sse.builders.BuilderResultSet ;
+import com.hp.hpl.jena.sparql.util.Convert ;
+
+public class TestQuery extends BaseTest 
+{
+    protected static ResultSet rs1 = null ; 
+    static {
+        Item item = SSE.parseItem("(resultset (?s ?p ?o) (row (?s <x>)(?p <p>)(?o 1)))") ;
+        rs1 = BuilderResultSet.build(item) ;
+    }
+    
+    @BeforeClass public static void beforeClass()
+    {
+        ServerTest.allocServer() ;
+        ServerTest.resetServer() ;
+        DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
+        du.putModel(model1) ;
+        du.putModel(gn1, model2) ;
+    }
+    
+    @AfterClass public static void afterClass()
+    {
+        DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
+        du.deleteDefault() ;
+        ServerTest.freeServer() ;
+    }
+    
+    @Test public void query_01()
+    {
+        execQuery("SELECT * {?s ?p ?o}", 1) ;
+    }
+    
+    @Test public void query_recursive_01()
+    {
+        String query = "SELECT * WHERE { SERVICE <" + serviceQuery + "> { ?s ?p ?o . BIND(?o AS ?x) } }";
+        try ( QueryExecution qExec = QueryExecutionFactory.sparqlService(serviceQuery, query) ) {
+            ResultSet rs = qExec.execSelect();
+            Var x = Var.alloc("x");
+            while (rs.hasNext()) {
+                Binding b = rs.nextBinding();
+                Assert.assertNotNull(b.get(x));
+            }
+        }
+    }
+    
+    @Test public void query_with_params_01()
+    {
+        String query = "ASK { }";
+        try ( QueryExecution qExec = QueryExecutionFactory.sparqlService(serviceQuery + "?output=json", query) ) {
+            boolean result = qExec.execAsk();
+            Assert.assertTrue(result);
+        }
+    }
+    
+    @Test public void request_id_header_01() throws IOException
+    {
+        String qs = Convert.encWWWForm("ASK{}") ;
+        URL u = new URL(serviceQuery+"?query="+qs);
+        HttpURLConnection conn = (HttpURLConnection) u.openConnection();
+        Assert.assertTrue(conn.getHeaderField("Fuseki-Request-ID") != null);
+    }
+
+    private void execQuery(String queryString, int exceptedRowCount)
+    {
+        QueryExecution qExec = QueryExecutionFactory.sparqlService(serviceQuery, queryString) ;
+        ResultSet rs = qExec.execSelect() ;
+        int x = ResultSetFormatter.consume(rs) ;
+        assertEquals(exceptedRowCount, x) ;
+    }
+    
+    private void execQuery(String queryString, ResultSet expectedResultSet)
+    {
+        QueryExecution qExec = QueryExecutionFactory.sparqlService(serviceQuery, queryString) ;
+        ResultSet rs = qExec.execSelect() ;
+        boolean b = ResultSetCompare.equalsByTerm(rs, expectedResultSet) ;
+        assertTrue("Result sets different", b) ;
+    }
+}


[04/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/JettyServerConfig.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/JettyServerConfig.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/JettyServerConfig.java
deleted file mode 100644
index 71012ef..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/JettyServerConfig.java
+++ /dev/null
@@ -1,51 +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.jena.fuseki.jetty;
-
-
-/** Configuration of the Jetty server when run from the command line directly,
- *  not as a webapp/war file.
- */
-
-public class JettyServerConfig
-{
-    public JettyServerConfig() {}
-    
-    /** Port to run the server service on */
-    public int port ;
-    /** Port to run the server service on */
-    public String contextPath ;
-    /** Jetty config file - if null, use the built-in configuration of Jetty */
-    public String jettyConfigFile = null ;
-    /** Listen only on the loopback (localhost) interface */
-    public boolean loopback = false ;
-    /** The local directory for serving the static pages */ 
-    public String pages ;
-    /** Enable Accept-Encoding compression. Set to false by default.*/
-    public boolean enableCompression = false ;
-    
-    /** Enable additional logging */
-    public boolean verboseLogging = false ;
-    /**
-     * Authentication config file used to setup Jetty Basic auth, if a Jetty config file was set this is ignored since Jetty config allows much more complex auth methods to be implemented
-     */
-    public String authConfigFile ;
-
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java
deleted file mode 100644
index 8d8a080..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java
+++ /dev/null
@@ -1,70 +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.jena.fuseki.mgt;
-
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.atlas.json.JsonValue ;
-import org.apache.jena.atlas.lib.InternalErrorException ;
-import org.apache.jena.fuseki.async.AsyncPool ;
-import org.apache.jena.fuseki.async.AsyncTask ;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-
-/** Base helper class for creating async tasks on "items", based on POST  */ 
-public abstract class ActionAsyncTask extends ActionItem
-{
-    // ?? Better as a library (mixin) so can be used outside ActionItem
-    private static AsyncPool asyncPool = AsyncPool.get() ;
-    
-    public ActionAsyncTask() { super() ; }
-    
-    @Override
-    final
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) {
-        ServletOps.errorMethodNotAllowed(METHOD_GET);
-    }
-
-    @Override
-    final
-    protected JsonValue execGetItem(HttpAction action) { 
-        throw new InternalErrorException("GET for AsyncTask -- Should not be here!") ;
-    }
-
-    @Override
-    final
-    protected JsonValue execPostItem(HttpAction action) {
-        Runnable task = createRunnable(action) ;
-        AsyncTask aTask = Async.execASyncTask(action, AsyncPool.get(), "backup", task) ;
-        Async.setLocationHeader(action, aTask);
-        return Async.asJson(aTask) ;
-    }
-    
-    public static AsyncTask execASyncTask(HttpAction action, AsyncPool asyncPool, String displayName, Runnable task) {
-        AsyncTask atask = Async.asyncTask(asyncPool, displayName, action.getDataService(), task) ;
-        Async.setLocationHeader(action, atask);
-        JsonValue v = Async.asJson(atask) ;
-        ServletOps.sendJsonReponse(action, v);
-        return atask ;
-    }
-    
-    protected abstract Runnable createRunnable(HttpAction action) ;
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
deleted file mode 100644
index 34f134e..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
+++ /dev/null
@@ -1,84 +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.jena.fuseki.mgt;
-
-import static java.lang.String.format ;
-
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.fuseki.servlets.HttpAction ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
-
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-
-public class ActionBackup extends ActionAsyncTask
-{
-    public ActionBackup() { super() ; }
-    
-    // Only POST
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
-        doCommon(request, response);
-    }
-
-    @Override
-    protected Runnable createRunnable(HttpAction action) {
-        String name = action.getDatasetName() ;
-        if ( name == null ) {
-            action.log.error("Null for dataset name in item request") ;  
-            ServletOps.errorOccurred("Null for dataset name in item request");
-            return null ;
-        }
-        action.log.info(format("[%d] Backup dataset %s", action.id, name)) ;
-        return new BackupTask(action) ;
-    }
-
-    static class BackupTask implements Runnable {
-        static private Logger log = LoggerFactory.getLogger("Backup") ;
-        
-        private final long actionId ;
-        private final DatasetGraph dataset ;
-        private final String datasetName ;
-        
-        public BackupTask(HttpAction action) {
-            this.actionId = action.id ;
-            action.getDataAccessPoint() ;
-            action.getDataAccessPoint().getDataService() ;
-            action.getDataAccessPoint().getDataService().getDataset() ;
-            this.dataset = action.getDataAccessPoint().getDataService().getDataset() ;
-            this.datasetName = action.getDatasetName() ;
-        }
-
-        @Override
-        public void run() {
-            try {
-                String backupFilename = Backup.chooseFileName(datasetName) ;
-                log.info(format("[%d] >>>> Start backup %s -> %s", actionId, datasetName, backupFilename)) ;
-                Backup.backup(dataset, backupFilename) ;
-                log.info(format("[%d] <<<< Finish backup %s -> %s", actionId, datasetName, backupFilename)) ;
-            } catch (Exception ex) {
-                log.info(format("[%d] **** Exception in backup", actionId), ex) ;
-            }
-        }
-    }
-}
-    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionContainerItem.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionContainerItem.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionContainerItem.java
deleted file mode 100644
index 134afc4..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionContainerItem.java
+++ /dev/null
@@ -1,94 +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.jena.fuseki.mgt;
-
-import org.apache.jena.atlas.json.JsonValue ;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-import org.apache.jena.web.HttpSC ;
-
-/** Base for actions that are container and also have action on items */ 
-public abstract class ActionContainerItem extends ActionCtl {
-    
-    public ActionContainerItem() { super() ; }
-    
-    @Override
-    final
-    protected void perform(HttpAction action) {
-        String method = action.request.getMethod() ;
-        if ( method.equals(METHOD_GET) )
-            execGet(action) ;
-        else if ( method.equals(METHOD_POST) )
-            execPost(action) ;
-        else if ( method.equals(METHOD_DELETE) )
-            execDelete(action) ;
-        else
-            ServletOps.error(HttpSC.METHOD_NOT_ALLOWED_405) ;
-    }
-
-    protected void execGet(HttpAction action) {
-        JsonValue v ;
-        if ( isContainerAction(action)  )
-            v = execGetContainer(action) ;
-        else
-            v = execGetItem(action) ;
-        
-        ServletOps.sendJsonReponse(action, v);
-    }
-    
-    /** GET request on the container - respond with JSON, or null for plain 200 */  
-    protected abstract JsonValue execGetContainer(HttpAction action) ;
-    /** GET request on an item in the container - repond with JSON, or null for plain 200 */  
-    protected abstract JsonValue execGetItem(HttpAction action) ;
-
-    protected void execPost(HttpAction action) {
-        JsonValue v ;
-        if ( isContainerAction(action) )
-            v = execPostContainer(action) ;
-        else
-            v = execPostItem(action) ;
-        
-        ServletOps.sendJsonReponse(action, v);
-    }
-    
-    /** POST request on an item in the container - respond with JSON, or null for plain 200 */  
-    protected abstract JsonValue execPostContainer(HttpAction action) ;
-    /** POST request on an item in the container - respond with JSON, or null for plain 200 */  
-    protected abstract JsonValue execPostItem(HttpAction action) ;
-
-    
-    /** DELETE request */
-    protected void execDelete(HttpAction action) {
-        if ( isContainerAction(action)  )
-            execDeleteContainer(action) ;
-        else 
-            execDeleteItem(action) ;
-        ServletOps.success(action) ;
-    }
-    
-    /** DELETE request on an item in the container */
-    protected void execDeleteContainer(HttpAction action) {
-        ServletOps.errorMethodNotAllowed(METHOD_DELETE, "DELETE applied to a container") ;
-    }
-
-    /** DELETE request on an item in the container */
-    protected void execDeleteItem(HttpAction action) {
-        ServletOps.errorMethodNotAllowed(METHOD_DELETE) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java
deleted file mode 100644
index 20073d9..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java
+++ /dev/null
@@ -1,97 +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.jena.fuseki.mgt;
-
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.server.DataAccessPoint ;
-import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
-import org.apache.jena.fuseki.server.DataService ;
-import org.apache.jena.fuseki.servlets.ActionBase ;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-
-/** Control/admin request lifecycle */
-public abstract class ActionCtl extends ActionBase
-{
-    protected ActionCtl() { super(Fuseki.adminLog) ; }
-    
-    @Override
-    final
-    protected void execCommonWorker(HttpAction action) {
-        DataAccessPoint dataAccessPoint ;
-        DataService dSrv ;
-        
-        String datasetUri = mapRequestToDatasetName(action) ;
-        if ( datasetUri != null ) {
-            dataAccessPoint = DataAccessPointRegistry.get().get(datasetUri) ;
-            if ( dataAccessPoint == null ) {
-                ServletOps.errorNotFound("Not found: "+datasetUri) ;
-                return ;
-            }
-        }
-        else {
-            // This is a placeholder when creating new DatasetRefs
-            // and also if addressing a container, not a dataset
-            dataAccessPoint = null ;
-            dSrv = DataService.serviceOnlyDataService() ;
-        }
-        
-        action.setControlRequest(dataAccessPoint, datasetUri) ;
-        action.setEndpoint(null, null) ;   // No operation or service name.
-        executeAction(action) ;
-    }
-
-    protected String mapRequestToDatasetName(HttpAction action) {
-        return extractItemName(action) ;
-    }
-
-    // Execute - no stats.
-    // Intercept point for the UberServlet 
-    protected void executeAction(HttpAction action) {
-        executeLifecycle(action) ;
-    }
-    
-    // This is the service request lifecycle.
-    final
-    protected void executeLifecycle(HttpAction action)
-    {
-        startRequest(action) ;
-        try {
-            perform(action) ;
-        }
-        finally { 
-            finishRequest(action) ;
-        }
-    }
-    
-    final
-    protected boolean isContainerAction(HttpAction action) {
-        return (action.getDataAccessPoint() == null ) ;
-    }
-    
-    protected abstract void perform(HttpAction action) ;
-
-//    /** Map request to uri in the registry.
-//     *  null means no mapping done (passthrough). 
-//     */
-//    protected String mapRequestToDataset(HttpAction action) 
-//    {
-//        return ActionLib.mapRequestToDataset(action.request.getRequestURI()) ;
-//    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
deleted file mode 100644
index ea3d44e..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
+++ /dev/null
@@ -1,404 +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.jena.fuseki.mgt;
-
-import static java.lang.String.format ;
-
-import java.io.* ;
-import java.util.HashMap ;
-import java.util.Iterator ;
-import java.util.Map ;
-
-import javax.servlet.ServletException ;
-import javax.servlet.ServletOutputStream ;
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.atlas.io.IO ;
-import org.apache.jena.atlas.json.JsonBuilder ;
-import org.apache.jena.atlas.json.JsonValue ;
-import org.apache.jena.atlas.lib.InternalErrorException ;
-import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.atlas.web.ContentType ;
-import org.apache.jena.fuseki.FusekiLib ;
-import org.apache.jena.fuseki.build.Builder ;
-import org.apache.jena.fuseki.build.Template ;
-import org.apache.jena.fuseki.build.TemplateFunctions ;
-import org.apache.jena.fuseki.server.* ;
-import org.apache.jena.fuseki.servlets.* ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.riot.RDFLanguages ;
-import org.apache.jena.riot.WebContent ;
-import org.apache.jena.riot.system.StreamRDF ;
-import org.apache.jena.riot.system.StreamRDFLib ;
-import org.apache.jena.web.HttpSC ;
-
-import com.hp.hpl.jena.datatypes.xsd.XSDDatatype ;
-import com.hp.hpl.jena.graph.Node ;
-import com.hp.hpl.jena.graph.NodeFactory ;
-import com.hp.hpl.jena.query.Dataset ;
-import com.hp.hpl.jena.query.ReadWrite ;
-import com.hp.hpl.jena.rdf.model.* ;
-import com.hp.hpl.jena.shared.uuid.JenaUUID ;
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-import com.hp.hpl.jena.sparql.core.Quad ;
-import com.hp.hpl.jena.sparql.util.FmtUtils ;
-import com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction ;
-import com.hp.hpl.jena.update.UpdateAction ;
-import com.hp.hpl.jena.update.UpdateFactory ;
-import com.hp.hpl.jena.update.UpdateRequest ;
-
-public class ActionDatasets extends ActionContainerItem {
-    
-    private static Dataset system = SystemState.getDataset() ;
-    private static DatasetGraphTransaction systemDSG = SystemState.getDatasetGraph() ; 
-    
-    static private Property pServiceName = FusekiVocab.pServiceName ;
-    static private Property pStatus = FusekiVocab.pStatus ;
-
-    private static final String paramDatasetName    = "dbName" ;
-    private static final String paramDatasetType    = "dbType" ;
-    private static final String tDatabasetTDB       = "tdb" ;
-    private static final String tDatabasetMem       = "mem" ;
-
-    public ActionDatasets() { super() ; }
-    
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) {
-        doCommon(request, response);
-    }
-
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
-        doCommon(request, response);
-    }
-    
-    @Override
-    protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        doCommon(request, response);
-    }
-    
-    // ---- GET : return details of dataset or datasets.
-    @Override
-    protected JsonValue execGetContainer(HttpAction action) { 
-        action.log.info(format("[%d] GET datasets", action.id)) ;
-        JsonBuilder builder = new JsonBuilder() ;
-        builder.startObject("D") ;
-        builder.key(JsonConst.datasets) ;
-        JsonDescription.arrayDatasets(builder, DataAccessPointRegistry.get());
-        builder.finishObject("D") ;
-        return builder.build() ;
-    }
-
-    @Override
-    protected JsonValue execGetItem(HttpAction action) {
-        action.log.info(format("[%d] GET dataset %s", action.id, action.getDatasetName())) ;
-        JsonBuilder builder = new JsonBuilder() ;
-        DataAccessPoint dsDesc = DataAccessPointRegistry.get().get(action.getDatasetName()) ;
-        if ( dsDesc == null )
-            ServletOps.errorNotFound("Not found: dataset "+action.getDatasetName());
-        JsonDescription.describe(builder, dsDesc) ;
-        return builder.build() ;
-    }
-    
-    // ---- POST 
-    
-    @Override
-    protected JsonValue execPostContainer(HttpAction action) {
-        JenaUUID uuid = JenaUUID.generate() ;
-        String newURI = uuid.asURI() ;
-        Node gn = NodeFactory.createURI(newURI) ;
-        
-        ContentType ct = FusekiLib.getContentType(action) ;
-        
-        boolean committed = false ;
-        system.begin(ReadWrite.WRITE) ;
-        try {
-            Model model = system.getNamedModel(gn.getURI()) ;
-            StreamRDF dest = StreamRDFLib.graph(model.getGraph()) ;
-    
-            if ( WebContent.isHtmlForm(ct) )
-                assemblerFromForm(action, dest) ;
-            else if ( WebContent.isMultiPartForm(ct) )
-                assemblerFromUpload(action, dest) ;
-            else
-                assemblerFromBody(action, dest) ;
-            
-            // Keep a persistent copy.
-            String filename = FusekiServer.dirFileArea.resolve(uuid.asString()).toString() ;
-            try ( OutputStream outCopy = new FileOutputStream(filename) ) {
-                RDFDataMgr.write(outCopy, model, Lang.TURTLE) ;
-            }
-            
-            Statement stmt = getOne(model, null, pServiceName, null) ;
-            if ( stmt == null ) {
-                StmtIterator sIter = model.listStatements(null, pServiceName, (RDFNode)null ) ;
-                if ( ! sIter.hasNext() )
-                    ServletOps.errorBadRequest("No name given in description of Fuseki service") ;
-                sIter.next() ;
-                if ( sIter.hasNext() )
-                    ServletOps.errorBadRequest("Multiple names given in description of Fuseki service") ;
-                throw new InternalErrorException("Inconsistent: getOne didn't fail the second time") ;
-            }
-                
-            if ( ! stmt.getObject().isLiteral() )
-                ServletOps.errorBadRequest("Found "+FmtUtils.stringForRDFNode(stmt.getObject())+" : Service names are strings, then used to build the external URI") ;
-            
-            Resource subject = stmt.getSubject() ;
-            Literal object = stmt.getObject().asLiteral() ;
-            
-            if ( object.getDatatype() != null && ! object.getDatatype().equals(XSDDatatype.XSDstring) )
-                action.log.warn(format("[%d] Service name '%s' is not a string", action.id, FmtUtils.stringForRDFNode(object)));
-    
-            String datasetName = object.getLexicalForm() ;
-            String datasetPath = DataAccessPoint.canonical(datasetName) ;
-            action.log.info(format("[%d] Create database : name = %s", action.id, datasetPath)) ;
-            
-            if ( DataAccessPointRegistry.get().isRegistered(datasetPath) )
-                // And abort.
-                ServletOps.error(HttpSC.CONFLICT_409, "Name already registered "+datasetPath) ;
-                
-            model.removeAll(null, pStatus, null) ;
-            model.add(subject, pStatus, FusekiVocab.stateActive) ;
-            
-            // Need to be in Resource space at this point.
-            DataAccessPoint ref = Builder.buildDataAccessPoint(subject) ;
-            DataAccessPointRegistry.register(datasetPath, ref) ;
-            action.getResponse().setContentType(WebContent.contentTypeTextPlain); 
-            ServletOutputStream out = action.getResponse().getOutputStream() ;
-            out.println("That went well") ;
-            ServletOps.success(action) ;
-            system.commit();
-            committed = true ;
-            
-        } catch (IOException ex) { IO.exception(ex); }
-        finally { 
-            if ( ! committed ) system.abort() ; 
-            system.end() ; 
-        }
-        return null ;
-    }
-
-    @Override
-    protected JsonValue execPostItem(HttpAction action) {
-        String name = action.getDatasetName() ;
-        if ( name == null )
-            name = "''" ;
-        action.log.info(format("[%d] POST dataset %s", action.id, name)) ;
-        
-        if ( action.getDataAccessPoint() == null )
-            ServletOps.errorNotFound("Not found: dataset "+action.getDatasetName());
-        
-        DataService dSrv = action.getDataService() ;
-        if ( dSrv == null )
-            // If not set explicitly, take from DataAccessPoint
-            dSrv = action.getDataAccessPoint().getDataService() ;
-        
-        String s = action.request.getParameter("state") ;
-        if ( s == null || s.isEmpty() )
-            ServletOps.errorBadRequest("No state change given") ;
-
-        // setDatasetState is a transaction on the persistent state of the server. 
-        if ( s.equalsIgnoreCase("active") ) {
-            action.log.info(format("[%d] REBUILD DATASET %s", action.id, name)) ;
-            setDatasetState(name, FusekiVocab.stateActive) ;
-            dSrv.goActive() ; 
-            // DatasetGraph dsg = ???? ;
-            //dSrv.activate(dsg) ; 
-            //dSrv.activate() ;
-        } else if ( s.equalsIgnoreCase("offline") ) {
-            action.log.info(format("[%d] OFFLINE DATASET %s", action.id, name)) ;
-            DataAccessPoint access = action.getDataAccessPoint() ;
-            //access.goOffline() ;
-            dSrv.goOffline() ;  // Affects the target of the name. 
-            setDatasetState(name, FusekiVocab.stateOffline) ;  
-            //dSrv.offline() ;
-        } else if ( s.equalsIgnoreCase("unlink") ) {
-            action.log.info(format("[%d] UNLINK ACCESS NAME %s", action.id, name)) ;
-            DataAccessPoint access = action.getDataAccessPoint() ;
-            ServletOps.errorNotImplemented("unlink: dataset"+action.getDatasetName());
-            //access.goOffline() ;
-            // Registry?
-        }
-        else
-            ServletOps.errorBadRequest("State change operation '"+s+"' not recognized");
-        return null ;
-    }
-
-    private void assemblerFromBody(HttpAction action, StreamRDF dest) {
-        bodyAsGraph(action, dest) ;
-    }
-
-    private void assemblerFromForm(HttpAction action, StreamRDF dest) {
-        String dbType = action.getRequest().getParameter(paramDatasetType) ;
-        String dbName = action.getRequest().getParameter(paramDatasetName) ;
-        Map<String, String> params = new HashMap<>() ;
-        params.put(Template.NAME, dbName) ;
-        FusekiServer.addGlobals(params); 
-        
-        //action.log.info(format("[%d] Create database : name = %s, type = %s", action.id, dbName, dbType )) ;
-        if ( dbType == null || dbName == null )
-            ServletOps.errorBadRequest("Required parameters: dbName and dbType");
-        if ( ! dbType.equals(tDatabasetTDB) && ! dbType.equals(tDatabasetMem) )
-            ServletOps.errorBadRequest(format("dbType can be only '%s' or '%s'", tDatabasetTDB, tDatabasetMem)) ;
-        
-        String template = null ;
-        if ( dbType.equalsIgnoreCase(tDatabasetTDB))
-            template = TemplateFunctions.templateFile(Template.templateTDBFN, params) ;
-        if ( dbType.equalsIgnoreCase(tDatabasetMem))
-            template = TemplateFunctions.templateFile(Template.templateMemFN, params) ;
-        RDFDataMgr.parse(dest, new StringReader(template), "http://base/", Lang.TTL) ;
-    }
-
-    private void assemblerFromUpload(HttpAction action, StreamRDF dest) {
-        Upload.fileUploadWorker(action, dest);
-    }
-
-    // ---- DELETE
-
-    @Override
-    protected void execDeleteItem(HttpAction action) {
-//      if ( isContainerAction(action) ) {
-//      ServletOps.errorBadRequest("DELETE only applies to a specific dataset.") ;
-//      return ;
-//  }
-  
-        // Does not exist?
-        String name = action.getDatasetName() ;
-        if ( name == null )
-            name = "" ;
-        action.log.info(format("[%d] DELETE ds=%s", action.id, name)) ;
-
-        if ( ! DataAccessPointRegistry.get().isRegistered(name) )
-            ServletOps.errorNotFound("No such dataset registered: "+name);
-
-        systemDSG.begin(ReadWrite.WRITE) ;
-        boolean committed = false ;
-        try {
-            // Here, go offline.
-            // Need to reference count operations when they drop to zero
-            // or a timer goes off, we delete the dataset.
-            
-            DataAccessPoint ref = DataAccessPointRegistry.get().get(name) ;
-            // Redo check inside transaction.
-            if ( ref == null )
-                ServletOps.errorNotFound("No such dataset registered: "+name);
-
-            // Make it invisible to the outside.
-            DataAccessPointRegistry.get().remove(name) ;
-            
-            // Name to graph
-            // Statically configured databases aren't in the system database.
-            Quad q = getOne(systemDSG, null, null, pServiceName.asNode(), null) ;
-//            if ( q == null )
-//                ServletOps.errorBadRequest("Failed to find dataset for '"+name+"'");
-            if ( q != null ) {
-                Node gn = q.getGraph() ;
-                //action.log.info("SHUTDOWN NEEDED"); // To ensure it goes away?
-                systemDSG.deleteAny(gn, null, null, null) ;
-            }
-            systemDSG.commit() ;
-            committed = true ;
-            ServletOps.success(action) ;
-        } finally { 
-            if ( ! committed ) systemDSG.abort() ; 
-            systemDSG.end() ; 
-        }
-    }
-
-    // Persistent state change.
-    private void setDatasetState(String name, Resource newState) {
-        boolean committed = false ;
-        system.begin(ReadWrite.WRITE) ;
-        try {
-            String dbName = name ;
-            if ( dbName.startsWith("/") )
-                dbName = dbName.substring(1) ;
-            
-            String update =  StrUtils.strjoinNL
-                (SystemState.PREFIXES,
-                 "DELETE { GRAPH ?g { ?s fu:status ?state } }",
-                 "INSERT { GRAPH ?g { ?s fu:status "+FmtUtils.stringForRDFNode(newState)+" } }",
-                 "WHERE {",
-                 "   GRAPH ?g { ?s fu:name '"+dbName+"' ; ",
-                 "                 fu:status ?state .",
-                 "   }",
-                 "}"
-                 ) ;
-            UpdateRequest req =  UpdateFactory.create(update) ;
-            UpdateAction.execute(req, system);
-            system.commit();
-            committed = true ;
-        } finally { 
-            if ( ! committed ) system.abort() ; 
-            system.end() ; 
-        }
-    }
-    
-    // ---- Auxilary functions
-
-    private static Quad getOne(DatasetGraph dsg, Node g, Node s, Node p, Node o) {
-        Iterator<Quad> iter = dsg.findNG(g, s, p, o) ;
-        if ( ! iter.hasNext() )
-            return null ;
-        Quad q = iter.next() ;
-        if ( iter.hasNext() )
-            return null ;
-        return q ;
-    }
-    
-    private static Statement getOne(Model m, Resource s, Property p, RDFNode o) {
-        StmtIterator iter = m.listStatements(s, p, o) ;
-        if ( ! iter.hasNext() )
-            return null ;
-        Statement stmt = iter.next() ;
-        if ( iter.hasNext() )
-            return null ;
-        return stmt ;
-    }
-    
-    // XXX Merge with Upload.incomingData
-    
-    private static void bodyAsGraph(HttpAction action, StreamRDF dest) {
-        HttpServletRequest request = action.request ;
-        String base = ActionLib.wholeRequestURL(request) ;
-        ContentType ct = FusekiLib.getContentType(request) ;
-        Lang lang = RDFLanguages.contentTypeToLang(ct.getContentType()) ;
-        if ( lang == null ) {
-            ServletOps.errorBadRequest("Unknown content type for triples: " + ct) ;
-            return ;
-        }
-        InputStream input = null ;
-        try { input = request.getInputStream() ; } 
-        catch (IOException ex) { IO.exception(ex) ; }
-
-        int len = request.getContentLength() ;
-//        if ( verbose ) {
-//            if ( len >= 0 )
-//                alog.info(format("[%d]   Body: Content-Length=%d, Content-Type=%s, Charset=%s => %s", action.id, len,
-//                                ct.getContentType(), ct.getCharset(), lang.getName())) ;
-//            else
-//                alog.info(format("[%d]   Body: Content-Type=%s, Charset=%s => %s", action.id, ct.getContentType(),
-//                                ct.getCharset(), lang.getName())) ;
-//        }
-        dest.prefix("root", base+"#");
-        ActionSPARQL.parse(action, dest, input, lang, base) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionItem.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionItem.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionItem.java
deleted file mode 100644
index 72d3c65..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionItem.java
+++ /dev/null
@@ -1,45 +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.jena.fuseki.mgt;
-
-import org.apache.jena.atlas.json.JsonValue ;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-import org.apache.jena.web.HttpSC ;
-
-/** Action on items in a container, but not the container itself */ 
-public abstract class ActionItem extends ActionContainerItem
-{
-    public ActionItem() { super() ; }
-    
-    @Override
-    final
-    protected JsonValue execGetContainer(HttpAction action) {
-        ServletOps.error(HttpSC.METHOD_NOT_ALLOWED_405) ;
-        return null ;
-    }
-
-    @Override
-    final
-    protected JsonValue execPostContainer(HttpAction action) {
-        ServletOps.error(HttpSC.METHOD_NOT_ALLOWED_405) ;
-        return null ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionLogs.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionLogs.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionLogs.java
deleted file mode 100644
index c4d6579..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionLogs.java
+++ /dev/null
@@ -1,59 +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.jena.fuseki.mgt;
-
-import static org.apache.jena.riot.WebContent.charsetUTF8 ;
-import static org.apache.jena.riot.WebContent.contentTypeTextPlain ;
-
-import java.io.IOException ;
-
-import javax.servlet.ServletOutputStream ;
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.fuseki.servlets.HttpAction ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-
-public class ActionLogs extends ActionCtl
-{
-    public ActionLogs() { super() ; } 
-    
-    @Override
-    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
-        doCommon(req, resp); 
-    }
-    
-    @Override
-    protected void perform(HttpAction action) {
-        execGet(action) ;
-    }
-
-    protected void execGet(HttpAction action) {
-        try {
-            HttpServletResponse response = action.response ;
-            ServletOutputStream out = response.getOutputStream() ;
-            response.setContentType(contentTypeTextPlain) ;
-            response.setCharacterEncoding(charsetUTF8) ;
-            out.println("Not implemented yet") ;
-            out.println() ; 
-            out.flush() ;
-            ServletOps.success(action);
-        } catch (IOException ex) { ServletOps.errorOccurred(ex) ; }
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionPing.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionPing.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionPing.java
deleted file mode 100644
index b43b9f1..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionPing.java
+++ /dev/null
@@ -1,78 +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.jena.fuseki.mgt;
-
-import static org.apache.jena.riot.WebContent.charsetUTF8 ;
-import static org.apache.jena.riot.WebContent.contentTypeTextPlain ;
-
-import java.io.IOException ;
-
-import javax.servlet.ServletOutputStream ;
-import javax.servlet.http.HttpServlet ;
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import com.hp.hpl.jena.sparql.util.Utils ;
-
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-import org.apache.jena.web.HttpSC ;
-
-/** The ping servlet provides a low costy, uncached endpoint that can be used
- * to determine if this component is running and responding.  For example,
- * a nagios check should use this endpoint.    
- */
-public class ActionPing extends HttpServlet
-{
-    // Ping is special.
-    // To avoid excessive logging and id allocation for a "noise" operation,
-    // this is a raw servlet.
-    public ActionPing() { super() ; } 
-    
-    @Override
-    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
-        doCommon(req, resp); 
-    }
-    
-    @Override
-    protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
-        doCommon(req, resp); 
-    }
-    
-
-    @Override
-    protected void doHead(HttpServletRequest req, HttpServletResponse resp) {
-        doCommon(req, resp); 
-    }
-
-    protected void doCommon(HttpServletRequest request, HttpServletResponse response) {
-        try {
-            ServletOps.setNoCache(response) ; 
-            response.setContentType(contentTypeTextPlain);
-            response.setCharacterEncoding(charsetUTF8) ;
-            response.setStatus(HttpSC.OK_200);
-            ServletOutputStream out = response.getOutputStream() ;
-            out.println(Utils.nowAsXSDDateTimeString());
-        } catch (IOException ex) {
-            Fuseki.serverLog.warn("ping :: IOException :: "+ex.getMessage());
-        }
-    }
-}
-
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java
deleted file mode 100644
index d8f5b1e..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java
+++ /dev/null
@@ -1,114 +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.jena.fuseki.mgt;
-
-import static org.apache.jena.riot.WebContent.charsetUTF8 ;
-import static org.apache.jena.riot.WebContent.contentTypeJSON ;
-
-import java.io.IOException ;
-
-import javax.servlet.ServletOutputStream ;
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.atlas.json.JSON ;
-import org.apache.jena.atlas.json.JsonBuilder ;
-import org.apache.jena.atlas.json.JsonValue ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-
-/** Description of datasets for a server */ 
-public class ActionServerStatus extends ActionCtl
-{
-    public ActionServerStatus() { super() ; }
-    
-    @Override
-    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
-        doCommon(req, resp) ;
-    }
-
-    @Override
-    protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
-        doCommon(req, resp) ;
-    }
-
-    @Override
-    protected void perform(HttpAction action) {
-        try {
-            description(action) ;
-            ServletOps.success(action) ;
-        } catch (IOException e) {
-            ServletOps.errorOccurred(e) ;
-        }
-    }
-    
-    private void description(HttpAction action) throws IOException {
-        ServletOutputStream out = action.response.getOutputStream() ;
-        action.response.setContentType(contentTypeJSON);
-        action.response.setCharacterEncoding(charsetUTF8) ;
-        
-        JsonBuilder builder = new JsonBuilder() ; 
-        builder.startObject() ;
-        describeServer(builder, action.request.getLocalPort()) ;
-        describeDatasets(builder) ;
-        builder.finishObject() ;
-        
-        JsonValue v = builder.build() ;
-        JSON.write(out, v) ;
-        out.println() ; 
-        out.flush() ;
-    }
-
-    private void describeServer(JsonBuilder builder, int requestPort) {
-        String versionStr = Fuseki.VERSION ;
-        String builtDateStr = Fuseki.BUILD_DATE ;
-        if ( versionStr == null || versionStr.startsWith("${") )
-            versionStr = "Development" ;
-        if ( builtDateStr == null || builtDateStr.startsWith("${") )
-            builtDateStr = "Unknown" ;
-
-//        builder
-//            .key(JsonConst.server)
-//            .startObject()
-//            .key(JsonConst.port).value(port)
-//            .finishObject() ;
-        builder
-            .key(JsonConst.admin)
-            .startObject()
-            .key(JsonConst.port).value(requestPort)
-            .finishObject() ;
-
-        builder
-            .key(JsonConst.version).value(versionStr)
-            .key(JsonConst.built).value(builtDateStr)
-            .key(JsonConst.startDT).value(Fuseki.serverStartedAt())
-            .key(JsonConst.uptime).value(Fuseki.serverUptimeSeconds())
-            ;
-            
-    }
-
-    private void describeDatasets(JsonBuilder builder) {
-        builder.key(JsonConst.datasets) ;
-        JsonDescription.arrayDatasets(builder, DataAccessPointRegistry.get());
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionSleep.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionSleep.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionSleep.java
deleted file mode 100644
index e53eb9a..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionSleep.java
+++ /dev/null
@@ -1,98 +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.jena.fuseki.mgt;
-
-import static java.lang.String.format ;
-
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.atlas.json.JsonValue ;
-import org.apache.jena.atlas.lib.Lib ;
-import org.apache.jena.fuseki.async.AsyncPool ;
-import org.apache.jena.fuseki.async.AsyncTask ;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-import org.slf4j.Logger ;
-
-/** A task that kicks off a asynchornous operation that simply waits and exits.  For testing. */
-public class ActionSleep extends ActionCtl /* Not ActionAsyncTask - that is a container */
-{
-    public ActionSleep() { super() ; }
-    
-    // And only POST
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
-        doCommon(request, response);
-    }
-
-    @Override
-    protected void perform(HttpAction action) {
-        Runnable task = createRunnable(action) ;
-        AsyncTask aTask = Async.execASyncTask(action, AsyncPool.get(), "sleep", task) ;
-        JsonValue v = Async.asJson(aTask) ;
-        Async.setLocationHeader(action, aTask);
-        ServletOps.sendJsonReponse(action, v);
-    }
-
-    protected Runnable createRunnable(HttpAction action) {
-        String name = action.getDatasetName() ;
-        if ( name == null ) {
-//            action.log.error("Null for dataset name in item request") ;  
-//            ServletOps.errorOccurred("Null for dataset name in item request");
-//            return null ;
-            name = "''" ;
-        }
-        
-        String interval = action.request.getParameter("interval") ;
-        int sleepMilli = 5000 ;
-        if ( interval != null )
-            try {
-                sleepMilli = Integer.parseInt(interval) ;
-            } catch (NumberFormatException ex) {
-                action.log.error(format("[%d] NumberFormatException: %s", action.id, interval)) ; 
-            }
-        action.log.info(format("[%d] Sleep %s %d ms", action.id, name, sleepMilli)) ;
-        return new SleepTask(action, sleepMilli) ;
-    }
-
-    static class SleepTask implements Runnable {
-        private final Logger log ;
-        private final long actionId ;
-        private final int sleepMilli ;
-        
-        public SleepTask(HttpAction action, int sleepMilli ) {
-            this.log = action.log ;
-            this.actionId = action.id ;
-            this.sleepMilli = sleepMilli ;
-        }
-
-        @Override
-        public void run() {
-            try {
-                log.info(format("[%d] >> Sleep start", actionId)) ;
-                Lib.sleep(sleepMilli) ;
-                log.info(format("[%d] << Sleep finish", actionId)) ;
-            } catch (Exception ex) {
-                log.info(format("[%d] **** Exception", actionId), ex) ;
-            }
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java
deleted file mode 100644
index 490bce2..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java
+++ /dev/null
@@ -1,214 +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.jena.fuseki.mgt;
-
-import static java.lang.String.format ;
-import static org.apache.jena.riot.WebContent.charsetUTF8 ;
-import static org.apache.jena.riot.WebContent.contentTypeTextPlain ;
-
-import java.io.IOException ;
-import java.util.Iterator ;
-import java.util.List ;
-
-import javax.servlet.ServletOutputStream ;
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.atlas.json.JsonBuilder ;
-import org.apache.jena.atlas.json.JsonValue ;
-import org.apache.jena.fuseki.server.* ;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-
-public class ActionStats extends ActionContainerItem
-{
-    // XXX Use ActionContainerItem
-    public ActionStats() { super() ; } 
-    
-    @Override
-    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
-        doCommon(req, resp); 
-    }
-    
-    // This does not consult the system database for dormant etc.
-    @Override
-    protected JsonValue execGetContainer(HttpAction action) { 
-        action.log.info(format("[%d] GET stats all", action.id)) ;
-        JsonBuilder builder = new JsonBuilder() ;
-        builder.startObject("top") ;
-        
-        builder.key(JsonConst.datasets) ;
-        builder.startObject("datasets") ;
-        for ( String ds : DataAccessPointRegistry.get().keys() )
-            statsDataset(builder, ds) ; 
-        builder.finishObject("datasets") ;
-        
-        builder.finishObject("top") ;
-        return builder.build() ;
-    }
-
-    @Override
-    protected JsonValue execGetItem(HttpAction action) {
-        action.log.info(format("[%d] GET stats dataset %s", action.id, action.getDatasetName())) ;
-        
-        JsonBuilder builder = new JsonBuilder() ;
-        String datasetPath = DataAccessPoint.canonical(action.getDatasetName()) ;
-        builder.startObject("TOP") ;
-        
-        builder.key(JsonConst.datasets) ;
-        builder.startObject("datasets") ;
-        statsDataset(builder, datasetPath) ;
-        builder.finishObject("datasets") ;
-        
-        builder.finishObject("TOP") ;
-        return builder.build() ;
-    }
-
-    private void statsDataset(JsonBuilder builder, String ds) {
-        // Object started
-        builder.key(ds) ;
-        
-        DataAccessPoint access = DataAccessPointRegistry.get().get(ds) ;
-        DataService dSrv = access.getDataService() ;
-        builder.startObject("counters") ;
-        
-        builder.key(CounterName.Requests.name()).value(dSrv.getCounters().value(CounterName.Requests)) ;
-        builder.key(CounterName.RequestsGood.name()).value(dSrv.getCounters().value(CounterName.RequestsGood)) ;
-        builder.key(CounterName.RequestsBad.name()).value(dSrv.getCounters().value(CounterName.RequestsBad)) ;
-        
-        
-        // Build the operation -> endpoint list map.
-        
-//      MultiMap<OperationName, Endpoint> map = MultiMap.createMapList() ;
-//      for ( OperationName operName : dSrv.getOperations() ) {
-//          List<Endpoint> endpoints = access.getDataService().getOperation(operName) ;
-//          for ( Endpoint endpoint : endpoints )
-//              map.put(operName, endpoint) ; 
-//      }
-        
-        
-        builder.key(JsonConst.endpoints).startObject("endpoints") ;
-        
-        for ( OperationName operName : dSrv.getOperations() ) {
-            List<Endpoint> endpoints = access.getDataService().getOperation(operName) ;
-//            System.err.println(operName+" : "+endpoints.size()) ;
-//            for ( Endpoint endpoint : endpoints )
-//                System.err.println("  "+endpoint.getEndpoint()) ;
-            
-            for ( Endpoint endpoint : endpoints ) {
-                
-                // Endpoint names are unique but not services.
-                
-                builder.key(endpoint.getEndpoint()) ;
-                builder.startObject() ;
-                
-                operationCounters(builder, endpoint);
-                builder.key(JsonConst.operation).value(operName.name()) ;
-                builder.key(JsonConst.description).value(operName.getDescription()) ;
-                
-                builder.finishObject() ;
-            }
-        }
-        builder.finishObject("endpoints") ;
-        builder.finishObject("counters") ;
-
-    }
-
-    private void operationCounters(JsonBuilder builder, Endpoint operation) {
-        for (CounterName cn : operation.getCounters().counters()) {
-            Counter c = operation.getCounters().get(cn) ;
-            builder.key(cn.name()).value(c.value()) ;
-        }
-    }
-
-    private void statsTxt(HttpServletResponse resp) throws IOException
-    {
-        ServletOutputStream out = resp.getOutputStream() ;
-        resp.setContentType(contentTypeTextPlain);
-        resp.setCharacterEncoding(charsetUTF8) ;
-
-        Iterator<String> iter = DataAccessPointRegistry.get().keys().iterator() ;
-        while(iter.hasNext())
-        {
-            String ds = iter.next() ;
-            DataAccessPoint desc = DataAccessPointRegistry.get().get(ds) ;
-            statsTxt(out, desc) ;
-            if ( iter.hasNext() )
-                out.println() ;
-        }
-        out.flush() ;
-    }
-    
-    private void statsTxt(ServletOutputStream out, DataAccessPoint desc) throws IOException
-    {
-        DataService dSrv = desc.getDataService() ;
-        out.println("Dataset: "+desc.getName()) ;
-        out.println("    Requests      = "+dSrv.getCounters().value(CounterName.Requests)) ;
-        out.println("    Good          = "+dSrv.getCounters().value(CounterName.RequestsGood)) ;
-        out.println("    Bad           = "+dSrv.getCounters().value(CounterName.RequestsBad)) ;
-
-        out.println("  SPARQL Query:") ;
-        out.println("    Request       = "+counter(dSrv, OperationName.Query, CounterName.Requests)) ;
-        out.println("    Good          = "+counter(dSrv, OperationName.Query, CounterName.RequestsGood)) ;
-        out.println("    Bad requests  = "+counter(dSrv, OperationName.Query, CounterName.RequestsBad)) ;
-        out.println("    Timeouts      = "+counter(dSrv, OperationName.Query, CounterName.QueryTimeouts)) ;
-        out.println("    Bad exec      = "+counter(dSrv, OperationName.Query, CounterName.QueryExecErrors)) ;
-        out.println("    IO Errors     = "+counter(dSrv, OperationName.Query, CounterName.QueryIOErrors)) ;
-
-        out.println("  SPARQL Update:") ;
-        out.println("    Request       = "+counter(dSrv, OperationName.Update, CounterName.Requests)) ;
-        out.println("    Good          = "+counter(dSrv, OperationName.Update, CounterName.RequestsGood)) ;
-        out.println("    Bad requests  = "+counter(dSrv, OperationName.Update, CounterName.RequestsBad)) ;
-        out.println("    Bad exec      = "+counter(dSrv, OperationName.Update, CounterName.UpdateExecErrors)) ;
-        
-        out.println("  Upload:") ;
-        out.println("    Requests      = "+counter(dSrv, OperationName.Upload, CounterName.Requests)) ;
-        out.println("    Good          = "+counter(dSrv, OperationName.Upload, CounterName.RequestsGood)) ;
-        out.println("    Bad           = "+counter(dSrv, OperationName.Upload, CounterName.RequestsBad)) ;
-        
-        out.println("  SPARQL Graph Store Protocol:") ;
-        out.println("    GETs          = "+gspValue(dSrv, CounterName.HTTPget)+ " (good="+gspValue(dSrv, CounterName.HTTPgetGood)+"/bad="+gspValue(dSrv, CounterName.HTTPGetBad)+")") ;
-        out.println("    PUTs          = "+gspValue(dSrv, CounterName.HTTPput)+ " (good="+gspValue(dSrv, CounterName.HTTPputGood)+"/bad="+gspValue(dSrv, CounterName.HTTPputBad)+")") ;
-        out.println("    POSTs         = "+gspValue(dSrv, CounterName.HTTPpost)+ " (good="+gspValue(dSrv, CounterName.HTTPpostGood)+"/bad="+gspValue(dSrv, CounterName.HTTPpostBad)+")") ;
-        out.println("    DELETEs       = "+gspValue(dSrv, CounterName.HTTPdelete)+ " (good="+gspValue(dSrv, CounterName.HTTPdeleteGood)+"/bad="+gspValue(dSrv, CounterName.HTTPdeleteBad)+")") ;
-        out.println("    HEADs         = "+gspValue(dSrv, CounterName.HTTPhead)+ " (good="+gspValue(dSrv, CounterName.HTTPheadGood)+"/bad="+gspValue(dSrv, CounterName.HTTPheadBad)+")") ;
-    }
-    
-    private long counter(DataService dSrv, OperationName opName, CounterName cName) {
-        return 0 ;
-    }
-    
-    private long gspValue(DataService dSrv, CounterName cn) {
-        return  counter(dSrv, OperationName.GSP, cn) +
-                counter(dSrv, OperationName.GSP_R, cn) ;
-    }
-
-    // We shouldn't get here - no doPost above.
-    
-    @Override
-    protected JsonValue execPostContainer(HttpAction action) {
-        throw new InternalError(METHOD_POST+" container") ;
-    }
-
-    @Override
-    protected JsonValue execPostItem(HttpAction action) {
-        throw new InternalError(METHOD_POST+" item") ;
-    }
-}
-
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionTasks.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionTasks.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionTasks.java
deleted file mode 100644
index 97f8027..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/ActionTasks.java
+++ /dev/null
@@ -1,125 +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.jena.fuseki.mgt;
-import static java.lang.String.format ;
-
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.atlas.json.JsonBuilder ;
-import org.apache.jena.atlas.json.JsonValue ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.async.AsyncPool ;
-import org.apache.jena.fuseki.async.AsyncTask ;
-import org.apache.jena.fuseki.servlets.ActionBase ;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-import org.apache.jena.web.HttpSC ;
-
-public class ActionTasks extends ActionBase //ActionContainerItem
-{
-    private static AsyncPool[] pools = { AsyncPool.get() } ; 
-    
-    public ActionTasks() { super(Fuseki.serverLog) ; }
-    
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) {
-        doCommon(request, response);
-    }
-
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
-        doCommon(request, response);
-    }
-
-    private static String prefix = "/" ;
-    
-    @Override
-    protected void execCommonWorker(HttpAction action) {
-        String name = extractItemName(action) ;
-        if ( name != null ) {
-            if ( name.startsWith(prefix))
-                name = name.substring(prefix.length()) ; 
-            else
-                log.warn("Unexpected task name : "+name) ;
-        }
-        
-        String method = action.request.getMethod() ;
-        if ( method.equals(METHOD_GET) )
-            execGet(action, name) ;
-        else if ( method.equals(METHOD_POST) )
-            execPost(action, name) ;
-        else
-            ServletOps.error(HttpSC.METHOD_NOT_ALLOWED_405) ;
-    }
-
-    private void execGet(HttpAction action, String name) {
-        if ( name == null )
-            log.info(format("[%d] Tasks", action.id));
-        else
-            log.info(format("[%d] Task %s", action.id, name));
-
-        JsonValue responseBody = null ;
-        
-        if ( name == null ) {
-            JsonBuilder builder = new JsonBuilder() ;
-            builder.startArray() ;
-            
-            for ( AsyncPool pool : pools ) {
-                for ( AsyncTask aTask : pool.tasks() ) {
-                    //builder.value(aTask.getTaskId()) ;
-                    descOneTask(builder, aTask) ;
-                }
-            }
-            builder.finishArray() ;
-            responseBody = builder.build(); 
-        } else {
-            for ( AsyncPool pool : pools ) {
-                // Assumes first is only.
-                AsyncTask aTask = pool.getTask(name) ;
-                if ( aTask != null ) {
-                    JsonBuilder builder = new JsonBuilder() ;
-                    descOneTask(builder, aTask);
-                    responseBody = builder.build() ;
-                }
-            }
-        }
-        
-        if ( responseBody == null )
-            ServletOps.errorNotFound("Task '"+name+"' not found") ;
-        ServletOps.setNoCache(action) ; 
-        ServletOps.sendJsonReponse(action, responseBody); 
-    }
-
-    private void execPost(HttpAction action, String name) {
-        
-    }
-    
-    private static void descOneTask(JsonBuilder builder, AsyncTask aTask) {
-        builder.startObject("SingleTask") ;
-        builder.key(JsonConst.task).value(aTask.displayName()) ;
-        builder.key(JsonConst.taskId).value(aTask.getTaskId()) ;
-        if ( aTask.getStartPoint() != null )
-            builder.key(JsonConst.started).value(aTask.getStartPoint()) ;
-        if ( aTask.getFinishPoint() != null )
-            builder.key(JsonConst.finished).value(aTask.getFinishPoint()) ;
-        builder.finishObject("SingleTask") ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/Async.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/Async.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/Async.java
deleted file mode 100644
index 1cbda48..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/Async.java
+++ /dev/null
@@ -1,68 +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.jena.fuseki.mgt;
-
-import org.apache.http.HttpHeaders ;
-import org.apache.jena.atlas.json.JsonBuilder ;
-import org.apache.jena.atlas.json.JsonValue ;
-import org.apache.jena.fuseki.async.AsyncPool ;
-import org.apache.jena.fuseki.async.AsyncTask ;
-import org.apache.jena.fuseki.server.DataService ;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-
-public class Async
-{
-    public static AsyncTask asyncTask(AsyncPool asyncPool, String displayName, DataService dataService, Runnable task) {
-        AsyncTask asyncTask = asyncPool.submit(task, displayName, dataService) ;
-        return asyncTask ;
-    }
-    
-    public static JsonValue asJson(AsyncTask asyncTask) {
-        JsonBuilder builder = new JsonBuilder() ;
-        builder.startObject("outer") ;
-        builder.key(JsonConst.taskId).value(asyncTask.getTaskId()) ;
-        builder.finishObject("outer") ;
-        return builder.build() ;
-    }
-    
-    public static void setLocationHeader(HttpAction action, AsyncTask asyncTask) {
-        String x = action.getRequest().getRequestURI() ;
-        if ( ! x.endsWith("/") )
-            x += "/" ;
-        x += asyncTask.getTaskId() ;
-        //String x = "/$/tasks/"+asyncTask.getTaskId() ;
-        action.getResponse().setHeader(HttpHeaders.LOCATION, x) ;
-    }
-
-    public static AsyncTask execASyncTask(HttpAction action, AsyncPool asyncPool, String displayName, Runnable runnable) {
-        AsyncTask atask = Async.asyncTask(asyncPool, "backup", action.getDataService(), runnable) ;
-        Async.setLocationHeader(action, atask); 
-        return atask ;
-    }
-    
-    // Combined does not work very well - e.g sleep does not set Location.
-//        public static AsyncTask execASyncTask(HttpAction action, AsyncPool asyncPool, String displayName, Runnable task) {
-//        AsyncTask atask = Async.asyncTask(asyncPool, displayName, action.getDataService(), task) ;
-//        Async.setLocationHeader(action, atask);
-//        JsonValue v = Async.asJson(atask) ;
-//        ServletOps.sendJsonReponse(action, v);
-//        return atask ;
-//    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/Backup.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/Backup.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/Backup.java
deleted file mode 100644
index 1b1d823..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/Backup.java
+++ /dev/null
@@ -1,102 +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.jena.fuseki.mgt;
-
-import java.io.* ;
-import java.util.HashSet ;
-import java.util.Set ;
-import java.util.zip.GZIPOutputStream ;
-
-import org.apache.jena.atlas.io.IO ;
-import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.atlas.logging.Log ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.FusekiException ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-import com.hp.hpl.jena.sparql.util.Utils ;
-
-/** Perform a backup */ 
-public class Backup
-{
-    public static final String BackupArea = "backups" ;
-
-    public static String chooseFileName(String dsName) {
-        FileOps.ensureDir(BackupArea) ;
-        final String ds = dsName.startsWith("/") ? dsName : "/" + dsName ;
-    
-        String timestamp = Utils.nowAsString("yyyy-MM-dd_HH-mm-ss") ;
-        final String filename = BackupArea + ds + "_" + timestamp ;
-        return filename ;
-    }
-    
-    // Rcord of all backups so we don't attempt to backup the
-    // same dataset multiple times at the same time. 
-    private static Set<DatasetGraph> activeBackups = new HashSet<>() ;
-    
-    public static void backup(DatasetGraph dsg, String backupfile) {
-        if ( !backupfile.endsWith(".nq") )
-            backupfile = backupfile + ".nq" ;
-
-        // Per backup source lock. 
-        synchronized(activeBackups) {
-            // Atomically check-and-set
-            if ( activeBackups.contains(backupfile) )
-                Log.warn(Fuseki.serverLog, "Backup already in progress") ;
-            activeBackups.add(dsg) ;
-        }
-
-        OutputStream out = null ;
-        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. GZip, large buffer.
-                out = new FileOutputStream(backupfile + ".gz") ;
-                out = new GZIPOutputStream(out, 8 * 1024) ;
-                out = new BufferedOutputStream(out) ;
-            } else {
-                out = new FileOutputStream(backupfile) ;
-                out = new BufferedOutputStream(out) ;
-            }
-
-            RDFDataMgr.write(out, dsg, Lang.NQUADS) ;
-            out.close() ;
-            out = null ;
-        } catch (FileNotFoundException e) {
-            Log.warn(Fuseki.serverLog, "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 */}
-            // Remove lock.
-            synchronized(activeBackups) {
-                activeBackups.remove(dsg) ;
-            }
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/DumpServlet.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/DumpServlet.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/DumpServlet.java
deleted file mode 100644
index 0b2a070..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/DumpServlet.java
+++ /dev/null
@@ -1,312 +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.
- */
-
-/** A servlet that dumps its request
- */
-
-// Could be neater - much, much neater!
-package org.apache.jena.fuseki.mgt;
-
-import java.io.BufferedReader ;
-import java.io.IOException ;
-import java.io.PrintWriter ;
-import java.io.StringWriter ;
-import java.util.Date ;
-import java.util.Enumeration ;
-import java.util.Locale ;
-import java.util.Properties ;
-
-import javax.servlet.ServletContext ;
-import javax.servlet.http.Cookie ;
-import javax.servlet.http.HttpServlet ;
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.atlas.io.IO ;
-
-public class DumpServlet extends HttpServlet
-{
-    private static final long serialVersionUID = 99L;  // Serilizable.
-
-
-    public DumpServlet()
-    {
-
-    }
-
-    @Override
-    public void init()
-    {
-        return ;
-    }
-
-    @Override
-    public void doGet(HttpServletRequest req, HttpServletResponse resp)
-    {
-        try {
-            PrintWriter out = resp.getWriter() ;
-            resp.setContentType("text/html");
-
-            String now = new Date().toString() ;
-
-            // HEAD
-            out.println("<html>") ;
-            out.println("<head>") ;
-            out.println("<Title>Dump @ "+now+"</Title>") ;
-            // Reduce the desire to cache it.
-            out.println("<meta CONTENT=now HTTP-EQUIV=expires>") ;
-            out.println("</head>") ;
-
-            // BODY
-            out.println("<body>") ;
-            out.println("<pre>") ;
-
-            out.println("Dump : "+now);
-            out.println() ;
-            out.println("==== Request");
-            out.println() ;
-            out.print(dumpRequest(req)) ;
-            out.println() ;
-                        
-            out.println(">>>> Body");
-            out.println() ;
-            printBody(out, req) ;
-            out.println("<<<< Body");
-            
-            out.println("==== ServletContext");
-            out.println() ;
-            out.print(dumpServletContext());
-            out.println() ;
-
-            out.println("==== Environment");
-            out.println() ;
-            out.print(dumpEnvironment());
-            out.println() ;
-
-            out.println("</pre>") ;
-
-            out.println("</body>") ;
-            out.println("</html>") ;
-            out.flush() ;
-        } catch (IOException e)
-        { }
-    }
-
-    // This resets the input stream
-
-    static public String dumpRequest(HttpServletRequest req)
-    {
-        try ( StringWriter sw = new StringWriter() ;
-              PrintWriter pw = new PrintWriter(sw) ) {
-            // Standard environment
-            pw.println("Method:                 "+req.getMethod());
-            pw.println("getContentLength:       "+Integer.toString(req.getContentLength()));
-            pw.println("getContentType:         "+req.getContentType());
-            pw.println("getRequestURI:          "+req.getRequestURI());
-            pw.println("getRequestURL:          "+req.getRequestURL());
-            pw.println("getContextPath:         "+req.getContextPath());
-            pw.println("getServletPath:         "+req.getServletPath());
-            pw.println("getPathInfo:            "+req.getPathInfo());
-            pw.println("getPathTranslated:      "+req.getPathTranslated());
-            pw.println("getQueryString:         "+req.getQueryString());
-            pw.println("getProtocol:            "+req.getProtocol());
-            pw.println("getScheme:              "+req.getScheme());
-            pw.println("getServerName:          "+req.getServerName());
-            pw.println("getServerPort:          "+req.getServerPort());
-            pw.println("getRemoteUser:          "+req.getRemoteUser());
-            pw.println("getRemoteAddr:          "+req.getRemoteAddr());
-            pw.println("getRemoteHost:          "+req.getRemoteHost());
-            pw.println("getRequestedSessionId:  "+req.getRequestedSessionId());
-            {
-                Cookie c[] = req.getCookies() ;
-                if ( c == null )
-                    pw.println("getCookies:            <none>");
-                else
-                {
-                    for ( int i = 0 ; i < c.length ; i++ )            
-                    {
-                        pw.println("Cookie:        "+c[i].getName());
-                        pw.println("    value:     "+c[i].getValue());
-                        pw.println("    version:   "+c[i].getVersion());
-                        pw.println("    comment:   "+c[i].getComment());
-                        pw.println("    domain:    "+c[i].getDomain());
-                        pw.println("    maxAge:    "+c[i].getMaxAge());
-                        pw.println("    path:      "+c[i].getPath());
-                        pw.println("    secure:    "+c[i].getSecure());
-                        pw.println();
-                    }
-                }
-            }
-            
-            {
-                // To do: create a string for the output so can send to console and return it.
-                Enumeration<String> en = req.getHeaderNames() ;
-
-                for ( ; en.hasMoreElements() ; )
-                {
-                    String name = en.nextElement() ;
-                    String value = req.getHeader(name) ;
-                    pw.println("Head: "+name + " = " + value) ;
-                }
-            }
-            
-            Enumeration<String> en2 = req.getAttributeNames() ;
-            if ( en2.hasMoreElements() )
-                pw.println();
-            for ( ; en2.hasMoreElements() ; )
-            {
-                String name = en2.nextElement() ;
-                String value = req.getAttribute(name).toString() ;
-                pw.println("Attr: "+name + " = " + value) ;
-            }
-
-            // Note that doing this on a form causes the forms content (body) to be read
-            // and parsed as form variables.
-//            en = req.getParameterNames() ;
-//            if ( en.hasMoreElements() )
-//                pw.println();
-//            for ( ; en.hasMoreElements() ; )
-//            {
-//                String name = (String)en.nextElement() ;
-//                String value = req.getParameter(name) ;
-//                pw.println("Param: "+name + " = " + value) ;
-//            }
-
-
-            
-//            MultiMap<String, String> map = WebLib.parseQueryString(req) ;
-//            for ( String name : map.keys() )
-//                for ( String value : map.get(name) )
-//                    pw.println("Param: "+name + " = " + value) ;
-            
-            Enumeration<Locale> en = req.getLocales() ;
-            if ( en.hasMoreElements() )
-                pw.println();
-            for ( ; en.hasMoreElements() ; )
-            {
-                String name = en.nextElement().toString() ;
-                pw.println("Locale: "+name) ;
-            }
-
-            pw.println() ;
-            //printBody(pw, req) ;
-
-            return sw.toString() ;
-        } catch (IOException e) { return null ; }
-    }
-
-    static void printBody(PrintWriter pw, HttpServletRequest req) throws IOException
-    {
-        BufferedReader in = req.getReader() ;
-        if ( req.getContentLength() > 0 )
-            // Need +2 because last line may not have a CR/LF on it.
-            in.mark(req.getContentLength()+2) ;
-        else
-            // This is a dump - try to do something that works, even if inefficient.
-            in.mark(100*1024) ;
-
-        while(true)
-        {
-            String x = in.readLine() ;
-            if ( x == null )
-                break ;
-            x = x.replaceAll("&", "&amp;") ;
-            x = x.replaceAll("<", "&lt;") ;
-            x = x.replaceAll(">", "&gt;") ;
-            pw.println(x) ;
-        }
-        try { in.reset() ; } catch (IOException e) { System.out.println("DumpServlet: Reset of content failed: "+e) ; }
-    }
-    
-    /**
-     * <code>dumpEnvironment</code>
-     * @return String that is the HTML of the System properties as name/value pairs.
-     * The values are with single quotes independent of whether or not the value has
-     * single quotes in it.
-     */
-    static public String dumpEnvironment()
-    {
-        Properties properties = System.getProperties();
-        try ( StringWriter sw = new StringWriter() ;
-            PrintWriter pw = new PrintWriter(sw) ; ) {
-            Enumeration<Object> en = properties.keys();
-            while(en.hasMoreElements())
-            {
-                String key = en.nextElement().toString();
-                pw.println(key+": '"+properties.getProperty(key)+"'");
-            }
-
-            pw.println() ;
-            return sw.toString() ;
-        } catch (IOException e) { IO.exception(e); return null ; }
-    }
-
-    public String dumpServletContext()
-    {
-        try ( StringWriter sw = new StringWriter() ;
-              PrintWriter pw = new PrintWriter(sw) ; ) {
-            ServletContext sc =  getServletContext();
-            pw.println("majorVersion: '"+sc.getMajorVersion()+"'");
-            pw.println("minorVersion: '"+sc.getMinorVersion()+"'");
-            pw.println("contextName:  '"+sc.getServletContextName()+"'");
-            pw.println("servletInfo:  '"+getServletInfo()+"'");
-            pw.println("serverInfo:  '"+sc.getServerInfo()+"'");
-    
-            {
-                Enumeration<String> en = sc.getInitParameterNames();
-                if (en != null) {
-                    pw.println("initParameters: ");
-                    while(en.hasMoreElements())
-                    {
-                        String key = en.nextElement();
-                        pw.println(key+": '"+sc.getInitParameter(key)+"'");
-                    }
-                }
-            }
-            
-            {
-                Enumeration<String> en = sc.getAttributeNames();
-                if (en != null) {
-                    pw.println("attributes: ");
-                    while(en.hasMoreElements())
-                    {
-                        String key = en.nextElement();
-                        pw.println(key+": '"+sc.getAttribute(key)+"'");
-                    }
-                }
-            }
-            pw.println() ;
-         
-             return sw.toString() ;
-        } catch (IOException e) { IO.exception(e); return null ; }
-    }
-
-    
-    @Override
-    public void doPost(HttpServletRequest req, HttpServletResponse resp)
-    {
-        doGet(req, resp) ;
-    }
-
-
-    @Override
-    public String getServletInfo()
-    {
-        return "Dump";
-    }
-}


[61/93] [abbrv] jena git commit: Clean POM

Posted by rv...@apache.org.
Clean POM


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/5827dcc8
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/5827dcc8
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/5827dcc8

Branch: refs/heads/hadoop-rdf
Commit: 5827dcc8160e45390a9834a2a91f623fe54b36e4
Parents: 35ef84f
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 20:21:14 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 20:21:14 2015 +0000

----------------------------------------------------------------------
 jena-fuseki2/pom.xml | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/5827dcc8/jena-fuseki2/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/pom.xml b/jena-fuseki2/pom.xml
index 2215ab1..a951f3d 100644
--- a/jena-fuseki2/pom.xml
+++ b/jena-fuseki2/pom.xml
@@ -18,14 +18,6 @@
 
 <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>
-
-  <name>Apache Jena Fuseki (SPARQL 1.1 Server)</name>
-  <groupId>org.apache.jena</groupId>
-  <artifactId>jena-fuseki</artifactId>
-  <version>2.0.0-SNAPSHOT</version>
-
-  <description>Apache Jena Fuseki</description>
-
   <parent>
     <groupId>org.apache.jena</groupId>
     <artifactId>jena-parent</artifactId>
@@ -33,7 +25,13 @@
     <relativePath>../jena-parent</relativePath>
   </parent> 
 
+  <name>Apache Jena Fuseki - SPARQL 1.1 Server</name>
+  <artifactId>jena-fuseki</artifactId>
+  <version>2.0.0-SNAPSHOT</version>
+
+  <description>Apache Jena Fuseki</description>
   <packaging>pom</packaging>
+  
   <url>http://jena.apache.org/</url>
 
   <repositories>


[66/93] [abbrv] jena git commit: Add test jar to produced artifacts

Posted by rv...@apache.org.
Add test jar to produced artifacts


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/9934c2cb
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/9934c2cb
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/9934c2cb

Branch: refs/heads/hadoop-rdf
Commit: 9934c2cb49125f6c3920f5f8194ed3e92e1086ac
Parents: 986d2dc
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Jan 6 10:28:37 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Jan 6 10:28:37 2015 +0000

----------------------------------------------------------------------
 jena-fuseki2/jena-fuseki-core/pom.xml | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/9934c2cb/jena-fuseki2/jena-fuseki-core/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/pom.xml b/jena-fuseki2/jena-fuseki-core/pom.xml
index efe35ec..a8bfec5 100644
--- a/jena-fuseki2/jena-fuseki-core/pom.xml
+++ b/jena-fuseki2/jena-fuseki-core/pom.xml
@@ -254,6 +254,19 @@
       </plugin>
 
       <plugin>
+	<!-- Include the test jar for mebedded usein testing (eg. jena-jdbc-driver-remote) -->
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-source-plugin</artifactId>
         <executions>


[08/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/bin/s-post
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/bin/s-post b/jena-fuseki2/jena-fuseki-dist/bin/s-post
new file mode 100755
index 0000000..0e3a807
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/bin/s-post
@@ -0,0 +1,707 @@
+#!/usr/bin/env ruby
+# -*- coding: 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.
+
+# SPARQL HTTP Update, client.
+
+require 'optparse'
+require 'net/http'
+require 'uri'
+require 'cgi'
+require 'pp'
+require 'ostruct'
+
+# ToDo
+#  Allow a choice of media type for GET
+#   --accept "content-type" (and abbreviations)
+#   --header "Add:this"
+#   --user, --password
+#  Basic authentication: request.basic_auth("username", "password")
+#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
+
+SOH_NAME="SOH"
+SOH_VERSION="0.0.0"
+
+$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
+
+# What about direct naming?
+
+# Names
+$mtTurtle           = 'text/turtle;charset=utf-8'
+$mtRDF              = 'application/rdf+xml'
+$mtText             = 'text/plain'
+$mtNQuads           = 'text/n-quads'
+$mtTriG             = 'application/trig'
+$mtSparqlResultsX   = 'application/sparql-results+xml'
+$mtSparqlResultsJ   = 'application/sparql-results+json'
+$mtAppJSON          = 'application/json'
+$mtAppXML           = 'application/xml'
+$mtSparqlResultsTSV = 'application/sparql-results+tsv'
+$mtSparqlResultsCSV = 'application/sparql-results+csv'
+$mtSparqlUpdate     = 'application/sparql-update'
+$mtWWWForm          = 'application/x-www-form-urlencoded'
+$mtSparqlQuery      = "application/sparql-query" ;
+
+# Global media type table.
+$fileMediaTypes = {}
+$fileMediaTypes['ttl']   = $mtTurtle
+$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
+$fileMediaTypes['nt']    = $mtText
+$fileMediaTypes['rdf']   = $mtRDF
+$fileMediaTypes['owl']   = $mtRDF
+$fileMediaTypes['nq']    = $mtNQuads
+$fileMediaTypes['trig']  = $mtTriG
+
+# Global charset : no entry means "don't set"
+$charsetUTF8      = 'utf-8'
+$charset = {}
+$charset[$mtTurtle]   = 'utf-8'
+$charset[$mtText]     = 'ascii'
+$charset[$mtTriG]     = 'utf-8'
+$charset[$mtNQuads]   = 'ascii'
+
+# Headers
+
+$hContentType         = 'Content-Type'
+# $hContentEncoding     = 'Content-Encoding'
+$hContentLength       = 'Content-Length'
+# $hContentLocation     = 'Content-Location'
+# $hContentRange        = 'Content-Range'
+
+$hAccept              = 'Accept'
+$hAcceptCharset       = 'Accept-Charset'
+$hAcceptEncoding      = 'Accept-Encoding'
+$hAcceptRanges        = 'Accept-Ranges' 
+
+$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
+$print_http = false
+
+# Default for GET
+# At least allow anythign (and hope!)
+$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
+# For SPARQL query
+$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
+
+# Accept any in case of trouble.
+$accept_rdf="#{$accept_rdf} , */*;q=0.1"
+$accept_results="#{$accept_results} , */*;q=0.1" 
+
+# The media type usually forces the charset.
+$accept_charset=nil
+
+## Who we are.
+## Two styles:
+##    s-query .....
+##    soh query .....
+
+$cmd = File.basename($0)
+if $cmd == 'soh'
+then
+  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
+end
+
+if ! $cmd.start_with?('s-') && $cmd != 'soh'
+  $cmd = 's-'+$cmd
+end
+
+## -------- 
+
+def GET(dataset, graph)
+  print "GET #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  get_worker(requestURI, headers)
+end
+
+def get_worker(requestURI, headers)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Get.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+def HEAD(dataset, graph)
+  print "HEAD #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Head.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def PUT(dataset, graph, file)
+  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Put)
+end
+
+def POST(dataset, graph, file)
+  print "POST #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Post)
+end
+
+def DELETE(dataset, graph)
+  print "DELETE #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Delete.new(uri.request_uri)
+  headers = {}
+  headers.merge!($headers)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def uri_escape(string)
+  CGI.escape(string)
+end
+
+def target(dataset, graph)
+  return dataset+"?default" if graph == "default"
+  return dataset+"?graph="+uri_escape(graph)
+end
+
+def send_body(dataset, graph, file, method)
+  mt = content_type(file)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hContentType] = mt
+  headers[$hContentLength] = File.size(file).to_s
+  ## p headers
+
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  
+  request = method.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  request.body_stream = File.open(file)
+  response_no_body(uri, request)
+end
+
+def response_no_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue Exception => e  
+    # puts e.message  
+    #puts e.backtrace.inspect  
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+  response = http.request(request)
+  print_http_response(response)
+  case response
+  when Net::HTTPSuccess, Net::HTTPRedirection
+    # OK
+  when Net::HTTPNotFound
+    warn_exit "404 Not found: #{uri}", 9
+    #print response.body
+  else
+    warn_exit "#{response.code} #{response.message} #{uri}", 9
+    # Unreachable
+      response.error!
+  end
+  # NO BODY IN RESPONSE
+end
+
+def response_print_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue => e  
+    #puts e.backtrace.inspect  
+    #print e.class
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+
+  # Add a blank line if headers were output.
+  print "\n" if $http_print ;
+
+  begin
+    response = http.request(request) { |res| 
+      print_http_response(res)
+      #puts res.code
+      res.read_body do |segment|
+        print segment
+      end
+    }
+    case response
+    when Net::HTTPSuccess, Net::HTTPRedirection
+      # OK
+    when Net::HTTPNotFound
+      warn_exit "404 Not found: #{uri}", 9
+      #print response.body
+    else
+      warn_exit "#{response.code}: #{uri}", 9
+      # Unreachable
+      response.error!
+    end
+  rescue EOFError => e
+    warn_exit "IO Error: "+e.message, 3
+  end
+end
+
+def print_http_request(uri, request)
+  return unless $print_http
+  #print "Request\n"
+  print request.method," ",uri, "\n"
+  print_headers("  ",request)
+end
+
+def print_http_response(response)
+  return unless $print_http
+  #print "Response\n"
+  print response.code, " ", response.message, "\n"
+  print_headers("  ",response)
+end
+
+def print_headers(marker, headers)
+  headers.each do |k,v| 
+    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
+    printf "%s%-20s %s\n",marker,k,v
+  end
+end
+
+def content_type(file)
+  file =~ /\.([^.]*)$/
+  ext = $1
+  mt = $fileMediaTypes[ext]
+  cs = $charset[mt]
+  mt = mt+';charset='+cs if ! cs.nil?
+  return mt
+end
+
+def charset(content_type)
+  return $charset[content_type]
+end
+
+def warn_exit(msg, rc)
+    warn msg
+    exit rc ;
+end
+
+def parseURI(uri_string)
+  begin
+    return URI.parse(uri_string).to_s
+  rescue URI::InvalidURIError => err
+    warn_exit "Bad URI: <#{uri_string}>", 2
+  end
+end
+
+## ---- Command
+
+def cmd_soh(command=nil)
+  ## Command line
+  options = {}
+  optparse = OptionParser.new do |opts|
+    # Set a banner, displayed at the top
+    # of the help screen.
+    case $cmd
+    when "s-http", "sparql-http", "soh"
+      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
+    when "s-get", "s-head", "s-delete"
+      banner="$cmd  datasetURI graph"
+    end
+
+    opts.banner = $banner
+    # Define the options, and what they do
+    
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    
+    options[:version] = false
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end
+    
+    # This displays the help screen, all programs are
+    # assumed to have this option.
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  if command.nil?
+    if ARGV.size == 0
+      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
+      exit 1
+    end
+    cmdPrint=ARGV.shift
+    command=cmdPrint.upcase
+  else
+    cmdPrint=command
+  end
+
+  case command
+  when "HEAD", "GET", "DELETE"
+    requiredFile=false
+  when "PUT", "POST"
+    requiredFile=true
+  when "QUERY"
+    cmd_sparql_query
+  when "UPDATE"
+    cmd_sparql_update
+  else
+    warn_exit "Unknown command: #{command}", 2
+  end
+
+  if requiredFile 
+  then
+    if ARGV.size != 3
+      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
+    end
+  else
+    if ARGV.size != 2
+      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
+    end
+  end
+
+  dataset=parseURI(ARGV.shift)
+  # Relative URI?
+  graph=parseURI(ARGV.shift)
+  file=""
+  if requiredFile
+  then
+    file = ARGV.shift if requiredFile
+    if ! File.exist?(file)
+      warn_exit "No such file: "+file, 3
+    end
+    if File.directory?(file)
+      warn_exit "File is a directory: "+file, 3
+    end
+  end
+
+  case command
+  when "GET"
+    GET(dataset, graph)
+  when "HEAD"
+    HEAD(dataset, graph)
+  when "PUT"
+    PUT(dataset, graph, file)
+  when "DELETE"
+    DELETE(dataset, graph)
+  when "POST"
+    POST(dataset, graph, file)
+  else
+    warn_exit "Internal error: Unknown command: #{cmd}", 2
+  end
+  exit 0
+end
+
+## --------
+def string_or_file(arg)
+  return arg if ! arg.match(/^@/)
+  a=(arg[1..-1])
+  open(a, 'rb'){|f| f.read}
+end
+
+## -------- SPARQL Query
+
+## Choose method
+def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
+   if ! query_file.nil?
+    query = open(query_file, 'rb'){|f| f.read}
+  end
+  if forcePOST || query.length >= 2*1024 
+    SPARQL_query_POST(service, query, args2)
+  else
+    SPARQL_query_GET(service, query, args2)
+  end
+end
+
+## By GET
+
+def SPARQL_query_GET(service, query, args2)
+  args = { "query" => query }
+  args.merge!(args2)
+  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  action="#{service}?#{qs}"
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  get_worker(action, headers)
+end
+
+## By POST
+
+def SPARQL_query_POST(service, query, args2)
+  # DRY - body/no body for each of request and response.
+  post_params={ "query" => query }
+  post_params.merge!(args2)
+  uri = URI.parse(service)
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  execute_post_form_body(uri, headers, post_params)
+end
+
+def execute_post_form_body(uri, headers, post_params)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = qs.length.to_s
+  request.initialize_http_header(headers)
+  request.body = qs
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+# Usage: -v --help --file= --query=
+def cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
+      options[:file]=file
+    end
+    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
+            'Set the output argument') do |type|
+      options[:output]=type
+    end
+    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
+            'Set the accept header type') do |type|
+      options[:accept]=type
+    end
+    options[:verbose] = false
+    opts.on( '--post', 'Force use of POST' ) do
+      options[:post] = true
+    end
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
+    warn e
+    exit 1
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+  usePOST = options[:post]
+
+  service = options[:service]
+  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
+
+  # Query
+  query=nil
+  query_file=options[:file]
+  if query_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No query specified.',1
+    end
+  if query_file.nil?
+    query = ARGV.shift
+    if query.match(/^@/)
+      query_file = query[1..-1]
+      query = nil
+    end
+  end
+
+  # --output ==> output= (non-standard)
+  args={}
+  case options[:output]
+  when nil
+  when  "json","xml","text","csv","tsv"
+    args['output'] = options[:output]
+  when :json,:xml,:text,:csv,:tsv
+    args['output'] = options[:output].to_s
+  else
+    warn_exit "Unrecognized output type: "+options[:output],2
+  end
+
+  # --accept
+  # options[:accept]
+
+  print "SPARQL #{service}\n" if $verbose
+  #args={"output"=>"text"}
+  SPARQL_query(service, query, query_file, usePOST, args)
+  exit(0)
+end
+
+## -------- SPARQL Update
+
+# Update sent as a WWW form.
+def SPARQL_update_by_form(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  # args? encode?
+  body="update="+uri_escape(update)
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = body.length.to_s
+  uri = URI.parse(service)
+  execute_post_form(uri, headers, body)
+end
+
+# DRY - query form.
+def execute_post_form(uri, headers, body)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = body
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def SPARQL_update(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  headers[$hContentType] = $mtSparqlUpdate
+  uri = URI.parse(service)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = update
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def cmd_sparql_update(by_raw_post=true)
+  # Share with cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
+      options[:file]=file
+    end
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  service = options[:service]
+  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
+  
+  update=nil
+  update_file=options[:file]
+
+  if update_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No update specified.',1
+    end
+  if update_file.nil?
+    update = ARGV.shift
+    if update.match(/^@/)
+      update_file = update[1..-1]
+      update = nil
+    end
+  end
+  
+  print "SPARQL-Update #{service}\n" if $verbose
+  args={}
+
+  # Reads in the file :-(
+  if update.nil?
+  then
+    update = open(update_file, 'rb'){|f| f.read}
+  else
+    update = string_or_file(update)
+  end
+
+  if by_raw_post
+    SPARQL_update(service, update, args)
+  else
+    SPARQL_update_by_form(service, update, args)
+  end
+  exit(0)
+end
+
+## -------
+
+case $cmd
+when "s-http", "sparql-http", "soh"
+  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
+  cmd_soh
+when "s-get", "s-head", "s-put", "s-delete", "s-post"
+
+  case $cmd
+  when "s-get", "s-head", "s-delete"
+    $banner="#{$cmd} datasetURI graph"
+  when "s-put", "s-post"
+    $banner="#{$cmd} datasetURI graph file"
+  end
+  cmd2 = $cmd.sub(/^s-/, '').upcase
+  cmd_soh cmd2
+
+when "s-query", "sparql-query"
+  cmd_sparql_query
+when "s-update", "sparql-update"
+  cmd_sparql_update true
+when "s-update-form", "sparql-update-form"
+  cmd_sparql_update false
+else 
+  warn_exit "Unknown: "+$cmd, 1
+end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/bin/s-put
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/bin/s-put b/jena-fuseki2/jena-fuseki-dist/bin/s-put
new file mode 100755
index 0000000..0e3a807
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/bin/s-put
@@ -0,0 +1,707 @@
+#!/usr/bin/env ruby
+# -*- coding: 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.
+
+# SPARQL HTTP Update, client.
+
+require 'optparse'
+require 'net/http'
+require 'uri'
+require 'cgi'
+require 'pp'
+require 'ostruct'
+
+# ToDo
+#  Allow a choice of media type for GET
+#   --accept "content-type" (and abbreviations)
+#   --header "Add:this"
+#   --user, --password
+#  Basic authentication: request.basic_auth("username", "password")
+#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
+
+SOH_NAME="SOH"
+SOH_VERSION="0.0.0"
+
+$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
+
+# What about direct naming?
+
+# Names
+$mtTurtle           = 'text/turtle;charset=utf-8'
+$mtRDF              = 'application/rdf+xml'
+$mtText             = 'text/plain'
+$mtNQuads           = 'text/n-quads'
+$mtTriG             = 'application/trig'
+$mtSparqlResultsX   = 'application/sparql-results+xml'
+$mtSparqlResultsJ   = 'application/sparql-results+json'
+$mtAppJSON          = 'application/json'
+$mtAppXML           = 'application/xml'
+$mtSparqlResultsTSV = 'application/sparql-results+tsv'
+$mtSparqlResultsCSV = 'application/sparql-results+csv'
+$mtSparqlUpdate     = 'application/sparql-update'
+$mtWWWForm          = 'application/x-www-form-urlencoded'
+$mtSparqlQuery      = "application/sparql-query" ;
+
+# Global media type table.
+$fileMediaTypes = {}
+$fileMediaTypes['ttl']   = $mtTurtle
+$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
+$fileMediaTypes['nt']    = $mtText
+$fileMediaTypes['rdf']   = $mtRDF
+$fileMediaTypes['owl']   = $mtRDF
+$fileMediaTypes['nq']    = $mtNQuads
+$fileMediaTypes['trig']  = $mtTriG
+
+# Global charset : no entry means "don't set"
+$charsetUTF8      = 'utf-8'
+$charset = {}
+$charset[$mtTurtle]   = 'utf-8'
+$charset[$mtText]     = 'ascii'
+$charset[$mtTriG]     = 'utf-8'
+$charset[$mtNQuads]   = 'ascii'
+
+# Headers
+
+$hContentType         = 'Content-Type'
+# $hContentEncoding     = 'Content-Encoding'
+$hContentLength       = 'Content-Length'
+# $hContentLocation     = 'Content-Location'
+# $hContentRange        = 'Content-Range'
+
+$hAccept              = 'Accept'
+$hAcceptCharset       = 'Accept-Charset'
+$hAcceptEncoding      = 'Accept-Encoding'
+$hAcceptRanges        = 'Accept-Ranges' 
+
+$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
+$print_http = false
+
+# Default for GET
+# At least allow anythign (and hope!)
+$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
+# For SPARQL query
+$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
+
+# Accept any in case of trouble.
+$accept_rdf="#{$accept_rdf} , */*;q=0.1"
+$accept_results="#{$accept_results} , */*;q=0.1" 
+
+# The media type usually forces the charset.
+$accept_charset=nil
+
+## Who we are.
+## Two styles:
+##    s-query .....
+##    soh query .....
+
+$cmd = File.basename($0)
+if $cmd == 'soh'
+then
+  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
+end
+
+if ! $cmd.start_with?('s-') && $cmd != 'soh'
+  $cmd = 's-'+$cmd
+end
+
+## -------- 
+
+def GET(dataset, graph)
+  print "GET #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  get_worker(requestURI, headers)
+end
+
+def get_worker(requestURI, headers)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Get.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+def HEAD(dataset, graph)
+  print "HEAD #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Head.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def PUT(dataset, graph, file)
+  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Put)
+end
+
+def POST(dataset, graph, file)
+  print "POST #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Post)
+end
+
+def DELETE(dataset, graph)
+  print "DELETE #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Delete.new(uri.request_uri)
+  headers = {}
+  headers.merge!($headers)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def uri_escape(string)
+  CGI.escape(string)
+end
+
+def target(dataset, graph)
+  return dataset+"?default" if graph == "default"
+  return dataset+"?graph="+uri_escape(graph)
+end
+
+def send_body(dataset, graph, file, method)
+  mt = content_type(file)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hContentType] = mt
+  headers[$hContentLength] = File.size(file).to_s
+  ## p headers
+
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  
+  request = method.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  request.body_stream = File.open(file)
+  response_no_body(uri, request)
+end
+
+def response_no_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue Exception => e  
+    # puts e.message  
+    #puts e.backtrace.inspect  
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+  response = http.request(request)
+  print_http_response(response)
+  case response
+  when Net::HTTPSuccess, Net::HTTPRedirection
+    # OK
+  when Net::HTTPNotFound
+    warn_exit "404 Not found: #{uri}", 9
+    #print response.body
+  else
+    warn_exit "#{response.code} #{response.message} #{uri}", 9
+    # Unreachable
+      response.error!
+  end
+  # NO BODY IN RESPONSE
+end
+
+def response_print_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue => e  
+    #puts e.backtrace.inspect  
+    #print e.class
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+
+  # Add a blank line if headers were output.
+  print "\n" if $http_print ;
+
+  begin
+    response = http.request(request) { |res| 
+      print_http_response(res)
+      #puts res.code
+      res.read_body do |segment|
+        print segment
+      end
+    }
+    case response
+    when Net::HTTPSuccess, Net::HTTPRedirection
+      # OK
+    when Net::HTTPNotFound
+      warn_exit "404 Not found: #{uri}", 9
+      #print response.body
+    else
+      warn_exit "#{response.code}: #{uri}", 9
+      # Unreachable
+      response.error!
+    end
+  rescue EOFError => e
+    warn_exit "IO Error: "+e.message, 3
+  end
+end
+
+def print_http_request(uri, request)
+  return unless $print_http
+  #print "Request\n"
+  print request.method," ",uri, "\n"
+  print_headers("  ",request)
+end
+
+def print_http_response(response)
+  return unless $print_http
+  #print "Response\n"
+  print response.code, " ", response.message, "\n"
+  print_headers("  ",response)
+end
+
+def print_headers(marker, headers)
+  headers.each do |k,v| 
+    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
+    printf "%s%-20s %s\n",marker,k,v
+  end
+end
+
+def content_type(file)
+  file =~ /\.([^.]*)$/
+  ext = $1
+  mt = $fileMediaTypes[ext]
+  cs = $charset[mt]
+  mt = mt+';charset='+cs if ! cs.nil?
+  return mt
+end
+
+def charset(content_type)
+  return $charset[content_type]
+end
+
+def warn_exit(msg, rc)
+    warn msg
+    exit rc ;
+end
+
+def parseURI(uri_string)
+  begin
+    return URI.parse(uri_string).to_s
+  rescue URI::InvalidURIError => err
+    warn_exit "Bad URI: <#{uri_string}>", 2
+  end
+end
+
+## ---- Command
+
+def cmd_soh(command=nil)
+  ## Command line
+  options = {}
+  optparse = OptionParser.new do |opts|
+    # Set a banner, displayed at the top
+    # of the help screen.
+    case $cmd
+    when "s-http", "sparql-http", "soh"
+      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
+    when "s-get", "s-head", "s-delete"
+      banner="$cmd  datasetURI graph"
+    end
+
+    opts.banner = $banner
+    # Define the options, and what they do
+    
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    
+    options[:version] = false
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end
+    
+    # This displays the help screen, all programs are
+    # assumed to have this option.
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  if command.nil?
+    if ARGV.size == 0
+      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
+      exit 1
+    end
+    cmdPrint=ARGV.shift
+    command=cmdPrint.upcase
+  else
+    cmdPrint=command
+  end
+
+  case command
+  when "HEAD", "GET", "DELETE"
+    requiredFile=false
+  when "PUT", "POST"
+    requiredFile=true
+  when "QUERY"
+    cmd_sparql_query
+  when "UPDATE"
+    cmd_sparql_update
+  else
+    warn_exit "Unknown command: #{command}", 2
+  end
+
+  if requiredFile 
+  then
+    if ARGV.size != 3
+      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
+    end
+  else
+    if ARGV.size != 2
+      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
+    end
+  end
+
+  dataset=parseURI(ARGV.shift)
+  # Relative URI?
+  graph=parseURI(ARGV.shift)
+  file=""
+  if requiredFile
+  then
+    file = ARGV.shift if requiredFile
+    if ! File.exist?(file)
+      warn_exit "No such file: "+file, 3
+    end
+    if File.directory?(file)
+      warn_exit "File is a directory: "+file, 3
+    end
+  end
+
+  case command
+  when "GET"
+    GET(dataset, graph)
+  when "HEAD"
+    HEAD(dataset, graph)
+  when "PUT"
+    PUT(dataset, graph, file)
+  when "DELETE"
+    DELETE(dataset, graph)
+  when "POST"
+    POST(dataset, graph, file)
+  else
+    warn_exit "Internal error: Unknown command: #{cmd}", 2
+  end
+  exit 0
+end
+
+## --------
+def string_or_file(arg)
+  return arg if ! arg.match(/^@/)
+  a=(arg[1..-1])
+  open(a, 'rb'){|f| f.read}
+end
+
+## -------- SPARQL Query
+
+## Choose method
+def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
+   if ! query_file.nil?
+    query = open(query_file, 'rb'){|f| f.read}
+  end
+  if forcePOST || query.length >= 2*1024 
+    SPARQL_query_POST(service, query, args2)
+  else
+    SPARQL_query_GET(service, query, args2)
+  end
+end
+
+## By GET
+
+def SPARQL_query_GET(service, query, args2)
+  args = { "query" => query }
+  args.merge!(args2)
+  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  action="#{service}?#{qs}"
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  get_worker(action, headers)
+end
+
+## By POST
+
+def SPARQL_query_POST(service, query, args2)
+  # DRY - body/no body for each of request and response.
+  post_params={ "query" => query }
+  post_params.merge!(args2)
+  uri = URI.parse(service)
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  execute_post_form_body(uri, headers, post_params)
+end
+
+def execute_post_form_body(uri, headers, post_params)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = qs.length.to_s
+  request.initialize_http_header(headers)
+  request.body = qs
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+# Usage: -v --help --file= --query=
+def cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
+      options[:file]=file
+    end
+    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
+            'Set the output argument') do |type|
+      options[:output]=type
+    end
+    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
+            'Set the accept header type') do |type|
+      options[:accept]=type
+    end
+    options[:verbose] = false
+    opts.on( '--post', 'Force use of POST' ) do
+      options[:post] = true
+    end
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
+    warn e
+    exit 1
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+  usePOST = options[:post]
+
+  service = options[:service]
+  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
+
+  # Query
+  query=nil
+  query_file=options[:file]
+  if query_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No query specified.',1
+    end
+  if query_file.nil?
+    query = ARGV.shift
+    if query.match(/^@/)
+      query_file = query[1..-1]
+      query = nil
+    end
+  end
+
+  # --output ==> output= (non-standard)
+  args={}
+  case options[:output]
+  when nil
+  when  "json","xml","text","csv","tsv"
+    args['output'] = options[:output]
+  when :json,:xml,:text,:csv,:tsv
+    args['output'] = options[:output].to_s
+  else
+    warn_exit "Unrecognized output type: "+options[:output],2
+  end
+
+  # --accept
+  # options[:accept]
+
+  print "SPARQL #{service}\n" if $verbose
+  #args={"output"=>"text"}
+  SPARQL_query(service, query, query_file, usePOST, args)
+  exit(0)
+end
+
+## -------- SPARQL Update
+
+# Update sent as a WWW form.
+def SPARQL_update_by_form(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  # args? encode?
+  body="update="+uri_escape(update)
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = body.length.to_s
+  uri = URI.parse(service)
+  execute_post_form(uri, headers, body)
+end
+
+# DRY - query form.
+def execute_post_form(uri, headers, body)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = body
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def SPARQL_update(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  headers[$hContentType] = $mtSparqlUpdate
+  uri = URI.parse(service)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = update
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def cmd_sparql_update(by_raw_post=true)
+  # Share with cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
+      options[:file]=file
+    end
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  service = options[:service]
+  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
+  
+  update=nil
+  update_file=options[:file]
+
+  if update_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No update specified.',1
+    end
+  if update_file.nil?
+    update = ARGV.shift
+    if update.match(/^@/)
+      update_file = update[1..-1]
+      update = nil
+    end
+  end
+  
+  print "SPARQL-Update #{service}\n" if $verbose
+  args={}
+
+  # Reads in the file :-(
+  if update.nil?
+  then
+    update = open(update_file, 'rb'){|f| f.read}
+  else
+    update = string_or_file(update)
+  end
+
+  if by_raw_post
+    SPARQL_update(service, update, args)
+  else
+    SPARQL_update_by_form(service, update, args)
+  end
+  exit(0)
+end
+
+## -------
+
+case $cmd
+when "s-http", "sparql-http", "soh"
+  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
+  cmd_soh
+when "s-get", "s-head", "s-put", "s-delete", "s-post"
+
+  case $cmd
+  when "s-get", "s-head", "s-delete"
+    $banner="#{$cmd} datasetURI graph"
+  when "s-put", "s-post"
+    $banner="#{$cmd} datasetURI graph file"
+  end
+  cmd2 = $cmd.sub(/^s-/, '').upcase
+  cmd_soh cmd2
+
+when "s-query", "sparql-query"
+  cmd_sparql_query
+when "s-update", "sparql-update"
+  cmd_sparql_update true
+when "s-update-form", "sparql-update-form"
+  cmd_sparql_update false
+else 
+  warn_exit "Unknown: "+$cmd, 1
+end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/bin/s-query
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/bin/s-query b/jena-fuseki2/jena-fuseki-dist/bin/s-query
new file mode 100755
index 0000000..0e3a807
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/bin/s-query
@@ -0,0 +1,707 @@
+#!/usr/bin/env ruby
+# -*- coding: 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.
+
+# SPARQL HTTP Update, client.
+
+require 'optparse'
+require 'net/http'
+require 'uri'
+require 'cgi'
+require 'pp'
+require 'ostruct'
+
+# ToDo
+#  Allow a choice of media type for GET
+#   --accept "content-type" (and abbreviations)
+#   --header "Add:this"
+#   --user, --password
+#  Basic authentication: request.basic_auth("username", "password")
+#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
+
+SOH_NAME="SOH"
+SOH_VERSION="0.0.0"
+
+$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
+
+# What about direct naming?
+
+# Names
+$mtTurtle           = 'text/turtle;charset=utf-8'
+$mtRDF              = 'application/rdf+xml'
+$mtText             = 'text/plain'
+$mtNQuads           = 'text/n-quads'
+$mtTriG             = 'application/trig'
+$mtSparqlResultsX   = 'application/sparql-results+xml'
+$mtSparqlResultsJ   = 'application/sparql-results+json'
+$mtAppJSON          = 'application/json'
+$mtAppXML           = 'application/xml'
+$mtSparqlResultsTSV = 'application/sparql-results+tsv'
+$mtSparqlResultsCSV = 'application/sparql-results+csv'
+$mtSparqlUpdate     = 'application/sparql-update'
+$mtWWWForm          = 'application/x-www-form-urlencoded'
+$mtSparqlQuery      = "application/sparql-query" ;
+
+# Global media type table.
+$fileMediaTypes = {}
+$fileMediaTypes['ttl']   = $mtTurtle
+$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
+$fileMediaTypes['nt']    = $mtText
+$fileMediaTypes['rdf']   = $mtRDF
+$fileMediaTypes['owl']   = $mtRDF
+$fileMediaTypes['nq']    = $mtNQuads
+$fileMediaTypes['trig']  = $mtTriG
+
+# Global charset : no entry means "don't set"
+$charsetUTF8      = 'utf-8'
+$charset = {}
+$charset[$mtTurtle]   = 'utf-8'
+$charset[$mtText]     = 'ascii'
+$charset[$mtTriG]     = 'utf-8'
+$charset[$mtNQuads]   = 'ascii'
+
+# Headers
+
+$hContentType         = 'Content-Type'
+# $hContentEncoding     = 'Content-Encoding'
+$hContentLength       = 'Content-Length'
+# $hContentLocation     = 'Content-Location'
+# $hContentRange        = 'Content-Range'
+
+$hAccept              = 'Accept'
+$hAcceptCharset       = 'Accept-Charset'
+$hAcceptEncoding      = 'Accept-Encoding'
+$hAcceptRanges        = 'Accept-Ranges' 
+
+$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
+$print_http = false
+
+# Default for GET
+# At least allow anythign (and hope!)
+$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
+# For SPARQL query
+$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
+
+# Accept any in case of trouble.
+$accept_rdf="#{$accept_rdf} , */*;q=0.1"
+$accept_results="#{$accept_results} , */*;q=0.1" 
+
+# The media type usually forces the charset.
+$accept_charset=nil
+
+## Who we are.
+## Two styles:
+##    s-query .....
+##    soh query .....
+
+$cmd = File.basename($0)
+if $cmd == 'soh'
+then
+  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
+end
+
+if ! $cmd.start_with?('s-') && $cmd != 'soh'
+  $cmd = 's-'+$cmd
+end
+
+## -------- 
+
+def GET(dataset, graph)
+  print "GET #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  get_worker(requestURI, headers)
+end
+
+def get_worker(requestURI, headers)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Get.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+def HEAD(dataset, graph)
+  print "HEAD #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Head.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def PUT(dataset, graph, file)
+  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Put)
+end
+
+def POST(dataset, graph, file)
+  print "POST #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Post)
+end
+
+def DELETE(dataset, graph)
+  print "DELETE #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Delete.new(uri.request_uri)
+  headers = {}
+  headers.merge!($headers)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def uri_escape(string)
+  CGI.escape(string)
+end
+
+def target(dataset, graph)
+  return dataset+"?default" if graph == "default"
+  return dataset+"?graph="+uri_escape(graph)
+end
+
+def send_body(dataset, graph, file, method)
+  mt = content_type(file)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hContentType] = mt
+  headers[$hContentLength] = File.size(file).to_s
+  ## p headers
+
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  
+  request = method.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  request.body_stream = File.open(file)
+  response_no_body(uri, request)
+end
+
+def response_no_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue Exception => e  
+    # puts e.message  
+    #puts e.backtrace.inspect  
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+  response = http.request(request)
+  print_http_response(response)
+  case response
+  when Net::HTTPSuccess, Net::HTTPRedirection
+    # OK
+  when Net::HTTPNotFound
+    warn_exit "404 Not found: #{uri}", 9
+    #print response.body
+  else
+    warn_exit "#{response.code} #{response.message} #{uri}", 9
+    # Unreachable
+      response.error!
+  end
+  # NO BODY IN RESPONSE
+end
+
+def response_print_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue => e  
+    #puts e.backtrace.inspect  
+    #print e.class
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+
+  # Add a blank line if headers were output.
+  print "\n" if $http_print ;
+
+  begin
+    response = http.request(request) { |res| 
+      print_http_response(res)
+      #puts res.code
+      res.read_body do |segment|
+        print segment
+      end
+    }
+    case response
+    when Net::HTTPSuccess, Net::HTTPRedirection
+      # OK
+    when Net::HTTPNotFound
+      warn_exit "404 Not found: #{uri}", 9
+      #print response.body
+    else
+      warn_exit "#{response.code}: #{uri}", 9
+      # Unreachable
+      response.error!
+    end
+  rescue EOFError => e
+    warn_exit "IO Error: "+e.message, 3
+  end
+end
+
+def print_http_request(uri, request)
+  return unless $print_http
+  #print "Request\n"
+  print request.method," ",uri, "\n"
+  print_headers("  ",request)
+end
+
+def print_http_response(response)
+  return unless $print_http
+  #print "Response\n"
+  print response.code, " ", response.message, "\n"
+  print_headers("  ",response)
+end
+
+def print_headers(marker, headers)
+  headers.each do |k,v| 
+    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
+    printf "%s%-20s %s\n",marker,k,v
+  end
+end
+
+def content_type(file)
+  file =~ /\.([^.]*)$/
+  ext = $1
+  mt = $fileMediaTypes[ext]
+  cs = $charset[mt]
+  mt = mt+';charset='+cs if ! cs.nil?
+  return mt
+end
+
+def charset(content_type)
+  return $charset[content_type]
+end
+
+def warn_exit(msg, rc)
+    warn msg
+    exit rc ;
+end
+
+def parseURI(uri_string)
+  begin
+    return URI.parse(uri_string).to_s
+  rescue URI::InvalidURIError => err
+    warn_exit "Bad URI: <#{uri_string}>", 2
+  end
+end
+
+## ---- Command
+
+def cmd_soh(command=nil)
+  ## Command line
+  options = {}
+  optparse = OptionParser.new do |opts|
+    # Set a banner, displayed at the top
+    # of the help screen.
+    case $cmd
+    when "s-http", "sparql-http", "soh"
+      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
+    when "s-get", "s-head", "s-delete"
+      banner="$cmd  datasetURI graph"
+    end
+
+    opts.banner = $banner
+    # Define the options, and what they do
+    
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    
+    options[:version] = false
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end
+    
+    # This displays the help screen, all programs are
+    # assumed to have this option.
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  if command.nil?
+    if ARGV.size == 0
+      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
+      exit 1
+    end
+    cmdPrint=ARGV.shift
+    command=cmdPrint.upcase
+  else
+    cmdPrint=command
+  end
+
+  case command
+  when "HEAD", "GET", "DELETE"
+    requiredFile=false
+  when "PUT", "POST"
+    requiredFile=true
+  when "QUERY"
+    cmd_sparql_query
+  when "UPDATE"
+    cmd_sparql_update
+  else
+    warn_exit "Unknown command: #{command}", 2
+  end
+
+  if requiredFile 
+  then
+    if ARGV.size != 3
+      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
+    end
+  else
+    if ARGV.size != 2
+      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
+    end
+  end
+
+  dataset=parseURI(ARGV.shift)
+  # Relative URI?
+  graph=parseURI(ARGV.shift)
+  file=""
+  if requiredFile
+  then
+    file = ARGV.shift if requiredFile
+    if ! File.exist?(file)
+      warn_exit "No such file: "+file, 3
+    end
+    if File.directory?(file)
+      warn_exit "File is a directory: "+file, 3
+    end
+  end
+
+  case command
+  when "GET"
+    GET(dataset, graph)
+  when "HEAD"
+    HEAD(dataset, graph)
+  when "PUT"
+    PUT(dataset, graph, file)
+  when "DELETE"
+    DELETE(dataset, graph)
+  when "POST"
+    POST(dataset, graph, file)
+  else
+    warn_exit "Internal error: Unknown command: #{cmd}", 2
+  end
+  exit 0
+end
+
+## --------
+def string_or_file(arg)
+  return arg if ! arg.match(/^@/)
+  a=(arg[1..-1])
+  open(a, 'rb'){|f| f.read}
+end
+
+## -------- SPARQL Query
+
+## Choose method
+def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
+   if ! query_file.nil?
+    query = open(query_file, 'rb'){|f| f.read}
+  end
+  if forcePOST || query.length >= 2*1024 
+    SPARQL_query_POST(service, query, args2)
+  else
+    SPARQL_query_GET(service, query, args2)
+  end
+end
+
+## By GET
+
+def SPARQL_query_GET(service, query, args2)
+  args = { "query" => query }
+  args.merge!(args2)
+  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  action="#{service}?#{qs}"
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  get_worker(action, headers)
+end
+
+## By POST
+
+def SPARQL_query_POST(service, query, args2)
+  # DRY - body/no body for each of request and response.
+  post_params={ "query" => query }
+  post_params.merge!(args2)
+  uri = URI.parse(service)
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  execute_post_form_body(uri, headers, post_params)
+end
+
+def execute_post_form_body(uri, headers, post_params)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = qs.length.to_s
+  request.initialize_http_header(headers)
+  request.body = qs
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+# Usage: -v --help --file= --query=
+def cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
+      options[:file]=file
+    end
+    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
+            'Set the output argument') do |type|
+      options[:output]=type
+    end
+    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
+            'Set the accept header type') do |type|
+      options[:accept]=type
+    end
+    options[:verbose] = false
+    opts.on( '--post', 'Force use of POST' ) do
+      options[:post] = true
+    end
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
+    warn e
+    exit 1
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+  usePOST = options[:post]
+
+  service = options[:service]
+  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
+
+  # Query
+  query=nil
+  query_file=options[:file]
+  if query_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No query specified.',1
+    end
+  if query_file.nil?
+    query = ARGV.shift
+    if query.match(/^@/)
+      query_file = query[1..-1]
+      query = nil
+    end
+  end
+
+  # --output ==> output= (non-standard)
+  args={}
+  case options[:output]
+  when nil
+  when  "json","xml","text","csv","tsv"
+    args['output'] = options[:output]
+  when :json,:xml,:text,:csv,:tsv
+    args['output'] = options[:output].to_s
+  else
+    warn_exit "Unrecognized output type: "+options[:output],2
+  end
+
+  # --accept
+  # options[:accept]
+
+  print "SPARQL #{service}\n" if $verbose
+  #args={"output"=>"text"}
+  SPARQL_query(service, query, query_file, usePOST, args)
+  exit(0)
+end
+
+## -------- SPARQL Update
+
+# Update sent as a WWW form.
+def SPARQL_update_by_form(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  # args? encode?
+  body="update="+uri_escape(update)
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = body.length.to_s
+  uri = URI.parse(service)
+  execute_post_form(uri, headers, body)
+end
+
+# DRY - query form.
+def execute_post_form(uri, headers, body)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = body
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def SPARQL_update(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  headers[$hContentType] = $mtSparqlUpdate
+  uri = URI.parse(service)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = update
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def cmd_sparql_update(by_raw_post=true)
+  # Share with cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
+      options[:file]=file
+    end
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  service = options[:service]
+  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
+  
+  update=nil
+  update_file=options[:file]
+
+  if update_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No update specified.',1
+    end
+  if update_file.nil?
+    update = ARGV.shift
+    if update.match(/^@/)
+      update_file = update[1..-1]
+      update = nil
+    end
+  end
+  
+  print "SPARQL-Update #{service}\n" if $verbose
+  args={}
+
+  # Reads in the file :-(
+  if update.nil?
+  then
+    update = open(update_file, 'rb'){|f| f.read}
+  else
+    update = string_or_file(update)
+  end
+
+  if by_raw_post
+    SPARQL_update(service, update, args)
+  else
+    SPARQL_update_by_form(service, update, args)
+  end
+  exit(0)
+end
+
+## -------
+
+case $cmd
+when "s-http", "sparql-http", "soh"
+  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
+  cmd_soh
+when "s-get", "s-head", "s-put", "s-delete", "s-post"
+
+  case $cmd
+  when "s-get", "s-head", "s-delete"
+    $banner="#{$cmd} datasetURI graph"
+  when "s-put", "s-post"
+    $banner="#{$cmd} datasetURI graph file"
+  end
+  cmd2 = $cmd.sub(/^s-/, '').upcase
+  cmd_soh cmd2
+
+when "s-query", "sparql-query"
+  cmd_sparql_query
+when "s-update", "sparql-update"
+  cmd_sparql_update true
+when "s-update-form", "sparql-update-form"
+  cmd_sparql_update false
+else 
+  warn_exit "Unknown: "+$cmd, 1
+end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/bin/s-update
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/bin/s-update b/jena-fuseki2/jena-fuseki-dist/bin/s-update
new file mode 100755
index 0000000..0e3a807
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/bin/s-update
@@ -0,0 +1,707 @@
+#!/usr/bin/env ruby
+# -*- coding: 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.
+
+# SPARQL HTTP Update, client.
+
+require 'optparse'
+require 'net/http'
+require 'uri'
+require 'cgi'
+require 'pp'
+require 'ostruct'
+
+# ToDo
+#  Allow a choice of media type for GET
+#   --accept "content-type" (and abbreviations)
+#   --header "Add:this"
+#   --user, --password
+#  Basic authentication: request.basic_auth("username", "password")
+#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
+
+SOH_NAME="SOH"
+SOH_VERSION="0.0.0"
+
+$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
+
+# What about direct naming?
+
+# Names
+$mtTurtle           = 'text/turtle;charset=utf-8'
+$mtRDF              = 'application/rdf+xml'
+$mtText             = 'text/plain'
+$mtNQuads           = 'text/n-quads'
+$mtTriG             = 'application/trig'
+$mtSparqlResultsX   = 'application/sparql-results+xml'
+$mtSparqlResultsJ   = 'application/sparql-results+json'
+$mtAppJSON          = 'application/json'
+$mtAppXML           = 'application/xml'
+$mtSparqlResultsTSV = 'application/sparql-results+tsv'
+$mtSparqlResultsCSV = 'application/sparql-results+csv'
+$mtSparqlUpdate     = 'application/sparql-update'
+$mtWWWForm          = 'application/x-www-form-urlencoded'
+$mtSparqlQuery      = "application/sparql-query" ;
+
+# Global media type table.
+$fileMediaTypes = {}
+$fileMediaTypes['ttl']   = $mtTurtle
+$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
+$fileMediaTypes['nt']    = $mtText
+$fileMediaTypes['rdf']   = $mtRDF
+$fileMediaTypes['owl']   = $mtRDF
+$fileMediaTypes['nq']    = $mtNQuads
+$fileMediaTypes['trig']  = $mtTriG
+
+# Global charset : no entry means "don't set"
+$charsetUTF8      = 'utf-8'
+$charset = {}
+$charset[$mtTurtle]   = 'utf-8'
+$charset[$mtText]     = 'ascii'
+$charset[$mtTriG]     = 'utf-8'
+$charset[$mtNQuads]   = 'ascii'
+
+# Headers
+
+$hContentType         = 'Content-Type'
+# $hContentEncoding     = 'Content-Encoding'
+$hContentLength       = 'Content-Length'
+# $hContentLocation     = 'Content-Location'
+# $hContentRange        = 'Content-Range'
+
+$hAccept              = 'Accept'
+$hAcceptCharset       = 'Accept-Charset'
+$hAcceptEncoding      = 'Accept-Encoding'
+$hAcceptRanges        = 'Accept-Ranges' 
+
+$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
+$print_http = false
+
+# Default for GET
+# At least allow anythign (and hope!)
+$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
+# For SPARQL query
+$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
+
+# Accept any in case of trouble.
+$accept_rdf="#{$accept_rdf} , */*;q=0.1"
+$accept_results="#{$accept_results} , */*;q=0.1" 
+
+# The media type usually forces the charset.
+$accept_charset=nil
+
+## Who we are.
+## Two styles:
+##    s-query .....
+##    soh query .....
+
+$cmd = File.basename($0)
+if $cmd == 'soh'
+then
+  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
+end
+
+if ! $cmd.start_with?('s-') && $cmd != 'soh'
+  $cmd = 's-'+$cmd
+end
+
+## -------- 
+
+def GET(dataset, graph)
+  print "GET #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  get_worker(requestURI, headers)
+end
+
+def get_worker(requestURI, headers)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Get.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+def HEAD(dataset, graph)
+  print "HEAD #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Head.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def PUT(dataset, graph, file)
+  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Put)
+end
+
+def POST(dataset, graph, file)
+  print "POST #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Post)
+end
+
+def DELETE(dataset, graph)
+  print "DELETE #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Delete.new(uri.request_uri)
+  headers = {}
+  headers.merge!($headers)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def uri_escape(string)
+  CGI.escape(string)
+end
+
+def target(dataset, graph)
+  return dataset+"?default" if graph == "default"
+  return dataset+"?graph="+uri_escape(graph)
+end
+
+def send_body(dataset, graph, file, method)
+  mt = content_type(file)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hContentType] = mt
+  headers[$hContentLength] = File.size(file).to_s
+  ## p headers
+
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  
+  request = method.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  request.body_stream = File.open(file)
+  response_no_body(uri, request)
+end
+
+def response_no_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue Exception => e  
+    # puts e.message  
+    #puts e.backtrace.inspect  
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+  response = http.request(request)
+  print_http_response(response)
+  case response
+  when Net::HTTPSuccess, Net::HTTPRedirection
+    # OK
+  when Net::HTTPNotFound
+    warn_exit "404 Not found: #{uri}", 9
+    #print response.body
+  else
+    warn_exit "#{response.code} #{response.message} #{uri}", 9
+    # Unreachable
+      response.error!
+  end
+  # NO BODY IN RESPONSE
+end
+
+def response_print_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue => e  
+    #puts e.backtrace.inspect  
+    #print e.class
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+
+  # Add a blank line if headers were output.
+  print "\n" if $http_print ;
+
+  begin
+    response = http.request(request) { |res| 
+      print_http_response(res)
+      #puts res.code
+      res.read_body do |segment|
+        print segment
+      end
+    }
+    case response
+    when Net::HTTPSuccess, Net::HTTPRedirection
+      # OK
+    when Net::HTTPNotFound
+      warn_exit "404 Not found: #{uri}", 9
+      #print response.body
+    else
+      warn_exit "#{response.code}: #{uri}", 9
+      # Unreachable
+      response.error!
+    end
+  rescue EOFError => e
+    warn_exit "IO Error: "+e.message, 3
+  end
+end
+
+def print_http_request(uri, request)
+  return unless $print_http
+  #print "Request\n"
+  print request.method," ",uri, "\n"
+  print_headers("  ",request)
+end
+
+def print_http_response(response)
+  return unless $print_http
+  #print "Response\n"
+  print response.code, " ", response.message, "\n"
+  print_headers("  ",response)
+end
+
+def print_headers(marker, headers)
+  headers.each do |k,v| 
+    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
+    printf "%s%-20s %s\n",marker,k,v
+  end
+end
+
+def content_type(file)
+  file =~ /\.([^.]*)$/
+  ext = $1
+  mt = $fileMediaTypes[ext]
+  cs = $charset[mt]
+  mt = mt+';charset='+cs if ! cs.nil?
+  return mt
+end
+
+def charset(content_type)
+  return $charset[content_type]
+end
+
+def warn_exit(msg, rc)
+    warn msg
+    exit rc ;
+end
+
+def parseURI(uri_string)
+  begin
+    return URI.parse(uri_string).to_s
+  rescue URI::InvalidURIError => err
+    warn_exit "Bad URI: <#{uri_string}>", 2
+  end
+end
+
+## ---- Command
+
+def cmd_soh(command=nil)
+  ## Command line
+  options = {}
+  optparse = OptionParser.new do |opts|
+    # Set a banner, displayed at the top
+    # of the help screen.
+    case $cmd
+    when "s-http", "sparql-http", "soh"
+      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
+    when "s-get", "s-head", "s-delete"
+      banner="$cmd  datasetURI graph"
+    end
+
+    opts.banner = $banner
+    # Define the options, and what they do
+    
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    
+    options[:version] = false
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end
+    
+    # This displays the help screen, all programs are
+    # assumed to have this option.
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  if command.nil?
+    if ARGV.size == 0
+      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
+      exit 1
+    end
+    cmdPrint=ARGV.shift
+    command=cmdPrint.upcase
+  else
+    cmdPrint=command
+  end
+
+  case command
+  when "HEAD", "GET", "DELETE"
+    requiredFile=false
+  when "PUT", "POST"
+    requiredFile=true
+  when "QUERY"
+    cmd_sparql_query
+  when "UPDATE"
+    cmd_sparql_update
+  else
+    warn_exit "Unknown command: #{command}", 2
+  end
+
+  if requiredFile 
+  then
+    if ARGV.size != 3
+      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
+    end
+  else
+    if ARGV.size != 2
+      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
+    end
+  end
+
+  dataset=parseURI(ARGV.shift)
+  # Relative URI?
+  graph=parseURI(ARGV.shift)
+  file=""
+  if requiredFile
+  then
+    file = ARGV.shift if requiredFile
+    if ! File.exist?(file)
+      warn_exit "No such file: "+file, 3
+    end
+    if File.directory?(file)
+      warn_exit "File is a directory: "+file, 3
+    end
+  end
+
+  case command
+  when "GET"
+    GET(dataset, graph)
+  when "HEAD"
+    HEAD(dataset, graph)
+  when "PUT"
+    PUT(dataset, graph, file)
+  when "DELETE"
+    DELETE(dataset, graph)
+  when "POST"
+    POST(dataset, graph, file)
+  else
+    warn_exit "Internal error: Unknown command: #{cmd}", 2
+  end
+  exit 0
+end
+
+## --------
+def string_or_file(arg)
+  return arg if ! arg.match(/^@/)
+  a=(arg[1..-1])
+  open(a, 'rb'){|f| f.read}
+end
+
+## -------- SPARQL Query
+
+## Choose method
+def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
+   if ! query_file.nil?
+    query = open(query_file, 'rb'){|f| f.read}
+  end
+  if forcePOST || query.length >= 2*1024 
+    SPARQL_query_POST(service, query, args2)
+  else
+    SPARQL_query_GET(service, query, args2)
+  end
+end
+
+## By GET
+
+def SPARQL_query_GET(service, query, args2)
+  args = { "query" => query }
+  args.merge!(args2)
+  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  action="#{service}?#{qs}"
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  get_worker(action, headers)
+end
+
+## By POST
+
+def SPARQL_query_POST(service, query, args2)
+  # DRY - body/no body for each of request and response.
+  post_params={ "query" => query }
+  post_params.merge!(args2)
+  uri = URI.parse(service)
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  execute_post_form_body(uri, headers, post_params)
+end
+
+def execute_post_form_body(uri, headers, post_params)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = qs.length.to_s
+  request.initialize_http_header(headers)
+  request.body = qs
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+# Usage: -v --help --file= --query=
+def cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
+      options[:file]=file
+    end
+    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
+            'Set the output argument') do |type|
+      options[:output]=type
+    end
+    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
+            'Set the accept header type') do |type|
+      options[:accept]=type
+    end
+    options[:verbose] = false
+    opts.on( '--post', 'Force use of POST' ) do
+      options[:post] = true
+    end
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
+    warn e
+    exit 1
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+  usePOST = options[:post]
+
+  service = options[:service]
+  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
+
+  # Query
+  query=nil
+  query_file=options[:file]
+  if query_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No query specified.',1
+    end
+  if query_file.nil?
+    query = ARGV.shift
+    if query.match(/^@/)
+      query_file = query[1..-1]
+      query = nil
+    end
+  end
+
+  # --output ==> output= (non-standard)
+  args={}
+  case options[:output]
+  when nil
+  when  "json","xml","text","csv","tsv"
+    args['output'] = options[:output]
+  when :json,:xml,:text,:csv,:tsv
+    args['output'] = options[:output].to_s
+  else
+    warn_exit "Unrecognized output type: "+options[:output],2
+  end
+
+  # --accept
+  # options[:accept]
+
+  print "SPARQL #{service}\n" if $verbose
+  #args={"output"=>"text"}
+  SPARQL_query(service, query, query_file, usePOST, args)
+  exit(0)
+end
+
+## -------- SPARQL Update
+
+# Update sent as a WWW form.
+def SPARQL_update_by_form(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  # args? encode?
+  body="update="+uri_escape(update)
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = body.length.to_s
+  uri = URI.parse(service)
+  execute_post_form(uri, headers, body)
+end
+
+# DRY - query form.
+def execute_post_form(uri, headers, body)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = body
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def SPARQL_update(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  headers[$hContentType] = $mtSparqlUpdate
+  uri = URI.parse(service)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = update
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def cmd_sparql_update(by_raw_post=true)
+  # Share with cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
+      options[:file]=file
+    end
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  service = options[:service]
+  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
+  
+  update=nil
+  update_file=options[:file]
+
+  if update_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No update specified.',1
+    end
+  if update_file.nil?
+    update = ARGV.shift
+    if update.match(/^@/)
+      update_file = update[1..-1]
+      update = nil
+    end
+  end
+  
+  print "SPARQL-Update #{service}\n" if $verbose
+  args={}
+
+  # Reads in the file :-(
+  if update.nil?
+  then
+    update = open(update_file, 'rb'){|f| f.read}
+  else
+    update = string_or_file(update)
+  end
+
+  if by_raw_post
+    SPARQL_update(service, update, args)
+  else
+    SPARQL_update_by_form(service, update, args)
+  end
+  exit(0)
+end
+
+## -------
+
+case $cmd
+when "s-http", "sparql-http", "soh"
+  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
+  cmd_soh
+when "s-get", "s-head", "s-put", "s-delete", "s-post"
+
+  case $cmd
+  when "s-get", "s-head", "s-delete"
+    $banner="#{$cmd} datasetURI graph"
+  when "s-put", "s-post"
+    $banner="#{$cmd} datasetURI graph file"
+  end
+  cmd2 = $cmd.sub(/^s-/, '').upcase
+  cmd_soh cmd2
+
+when "s-query", "sparql-query"
+  cmd_sparql_query
+when "s-update", "sparql-update"
+  cmd_sparql_update true
+when "s-update-form", "sparql-update-form"
+  cmd_sparql_update false
+else 
+  warn_exit "Unknown: "+$cmd, 1
+end


[07/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/bin/s-update-form
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/bin/s-update-form b/jena-fuseki2/jena-fuseki-dist/bin/s-update-form
new file mode 100755
index 0000000..0e3a807
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/bin/s-update-form
@@ -0,0 +1,707 @@
+#!/usr/bin/env ruby
+# -*- coding: 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.
+
+# SPARQL HTTP Update, client.
+
+require 'optparse'
+require 'net/http'
+require 'uri'
+require 'cgi'
+require 'pp'
+require 'ostruct'
+
+# ToDo
+#  Allow a choice of media type for GET
+#   --accept "content-type" (and abbreviations)
+#   --header "Add:this"
+#   --user, --password
+#  Basic authentication: request.basic_auth("username", "password")
+#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
+
+SOH_NAME="SOH"
+SOH_VERSION="0.0.0"
+
+$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
+
+# What about direct naming?
+
+# Names
+$mtTurtle           = 'text/turtle;charset=utf-8'
+$mtRDF              = 'application/rdf+xml'
+$mtText             = 'text/plain'
+$mtNQuads           = 'text/n-quads'
+$mtTriG             = 'application/trig'
+$mtSparqlResultsX   = 'application/sparql-results+xml'
+$mtSparqlResultsJ   = 'application/sparql-results+json'
+$mtAppJSON          = 'application/json'
+$mtAppXML           = 'application/xml'
+$mtSparqlResultsTSV = 'application/sparql-results+tsv'
+$mtSparqlResultsCSV = 'application/sparql-results+csv'
+$mtSparqlUpdate     = 'application/sparql-update'
+$mtWWWForm          = 'application/x-www-form-urlencoded'
+$mtSparqlQuery      = "application/sparql-query" ;
+
+# Global media type table.
+$fileMediaTypes = {}
+$fileMediaTypes['ttl']   = $mtTurtle
+$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
+$fileMediaTypes['nt']    = $mtText
+$fileMediaTypes['rdf']   = $mtRDF
+$fileMediaTypes['owl']   = $mtRDF
+$fileMediaTypes['nq']    = $mtNQuads
+$fileMediaTypes['trig']  = $mtTriG
+
+# Global charset : no entry means "don't set"
+$charsetUTF8      = 'utf-8'
+$charset = {}
+$charset[$mtTurtle]   = 'utf-8'
+$charset[$mtText]     = 'ascii'
+$charset[$mtTriG]     = 'utf-8'
+$charset[$mtNQuads]   = 'ascii'
+
+# Headers
+
+$hContentType         = 'Content-Type'
+# $hContentEncoding     = 'Content-Encoding'
+$hContentLength       = 'Content-Length'
+# $hContentLocation     = 'Content-Location'
+# $hContentRange        = 'Content-Range'
+
+$hAccept              = 'Accept'
+$hAcceptCharset       = 'Accept-Charset'
+$hAcceptEncoding      = 'Accept-Encoding'
+$hAcceptRanges        = 'Accept-Ranges' 
+
+$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
+$print_http = false
+
+# Default for GET
+# At least allow anythign (and hope!)
+$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
+# For SPARQL query
+$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
+
+# Accept any in case of trouble.
+$accept_rdf="#{$accept_rdf} , */*;q=0.1"
+$accept_results="#{$accept_results} , */*;q=0.1" 
+
+# The media type usually forces the charset.
+$accept_charset=nil
+
+## Who we are.
+## Two styles:
+##    s-query .....
+##    soh query .....
+
+$cmd = File.basename($0)
+if $cmd == 'soh'
+then
+  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
+end
+
+if ! $cmd.start_with?('s-') && $cmd != 'soh'
+  $cmd = 's-'+$cmd
+end
+
+## -------- 
+
+def GET(dataset, graph)
+  print "GET #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  get_worker(requestURI, headers)
+end
+
+def get_worker(requestURI, headers)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Get.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+def HEAD(dataset, graph)
+  print "HEAD #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Head.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def PUT(dataset, graph, file)
+  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Put)
+end
+
+def POST(dataset, graph, file)
+  print "POST #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Post)
+end
+
+def DELETE(dataset, graph)
+  print "DELETE #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Delete.new(uri.request_uri)
+  headers = {}
+  headers.merge!($headers)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def uri_escape(string)
+  CGI.escape(string)
+end
+
+def target(dataset, graph)
+  return dataset+"?default" if graph == "default"
+  return dataset+"?graph="+uri_escape(graph)
+end
+
+def send_body(dataset, graph, file, method)
+  mt = content_type(file)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hContentType] = mt
+  headers[$hContentLength] = File.size(file).to_s
+  ## p headers
+
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  
+  request = method.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  request.body_stream = File.open(file)
+  response_no_body(uri, request)
+end
+
+def response_no_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue Exception => e  
+    # puts e.message  
+    #puts e.backtrace.inspect  
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+  response = http.request(request)
+  print_http_response(response)
+  case response
+  when Net::HTTPSuccess, Net::HTTPRedirection
+    # OK
+  when Net::HTTPNotFound
+    warn_exit "404 Not found: #{uri}", 9
+    #print response.body
+  else
+    warn_exit "#{response.code} #{response.message} #{uri}", 9
+    # Unreachable
+      response.error!
+  end
+  # NO BODY IN RESPONSE
+end
+
+def response_print_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue => e  
+    #puts e.backtrace.inspect  
+    #print e.class
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+
+  # Add a blank line if headers were output.
+  print "\n" if $http_print ;
+
+  begin
+    response = http.request(request) { |res| 
+      print_http_response(res)
+      #puts res.code
+      res.read_body do |segment|
+        print segment
+      end
+    }
+    case response
+    when Net::HTTPSuccess, Net::HTTPRedirection
+      # OK
+    when Net::HTTPNotFound
+      warn_exit "404 Not found: #{uri}", 9
+      #print response.body
+    else
+      warn_exit "#{response.code}: #{uri}", 9
+      # Unreachable
+      response.error!
+    end
+  rescue EOFError => e
+    warn_exit "IO Error: "+e.message, 3
+  end
+end
+
+def print_http_request(uri, request)
+  return unless $print_http
+  #print "Request\n"
+  print request.method," ",uri, "\n"
+  print_headers("  ",request)
+end
+
+def print_http_response(response)
+  return unless $print_http
+  #print "Response\n"
+  print response.code, " ", response.message, "\n"
+  print_headers("  ",response)
+end
+
+def print_headers(marker, headers)
+  headers.each do |k,v| 
+    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
+    printf "%s%-20s %s\n",marker,k,v
+  end
+end
+
+def content_type(file)
+  file =~ /\.([^.]*)$/
+  ext = $1
+  mt = $fileMediaTypes[ext]
+  cs = $charset[mt]
+  mt = mt+';charset='+cs if ! cs.nil?
+  return mt
+end
+
+def charset(content_type)
+  return $charset[content_type]
+end
+
+def warn_exit(msg, rc)
+    warn msg
+    exit rc ;
+end
+
+def parseURI(uri_string)
+  begin
+    return URI.parse(uri_string).to_s
+  rescue URI::InvalidURIError => err
+    warn_exit "Bad URI: <#{uri_string}>", 2
+  end
+end
+
+## ---- Command
+
+def cmd_soh(command=nil)
+  ## Command line
+  options = {}
+  optparse = OptionParser.new do |opts|
+    # Set a banner, displayed at the top
+    # of the help screen.
+    case $cmd
+    when "s-http", "sparql-http", "soh"
+      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
+    when "s-get", "s-head", "s-delete"
+      banner="$cmd  datasetURI graph"
+    end
+
+    opts.banner = $banner
+    # Define the options, and what they do
+    
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    
+    options[:version] = false
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end
+    
+    # This displays the help screen, all programs are
+    # assumed to have this option.
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  if command.nil?
+    if ARGV.size == 0
+      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
+      exit 1
+    end
+    cmdPrint=ARGV.shift
+    command=cmdPrint.upcase
+  else
+    cmdPrint=command
+  end
+
+  case command
+  when "HEAD", "GET", "DELETE"
+    requiredFile=false
+  when "PUT", "POST"
+    requiredFile=true
+  when "QUERY"
+    cmd_sparql_query
+  when "UPDATE"
+    cmd_sparql_update
+  else
+    warn_exit "Unknown command: #{command}", 2
+  end
+
+  if requiredFile 
+  then
+    if ARGV.size != 3
+      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
+    end
+  else
+    if ARGV.size != 2
+      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
+    end
+  end
+
+  dataset=parseURI(ARGV.shift)
+  # Relative URI?
+  graph=parseURI(ARGV.shift)
+  file=""
+  if requiredFile
+  then
+    file = ARGV.shift if requiredFile
+    if ! File.exist?(file)
+      warn_exit "No such file: "+file, 3
+    end
+    if File.directory?(file)
+      warn_exit "File is a directory: "+file, 3
+    end
+  end
+
+  case command
+  when "GET"
+    GET(dataset, graph)
+  when "HEAD"
+    HEAD(dataset, graph)
+  when "PUT"
+    PUT(dataset, graph, file)
+  when "DELETE"
+    DELETE(dataset, graph)
+  when "POST"
+    POST(dataset, graph, file)
+  else
+    warn_exit "Internal error: Unknown command: #{cmd}", 2
+  end
+  exit 0
+end
+
+## --------
+def string_or_file(arg)
+  return arg if ! arg.match(/^@/)
+  a=(arg[1..-1])
+  open(a, 'rb'){|f| f.read}
+end
+
+## -------- SPARQL Query
+
+## Choose method
+def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
+   if ! query_file.nil?
+    query = open(query_file, 'rb'){|f| f.read}
+  end
+  if forcePOST || query.length >= 2*1024 
+    SPARQL_query_POST(service, query, args2)
+  else
+    SPARQL_query_GET(service, query, args2)
+  end
+end
+
+## By GET
+
+def SPARQL_query_GET(service, query, args2)
+  args = { "query" => query }
+  args.merge!(args2)
+  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  action="#{service}?#{qs}"
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  get_worker(action, headers)
+end
+
+## By POST
+
+def SPARQL_query_POST(service, query, args2)
+  # DRY - body/no body for each of request and response.
+  post_params={ "query" => query }
+  post_params.merge!(args2)
+  uri = URI.parse(service)
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  execute_post_form_body(uri, headers, post_params)
+end
+
+def execute_post_form_body(uri, headers, post_params)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = qs.length.to_s
+  request.initialize_http_header(headers)
+  request.body = qs
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+# Usage: -v --help --file= --query=
+def cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
+      options[:file]=file
+    end
+    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
+            'Set the output argument') do |type|
+      options[:output]=type
+    end
+    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
+            'Set the accept header type') do |type|
+      options[:accept]=type
+    end
+    options[:verbose] = false
+    opts.on( '--post', 'Force use of POST' ) do
+      options[:post] = true
+    end
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
+    warn e
+    exit 1
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+  usePOST = options[:post]
+
+  service = options[:service]
+  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
+
+  # Query
+  query=nil
+  query_file=options[:file]
+  if query_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No query specified.',1
+    end
+  if query_file.nil?
+    query = ARGV.shift
+    if query.match(/^@/)
+      query_file = query[1..-1]
+      query = nil
+    end
+  end
+
+  # --output ==> output= (non-standard)
+  args={}
+  case options[:output]
+  when nil
+  when  "json","xml","text","csv","tsv"
+    args['output'] = options[:output]
+  when :json,:xml,:text,:csv,:tsv
+    args['output'] = options[:output].to_s
+  else
+    warn_exit "Unrecognized output type: "+options[:output],2
+  end
+
+  # --accept
+  # options[:accept]
+
+  print "SPARQL #{service}\n" if $verbose
+  #args={"output"=>"text"}
+  SPARQL_query(service, query, query_file, usePOST, args)
+  exit(0)
+end
+
+## -------- SPARQL Update
+
+# Update sent as a WWW form.
+def SPARQL_update_by_form(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  # args? encode?
+  body="update="+uri_escape(update)
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = body.length.to_s
+  uri = URI.parse(service)
+  execute_post_form(uri, headers, body)
+end
+
+# DRY - query form.
+def execute_post_form(uri, headers, body)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = body
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def SPARQL_update(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  headers[$hContentType] = $mtSparqlUpdate
+  uri = URI.parse(service)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = update
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def cmd_sparql_update(by_raw_post=true)
+  # Share with cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
+      options[:file]=file
+    end
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  service = options[:service]
+  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
+  
+  update=nil
+  update_file=options[:file]
+
+  if update_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No update specified.',1
+    end
+  if update_file.nil?
+    update = ARGV.shift
+    if update.match(/^@/)
+      update_file = update[1..-1]
+      update = nil
+    end
+  end
+  
+  print "SPARQL-Update #{service}\n" if $verbose
+  args={}
+
+  # Reads in the file :-(
+  if update.nil?
+  then
+    update = open(update_file, 'rb'){|f| f.read}
+  else
+    update = string_or_file(update)
+  end
+
+  if by_raw_post
+    SPARQL_update(service, update, args)
+  else
+    SPARQL_update_by_form(service, update, args)
+  end
+  exit(0)
+end
+
+## -------
+
+case $cmd
+when "s-http", "sparql-http", "soh"
+  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
+  cmd_soh
+when "s-get", "s-head", "s-put", "s-delete", "s-post"
+
+  case $cmd
+  when "s-get", "s-head", "s-delete"
+    $banner="#{$cmd} datasetURI graph"
+  when "s-put", "s-post"
+    $banner="#{$cmd} datasetURI graph file"
+  end
+  cmd2 = $cmd.sub(/^s-/, '').upcase
+  cmd_soh cmd2
+
+when "s-query", "sparql-query"
+  cmd_sparql_query
+when "s-update", "sparql-update"
+  cmd_sparql_update true
+when "s-update-form", "sparql-update-form"
+  cmd_sparql_update false
+else 
+  warn_exit "Unknown: "+$cmd, 1
+end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/bin/soh
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/bin/soh b/jena-fuseki2/jena-fuseki-dist/bin/soh
new file mode 100755
index 0000000..0e3a807
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/bin/soh
@@ -0,0 +1,707 @@
+#!/usr/bin/env ruby
+# -*- coding: 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.
+
+# SPARQL HTTP Update, client.
+
+require 'optparse'
+require 'net/http'
+require 'uri'
+require 'cgi'
+require 'pp'
+require 'ostruct'
+
+# ToDo
+#  Allow a choice of media type for GET
+#   --accept "content-type" (and abbreviations)
+#   --header "Add:this"
+#   --user, --password
+#  Basic authentication: request.basic_auth("username", "password")
+#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
+
+SOH_NAME="SOH"
+SOH_VERSION="0.0.0"
+
+$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
+
+# What about direct naming?
+
+# Names
+$mtTurtle           = 'text/turtle;charset=utf-8'
+$mtRDF              = 'application/rdf+xml'
+$mtText             = 'text/plain'
+$mtNQuads           = 'text/n-quads'
+$mtTriG             = 'application/trig'
+$mtSparqlResultsX   = 'application/sparql-results+xml'
+$mtSparqlResultsJ   = 'application/sparql-results+json'
+$mtAppJSON          = 'application/json'
+$mtAppXML           = 'application/xml'
+$mtSparqlResultsTSV = 'application/sparql-results+tsv'
+$mtSparqlResultsCSV = 'application/sparql-results+csv'
+$mtSparqlUpdate     = 'application/sparql-update'
+$mtWWWForm          = 'application/x-www-form-urlencoded'
+$mtSparqlQuery      = "application/sparql-query" ;
+
+# Global media type table.
+$fileMediaTypes = {}
+$fileMediaTypes['ttl']   = $mtTurtle
+$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
+$fileMediaTypes['nt']    = $mtText
+$fileMediaTypes['rdf']   = $mtRDF
+$fileMediaTypes['owl']   = $mtRDF
+$fileMediaTypes['nq']    = $mtNQuads
+$fileMediaTypes['trig']  = $mtTriG
+
+# Global charset : no entry means "don't set"
+$charsetUTF8      = 'utf-8'
+$charset = {}
+$charset[$mtTurtle]   = 'utf-8'
+$charset[$mtText]     = 'ascii'
+$charset[$mtTriG]     = 'utf-8'
+$charset[$mtNQuads]   = 'ascii'
+
+# Headers
+
+$hContentType         = 'Content-Type'
+# $hContentEncoding     = 'Content-Encoding'
+$hContentLength       = 'Content-Length'
+# $hContentLocation     = 'Content-Location'
+# $hContentRange        = 'Content-Range'
+
+$hAccept              = 'Accept'
+$hAcceptCharset       = 'Accept-Charset'
+$hAcceptEncoding      = 'Accept-Encoding'
+$hAcceptRanges        = 'Accept-Ranges' 
+
+$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
+$print_http = false
+
+# Default for GET
+# At least allow anythign (and hope!)
+$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
+# For SPARQL query
+$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
+
+# Accept any in case of trouble.
+$accept_rdf="#{$accept_rdf} , */*;q=0.1"
+$accept_results="#{$accept_results} , */*;q=0.1" 
+
+# The media type usually forces the charset.
+$accept_charset=nil
+
+## Who we are.
+## Two styles:
+##    s-query .....
+##    soh query .....
+
+$cmd = File.basename($0)
+if $cmd == 'soh'
+then
+  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
+end
+
+if ! $cmd.start_with?('s-') && $cmd != 'soh'
+  $cmd = 's-'+$cmd
+end
+
+## -------- 
+
+def GET(dataset, graph)
+  print "GET #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  get_worker(requestURI, headers)
+end
+
+def get_worker(requestURI, headers)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Get.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+def HEAD(dataset, graph)
+  print "HEAD #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Head.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def PUT(dataset, graph, file)
+  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Put)
+end
+
+def POST(dataset, graph, file)
+  print "POST #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Post)
+end
+
+def DELETE(dataset, graph)
+  print "DELETE #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Delete.new(uri.request_uri)
+  headers = {}
+  headers.merge!($headers)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def uri_escape(string)
+  CGI.escape(string)
+end
+
+def target(dataset, graph)
+  return dataset+"?default" if graph == "default"
+  return dataset+"?graph="+uri_escape(graph)
+end
+
+def send_body(dataset, graph, file, method)
+  mt = content_type(file)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hContentType] = mt
+  headers[$hContentLength] = File.size(file).to_s
+  ## p headers
+
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  
+  request = method.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  request.body_stream = File.open(file)
+  response_no_body(uri, request)
+end
+
+def response_no_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue Exception => e  
+    # puts e.message  
+    #puts e.backtrace.inspect  
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+  response = http.request(request)
+  print_http_response(response)
+  case response
+  when Net::HTTPSuccess, Net::HTTPRedirection
+    # OK
+  when Net::HTTPNotFound
+    warn_exit "404 Not found: #{uri}", 9
+    #print response.body
+  else
+    warn_exit "#{response.code} #{response.message} #{uri}", 9
+    # Unreachable
+      response.error!
+  end
+  # NO BODY IN RESPONSE
+end
+
+def response_print_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue => e  
+    #puts e.backtrace.inspect  
+    #print e.class
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+
+  # Add a blank line if headers were output.
+  print "\n" if $http_print ;
+
+  begin
+    response = http.request(request) { |res| 
+      print_http_response(res)
+      #puts res.code
+      res.read_body do |segment|
+        print segment
+      end
+    }
+    case response
+    when Net::HTTPSuccess, Net::HTTPRedirection
+      # OK
+    when Net::HTTPNotFound
+      warn_exit "404 Not found: #{uri}", 9
+      #print response.body
+    else
+      warn_exit "#{response.code}: #{uri}", 9
+      # Unreachable
+      response.error!
+    end
+  rescue EOFError => e
+    warn_exit "IO Error: "+e.message, 3
+  end
+end
+
+def print_http_request(uri, request)
+  return unless $print_http
+  #print "Request\n"
+  print request.method," ",uri, "\n"
+  print_headers("  ",request)
+end
+
+def print_http_response(response)
+  return unless $print_http
+  #print "Response\n"
+  print response.code, " ", response.message, "\n"
+  print_headers("  ",response)
+end
+
+def print_headers(marker, headers)
+  headers.each do |k,v| 
+    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
+    printf "%s%-20s %s\n",marker,k,v
+  end
+end
+
+def content_type(file)
+  file =~ /\.([^.]*)$/
+  ext = $1
+  mt = $fileMediaTypes[ext]
+  cs = $charset[mt]
+  mt = mt+';charset='+cs if ! cs.nil?
+  return mt
+end
+
+def charset(content_type)
+  return $charset[content_type]
+end
+
+def warn_exit(msg, rc)
+    warn msg
+    exit rc ;
+end
+
+def parseURI(uri_string)
+  begin
+    return URI.parse(uri_string).to_s
+  rescue URI::InvalidURIError => err
+    warn_exit "Bad URI: <#{uri_string}>", 2
+  end
+end
+
+## ---- Command
+
+def cmd_soh(command=nil)
+  ## Command line
+  options = {}
+  optparse = OptionParser.new do |opts|
+    # Set a banner, displayed at the top
+    # of the help screen.
+    case $cmd
+    when "s-http", "sparql-http", "soh"
+      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
+    when "s-get", "s-head", "s-delete"
+      banner="$cmd  datasetURI graph"
+    end
+
+    opts.banner = $banner
+    # Define the options, and what they do
+    
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    
+    options[:version] = false
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end
+    
+    # This displays the help screen, all programs are
+    # assumed to have this option.
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  if command.nil?
+    if ARGV.size == 0
+      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
+      exit 1
+    end
+    cmdPrint=ARGV.shift
+    command=cmdPrint.upcase
+  else
+    cmdPrint=command
+  end
+
+  case command
+  when "HEAD", "GET", "DELETE"
+    requiredFile=false
+  when "PUT", "POST"
+    requiredFile=true
+  when "QUERY"
+    cmd_sparql_query
+  when "UPDATE"
+    cmd_sparql_update
+  else
+    warn_exit "Unknown command: #{command}", 2
+  end
+
+  if requiredFile 
+  then
+    if ARGV.size != 3
+      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
+    end
+  else
+    if ARGV.size != 2
+      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
+    end
+  end
+
+  dataset=parseURI(ARGV.shift)
+  # Relative URI?
+  graph=parseURI(ARGV.shift)
+  file=""
+  if requiredFile
+  then
+    file = ARGV.shift if requiredFile
+    if ! File.exist?(file)
+      warn_exit "No such file: "+file, 3
+    end
+    if File.directory?(file)
+      warn_exit "File is a directory: "+file, 3
+    end
+  end
+
+  case command
+  when "GET"
+    GET(dataset, graph)
+  when "HEAD"
+    HEAD(dataset, graph)
+  when "PUT"
+    PUT(dataset, graph, file)
+  when "DELETE"
+    DELETE(dataset, graph)
+  when "POST"
+    POST(dataset, graph, file)
+  else
+    warn_exit "Internal error: Unknown command: #{cmd}", 2
+  end
+  exit 0
+end
+
+## --------
+def string_or_file(arg)
+  return arg if ! arg.match(/^@/)
+  a=(arg[1..-1])
+  open(a, 'rb'){|f| f.read}
+end
+
+## -------- SPARQL Query
+
+## Choose method
+def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
+   if ! query_file.nil?
+    query = open(query_file, 'rb'){|f| f.read}
+  end
+  if forcePOST || query.length >= 2*1024 
+    SPARQL_query_POST(service, query, args2)
+  else
+    SPARQL_query_GET(service, query, args2)
+  end
+end
+
+## By GET
+
+def SPARQL_query_GET(service, query, args2)
+  args = { "query" => query }
+  args.merge!(args2)
+  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  action="#{service}?#{qs}"
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  get_worker(action, headers)
+end
+
+## By POST
+
+def SPARQL_query_POST(service, query, args2)
+  # DRY - body/no body for each of request and response.
+  post_params={ "query" => query }
+  post_params.merge!(args2)
+  uri = URI.parse(service)
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  execute_post_form_body(uri, headers, post_params)
+end
+
+def execute_post_form_body(uri, headers, post_params)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = qs.length.to_s
+  request.initialize_http_header(headers)
+  request.body = qs
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+# Usage: -v --help --file= --query=
+def cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
+      options[:file]=file
+    end
+    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
+            'Set the output argument') do |type|
+      options[:output]=type
+    end
+    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
+            'Set the accept header type') do |type|
+      options[:accept]=type
+    end
+    options[:verbose] = false
+    opts.on( '--post', 'Force use of POST' ) do
+      options[:post] = true
+    end
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
+    warn e
+    exit 1
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+  usePOST = options[:post]
+
+  service = options[:service]
+  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
+
+  # Query
+  query=nil
+  query_file=options[:file]
+  if query_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No query specified.',1
+    end
+  if query_file.nil?
+    query = ARGV.shift
+    if query.match(/^@/)
+      query_file = query[1..-1]
+      query = nil
+    end
+  end
+
+  # --output ==> output= (non-standard)
+  args={}
+  case options[:output]
+  when nil
+  when  "json","xml","text","csv","tsv"
+    args['output'] = options[:output]
+  when :json,:xml,:text,:csv,:tsv
+    args['output'] = options[:output].to_s
+  else
+    warn_exit "Unrecognized output type: "+options[:output],2
+  end
+
+  # --accept
+  # options[:accept]
+
+  print "SPARQL #{service}\n" if $verbose
+  #args={"output"=>"text"}
+  SPARQL_query(service, query, query_file, usePOST, args)
+  exit(0)
+end
+
+## -------- SPARQL Update
+
+# Update sent as a WWW form.
+def SPARQL_update_by_form(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  # args? encode?
+  body="update="+uri_escape(update)
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = body.length.to_s
+  uri = URI.parse(service)
+  execute_post_form(uri, headers, body)
+end
+
+# DRY - query form.
+def execute_post_form(uri, headers, body)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = body
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def SPARQL_update(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  headers[$hContentType] = $mtSparqlUpdate
+  uri = URI.parse(service)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = update
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def cmd_sparql_update(by_raw_post=true)
+  # Share with cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
+      options[:file]=file
+    end
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  service = options[:service]
+  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
+  
+  update=nil
+  update_file=options[:file]
+
+  if update_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No update specified.',1
+    end
+  if update_file.nil?
+    update = ARGV.shift
+    if update.match(/^@/)
+      update_file = update[1..-1]
+      update = nil
+    end
+  end
+  
+  print "SPARQL-Update #{service}\n" if $verbose
+  args={}
+
+  # Reads in the file :-(
+  if update.nil?
+  then
+    update = open(update_file, 'rb'){|f| f.read}
+  else
+    update = string_or_file(update)
+  end
+
+  if by_raw_post
+    SPARQL_update(service, update, args)
+  else
+    SPARQL_update_by_form(service, update, args)
+  end
+  exit(0)
+end
+
+## -------
+
+case $cmd
+when "s-http", "sparql-http", "soh"
+  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
+  cmd_soh
+when "s-get", "s-head", "s-put", "s-delete", "s-post"
+
+  case $cmd
+  when "s-get", "s-head", "s-delete"
+    $banner="#{$cmd} datasetURI graph"
+  when "s-put", "s-post"
+    $banner="#{$cmd} datasetURI graph file"
+  end
+  cmd2 = $cmd.sub(/^s-/, '').upcase
+  cmd_soh cmd2
+
+when "s-query", "sparql-query"
+  cmd_sparql_query
+when "s-update", "sparql-update"
+  cmd_sparql_update true
+when "s-update-form", "sparql-update-form"
+  cmd_sparql_update false
+else 
+  warn_exit "Unknown: "+$cmd, 1
+end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/dist/ABOUT
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/dist/ABOUT b/jena-fuseki2/jena-fuseki-dist/dist/ABOUT
new file mode 100644
index 0000000..cee2ca2
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/dist/ABOUT
@@ -0,0 +1 @@
+This directory holds the material needed for inclusion in the Fuseki distribution.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/dist/LICENSE
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/dist/LICENSE b/jena-fuseki2/jena-fuseki-dist/dist/LICENSE
new file mode 100644
index 0000000..10474ab
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/dist/LICENSE
@@ -0,0 +1,617 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+- - - - - - - - - - - - - - - - - - - - - - - 
+
+  (c) Copyright 2003, Plugged In Software 
+
+  All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. The name of the author may not be used to endorse or promote products
+    derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+- - - - - - - - - - - - - - - - - - - - - - - 
+
+http://www.slf4j.org/license.html
+
+ Copyright (c) 2004-2011 QOS.ch
+ All rights reserved.
+
+ Permission is hereby granted, free  of charge, to any person obtaining
+ a  copy  of this  software  and  associated  documentation files  (the
+ "Software"), to  deal in  the Software without  restriction, including
+ without limitation  the rights to  use, copy, modify,  merge, publish,
+ distribute,  sublicense, and/or sell  copies of  the Software,  and to
+ permit persons to whom the Software  is furnished to do so, subject to
+ the following conditions:
+ 
+ The  above  copyright  notice  and  this permission  notice  shall  be
+ included in all copies or substantial portions of the Software.
+ 
+ THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+ EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+ MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+- - - - - - - - - - - - - - - - - - - - - - - 
+
+==============================================================
+ Jetty Web Container
+ Copyright 1995-2012 Mort Bay Consulting Pty Ltd.
+==============================================================
+
+The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd
+unless otherwise noted.
+
+Jetty is dual licensed under both
+
+  * The Apache 2.0 License
+    http://www.apache.org/licenses/LICENSE-2.0.html
+
+      and
+
+  * The Eclipse Public 1.0 License
+    http://www.eclipse.org/legal/epl-v10.html
+
+Jetty may be distributed under either license.
+
+The javax.servlet package used was sourced from the Apache
+Software Foundation and is distributed under the apache 2.0
+license.
+
+The UnixCrypt.java code implements the one way cryptography used by
+Unix systems for simple password protection.  Copyright 1996 Aki Yoshida,
+modified April 2001  by Iris Van den Broeke, Daniel Deville.
+Permission to use, copy, modify and distribute UnixCrypt
+for non-commercial or commercial purposes and without fee is
+granted provided that the copyright notice appears in all copies.
+
+- - - - - - - - - - - - - - - - - - - - - - - 
+
+This product bundles "Bootstrap", which is available under an
+MIT license.  See: https://github.com/twbs/bootstrap/blob/master/LICENSE
+
+This product bundles "codemirror", which is available under an
+MIT license.  See http://codemirror.net/LICENSE
+
+This product bundles "jquery", which is available under an
+MIT license.  See https://jquery.org/license/
+
+This product bundles "jquery.form", which is available under an
+MIT license.  See http://malsup.github.io/mit-license.txt
+
+This product bundles "jquery.xdomainrequest", which is available under an
+MIT license.  See https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest/blob/master/LICENSE.txt
+
+This product bundles "backbone.js", which is available under an
+MIT license.  See https://github.com/jashkenas/backbone/blob/master/LICENSE
+
+This product bundles "backbone.marionette", which is available under an
+MIT license. See http://mutedsolutions.mit-license.org/
+   "backbone.marionette" includes "Backbone.BabySitter" and 
+   "Backbone.Wreqr" also available under the same MIT license.
+
+This product bundles "html5shiv", which is available under an
+MIT license.  See https://code.google.com/p/html5shiv/
+
+This product bundles "RequireJS", which is available under an
+MIT license. 
+https://github.com/jrburke/requirejs/blob/master/LICENSE
+  "RequireJS" is also available with a "30clause BSD license"
+
+This product bundles "Respond", which is available under an
+MIT license. See https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
+
+This product bundles "sprintf.js", which is available under a
+"3 clause BSD" license. 
+  https://github.com/alexei/sprintf.js/blob/master/LICENSE
+
+This product bundles "underscore", which is available under an
+MIT license.  See https://github.com/jashkenas/underscore/blob/master/LICENSE
+
+This product bundles "FontAwesome"
+  "Font Awesome by Dave Gandy - http://fontawesome.io"
+The font is available under an  SIL Open Font License 1.1
+and the CSS files under an MIT License.
+See http://fontawesome.io/license/
+
+This product bundles "jQuery File Upload Plugin" 
+which is available under an MIT License.
+See https://github.com/blueimp/jQuery-File-Upload
+
+This product bundles "Bootstrap-select"
+which is available under an MIT License.
+See https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE
+
+This product bundles "pivot.js"
+which is available under a BSD 3-clause style license.
+https://github.com/rwjblue/pivot.js/blob/master/LICENSE
+
+This product bundles "YASEQE - Yet Another Sparql Query Editor"
+which is available under an MIT License.
+See http://yasqe.yasgui.org/license.txt
+
+This product bundles "YASR - Yet Another Sparql Resultset GUI"
+which is available under an MIT License.
+See http://yasr.yasgui.org/license.txt
+
+- - - - - - - - - - - - - - - - - - - - - - - 
+
+From Apache HttpComponents Client
+
+This project contains annotations derived from JCIP-ANNOTATIONS
+Copyright (c) 2005 Brian Goetz and Tim Peierls.
+See http://www.jcip.net and the Creative Commons Attribution License 
+(http://creativecommons.org/licenses/by/2.5)
+
+- - - - - - - - - - - - - - - - - - - - - - - 
+
+From Apache Lucene
+
+Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was
+derived from unicode conversion examples available at
+http://www.unicode.org/Public/PROGRAMS/CVTUTF.  Here is the copyright
+from those sources:
+
+/*
+ * Copyright 2001-2004 Unicode, Inc.
+ * 
+ * Disclaimer
+ * 
+ * This source code is provided as is by Unicode, Inc. No claims are
+ * made as to fitness for any particular purpose. No warranties of any
+ * kind are expressed or implied. The recipient agrees to determine
+ * applicability of information provided. If this file has been
+ * purchased on magnetic or optical media from Unicode, Inc., the
+ * sole remedy for any claim will be exchange of defective media
+ * within 90 days of receipt.
+ * 
+ * Limitations on Rights to Redistribute This Code
+ * 
+ * Unicode, Inc. hereby grants the right to freely use the information
+ * supplied in this file in the creation of products supporting the
+ * Unicode Standard, and to make copies of this file in any form
+ * for internal or external distribution as long as this notice
+ * remains attached.
+ */
+
+
+Some code in core/src/java/org/apache/lucene/util/ArrayUtil.java was
+derived from Python 2.4.2 sources available at
+http://www.python.org. Full license is here:
+
+  http://www.python.org/download/releases/2.4.2/license/
+
+Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was
+derived from Python 3.1.2 sources available at
+http://www.python.org. Full license is here:
+
+  http://www.python.org/download/releases/3.1.2/license/
+
+Some code in core/src/java/org/apache/lucene/util/automaton was
+derived from Brics automaton sources available at
+www.brics.dk/automaton/. Here is the copyright from those sources:
+
+/*
+ * Copyright (c) 2001-2009 Anders Moeller
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ 
+The levenshtein automata tables in core/src/java/org/apache/lucene/util/automaton 
+were automatically generated with the moman/finenight FSA package.
+Here is the copyright for those sources:
+
+# Copyright (c) 2010, Jean-Philippe Barrette-LaPierre, <jp...@rrette.com>
+#
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation
+# files (the "Software"), to deal in the Software without
+# restriction, including without limitation the rights to use,
+# copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following
+# conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was
+derived from ICU (http://www.icu-project.org)
+The full license is available here: 
+  http://source.icu-project.org/repos/icu/icu/trunk/license.html
+
+/*
+ * Copyright (C) 1999-2010, International Business Machines
+ * Corporation and others.  All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy 
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights 
+ * to use, copy, modify, merge, publish, distribute, and/or sell copies of the 
+ * Software, and to permit persons to whom the Software is furnished to do so, 
+ * provided that the above copyright notice(s) and this permission notice appear 
+ * in all copies of the Software and that both the above copyright notice(s) and
+ * this permission notice appear in supporting documentation.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. 
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE 
+ * LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR 
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not 
+ * be used in advertising or otherwise to promote the sale, use or other 
+ * dealings in this Software without prior written authorization of the 
+ * copyright holder.
+ */
+ 
+The following license applies to the Snowball stemmers:
+
+Copyright (c) 2001, Dr Martin Porter
+Copyright (c) 2002, Richard Boulton
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+    * this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+    * notice, this list of conditions and the following disclaimer in the
+    * documentation and/or other materials provided with the distribution.
+    * Neither the name of the copyright holders nor the names of its contributors
+    * may be used to endorse or promote products derived from this software
+    * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The following license applies to the KStemmer:
+
+Copyright © 2003,
+Center for Intelligent Information Retrieval,
+University of Massachusetts, Amherst.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. The names "Center for Intelligent Information Retrieval" and
+"University of Massachusetts" must not be used to endorse or promote products
+derived from this software without prior written permission. To obtain
+permission, contact info@ciir.cs.umass.edu.
+
+THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF MASSACHUSETTS AND OTHER CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+The following license applies to the Morfologik project:
+
+Copyright (c) 2006 Dawid Weiss
+Copyright (c) 2007-2011 Dawid Weiss, Marcin Miłkowski
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, 
+    this list of conditions and the following disclaimer.
+    
+    * Redistributions in binary form must reproduce the above copyright notice, 
+    this list of conditions and the following disclaimer in the documentation 
+    and/or other materials provided with the distribution.
+    
+    * Neither the name of Morfologik nor the names of its contributors 
+    may be used to endorse or promote products derived from this software 
+    without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+---
+
+The dictionary comes from Morfologik project. Morfologik uses data from 
+Polish ispell/myspell dictionary hosted at http://www.sjp.pl/slownik/en/ and 
+is licenced on the terms of (inter alia) LGPL and Creative Commons 
+ShareAlike. The part-of-speech tags were added in Morfologik project and
+are not found in the data from sjp.pl. The tagset is similar to IPI PAN
+tagset.
+
+---
+
+The following license applies to the Morfeusz project,
+used by org.apache.lucene.analysis.morfologik.
+
+BSD-licensed dictionary of Polish (SGJP)
+http://sgjp.pl/morfeusz/
+
+Copyright © 2011 Zygmunt Saloni, Włodzimierz Gruszczyński, 
+	    	 Marcin Woliński, Robert Wołosz
+
+All rights reserved.
+
+Redistribution and  use in  source and binary  forms, with  or without
+modification, are permitted provided that the following conditions are
+met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS “AS IS” AND ANY EXPRESS
+OR  IMPLIED WARRANTIES,  INCLUDING, BUT  NOT LIMITED  TO,  THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT  SHALL COPYRIGHT  HOLDERS OR  CONTRIBUTORS BE
+LIABLE FOR  ANY DIRECT,  INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES  (INCLUDING, BUT NOT LIMITED  TO, PROCUREMENT OF
+SUBSTITUTE  GOODS OR  SERVICES;  LOSS  OF USE,  DATA,  OR PROFITS;  OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF LIABILITY,
+WHETHER IN  CONTRACT, STRICT LIABILITY, OR  TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/dist/NOTICE
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/dist/NOTICE b/jena-fuseki2/jena-fuseki-dist/dist/NOTICE
new file mode 100644
index 0000000..a840c0b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/dist/NOTICE
@@ -0,0 +1,216 @@
+Apache Jena - module Fuseki
+Copyright 2011-2013 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of this software were originally based on the following:
+  - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+  - Copyright 2010, 2011 Epimorphics Ltd.
+  - Copyright 2010, 2011 Talis Systems Ltd.
+These have been licensed to the Apache Software Foundation under a software grant.
+
+- - - - - - - - - - - - - - - - - - - - - - - 
+
+slf4j:
+ Copyright (c) 2004-2011 QOS.ch
+ All rights reserved.
+
+- - - - - - - - - - - - - - - - - - - - - - -
+
+(c) Copyright 2003, Plugged In Software 
+This product includes software developed by
+PluggedIn Software under a BSD license.
+
+- - - - - - - - - - - - - - - - - - - - - - -
+
+ Jetty Web Container
+ Copyright 1995-2012 Mort Bay Consulting Pty Ltd.
+
+under the Apache 2.0 License. 
+
+The Jetty Web Container includes:
+
+UnixCrypt.java
+Copyright 1996 Aki Yoshida,
+modified April 2001  by Iris Van den Broeke, Daniel Deville.
+
+- - - - - - - - - - - - - - - - - - - - - - -
+
+From Apache HttpComponents Client:
+
+This project contains annotations derived from JCIP-ANNOTATIONS
+Copyright (c) 2005 Brian Goetz and Tim Peierls. See http://www.jcip.net
+
+- - - - - - - - - - - - - - - - - - - - - - -
+
+  Apache Xerces Java
+   Copyright 1999-2013 The Apache Software Foundation
+
+   This product includes software developed at
+   The Apache Software Foundation (http://www.apache.org/).
+
+   Portions of this software were originally based on the following:
+     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
+     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
+     - voluntary contributions made by Paul Eng on behalf of the 
+       Apache Software Foundation that were originally developed at iClick, Inc.,
+       software copyright (c) 1999.
+
+- - - - - - - - - - - - - - - - - - - - - - -
+
+From Apache Lucene:
+
+ICU4J, (under analysis/icu) is licensed under an MIT styles license
+and Copyright (c) 1995-2008 International Business Machines Corporation and others
+
+Some data files (under analysis/icu/src/data) are derived from Unicode data such
+as the Unicode Character Database. See http://unicode.org/copyright.html for more
+details.
+
+Brics Automaton (under core/src/java/org/apache/lucene/util/automaton) is 
+BSD-licensed, created by Anders Møller. See http://www.brics.dk/automaton/
+
+The levenshtein automata tables (under core/src/java/org/apache/lucene/util/automaton) were
+automatically generated with the moman/finenight FSA library, created by
+Jean-Philippe Barrette-LaPierre. This library is available under an MIT license,
+see http://sites.google.com/site/rrettesite/moman and 
+http://bitbucket.org/jpbarrette/moman/overview/
+
+This product includes code (JaspellTernarySearchTrie) from Java Spelling 
+Checking Package (jaspell): http://jaspell.sourceforge.net/
+License: The BSD License (http://www.opensource.org/licenses/bsd-license.php)
+
+The snowball stemmers in
+  analysis/common/src/java/net/sf/snowball
+were developed by Martin Porter and Richard Boulton.
+The snowball stopword lists in
+  analysis/common/src/resources/org/apache/lucene/analysis/snowball
+were developed by Martin Porter and Richard Boulton.
+The full snowball package is available from
+  http://snowball.tartarus.org/
+
+The KStem stemmer in
+  analysis/common/src/org/apache/lucene/analysis/en
+was developed by Bob Krovetz and Sergio Guzman-Lara (CIIR-UMass Amherst)
+under the BSD-license.
+
+The Arabic,Persian,Romanian,Bulgarian, and Hindi analyzers (common) come with a default
+stopword list that is BSD-licensed created by Jacques Savoy.
+See http://members.unine.ch/jacques.savoy/clef/index.html.
+
+The German,Spanish,Finnish,French,Hungarian,Italian,Portuguese,Russian and Swedish light stemmers
+(common) are based on BSD-licensed reference implementations created by Jacques Savoy and
+Ljiljana Dolamic.
+
+The Stempel analyzer (stempel) includes BSD-licensed software developed 
+by the Egothor project http://egothor.sf.net/, created by Leo Galambos, Martin Kvapil,
+and Edmond Nolan.
+
+The Polish analyzer (stempel) comes with a default
+stopword list that is BSD-licensed created by the Carrot2 project. The file resides
+in stempel/src/resources/org/apache/lucene/analysis/pl/stopwords.txt.
+See http://project.carrot2.org/license.html.
+
+The SmartChineseAnalyzer source code (smartcn) was
+provided by Xiaoping Gao and copyright 2009 by www.imdict.net.
+
+WordBreakTestUnicode_*.java (under modules/analysis/common/src/test/) 
+is derived from Unicode data such as the Unicode Character Database. 
+See http://unicode.org/copyright.html for more details.
+
+The Morfologik analyzer (morfologik) includes BSD-licensed software
+developed by Dawid Weiss and Marcin Miłkowski (http://morfologik.blogspot.com/).
+
+Morfologik uses data from Polish ispell/myspell dictionary
+(http://www.sjp.pl/slownik/en/) licenced on the terms of (inter alia)
+LGPL and Creative Commons ShareAlike.
+
+Morfologic includes data from BSD-licensed dictionary of Polish (SGJP)
+(http://sgjp.pl/morfeusz/)
+
+Servlet-api.jar and javax.servlet-*.jar are under the CDDL license, the original
+source code for this can be found at http://www.eclipse.org/jetty/downloads.php
+
+===========================================================================
+Kuromoji Japanese Morphological Analyzer - Apache Lucene Integration
+===========================================================================
+
+This software includes a binary and/or source version of data from
+
+  mecab-ipadic-2.7.0-20070801
+
+which can be obtained from
+
+  http://atilika.com/releases/mecab-ipadic/mecab-ipadic-2.7.0-20070801.tar.gz
+
+or
+
+  http://jaist.dl.sourceforge.net/project/mecab/mecab-ipadic/2.7.0-20070801/mecab-ipadic-2.7.0-20070801.tar.gz
+
+===========================================================================
+mecab-ipadic-2.7.0-20070801 Notice
+===========================================================================
+
+Nara Institute of Science and Technology (NAIST),
+the copyright holders, disclaims all warranties with regard to this
+software, including all implied warranties of merchantability and
+fitness, in no event shall NAIST be liable for
+any special, indirect or consequential damages or any damages
+whatsoever resulting from loss of use, data or profits, whether in an
+action of contract, negligence or other tortuous action, arising out
+of or in connection with the use or performance of this software.
+
+A large portion of the dictionary entries
+originate from ICOT Free Software.  The following conditions for ICOT
+Free Software applies to the current dictionary as well.
+
+Each User may also freely distribute the Program, whether in its
+original form or modified, to any third party or parties, PROVIDED
+that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear
+on, or be attached to, the Program, which is distributed substantially
+in the same form as set out herein and that such intended
+distribution, if actually made, will neither violate or otherwise
+contravene any of the laws and regulations of the countries having
+jurisdiction over the User or the intended distribution itself.
+
+NO WARRANTY
+
+The program was produced on an experimental basis in the course of the
+research and development conducted during the project and is provided
+to users as so produced on an experimental basis.  Accordingly, the
+program is provided without any warranty whatsoever, whether express,
+implied, statutory or otherwise.  The term "warranty" used herein
+includes, but is not limited to, any warranty of the quality,
+performance, merchantability and fitness for a particular purpose of
+the program and the nonexistence of any infringement or violation of
+any right of any third party.
+
+Each user of the program will agree and understand, and be deemed to
+have agreed and understood, that there is no warranty whatsoever for
+the program and, accordingly, the entire risk arising from or
+otherwise connected with the program is assumed by the user.
+
+Therefore, neither ICOT, the copyright holder, or any other
+organization that participated in or was otherwise related to the
+development of the program and their respective officials, directors,
+officers and other employees shall be held liable for any and all
+damages, including, without limitation, general, special, incidental
+and consequential damages, arising out of or otherwise in connection
+with the use or inability to use the program or any product, material
+or result produced or otherwise obtained by using the program,
+regardless of whether they have been advised of, or otherwise had
+knowledge of, the possibility of such damages at any time during the
+project or thereafter.  Each user will be deemed to have agreed to the
+foregoing by his or her commencement of use of the program.  The term
+"use" as used herein includes, but is not limited to, the use,
+modification, copying and distribution of the program and the
+production of secondary products from the program.
+
+In the case where the program, whether in its original form or
+modified, was distributed or delivered to or received by a user from
+any person, organization or entity other than ICOT, unless it makes or
+grants independently of ICOT any specific warranty to the user in
+writing, such person, organization or entity, will also be exempted
+from and not be held liable to the user for any such damages as noted
+above as far as the program is concerned.


[92/93] [abbrv] jena git commit: Merge branch 'master' into hadoop-rdf

Posted by rv...@apache.org.
Merge branch 'master' into hadoop-rdf


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

Branch: refs/heads/hadoop-rdf
Commit: e89032be1752455eaac9634eb274b8886e92b637
Parents: 6bb5d12 7e25656
Author: Rob Vesse <rv...@apache.org>
Authored: Tue Jan 13 15:39:19 2015 +0000
Committer: Rob Vesse <rv...@apache.org>
Committed: Tue Jan 13 15:39:19 2015 +0000

----------------------------------------------------------------------
 NOTICE                                          |     2 +-
 apache-jena/NOTICE                              |     2 +-
 jena-arq/NOTICE                                 |     2 +-
 .../org/apache/jena/riot/system/IRILib.java     |    54 +-
 jena-arq/src/main/resources/META-INF/NOTICE     |     2 +-
 jena-core/NOTICE                                |     2 +-
 jena-core/src/main/java/jena/rdfcat.java        |    61 +-
 jena-core/src/main/resources/META-INF/NOTICE    |     2 +-
 jena-csv/NOTICE                                 |     2 +-
 jena-csv/src/main/resources/META-INF/NOTICE     |     5 +
 jena-fuseki/NOTICE                              |     2 +-
 jena-fuseki/dist/NOTICE                         |     2 +-
 jena-fuseki/src/main/resources/META-INF/NOTICE  |     2 +-
 jena-fuseki2/NOTICE                             |     2 +-
 jena-fuseki2/jena-fuseki-core/pom.xml           |     2 +-
 .../jena/fuseki/build/DataServiceDesc.java      |     2 +-
 .../jena/fuseki/build/TemplateFunctions.java    |    34 +-
 .../org/apache/jena/fuseki/cmd/FusekiCmd.java   |     2 +
 .../apache/jena/fuseki/mgt/ActionDatasets.java  |     4 +-
 .../apache/jena/fuseki/server/FusekiEnv.java    |    78 +-
 .../apache/jena/fuseki/server/FusekiServer.java |     4 +-
 .../src/main/resources/META-INF/NOTICE          |     2 +-
 jena-fuseki2/jena-fuseki-dist/assembly-dist.xml |    27 +-
 jena-fuseki2/jena-fuseki-dist/dist/NOTICE       |     2 +-
 jena-fuseki2/jena-fuseki-dist/pom.xml           |     2 +-
 jena-fuseki2/jena-fuseki-server/pom.xml         |     2 +-
 jena-fuseki2/jena-fuseki-war/pom.xml            |     2 +-
 jena-fuseki2/pom.xml                            |     2 +-
 jena-iri/NOTICE                                 |     2 +-
 .../src/main/java/org/apache/jena/iri/IRI.java  |    16 +-
 .../org/apache/jena/iri/impl/AbsIRIImpl.java    |    43 +-
 jena-iri/src/main/resources/META-INF/NOTICE     |     2 +-
 .../java/org/apache/jena/iri/TestExample.java   |     9 +-
 .../org/apache/jena/iri/TestMoreExamples.java   |     7 +-
 .../org/apache/jena/iri/test/Additional.java    |    61 -
 .../org/apache/jena/iri/test/MoreTests.java     |    98 -
 .../org/apache/jena/iri/test/TestCreator.java   |   254 -
 .../apache/jena/iri/test/TestErrorMessages.java |   144 -
 .../org/apache/jena/iri/test/TestExample.java   |   279 -
 .../org/apache/jena/iri/test/TestMEIri.java     |    39 -
 .../apache/jena/iri/test/TestMERelativize.java  |    50 -
 .../org/apache/jena/iri/test/TestMEResolve.java |    42 -
 .../org/apache/jena/iri/test/TestMEResult.java  |    46 -
 .../apache/jena/iri/test/TestMoreExamples.java  |   264 -
 .../org/apache/jena/iri/test/TestPackage.java   |    36 -
 .../test/resources/org/apache/jena/iri/test.xml | 18422 ++++++++---------
 .../resources/org/apache/jena/iri/test/test.xml |  9217 ---------
 .../resources/org/apache/jena/iri/test/uris.xml |   463 -
 jena-jdbc/NOTICE                                |     2 +-
 jena-jdbc/jena-jdbc-core/NOTICE                 |     2 +-
 jena-jdbc/jena-jdbc-driver-bundle/NOTICE        |     2 +-
 jena-jdbc/jena-jdbc-driver-mem/NOTICE           |     2 +-
 jena-jdbc/jena-jdbc-driver-remote/NOTICE        |     2 +-
 jena-jdbc/jena-jdbc-driver-tdb/NOTICE           |     2 +-
 jena-parent/NOTICE                              |     2 +-
 jena-sdb/NOTICE                                 |     2 +-
 jena-sdb/dist/NOTICE                            |     2 +-
 jena-sdb/src/main/resources/META-INF/NOTICE     |     2 +-
 jena-security/NOTICE                            |     2 +-
 jena-spatial/NOTICE                             |     2 +-
 jena-spatial/src/main/resources/META-INF/NOTICE |     5 +
 jena-tdb/NOTICE                                 |     2 +-
 .../com/hp/hpl/jena/tdb/index/SetupIndex.java   |   173 +
 .../java/com/hp/hpl/jena/tdb/sys/SetupTDB.java  |   162 +-
 jena-tdb/src/main/java/tdb/CmdRewriteIndex.java |     4 +-
 jena-tdb/src/main/resources/META-INF/NOTICE     |     2 +-
 .../jena/tdb/base/file/TestLocationLock.java    |    47 -
 .../jena/tdb/index/AbstractTestTupleIndex.java  |   271 -
 .../index/bplustree/TestBPlusTreeRewriter.java  |     4 +-
 .../com/hp/hpl/jena/tdb/store/TS_Store.java     |     1 +
 .../store/TestLocationLockStoreConnection.java  |    98 +
 .../tupletable/AbstractTestTupleIndex.java      |   271 +
 .../store/tupletable/TestTupleIndexRecord.java  |     1 -
 jena-text/NOTICE                                |     2 +-
 jena-text/src/main/resources/LICENSE            |   202 -
 jena-text/src/main/resources/META-INF/LICENSE   |   202 +
 jena-text/src/main/resources/META-INF/NOTICE    |     2 +-
 77 files changed, 10255 insertions(+), 21019 deletions(-)
----------------------------------------------------------------------



[32/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/file-upload.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/file-upload.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/file-upload.js
new file mode 100644
index 0000000..f16e544
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/file-upload.js
@@ -0,0 +1,225 @@
+/**
+ * This view presents a control to upload files to the current dataset, and a recently-uploaded
+ * log to track what has been done.
+ */
+
+define(
+  function( require ) {
+    var Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        sprintf = require( "sprintf" ),
+        fui = require( "app/fui" ),
+        fileUploadTemplate = require( "plugins/text!app/templates/file-upload.tpl" ),
+        UploadableFileView = require( "app/views/uploadable-file" );
+
+    var FileUploadView = Backbone.Marionette.CompositeView.extend( {
+      initialize: function(){
+        _.bindAll( this,
+                   "onUploadAdd", "onRemoveUpload", "onUploadAll",
+                   "onProgress", "onUploadDone", "onUploadFail",
+                   "onPerformUpload" );
+
+        fui.vent.on( "upload.remove", this.onRemoveUpload );
+        fui.vent.on( "upload.perform", this.onPerformUpload );
+      },
+
+      template: _.template( fileUploadTemplate ),
+
+      el: "#file-upload",
+
+      itemViewContainer: "ul",
+      itemView: UploadableFileView,
+      collection: new Backbone.Collection(),
+
+      ui: {
+        fileUpload: '#fileuploadForm',
+        graphLabel: '.graph-label input'
+      },
+
+      events: {
+        "click .action-upload-all": "onUploadAll"
+      },
+
+      templateHelpers: {
+      },
+
+      onRender: function() {
+        // initialise the file upload widget
+        this.ui.fileUpload.fileupload( {
+          dataType: 'json',
+          add: this.onUploadAdd,
+          progress: this.onProgress
+        } );
+      },
+
+      /** User has added a file */
+      onUploadAdd: function( e, data ) {
+        var collection = this.collection;
+        var self = this;
+
+        _.each( data.files, function( file ) {
+          file.readableFileSize = self.readableFileSize( file );
+          collection.add( new Backbone.Model( {file: file} ) );
+        } );
+
+        this.enableUploadAll( true );
+      },
+
+      /** Return file size in bytes in a human-readable form */
+      readableFileSize: function( file ) {
+        var k = 1024;
+        var m = k * k;
+
+        if (file.size >= m) {
+          return sprintf( "%.1fmb", file.size / m );
+        }
+        else if (file.size >= k) {
+          return sprintf( "%.1fkb", file.size / k );
+        }
+        else {
+          return sprintf( "%d bytes", file.size );
+        }
+      },
+
+      /** User has requested to remove a selected upload */
+      onRemoveUpload: function( file ) {
+        this.collection.remove( file );
+        this.enableUploadAll( this.collection.size() > 0 )
+      },
+
+      /** User has requested to perform a selected upload */
+      onPerformUpload: function( model ) {
+        this.loadAll = false;
+        this.uploadFileFromModel( model );
+      },
+
+      /** Return the list of active files waiting for upload */
+      activeFiles: function() {
+        var activeModels = _.filter( this.collection.models, function( m ) {
+            return !m.completed;
+          } );
+
+        return _.map( activeModels,  function( m ) {
+            return m.get( "file" );
+          } );
+      },
+
+      /** User action to upload all active files */
+      onUploadAll: function( e ) {
+        if (e) {
+          e.preventDefault();
+        }
+
+        this.$el.find( ".file-description .action" ).attr( 'disabled', 'disabled' );
+        this.loadNextAvailableFile( true );
+      },
+
+      /** Load the next file in the sequence */
+      loadNextAvailableFile: function( all ) {
+        this.loadAll = all;
+        var files = this.activeFiles();
+
+        if (files.length > 0) {
+          this.uploadFile( files.shift() );
+        }
+        else {
+          this.enableUploadAll( false );
+        }
+      },
+
+      /** Upload the given file to the server */
+      uploadFile: function( file ) {
+        this.uploadFileFromModel( this.collection.findWhere( {file: file} ) );
+      },
+
+      /** Upload the file attached to a given model */
+      uploadFileFromModel: function( model ) {
+        this.cacheModel( model );
+
+        var file = model.get( "file" );
+        var ds = fui.models.fusekiServer.selectedDataset();
+        var url = ds.uploadURL( this.destinationGraphName() );
+
+        this.ui.fileUpload.fileupload( 'send', {
+          files: [file],
+          url: url
+        })
+          .success( this.onUploadDone )
+          .fail( this.onUploadFail );
+      },
+
+      /** Return the selected graph name, or 'default' */
+      destinationGraphName: function() {
+        var gName = this.ui.graphLabel.val();
+        return (gName && gName !== "") ? gName : 'default';
+      },
+
+      /** Callback on progress against an upload */
+      onProgress: function( e, data ) {
+        var complete = Math.round( 100.0 * data.loaded/ data.total);
+        $(this.activeView.el).find( ".progress-bar" )
+                             .attr( 'aria-valuenow', complete )
+                             .css( 'width', sprintf( "%s%%", complete ));
+      },
+
+      /** Callback on successful completion */
+      onUploadDone: function( data, response ) {
+        var label = "Data file was empty.";
+        if ((data.count) > 0) {
+          var s = (data.count === 1) ? "" : "s";
+          label = sprintf( "%d %s%s", data.count, ((data.tripleCount > 0) ? "triple" : "quad"), s );
+        }
+
+        this.displayUploadResult( sprintf( "<p><small>Result: <strong>success</strong>. %s</small></p>", label ), "" );
+
+        if (this.loadAll) {
+          this.loadNextAvailableFile( true );
+        }
+      },
+
+      /** Callback on error */
+      onUploadFail: function( jqxhr, error, msg ) {
+        $(this.activeView.el).find( ".progress-bar" )
+                             .removeClass( "progress-bar-success" )
+                             .addClass( "progress-bar-warning" );
+        this.displayUploadResult( sprintf( "<p><small>Result: <strong>failed</strong> with message &quot;%s&quot;</small></p>", msg ), "text-danger" );
+
+        if (this.loadAll) {
+          this.loadNextAvailableFile( true );
+        }
+      },
+
+      /** Show the result of uploading a file */
+      displayUploadResult: function( html, cls ) {
+        var el = $(this.activeView.el);
+        this.activeModel.completed = true;
+        el.find( ".action" ).hide();
+
+        el.find( ".result" )
+          .addClass( cls )
+          .append( html );
+      },
+
+      /** Cache the currently active model so that we can attach actions to the corresponding view */
+      cacheModel: function( model ) {
+        this.activeModel = model;
+        this.activeView = this.children.findByModel( model );
+      },
+
+      /** Enable or disable the upload all button */
+      enableUploadAll: function( enabled ) {
+        if (enabled) {
+          $(".action-upload-all").removeAttr( 'disabled' );
+        }
+        else {
+          $(".action-upload-all").attr( 'disabled', 'disabled' );
+        }
+      }
+
+
+    });
+
+
+    return FileUploadView;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/tabbed-view-manager.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/tabbed-view-manager.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/tabbed-view-manager.js
new file mode 100644
index 0000000..5bba26d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/tabbed-view-manager.js
@@ -0,0 +1,63 @@
+/**
+ * Reusable component that encapsulates managing a collection of sub-views as
+ * tabs, with the active tab being selected via the URL query param `tab`.
+ **/
+
+define(
+  function( require ) {
+    "use strict";
+
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        sprintf = require( "sprintf" ),
+        PageUtils = require( "app/util/page-utils" );
+
+    var TabbedViewManagerView = Backbone.View.extend( {
+
+      initialize: function(){
+        this._tab = PageUtils.queryParam( "tab" );
+        this._firstRender = false;
+      },
+
+      render: function() {
+        if (!this._firstRender) {
+          this._firstRender = true;
+          this.activateCurrentTab();
+
+          $(".nav-tabs").on( "shown.bs.tab", function( e ) {
+            fui.vent.trigger( "shown.bs.tab", $(e.target) );
+          } );
+        }
+      },
+
+      /**
+       * Make the tab named as the current tab active. If no named tab, make
+       * the first tab active by default.
+       */
+      activateCurrentTab: function() {
+        var tabs = $(".nav-tabs");
+        var tab = tabs.children().first();
+
+        if (this._tab) {
+          tab = tabs.find( sprintf( "a[href=#%s]", this._tab ) )
+                    .parent();
+        }
+
+        if (!tab.is(".active")) {
+          tabs.children( "li" ).removeClass( "active" );
+          tabs.parent().children(".tab-pane").removeClass("active");
+
+          tab.addClass( "active" );
+          $( tab.children( "a" ).attr( "href" ) ).addClass("active");
+        }
+      }
+
+
+    });
+
+
+    return TabbedViewManagerView;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/uploadable-file.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/uploadable-file.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/uploadable-file.js
new file mode 100644
index 0000000..382a92f
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/uploadable-file.js
@@ -0,0 +1,39 @@
+/**
+ * This view encapsulates a single uploadable file
+ */
+
+define(
+  function( require ) {
+    var Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        uploadableFileTemplate = require( "plugins/text!app/templates/uploadable-file.tpl" );
+
+    var UploadableFileView = Backbone.Marionette.ItemView.extend( {
+      initialize: function(){
+      },
+
+      tagName: "li",
+
+      template: _.template( uploadableFileTemplate ),
+
+      events: {
+        "click .action-remove-upload": "onActionRemoveUpload",
+        "click .action-upload-file": "onActionUploadFile"
+      },
+
+      onActionRemoveUpload: function( e ) {
+        e.preventDefault();
+        fui.vent.trigger( "upload.remove", this.model );
+      },
+
+      onActionUploadFile: function( e ) {
+        e.preventDefault();
+        fui.vent.trigger( "upload.perform", this.model );
+      }
+
+    });
+
+    return UploadableFileView;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/validation-options.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/validation-options.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/validation-options.js
new file mode 100644
index 0000000..ef0f723
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/views/validation-options.js
@@ -0,0 +1,54 @@
+define(
+  function( require ) {
+    var Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" );
+
+    var ValidationOptions = Backbone.Marionette.ItemView.extend( {
+      initialize: function(){
+        _.bindAll( this, "onValidateAs", "onOutputFormat", "onModelChange" );
+        this.listenTo( this.model, "change", this.onModelChange, this );
+      },
+
+      el: ".validation",
+
+      events: {
+        "click .validate-as-options a": "onValidateAs",
+        "click .output-format-options a": "onOutputFormat",
+      },
+
+      templateHelpers: {
+      },
+
+      onValidateAs: function( e ) {
+        e.preventDefault();
+        var elem = $(e.currentTarget);
+        this.model.setValidateAs( elem.data( "validate-as" ) );
+        this.$el.find(".validate-as-options a").removeClass("active");
+        elem.addClass("active");
+
+        if (this.model.validateAsQuery()) {
+          this.$el.find(".output-format-options").removeClass("hidden");
+        }
+        else {
+          this.$el.find(".output-format-options").addClass("hidden");
+        }
+      },
+
+      onOutputFormat: function( e ) {
+        e.preventDefault();
+        var elem = $(e.currentTarget);
+        this.model.setOutputFormat( elem.data( "output-format" ) );
+        this.$el.find(".output-format-options a").removeClass("active");
+        elem.addClass("active");
+      },
+
+      onModelChange: function( event ) {
+      }
+
+    });
+
+
+    return ValidationOptions;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/common-config.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/common-config.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/common-config.js
new file mode 100644
index 0000000..d715670
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/common-config.js
@@ -0,0 +1,93 @@
+require.config({
+  baseUrl: 'js/lib',
+  paths: {
+    'app':                  '../app',
+    // lib paths
+    'bootstrap':            'bootstrap.min',
+    'jquery':               'jquery-1.10.2.min',
+    'marionette':           'backbone.marionette',
+    'sprintf':              'sprintf-0.7-beta1',
+    'datatables':           'jquery.dataTables.min',
+    'yasqe':                'yasqe.min',
+    'yasr':                 'yasr.min',
+    'pivottable':           'pivot.min',
+    'jquery-ui':            'jquery-ui.min'
+  },
+  map: {
+      '*': {
+          'codemirror': 'lib/codemirror',
+          'jquery.dataTables.min' : 'datatables',
+          'jquery-ui': 'jquery-ui'
+      },
+  },
+  shim: {
+    'underscore': {
+      exports: '_'
+    },
+    'backbone': {
+      deps: ['underscore', 'jquery'],
+      exports: 'Backbone'
+    },
+    'bootstrap': {
+      deps: ['jquery']
+    },
+    'bootstrap-select.min': {
+      deps: ['bootstrap']
+    },
+    'jquery.xdomainrequest': {
+      deps: ['jquery']
+    },
+    'jquery.dataTables.min': {
+      deps: ['jquery']
+    },
+    'jquery.form': {
+      deps: ['jquery']
+    },
+    'jquery.ui.widget': {
+      deps: ['jquery']
+    },
+    'qonsole': {
+      deps: ['yasqe', 'yasr'],
+      exports: 'qonsole'
+    },
+    'yasqe': {
+      deps: ['jquery', 'lib/codemirror'],
+      exports: 'YASQE'
+    },
+    'yasr': {
+        deps: ['pivottable', 'jquery', 'lib/codemirror', 'datatables'],
+        exports: 'YASR'
+    },
+    'pivottable': {
+        deps: ['jquery-ui']
+    },
+    'jquery-ui': {
+        deps: ['jquery']
+    },
+    'jquery.fileupload': {
+      deps: ['jquery.fileupload.local', 'jquery.iframe-transport', 'jquery.ui.widget']
+    },
+    'jquery.fileupload.local': {
+      deps: ['jquery']
+    },
+    'jquery.iframe-transport': {
+      deps: ['jquery']
+    },
+    'sprintf': {
+      exports: 'sprintf'
+    },
+    'marionette': {
+      deps: ['backbone'],
+      exports: 'Marionette'
+    },
+    'addon/fold/foldcode': {deps: ['lib/codemirror']},
+    'addon/fold/brace-fold': {deps: ['addon/fold/foldcode']},
+    'addon/fold/comment-fold': {deps: ['addon/fold/foldcode']},
+    'addon/fold/foldgutter': {deps: ['addon/fold/foldcode']},
+    'addon/fold/xml-fold': {deps: ['addon/fold/foldcode']},
+    'mode/javascript/javascript': {deps: ['lib/codemirror']},
+    'mode/sparql/sparql': {deps: ['lib/codemirror']},
+    'mode/xml/xml': {deps: ['lib/codemirror']},
+    'mode/turtle/turtle': {deps: ['lib/codemirror']}
+  }
+});

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/brace-fold.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/brace-fold.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/brace-fold.js
new file mode 100644
index 0000000..1605f6c
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/brace-fold.js
@@ -0,0 +1,105 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+(function(mod) {
+  if (typeof exports == "object" && typeof module == "object") // CommonJS
+    mod(require("../../lib/codemirror"));
+  else if (typeof define == "function" && define.amd) // AMD
+    define(["../../lib/codemirror"], mod);
+  else // Plain browser env
+    mod(CodeMirror);
+})(function(CodeMirror) {
+"use strict";
+
+CodeMirror.registerHelper("fold", "brace", function(cm, start) {
+  var line = start.line, lineText = cm.getLine(line);
+  var startCh, tokenType;
+
+  function findOpening(openCh) {
+    for (var at = start.ch, pass = 0;;) {
+      var found = at <= 0 ? -1 : lineText.lastIndexOf(openCh, at - 1);
+      if (found == -1) {
+        if (pass == 1) break;
+        pass = 1;
+        at = lineText.length;
+        continue;
+      }
+      if (pass == 1 && found < start.ch) break;
+      tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1));
+      if (!/^(comment|string)/.test(tokenType)) return found + 1;
+      at = found - 1;
+    }
+  }
+
+  var startToken = "{", endToken = "}", startCh = findOpening("{");
+  if (startCh == null) {
+    startToken = "[", endToken = "]";
+    startCh = findOpening("[");
+  }
+
+  if (startCh == null) return;
+  var count = 1, lastLine = cm.lastLine(), end, endCh;
+  outer: for (var i = line; i <= lastLine; ++i) {
+    var text = cm.getLine(i), pos = i == line ? startCh : 0;
+    for (;;) {
+      var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);
+      if (nextOpen < 0) nextOpen = text.length;
+      if (nextClose < 0) nextClose = text.length;
+      pos = Math.min(nextOpen, nextClose);
+      if (pos == text.length) break;
+      if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == tokenType) {
+        if (pos == nextOpen) ++count;
+        else if (!--count) { end = i; endCh = pos; break outer; }
+      }
+      ++pos;
+    }
+  }
+  if (end == null || line == end && endCh == startCh) return;
+  return {from: CodeMirror.Pos(line, startCh),
+          to: CodeMirror.Pos(end, endCh)};
+});
+
+CodeMirror.registerHelper("fold", "import", function(cm, start) {
+  function hasImport(line) {
+    if (line < cm.firstLine() || line > cm.lastLine()) return null;
+    var start = cm.getTokenAt(CodeMirror.Pos(line, 1));
+    if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));
+    if (start.type != "keyword" || start.string != "import") return null;
+    // Now find closing semicolon, return its position
+    for (var i = line, e = Math.min(cm.lastLine(), line + 10); i <= e; ++i) {
+      var text = cm.getLine(i), semi = text.indexOf(";");
+      if (semi != -1) return {startCh: start.end, end: CodeMirror.Pos(i, semi)};
+    }
+  }
+
+  var start = start.line, has = hasImport(start), prev;
+  if (!has || hasImport(start - 1) || ((prev = hasImport(start - 2)) && prev.end.line == start - 1))
+    return null;
+  for (var end = has.end;;) {
+    var next = hasImport(end.line + 1);
+    if (next == null) break;
+    end = next.end;
+  }
+  return {from: cm.clipPos(CodeMirror.Pos(start, has.startCh + 1)), to: end};
+});
+
+CodeMirror.registerHelper("fold", "include", function(cm, start) {
+  function hasInclude(line) {
+    if (line < cm.firstLine() || line > cm.lastLine()) return null;
+    var start = cm.getTokenAt(CodeMirror.Pos(line, 1));
+    if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));
+    if (start.type == "meta" && start.string.slice(0, 8) == "#include") return start.start + 8;
+  }
+
+  var start = start.line, has = hasInclude(start);
+  if (has == null || hasInclude(start - 1) != null) return null;
+  for (var end = start;;) {
+    var next = hasInclude(end + 1);
+    if (next == null) break;
+    ++end;
+  }
+  return {from: CodeMirror.Pos(start, has + 1),
+          to: cm.clipPos(CodeMirror.Pos(end))};
+});
+
+});

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/comment-fold.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/comment-fold.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/comment-fold.js
new file mode 100644
index 0000000..b75db7e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/comment-fold.js
@@ -0,0 +1,57 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+(function(mod) {
+  if (typeof exports == "object" && typeof module == "object") // CommonJS
+    mod(require("../../lib/codemirror"));
+  else if (typeof define == "function" && define.amd) // AMD
+    define(["../../lib/codemirror"], mod);
+  else // Plain browser env
+    mod(CodeMirror);
+})(function(CodeMirror) {
+"use strict";
+
+CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {
+  return mode.blockCommentStart && mode.blockCommentEnd;
+}, function(cm, start) {
+  var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd;
+  if (!startToken || !endToken) return;
+  var line = start.line, lineText = cm.getLine(line);
+
+  var startCh;
+  for (var at = start.ch, pass = 0;;) {
+    var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1);
+    if (found == -1) {
+      if (pass == 1) return;
+      pass = 1;
+      at = lineText.length;
+      continue;
+    }
+    if (pass == 1 && found < start.ch) return;
+    if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) {
+      startCh = found + startToken.length;
+      break;
+    }
+    at = found - 1;
+  }
+
+  var depth = 1, lastLine = cm.lastLine(), end, endCh;
+  outer: for (var i = line; i <= lastLine; ++i) {
+    var text = cm.getLine(i), pos = i == line ? startCh : 0;
+    for (;;) {
+      var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);
+      if (nextOpen < 0) nextOpen = text.length;
+      if (nextClose < 0) nextClose = text.length;
+      pos = Math.min(nextOpen, nextClose);
+      if (pos == text.length) break;
+      if (pos == nextOpen) ++depth;
+      else if (!--depth) { end = i; endCh = pos; break outer; }
+      ++pos;
+    }
+  }
+  if (end == null || line == end && endCh == startCh) return;
+  return {from: CodeMirror.Pos(line, startCh),
+          to: CodeMirror.Pos(end, endCh)};
+});
+
+});

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/foldcode.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/foldcode.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/foldcode.js
new file mode 100644
index 0000000..3abeb83
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/foldcode.js
@@ -0,0 +1,145 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+(function(mod) {
+  if (typeof exports == "object" && typeof module == "object") // CommonJS
+    mod(require("../../lib/codemirror"));
+  else if (typeof define == "function" && define.amd) // AMD
+    define(["../../lib/codemirror"], mod);
+  else // Plain browser env
+    mod(CodeMirror);
+})(function(CodeMirror) {
+  "use strict";
+
+  function doFold(cm, pos, options, force) {
+    if (options && options.call) {
+      var finder = options;
+      options = null;
+    } else {
+      var finder = getOption(cm, options, "rangeFinder");
+    }
+    if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0);
+    var minSize = getOption(cm, options, "minFoldSize");
+
+    function getRange(allowFolded) {
+      var range = finder(cm, pos);
+      if (!range || range.to.line - range.from.line < minSize) return null;
+      var marks = cm.findMarksAt(range.from);
+      for (var i = 0; i < marks.length; ++i) {
+        if (marks[i].__isFold && force !== "fold") {
+          if (!allowFolded) return null;
+          range.cleared = true;
+          marks[i].clear();
+        }
+      }
+      return range;
+    }
+
+    var range = getRange(true);
+    if (getOption(cm, options, "scanUp")) while (!range && pos.line > cm.firstLine()) {
+      pos = CodeMirror.Pos(pos.line - 1, 0);
+      range = getRange(false);
+    }
+    if (!range || range.cleared || force === "unfold") return;
+
+    var myWidget = makeWidget(cm, options);
+    CodeMirror.on(myWidget, "mousedown", function(e) {
+      myRange.clear();
+      CodeMirror.e_preventDefault(e);
+    });
+    var myRange = cm.markText(range.from, range.to, {
+      replacedWith: myWidget,
+      clearOnEnter: true,
+      __isFold: true
+    });
+    myRange.on("clear", function(from, to) {
+      CodeMirror.signal(cm, "unfold", cm, from, to);
+    });
+    CodeMirror.signal(cm, "fold", cm, range.from, range.to);
+  }
+
+  function makeWidget(cm, options) {
+    var widget = getOption(cm, options, "widget");
+    if (typeof widget == "string") {
+      var text = document.createTextNode(widget);
+      widget = document.createElement("span");
+      widget.appendChild(text);
+      widget.className = "CodeMirror-foldmarker";
+    }
+    return widget;
+  }
+
+  // Clumsy backwards-compatible interface
+  CodeMirror.newFoldFunction = function(rangeFinder, widget) {
+    return function(cm, pos) { doFold(cm, pos, {rangeFinder: rangeFinder, widget: widget}); };
+  };
+
+  // New-style interface
+  CodeMirror.defineExtension("foldCode", function(pos, options, force) {
+    doFold(this, pos, options, force);
+  });
+
+  CodeMirror.defineExtension("isFolded", function(pos) {
+    var marks = this.findMarksAt(pos);
+    for (var i = 0; i < marks.length; ++i)
+      if (marks[i].__isFold) return true;
+  });
+
+  CodeMirror.commands.toggleFold = function(cm) {
+    cm.foldCode(cm.getCursor());
+  };
+  CodeMirror.commands.fold = function(cm) {
+    cm.foldCode(cm.getCursor(), null, "fold");
+  };
+  CodeMirror.commands.unfold = function(cm) {
+    cm.foldCode(cm.getCursor(), null, "unfold");
+  };
+  CodeMirror.commands.foldAll = function(cm) {
+    cm.operation(function() {
+      for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)
+        cm.foldCode(CodeMirror.Pos(i, 0), null, "fold");
+    });
+  };
+  CodeMirror.commands.unfoldAll = function(cm) {
+    cm.operation(function() {
+      for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)
+        cm.foldCode(CodeMirror.Pos(i, 0), null, "unfold");
+    });
+  };
+
+  CodeMirror.registerHelper("fold", "combine", function() {
+    var funcs = Array.prototype.slice.call(arguments, 0);
+    return function(cm, start) {
+      for (var i = 0; i < funcs.length; ++i) {
+        var found = funcs[i](cm, start);
+        if (found) return found;
+      }
+    };
+  });
+
+  CodeMirror.registerHelper("fold", "auto", function(cm, start) {
+    var helpers = cm.getHelpers(start, "fold");
+    for (var i = 0; i < helpers.length; i++) {
+      var cur = helpers[i](cm, start);
+      if (cur) return cur;
+    }
+  });
+
+  var defaultOptions = {
+    rangeFinder: CodeMirror.fold.auto,
+    widget: "\u2194",
+    minFoldSize: 0,
+    scanUp: false
+  };
+
+  CodeMirror.defineOption("foldOptions", null);
+
+  function getOption(cm, options, name) {
+    if (options && options[name] !== undefined)
+      return options[name];
+    var editorOptions = cm.options.foldOptions;
+    if (editorOptions && editorOptions[name] !== undefined)
+      return editorOptions[name];
+    return defaultOptions[name];
+  }
+});

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/foldgutter.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/foldgutter.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/foldgutter.js
new file mode 100644
index 0000000..bd31ec4
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/foldgutter.js
@@ -0,0 +1,134 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+(function(mod) {
+  if (typeof exports == "object" && typeof module == "object") // CommonJS
+    mod(require("../../lib/codemirror"), require("./foldcode"));
+  else if (typeof define == "function" && define.amd) // AMD
+    define(["../../lib/codemirror", "./foldcode"], mod);
+  else // Plain browser env
+    mod(CodeMirror);
+})(function(CodeMirror) {
+  "use strict";
+
+  CodeMirror.defineOption("foldGutter", false, function(cm, val, old) {
+    if (old && old != CodeMirror.Init) {
+      cm.clearGutter(cm.state.foldGutter.options.gutter);
+      cm.state.foldGutter = null;
+      cm.off("gutterClick", onGutterClick);
+      cm.off("change", onChange);
+      cm.off("viewportChange", onViewportChange);
+      cm.off("fold", onFold);
+      cm.off("unfold", onFold);
+      cm.off("swapDoc", updateInViewport);
+    }
+    if (val) {
+      cm.state.foldGutter = new State(parseOptions(val));
+      updateInViewport(cm);
+      cm.on("gutterClick", onGutterClick);
+      cm.on("change", onChange);
+      cm.on("viewportChange", onViewportChange);
+      cm.on("fold", onFold);
+      cm.on("unfold", onFold);
+      cm.on("swapDoc", updateInViewport);
+    }
+  });
+
+  var Pos = CodeMirror.Pos;
+
+  function State(options) {
+    this.options = options;
+    this.from = this.to = 0;
+  }
+
+  function parseOptions(opts) {
+    if (opts === true) opts = {};
+    if (opts.gutter == null) opts.gutter = "CodeMirror-foldgutter";
+    if (opts.indicatorOpen == null) opts.indicatorOpen = "CodeMirror-foldgutter-open";
+    if (opts.indicatorFolded == null) opts.indicatorFolded = "CodeMirror-foldgutter-folded";
+    return opts;
+  }
+
+  function isFolded(cm, line) {
+    var marks = cm.findMarksAt(Pos(line));
+    for (var i = 0; i < marks.length; ++i)
+      if (marks[i].__isFold && marks[i].find().from.line == line) return true;
+  }
+
+  function marker(spec) {
+    if (typeof spec == "string") {
+      var elt = document.createElement("div");
+      elt.className = spec + " CodeMirror-guttermarker-subtle";
+      return elt;
+    } else {
+      return spec.cloneNode(true);
+    }
+  }
+
+  function updateFoldInfo(cm, from, to) {
+    var opts = cm.state.foldGutter.options, cur = from;
+    cm.eachLine(from, to, function(line) {
+      var mark = null;
+      if (isFolded(cm, cur)) {
+        mark = marker(opts.indicatorFolded);
+      } else {
+        var pos = Pos(cur, 0), func = opts.rangeFinder || CodeMirror.fold.auto;
+        var range = func && func(cm, pos);
+        if (range && range.from.line + 1 < range.to.line)
+          mark = marker(opts.indicatorOpen);
+      }
+      cm.setGutterMarker(line, opts.gutter, mark);
+      ++cur;
+    });
+  }
+
+  function updateInViewport(cm) {
+    var vp = cm.getViewport(), state = cm.state.foldGutter;
+    if (!state) return;
+    cm.operation(function() {
+      updateFoldInfo(cm, vp.from, vp.to);
+    });
+    state.from = vp.from; state.to = vp.to;
+  }
+
+  function onGutterClick(cm, line, gutter) {
+    var opts = cm.state.foldGutter.options;
+    if (gutter != opts.gutter) return;
+    cm.foldCode(Pos(line, 0), opts.rangeFinder);
+  }
+
+  function onChange(cm) {
+    var state = cm.state.foldGutter, opts = cm.state.foldGutter.options;
+    state.from = state.to = 0;
+    clearTimeout(state.changeUpdate);
+    state.changeUpdate = setTimeout(function() { updateInViewport(cm); }, opts.foldOnChangeTimeSpan || 600);
+  }
+
+  function onViewportChange(cm) {
+    var state = cm.state.foldGutter, opts = cm.state.foldGutter.options;
+    clearTimeout(state.changeUpdate);
+    state.changeUpdate = setTimeout(function() {
+      var vp = cm.getViewport();
+      if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {
+        updateInViewport(cm);
+      } else {
+        cm.operation(function() {
+          if (vp.from < state.from) {
+            updateFoldInfo(cm, vp.from, state.from);
+            state.from = vp.from;
+          }
+          if (vp.to > state.to) {
+            updateFoldInfo(cm, state.to, vp.to);
+            state.to = vp.to;
+          }
+        });
+      }
+    }, opts.updateViewportTimeSpan || 400);
+  }
+
+  function onFold(cm, from) {
+    var state = cm.state.foldGutter, line = from.line;
+    if (line >= state.from && line < state.to)
+      updateFoldInfo(cm, line, line + 1);
+  }
+});

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/xml-fold.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/xml-fold.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/xml-fold.js
new file mode 100644
index 0000000..a45da58
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/addon/fold/xml-fold.js
@@ -0,0 +1,181 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+(function(mod) {
+  if (typeof exports == "object" && typeof module == "object") // CommonJS
+    mod(require("../../lib/codemirror"));
+  else if (typeof define == "function" && define.amd) // AMD
+    define(["../../lib/codemirror"], mod);
+  else // Plain browser env
+    mod(CodeMirror);
+})(function(CodeMirror) {
+  "use strict";
+
+  var Pos = CodeMirror.Pos;
+  function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }
+
+  var nameStartChar = "A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
+  var nameChar = nameStartChar + "\-\:\.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
+  var xmlTagStart = new RegExp("<(/?)([" + nameStartChar + "][" + nameChar + "]*)", "g");
+
+  function Iter(cm, line, ch, range) {
+    this.line = line; this.ch = ch;
+    this.cm = cm; this.text = cm.getLine(line);
+    this.min = range ? range.from : cm.firstLine();
+    this.max = range ? range.to - 1 : cm.lastLine();
+  }
+
+  function tagAt(iter, ch) {
+    var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch));
+    return type && /\btag\b/.test(type);
+  }
+
+  function nextLine(iter) {
+    if (iter.line >= iter.max) return;
+    iter.ch = 0;
+    iter.text = iter.cm.getLine(++iter.line);
+    return true;
+  }
+  function prevLine(iter) {
+    if (iter.line <= iter.min) return;
+    iter.text = iter.cm.getLine(--iter.line);
+    iter.ch = iter.text.length;
+    return true;
+  }
+
+  function toTagEnd(iter) {
+    for (;;) {
+      var gt = iter.text.indexOf(">", iter.ch);
+      if (gt == -1) { if (nextLine(iter)) continue; else return; }
+      if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; }
+      var lastSlash = iter.text.lastIndexOf("/", gt);
+      var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
+      iter.ch = gt + 1;
+      return selfClose ? "selfClose" : "regular";
+    }
+  }
+  function toTagStart(iter) {
+    for (;;) {
+      var lt = iter.ch ? iter.text.lastIndexOf("<", iter.ch - 1) : -1;
+      if (lt == -1) { if (prevLine(iter)) continue; else return; }
+      if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; }
+      xmlTagStart.lastIndex = lt;
+      iter.ch = lt;
+      var match = xmlTagStart.exec(iter.text);
+      if (match && match.index == lt) return match;
+    }
+  }
+
+  function toNextTag(iter) {
+    for (;;) {
+      xmlTagStart.lastIndex = iter.ch;
+      var found = xmlTagStart.exec(iter.text);
+      if (!found) { if (nextLine(iter)) continue; else return; }
+      if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; }
+      iter.ch = found.index + found[0].length;
+      return found;
+    }
+  }
+  function toPrevTag(iter) {
+    for (;;) {
+      var gt = iter.ch ? iter.text.lastIndexOf(">", iter.ch - 1) : -1;
+      if (gt == -1) { if (prevLine(iter)) continue; else return; }
+      if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; }
+      var lastSlash = iter.text.lastIndexOf("/", gt);
+      var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
+      iter.ch = gt + 1;
+      return selfClose ? "selfClose" : "regular";
+    }
+  }
+
+  function findMatchingClose(iter, tag) {
+    var stack = [];
+    for (;;) {
+      var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0);
+      if (!next || !(end = toTagEnd(iter))) return;
+      if (end == "selfClose") continue;
+      if (next[1]) { // closing tag
+        for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {
+          stack.length = i;
+          break;
+        }
+        if (i < 0 && (!tag || tag == next[2])) return {
+          tag: next[2],
+          from: Pos(startLine, startCh),
+          to: Pos(iter.line, iter.ch)
+        };
+      } else { // opening tag
+        stack.push(next[2]);
+      }
+    }
+  }
+  function findMatchingOpen(iter, tag) {
+    var stack = [];
+    for (;;) {
+      var prev = toPrevTag(iter);
+      if (!prev) return;
+      if (prev == "selfClose") { toTagStart(iter); continue; }
+      var endLine = iter.line, endCh = iter.ch;
+      var start = toTagStart(iter);
+      if (!start) return;
+      if (start[1]) { // closing tag
+        stack.push(start[2]);
+      } else { // opening tag
+        for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) {
+          stack.length = i;
+          break;
+        }
+        if (i < 0 && (!tag || tag == start[2])) return {
+          tag: start[2],
+          from: Pos(iter.line, iter.ch),
+          to: Pos(endLine, endCh)
+        };
+      }
+    }
+  }
+
+  CodeMirror.registerHelper("fold", "xml", function(cm, start) {
+    var iter = new Iter(cm, start.line, 0);
+    for (;;) {
+      var openTag = toNextTag(iter), end;
+      if (!openTag || iter.line != start.line || !(end = toTagEnd(iter))) return;
+      if (!openTag[1] && end != "selfClose") {
+        var start = Pos(iter.line, iter.ch);
+        var close = findMatchingClose(iter, openTag[2]);
+        return close && {from: start, to: close.from};
+      }
+    }
+  });
+  CodeMirror.findMatchingTag = function(cm, pos, range) {
+    var iter = new Iter(cm, pos.line, pos.ch, range);
+    if (iter.text.indexOf(">") == -1 && iter.text.indexOf("<") == -1) return;
+    var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);
+    var start = end && toTagStart(iter);
+    if (!end || end == "selfClose" || !start || cmp(iter, pos) > 0) return;
+    var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};
+
+    if (start[1]) { // closing tag
+      return {open: findMatchingOpen(iter, start[2]), close: here, at: "close"};
+    } else { // opening tag
+      iter = new Iter(cm, to.line, to.ch, range);
+      return {open: here, close: findMatchingClose(iter, start[2]), at: "open"};
+    }
+  };
+
+  CodeMirror.findEnclosingTag = function(cm, pos, range) {
+    var iter = new Iter(cm, pos.line, pos.ch, range);
+    for (;;) {
+      var open = findMatchingOpen(iter);
+      if (!open) break;
+      var forward = new Iter(cm, pos.line, pos.ch, range);
+      var close = findMatchingClose(forward, open.tag);
+      if (close) return {open: open, close: close};
+    }
+  };
+
+  // Used by addon/edit/closetag.js
+  CodeMirror.scanForClosingTag = function(cm, pos, name, end) {
+    var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);
+    return findMatchingClose(iter, name);
+  };
+});

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone-min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone-min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone-min.js
new file mode 100644
index 0000000..3b2593d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone-min.js
@@ -0,0 +1,2 @@
+(function(){var t=this;var e=t.Backbone;var i=[];var r=i.push;var s=i.slice;var n=i.splice;var a;if(typeof exports!=="undefined"){a=exports}else{a=t.Backbone={}}a.VERSION="1.1.0";var h=t._;if(!h&&typeof require!=="undefined")h=require("underscore");a.$=t.jQuery||t.Zepto||t.ender||t.$;a.noConflict=function(){t.Backbone=e;return this};a.emulateHTTP=false;a.emulateJSON=false;var o=a.Events={on:function(t,e,i){if(!l(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,i){if(!l(this,"once",t,[e,i])||!e)return this;var r=this;var s=h.once(function(){r.off(t,s);e.apply(this,arguments)});s._callback=e;return this.on(t,s,i)},off:function(t,e,i){var r,s,n,a,o,u,c,f;if(!this._events||!l(this,"off",t,[e,i]))return this;if(!t&&!e&&!i){this._events={};return this}a=t?[t]:h.keys(this._events);for(o=0,u=a.length;o<u;o++){t=a[o];if(n=this._events[t]){this._events[t]=r=[
 ];if(e||i){for(c=0,f=n.length;c<f;c++){s=n[c];if(e&&e!==s.callback&&e!==s.callback._callback||i&&i!==s.context){r.push(s)}}}if(!r.length)delete this._events[t]}}return this},trigger:function(t){if(!this._events)return this;var e=s.call(arguments,1);if(!l(this,"trigger",t,e))return this;var i=this._events[t];var r=this._events.all;if(i)c(i,e);if(r)c(r,arguments);return this},stopListening:function(t,e,i){var r=this._listeningTo;if(!r)return this;var s=!e&&!i;if(!i&&typeof e==="object")i=this;if(t)(r={})[t._listenId]=t;for(var n in r){t=r[n];t.off(e,i,this);if(s||h.isEmpty(t._events))delete this._listeningTo[n]}return this}};var u=/\s+/;var l=function(t,e,i,r){if(!i)return true;if(typeof i==="object"){for(var s in i){t[e].apply(t,[s,i[s]].concat(r))}return false}if(u.test(i)){var n=i.split(u);for(var a=0,h=n.length;a<h;a++){t[e].apply(t,[n[a]].concat(r))}return false}return true};var c=function(t,e){var i,r=-1,s=t.length,n=e[0],a=e[1],h=e[2];switch(e.length){case 0:while(++r<s)(i=t[r]
 ).callback.call(i.ctx);return;case 1:while(++r<s)(i=t[r]).callback.call(i.ctx,n);return;case 2:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a);return;case 3:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a,h);return;default:while(++r<s)(i=t[r]).callback.apply(i.ctx,e)}};var f={listenTo:"on",listenToOnce:"once"};h.each(f,function(t,e){o[e]=function(e,i,r){var s=this._listeningTo||(this._listeningTo={});var n=e._listenId||(e._listenId=h.uniqueId("l"));s[n]=e;if(!r&&typeof i==="object")r=this;e[t](i,r,this);return this}});o.bind=o.on;o.unbind=o.off;h.extend(a,o);var d=a.Model=function(t,e){var i=t||{};e||(e={});this.cid=h.uniqueId("c");this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)i=this.parse(i,e)||{};i=h.defaults({},i,h.result(this,"defaults"));this.set(i,e);this.changed={};this.initialize.apply(this,arguments)};h.extend(d.prototype,o,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return h.clone(this.attributes)},
 sync:function(){return a.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return h.escape(this.get(t))},has:function(t){return this.get(t)!=null},set:function(t,e,i){var r,s,n,a,o,u,l,c;if(t==null)return this;if(typeof t==="object"){s=t;i=e}else{(s={})[t]=e}i||(i={});if(!this._validate(s,i))return false;n=i.unset;o=i.silent;a=[];u=this._changing;this._changing=true;if(!u){this._previousAttributes=h.clone(this.attributes);this.changed={}}c=this.attributes,l=this._previousAttributes;if(this.idAttribute in s)this.id=s[this.idAttribute];for(r in s){e=s[r];if(!h.isEqual(c[r],e))a.push(r);if(!h.isEqual(l[r],e)){this.changed[r]=e}else{delete this.changed[r]}n?delete c[r]:c[r]=e}if(!o){if(a.length)this._pending=true;for(var f=0,d=a.length;f<d;f++){this.trigger("change:"+a[f],this,c[a[f]],i)}}if(u)return this;if(!o){while(this._pending){this._pending=false;this.trigger("change",this,i)}}this._pending=false;this._changing=false;return this},unset:funct
 ion(t,e){return this.set(t,void 0,h.extend({},e,{unset:true}))},clear:function(t){var e={};for(var i in this.attributes)e[i]=void 0;return this.set(e,h.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!h.isEmpty(this.changed);return h.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?h.clone(this.changed):false;var e,i=false;var r=this._changing?this._previousAttributes:this.attributes;for(var s in t){if(h.isEqual(r[s],e=t[s]))continue;(i||(i={}))[s]=e}return i},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return h.clone(this._previousAttributes)},fetch:function(t){t=t?h.clone(t):{};if(t.parse===void 0)t.parse=true;var e=this;var i=t.success;t.success=function(r){if(!e.set(e.parse(r,t),t))return false;if(i)i(e,r,t);e.trigger("sync",e,r,t)};M(this,t);return this.sync("read",this,t)},save:function(t,e,i){var r,s,n,a=this.attributes;if(t==null||
 typeof t==="object"){r=t;i=e}else{(r={})[t]=e}i=h.extend({validate:true},i);if(r&&!i.wait){if(!this.set(r,i))return false}else{if(!this._validate(r,i))return false}if(r&&i.wait){this.attributes=h.extend({},a,r)}if(i.parse===void 0)i.parse=true;var o=this;var u=i.success;i.success=function(t){o.attributes=a;var e=o.parse(t,i);if(i.wait)e=h.extend(r||{},e);if(h.isObject(e)&&!o.set(e,i)){return false}if(u)u(o,t,i);o.trigger("sync",o,t,i)};M(this,i);s=this.isNew()?"create":i.patch?"patch":"update";if(s==="patch")i.attrs=r;n=this.sync(s,this,i);if(r&&i.wait)this.attributes=a;return n},destroy:function(t){t=t?h.clone(t):{};var e=this;var i=t.success;var r=function(){e.trigger("destroy",e,e.collection,t)};t.success=function(s){if(t.wait||e.isNew())r();if(i)i(e,s,t);if(!e.isNew())e.trigger("sync",e,s,t)};if(this.isNew()){t.success();return false}M(this,t);var s=this.sync("delete",this,t);if(!t.wait)r();return s},url:function(){var t=h.result(this,"urlRoot")||h.result(this.collection,"url")|
 |U();if(this.isNew())return t;return t+(t.charAt(t.length-1)==="/"?"":"/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return this.id==null},isValid:function(t){return this._validate({},h.extend(t||{},{validate:true}))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=h.extend({},this.attributes,t);var i=this.validationError=this.validate(t,e)||null;if(!i)return true;this.trigger("invalid",this,i,h.extend(e,{validationError:i}));return false}});var p=["keys","values","pairs","invert","pick","omit"];h.each(p,function(t){d.prototype[t]=function(){var e=s.call(arguments);e.unshift(this.attributes);return h[t].apply(h,e)}});var v=a.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,h.extend({silent:true},e))};var g={add:true,remove:true,m
 erge:true};var m={add:true,remove:false};h.extend(v.prototype,o,{model:d,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return a.sync.apply(this,arguments)},add:function(t,e){return this.set(t,h.extend({merge:false},e,m))},remove:function(t,e){var i=!h.isArray(t);t=i?[t]:h.clone(t);e||(e={});var r,s,n,a;for(r=0,s=t.length;r<s;r++){a=t[r]=this.get(t[r]);if(!a)continue;delete this._byId[a.id];delete this._byId[a.cid];n=this.indexOf(a);this.models.splice(n,1);this.length--;if(!e.silent){e.index=n;a.trigger("remove",a,this,e)}this._removeReference(a)}return i?t[0]:t},set:function(t,e){e=h.defaults({},e,g);if(e.parse)t=this.parse(t,e);var i=!h.isArray(t);t=i?t?[t]:[]:h.clone(t);var r,s,n,a,o,u,l;var c=e.at;var f=this.model;var p=this.comparator&&c==null&&e.sort!==false;var v=h.isString(this.comparator)?this.comparator:null;var m=[],y=[],_={};var w=e.add,b=e.merge,x=e.remove;var E=!p&&w&&x?[]:false;for(r=0,s=t.length;r<s;r++){o
 =t[r];if(o instanceof d){n=a=o}else{n=o[f.prototype.idAttribute]}if(u=this.get(n)){if(x)_[u.cid]=true;if(b){o=o===a?a.attributes:o;if(e.parse)o=u.parse(o,e);u.set(o,e);if(p&&!l&&u.hasChanged(v))l=true}t[r]=u}else if(w){a=t[r]=this._prepareModel(o,e);if(!a)continue;m.push(a);a.on("all",this._onModelEvent,this);this._byId[a.cid]=a;if(a.id!=null)this._byId[a.id]=a}if(E)E.push(u||a)}if(x){for(r=0,s=this.length;r<s;++r){if(!_[(a=this.models[r]).cid])y.push(a)}if(y.length)this.remove(y,e)}if(m.length||E&&E.length){if(p)l=true;this.length+=m.length;if(c!=null){for(r=0,s=m.length;r<s;r++){this.models.splice(c+r,0,m[r])}}else{if(E)this.models.length=0;var T=E||m;for(r=0,s=T.length;r<s;r++){this.models.push(T[r])}}}if(l)this.sort({silent:true});if(!e.silent){for(r=0,s=m.length;r<s;r++){(a=m[r]).trigger("add",a,this,e)}if(l||E&&E.length)this.trigger("sort",this,e)}return i?t[0]:t},reset:function(t,e){e||(e={});for(var i=0,r=this.models.length;i<r;i++){this._removeReference(this.models[i])}e.pr
 eviousModels=this.models;this._reset();t=this.add(t,h.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,h.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);this.remove(e,t);return e},unshift:function(t,e){return this.add(t,h.extend({at:0},e))},shift:function(t){var e=this.at(0);this.remove(e,t);return e},slice:function(){return s.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;return this._byId[t.id]||this._byId[t.cid]||this._byId[t]},at:function(t){return this.models[t]},where:function(t,e){if(h.isEmpty(t))return e?void 0:[];return this[e?"find":"filter"](function(e){for(var i in t){if(t[i]!==e.get(i))return false}return true})},findWhere:function(t){return this.where(t,true)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");t||(t={});if(h.isString(this.comparator)||this.comparator.length===1){this.models=this.sortBy(this.compa
 rator,this)}else{this.models.sort(h.bind(this.comparator,this))}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return h.invoke(this.models,"get",t)},fetch:function(t){t=t?h.clone(t):{};if(t.parse===void 0)t.parse=true;var e=t.success;var i=this;t.success=function(r){var s=t.reset?"reset":"set";i[s](r,t);if(e)e(i,r,t);i.trigger("sync",i,r,t)};M(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?h.clone(e):{};if(!(t=this._prepareModel(t,e)))return false;if(!e.wait)this.add(t,e);var i=this;var r=e.success;e.success=function(t,e,s){if(s.wait)i.add(t,s);if(r)r(t,e,s)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(t instanceof d){if(!t.collection)t.collection=this;return t}e=e?h.clone(e):{};e.collection=this;var i=new this.model(t,e);if(!i.validationError)return i;this.trigger("invalid",this
 ,i.validationError,e);return false},_removeReference:function(t){if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(e&&t==="change:"+e.idAttribute){delete this._byId[e.previous(e.idAttribute)];if(e.id!=null)this._byId[e.id]=e}this.trigger.apply(this,arguments)}});var y=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain"];h.each(y,function(t){v.prototype[t]=function(){var e=s.call(arguments);e.unshift(this.models);return h[t].apply(h,e)}});var _=["groupBy","countBy","sortBy"];h.each(_,function(t){v.prototype[t]=function(e,i){var r=h.isFunction(e)?e:func
 tion(t){return t.get(e)};return h[t](this.models,r,i)}});var w=a.View=function(t){this.cid=h.uniqueId("view");t||(t={});h.extend(this,h.pick(t,x));this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()};var b=/^(\S+)\s*(.*)$/;var x=["model","collection","el","id","attributes","className","tagName","events"];h.extend(w.prototype,o,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();this.stopListening();return this},setElement:function(t,e){if(this.$el)this.undelegateEvents();this.$el=t instanceof a.$?t:a.$(t);this.el=this.$el[0];if(e!==false)this.delegateEvents();return this},delegateEvents:function(t){if(!(t||(t=h.result(this,"events"))))return this;this.undelegateEvents();for(var e in t){var i=t[e];if(!h.isFunction(i))i=this[t[e]];if(!i)continue;var r=e.match(b);var s=r[1],n=r[2];i=h.bind(i,this);s+=".delegateEvents"+this.cid;if(n===""){this.$el.on(s,i)}else{this.
 $el.on(s,n,i)}}return this},undelegateEvents:function(){this.$el.off(".delegateEvents"+this.cid);return this},_ensureElement:function(){if(!this.el){var t=h.extend({},h.result(this,"attributes"));if(this.id)t.id=h.result(this,"id");if(this.className)t["class"]=h.result(this,"className");var e=a.$("<"+h.result(this,"tagName")+">").attr(t);this.setElement(e,false)}else{this.setElement(h.result(this,"el"),false)}}});a.sync=function(t,e,i){var r=T[t];h.defaults(i||(i={}),{emulateHTTP:a.emulateHTTP,emulateJSON:a.emulateJSON});var s={type:r,dataType:"json"};if(!i.url){s.url=h.result(e,"url")||U()}if(i.data==null&&e&&(t==="create"||t==="update"||t==="patch")){s.contentType="application/json";s.data=JSON.stringify(i.attrs||e.toJSON(i))}if(i.emulateJSON){s.contentType="application/x-www-form-urlencoded";s.data=s.data?{model:s.data}:{}}if(i.emulateHTTP&&(r==="PUT"||r==="DELETE"||r==="PATCH")){s.type="POST";if(i.emulateJSON)s.data._method=r;var n=i.beforeSend;i.beforeSend=function(t){t.setRequ
 estHeader("X-HTTP-Method-Override",r);if(n)return n.apply(this,arguments)}}if(s.type!=="GET"&&!i.emulateJSON){s.processData=false}if(s.type==="PATCH"&&E){s.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var o=i.xhr=a.ajax(h.extend(s,i));e.trigger("request",e,o,i);return o};var E=typeof window!=="undefined"&&!!window.ActiveXObject&&!(window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};a.ajax=function(){return a.$.ajax.apply(a.$,arguments)};var k=a.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var S=/\((.*?)\)/g;var $=/(\(\?)?:\w+/g;var H=/\*\w+/g;var A=/[\-{}\[\]+?.,\\\^$|#\s]/g;h.extend(k.prototype,o,{initialize:function(){},route:function(t,e,i){if(!h.isRegExp(t))t=this._routeToRegExp(t);if(h.isFunction(e)){i=e;e=""}if(!i)i=this[e];var r=this;a.history.route(t,function(s){var n=r._extractParameters(t,s);i&&i.ap
 ply(r,n);r.trigger.apply(r,["route:"+e].concat(n));r.trigger("route",e,n);a.history.trigger("route",r,e,n)});return this},navigate:function(t,e){a.history.navigate(t,e);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=h.result(this,"routes");var t,e=h.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(A,"\\$&").replace(S,"(?:$1)?").replace($,function(t,e){return e?t:"([^/]+)"}).replace(H,"(.*?)");return new RegExp("^"+t+"$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return h.map(i,function(t){return t?decodeURIComponent(t):null})}});var I=a.History=function(){this.handlers=[];h.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var N=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var P=/msie [\w.]+/;var C=/\/$/;var j=/[?#].*$/;I.started=false;h.extend(I.prototype,o,{interval:50,getHash:function(t){var e=(t||this).location.href.matc
 h(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=this.location.pathname;var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.slice(i.length)}else{t=this.getHash()}}return t.replace(N,"")},start:function(t){if(I.started)throw new Error("Backbone.history has already been started");I.started=true;this.options=h.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var e=this.getFragment();var i=document.documentMode;var r=P.exec(navigator.userAgent.toLowerCase())&&(!i||i<=7);this.root=("/"+this.root+"/").replace(O,"/");if(r&&this._wantsHashChange){this.iframe=a.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow;this.navigate(e)}if(this._hasPushState){a.$(window).on("popstate",this.checkUrl)}
 else if(this._wantsHashChange&&"onhashchange"in window&&!r){a.$(window).on("hashchange",this.checkUrl)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}this.fragment=e;var s=this.location;var n=s.pathname.replace(/[^\/]$/,"$&/")===this.root;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!n){this.fragment=this.getFragment(null,true);this.location.replace(this.root+this.location.search+"#"+this.fragment);return true}else if(this._hasPushState&&n&&s.hash){this.fragment=this.getHash().replace(N,"");this.history.replaceState({},document.title,this.root+this.fragment+s.search)}}if(!this.options.silent)return this.loadUrl()},stop:function(){a.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl);clearInterval(this._checkUrlInterval);I.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.ge
 tFragment(this.getHash(this.iframe))}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){t=this.fragment=this.getFragment(t);return h.any(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!I.started)return false;if(!e||e===true)e={trigger:!!e};var i=this.root+(t=this.getFragment(t||""));t=t.replace(j,"");if(this.fragment===t)return;this.fragment=t;if(t===""&&i!=="/")i=i.slice(0,-1);if(this._hasPushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,i)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getFragment(this.getHash(this.iframe))){if(!e.replace)this.iframe.document.open().close();this._updateHash(this.iframe.location,t,e.replace)}}else{return this.location.assign(i)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}e
 lse{t.hash="#"+e}}});a.history=new I;var R=function(t,e){var i=this;var r;if(t&&h.has(t,"constructor")){r=t.constructor}else{r=function(){return i.apply(this,arguments)}}h.extend(r,i,e);var s=function(){this.constructor=r};s.prototype=i.prototype;r.prototype=new s;if(t)h.extend(r.prototype,t);r.__super__=i.prototype;return r};d.extend=v.extend=k.extend=w.extend=I.extend=R;var U=function(){throw new Error('A "url" property or function must be specified')};var M=function(t,e){var i=e.error;e.error=function(r){if(i)i(t,r,e);t.trigger("error",t,r,e)}}}).call(this);
+//# sourceMappingURL=backbone-min.map
\ No newline at end of file


[83/93] [abbrv] jena git commit: JENA-846 : Implement IRI.toURI. Clean up exception declarations.

Posted by rv...@apache.org.
JENA-846 : Implement IRI.toURI. Clean up exception declarations.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/612c1bc2
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/612c1bc2
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/612c1bc2

Branch: refs/heads/hadoop-rdf
Commit: 612c1bc2a29c56de667ef475fd38a071e8668f78
Parents: 1e18e1d
Author: Andy Seaborne <an...@apache.org>
Authored: Sat Jan 10 19:08:08 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat Jan 10 19:08:08 2015 +0000

----------------------------------------------------------------------
 .../org/apache/jena/iri/impl/AbsIRIImpl.java    | 36 +++++++++-----------
 1 file changed, 16 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/612c1bc2/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java
index fec96ef..2416bf2 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java
@@ -18,14 +18,11 @@
 
 package org.apache.jena.iri.impl;
 
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import java.net.IDN;
+import java.io.UnsupportedEncodingException ;
+import java.net.* ;
+import java.util.ArrayList ;
+import java.util.Iterator ;
+import java.util.NoSuchElementException ;
 
 import org.apache.jena.iri.* ;
 /*
@@ -270,6 +267,12 @@ abstract public class AbsIRIImpl extends  IRI implements
         return new URL(toASCIIString());
     }
 
+    @Override
+    public URI toURI() {
+        String x = createASCIIString() ;
+        return URI.create(x) ;
+    }
+
     // TODO ToAsciiMask
     static long ToAsciiMask = 
         ~0l;
@@ -280,14 +283,14 @@ abstract public class AbsIRIImpl extends  IRI implements
             | (1l << DOUBLE_DASH_IN_REG_NAME);
 */
     @Override
-    public String toASCIIString() throws MalformedURLException {
+    public String toASCIIString() {
         if (hasExceptionMask(ToAsciiMask)) {
             return createASCIIString();
         }
         return toString();
     }
 
-    private String createASCIIString() throws MalformedURLException {
+    private String createASCIIString() {
         StringBuffer asciiString = new StringBuffer();
 
         if (has(SCHEME)) {
@@ -320,24 +323,17 @@ abstract public class AbsIRIImpl extends  IRI implements
         return asciiString.toString();
     }
 
-    private void regNameToAscii(StringBuffer asciiString, String host)
-            throws MalformedURLException {
+    private void regNameToAscii(StringBuffer asciiString, String host) {
         if ((errors(HOST) & ToAsciiMask) == 0) {
             asciiString.append(host);
             return;
         }
-       
         asciiString.append(domainToAscii(host));
-
     }
 
-    static CharSequence domainToAscii(String host) throws MalformedIDNException {
+    static CharSequence domainToAscii(String host) {
         
-        try {
-            return IDNP.toASCII(host, IDN.USE_STD3_ASCII_RULES|IDN.ALLOW_UNASSIGNED);
-        } catch (Exception e) {
-            throw new MalformedIDNException(e);
-        } 
+        return IDNP.toASCII(host, IDN.USE_STD3_ASCII_RULES|IDN.ALLOW_UNASSIGNED);
         /*
         int u[] = new int[host.length()];
         for (int i = 0; i < host.length(); i++)


[20/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/javascript/javascript.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/javascript/javascript.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/javascript/javascript.js
new file mode 100644
index 0000000..315674b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/javascript/javascript.js
@@ -0,0 +1,683 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+// TODO actually recognize syntax of TypeScript constructs
+
+(function(mod) {
+  if (typeof exports == "object" && typeof module == "object") // CommonJS
+    mod(require("../../lib/codemirror"));
+  else if (typeof define == "function" && define.amd) // AMD
+    define(["../../lib/codemirror"], mod);
+  else // Plain browser env
+    mod(CodeMirror);
+})(function(CodeMirror) {
+"use strict";
+
+CodeMirror.defineMode("javascript", function(config, parserConfig) {
+  var indentUnit = config.indentUnit;
+  var statementIndent = parserConfig.statementIndent;
+  var jsonldMode = parserConfig.jsonld;
+  var jsonMode = parserConfig.json || jsonldMode;
+  var isTS = parserConfig.typescript;
+
+  // Tokenizer
+
+  var keywords = function(){
+    function kw(type) {return {type: type, style: "keyword"};}
+    var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
+    var operator = kw("operator"), atom = {type: "atom", style: "atom"};
+
+    var jsKeywords = {
+      "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
+      "return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C, "debugger": C,
+      "var": kw("var"), "const": kw("var"), "let": kw("var"),
+      "function": kw("function"), "catch": kw("catch"),
+      "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
+      "in": operator, "typeof": operator, "instanceof": operator,
+      "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
+      "this": kw("this"), "module": kw("module"), "class": kw("class"), "super": kw("atom"),
+      "yield": C, "export": kw("export"), "import": kw("import"), "extends": C
+    };
+
+    // Extend the 'normal' keywords with the TypeScript language extensions
+    if (isTS) {
+      var type = {type: "variable", style: "variable-3"};
+      var tsKeywords = {
+        // object-like things
+        "interface": kw("interface"),
+        "extends": kw("extends"),
+        "constructor": kw("constructor"),
+
+        // scope modifiers
+        "public": kw("public"),
+        "private": kw("private"),
+        "protected": kw("protected"),
+        "static": kw("static"),
+
+        // types
+        "string": type, "number": type, "bool": type, "any": type
+      };
+
+      for (var attr in tsKeywords) {
+        jsKeywords[attr] = tsKeywords[attr];
+      }
+    }
+
+    return jsKeywords;
+  }();
+
+  var isOperatorChar = /[+\-*&%=<>!?|~^]/;
+  var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
+
+  function readRegexp(stream) {
+    var escaped = false, next, inSet = false;
+    while ((next = stream.next()) != null) {
+      if (!escaped) {
+        if (next == "/" && !inSet) return;
+        if (next == "[") inSet = true;
+        else if (inSet && next == "]") inSet = false;
+      }
+      escaped = !escaped && next == "\\";
+    }
+  }
+
+  // Used as scratch variables to communicate multiple values without
+  // consing up tons of objects.
+  var type, content;
+  function ret(tp, style, cont) {
+    type = tp; content = cont;
+    return style;
+  }
+  function tokenBase(stream, state) {
+    var ch = stream.next();
+    if (ch == '"' || ch == "'") {
+      state.tokenize = tokenString(ch);
+      return state.tokenize(stream, state);
+    } else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) {
+      return ret("number", "number");
+    } else if (ch == "." && stream.match("..")) {
+      return ret("spread", "meta");
+    } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
+      return ret(ch);
+    } else if (ch == "=" && stream.eat(">")) {
+      return ret("=>", "operator");
+    } else if (ch == "0" && stream.eat(/x/i)) {
+      stream.eatWhile(/[\da-f]/i);
+      return ret("number", "number");
+    } else if (/\d/.test(ch)) {
+      stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
+      return ret("number", "number");
+    } else if (ch == "/") {
+      if (stream.eat("*")) {
+        state.tokenize = tokenComment;
+        return tokenComment(stream, state);
+      } else if (stream.eat("/")) {
+        stream.skipToEnd();
+        return ret("comment", "comment");
+      } else if (state.lastType == "operator" || state.lastType == "keyword c" ||
+               state.lastType == "sof" || /^[\[{}\(,;:]$/.test(state.lastType)) {
+        readRegexp(stream);
+        stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla
+        return ret("regexp", "string-2");
+      } else {
+        stream.eatWhile(isOperatorChar);
+        return ret("operator", "operator", stream.current());
+      }
+    } else if (ch == "`") {
+      state.tokenize = tokenQuasi;
+      return tokenQuasi(stream, state);
+    } else if (ch == "#") {
+      stream.skipToEnd();
+      return ret("error", "error");
+    } else if (isOperatorChar.test(ch)) {
+      stream.eatWhile(isOperatorChar);
+      return ret("operator", "operator", stream.current());
+    } else {
+      stream.eatWhile(/[\w\$_]/);
+      var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
+      return (known && state.lastType != ".") ? ret(known.type, known.style, word) :
+                     ret("variable", "variable", word);
+    }
+  }
+
+  function tokenString(quote) {
+    return function(stream, state) {
+      var escaped = false, next;
+      if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
+        state.tokenize = tokenBase;
+        return ret("jsonld-keyword", "meta");
+      }
+      while ((next = stream.next()) != null) {
+        if (next == quote && !escaped) break;
+        escaped = !escaped && next == "\\";
+      }
+      if (!escaped) state.tokenize = tokenBase;
+      return ret("string", "string");
+    };
+  }
+
+  function tokenComment(stream, state) {
+    var maybeEnd = false, ch;
+    while (ch = stream.next()) {
+      if (ch == "/" && maybeEnd) {
+        state.tokenize = tokenBase;
+        break;
+      }
+      maybeEnd = (ch == "*");
+    }
+    return ret("comment", "comment");
+  }
+
+  function tokenQuasi(stream, state) {
+    var escaped = false, next;
+    while ((next = stream.next()) != null) {
+      if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
+        state.tokenize = tokenBase;
+        break;
+      }
+      escaped = !escaped && next == "\\";
+    }
+    return ret("quasi", "string-2", stream.current());
+  }
+
+  var brackets = "([{}])";
+  // This is a crude lookahead trick to try and notice that we're
+  // parsing the argument patterns for a fat-arrow function before we
+  // actually hit the arrow token. It only works if the arrow is on
+  // the same line as the arguments and there's no strange noise
+  // (comments) in between. Fallback is to only notice when we hit the
+  // arrow, and not declare the arguments as locals for the arrow
+  // body.
+  function findFatArrow(stream, state) {
+    if (state.fatArrowAt) state.fatArrowAt = null;
+    var arrow = stream.string.indexOf("=>", stream.start);
+    if (arrow < 0) return;
+
+    var depth = 0, sawSomething = false;
+    for (var pos = arrow - 1; pos >= 0; --pos) {
+      var ch = stream.string.charAt(pos);
+      var bracket = brackets.indexOf(ch);
+      if (bracket >= 0 && bracket < 3) {
+        if (!depth) { ++pos; break; }
+        if (--depth == 0) break;
+      } else if (bracket >= 3 && bracket < 6) {
+        ++depth;
+      } else if (/[$\w]/.test(ch)) {
+        sawSomething = true;
+      } else if (sawSomething && !depth) {
+        ++pos;
+        break;
+      }
+    }
+    if (sawSomething && !depth) state.fatArrowAt = pos;
+  }
+
+  // Parser
+
+  var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true};
+
+  function JSLexical(indented, column, type, align, prev, info) {
+    this.indented = indented;
+    this.column = column;
+    this.type = type;
+    this.prev = prev;
+    this.info = info;
+    if (align != null) this.align = align;
+  }
+
+  function inScope(state, varname) {
+    for (var v = state.localVars; v; v = v.next)
+      if (v.name == varname) return true;
+    for (var cx = state.context; cx; cx = cx.prev) {
+      for (var v = cx.vars; v; v = v.next)
+        if (v.name == varname) return true;
+    }
+  }
+
+  function parseJS(state, style, type, content, stream) {
+    var cc = state.cc;
+    // Communicate our context to the combinators.
+    // (Less wasteful than consing up a hundred closures on every call.)
+    cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;
+
+    if (!state.lexical.hasOwnProperty("align"))
+      state.lexical.align = true;
+
+    while(true) {
+      var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
+      if (combinator(type, content)) {
+        while(cc.length && cc[cc.length - 1].lex)
+          cc.pop()();
+        if (cx.marked) return cx.marked;
+        if (type == "variable" && inScope(state, content)) return "variable-2";
+        return style;
+      }
+    }
+  }
+
+  // Combinator utils
+
+  var cx = {state: null, column: null, marked: null, cc: null};
+  function pass() {
+    for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
+  }
+  function cont() {
+    pass.apply(null, arguments);
+    return true;
+  }
+  function register(varname) {
+    function inList(list) {
+      for (var v = list; v; v = v.next)
+        if (v.name == varname) return true;
+      return false;
+    }
+    var state = cx.state;
+    if (state.context) {
+      cx.marked = "def";
+      if (inList(state.localVars)) return;
+      state.localVars = {name: varname, next: state.localVars};
+    } else {
+      if (inList(state.globalVars)) return;
+      if (parserConfig.globalVars)
+        state.globalVars = {name: varname, next: state.globalVars};
+    }
+  }
+
+  // Combinators
+
+  var defaultVars = {name: "this", next: {name: "arguments"}};
+  function pushcontext() {
+    cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
+    cx.state.localVars = defaultVars;
+  }
+  function popcontext() {
+    cx.state.localVars = cx.state.context.vars;
+    cx.state.context = cx.state.context.prev;
+  }
+  function pushlex(type, info) {
+    var result = function() {
+      var state = cx.state, indent = state.indented;
+      if (state.lexical.type == "stat") indent = state.lexical.indented;
+      state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
+    };
+    result.lex = true;
+    return result;
+  }
+  function poplex() {
+    var state = cx.state;
+    if (state.lexical.prev) {
+      if (state.lexical.type == ")")
+        state.indented = state.lexical.indented;
+      state.lexical = state.lexical.prev;
+    }
+  }
+  poplex.lex = true;
+
+  function expect(wanted) {
+    function exp(type) {
+      if (type == wanted) return cont();
+      else if (wanted == ";") return pass();
+      else return cont(exp);
+    };
+    return exp;
+  }
+
+  function statement(type, value) {
+    if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);
+    if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
+    if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
+    if (type == "{") return cont(pushlex("}"), block, poplex);
+    if (type == ";") return cont();
+    if (type == "if") {
+      if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
+        cx.state.cc.pop()();
+      return cont(pushlex("form"), expression, statement, poplex, maybeelse);
+    }
+    if (type == "function") return cont(functiondef);
+    if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
+    if (type == "variable") return cont(pushlex("stat"), maybelabel);
+    if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
+                                      block, poplex, poplex);
+    if (type == "case") return cont(expression, expect(":"));
+    if (type == "default") return cont(expect(":"));
+    if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
+                                     statement, poplex, popcontext);
+    if (type == "module") return cont(pushlex("form"), pushcontext, afterModule, popcontext, poplex);
+    if (type == "class") return cont(pushlex("form"), className, poplex);
+    if (type == "export") return cont(pushlex("form"), afterExport, poplex);
+    if (type == "import") return cont(pushlex("form"), afterImport, poplex);
+    return pass(pushlex("stat"), expression, expect(";"), poplex);
+  }
+  function expression(type) {
+    return expressionInner(type, false);
+  }
+  function expressionNoComma(type) {
+    return expressionInner(type, true);
+  }
+  function expressionInner(type, noComma) {
+    if (cx.state.fatArrowAt == cx.stream.start) {
+      var body = noComma ? arrowBodyNoComma : arrowBody;
+      if (type == "(") return cont(pushcontext, pushlex(")"), commasep(pattern, ")"), poplex, expect("=>"), body, popcontext);
+      else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
+    }
+
+    var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
+    if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
+    if (type == "function") return cont(functiondef, maybeop);
+    if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
+    if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop);
+    if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
+    if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
+    if (type == "{") return contCommasep(objprop, "}", null, maybeop);
+    if (type == "quasi") { return pass(quasi, maybeop); }
+    return cont();
+  }
+  function maybeexpression(type) {
+    if (type.match(/[;\}\)\],]/)) return pass();
+    return pass(expression);
+  }
+  function maybeexpressionNoComma(type) {
+    if (type.match(/[;\}\)\],]/)) return pass();
+    return pass(expressionNoComma);
+  }
+
+  function maybeoperatorComma(type, value) {
+    if (type == ",") return cont(expression);
+    return maybeoperatorNoComma(type, value, false);
+  }
+  function maybeoperatorNoComma(type, value, noComma) {
+    var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
+    var expr = noComma == false ? expression : expressionNoComma;
+    if (value == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
+    if (type == "operator") {
+      if (/\+\+|--/.test(value)) return cont(me);
+      if (value == "?") return cont(expression, expect(":"), expr);
+      return cont(expr);
+    }
+    if (type == "quasi") { return pass(quasi, me); }
+    if (type == ";") return;
+    if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
+    if (type == ".") return cont(property, me);
+    if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
+  }
+  function quasi(type, value) {
+    if (type != "quasi") return pass();
+    if (value.slice(value.length - 2) != "${") return cont(quasi);
+    return cont(expression, continueQuasi);
+  }
+  function continueQuasi(type) {
+    if (type == "}") {
+      cx.marked = "string-2";
+      cx.state.tokenize = tokenQuasi;
+      return cont(quasi);
+    }
+  }
+  function arrowBody(type) {
+    findFatArrow(cx.stream, cx.state);
+    if (type == "{") return pass(statement);
+    return pass(expression);
+  }
+  function arrowBodyNoComma(type) {
+    findFatArrow(cx.stream, cx.state);
+    if (type == "{") return pass(statement);
+    return pass(expressionNoComma);
+  }
+  function maybelabel(type) {
+    if (type == ":") return cont(poplex, statement);
+    return pass(maybeoperatorComma, expect(";"), poplex);
+  }
+  function property(type) {
+    if (type == "variable") {cx.marked = "property"; return cont();}
+  }
+  function objprop(type, value) {
+    if (type == "variable" || cx.style == "keyword") {
+      cx.marked = "property";
+      if (value == "get" || value == "set") return cont(getterSetter);
+      return cont(afterprop);
+    } else if (type == "number" || type == "string") {
+      cx.marked = jsonldMode ? "property" : (cx.style + " property");
+      return cont(afterprop);
+    } else if (type == "jsonld-keyword") {
+      return cont(afterprop);
+    } else if (type == "[") {
+      return cont(expression, expect("]"), afterprop);
+    }
+  }
+  function getterSetter(type) {
+    if (type != "variable") return pass(afterprop);
+    cx.marked = "property";
+    return cont(functiondef);
+  }
+  function afterprop(type) {
+    if (type == ":") return cont(expressionNoComma);
+    if (type == "(") return pass(functiondef);
+  }
+  function commasep(what, end) {
+    function proceed(type) {
+      if (type == ",") {
+        var lex = cx.state.lexical;
+        if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
+        return cont(what, proceed);
+      }
+      if (type == end) return cont();
+      return cont(expect(end));
+    }
+    return function(type) {
+      if (type == end) return cont();
+      return pass(what, proceed);
+    };
+  }
+  function contCommasep(what, end, info) {
+    for (var i = 3; i < arguments.length; i++)
+      cx.cc.push(arguments[i]);
+    return cont(pushlex(end, info), commasep(what, end), poplex);
+  }
+  function block(type) {
+    if (type == "}") return cont();
+    return pass(statement, block);
+  }
+  function maybetype(type) {
+    if (isTS && type == ":") return cont(typedef);
+  }
+  function typedef(type) {
+    if (type == "variable"){cx.marked = "variable-3"; return cont();}
+  }
+  function vardef() {
+    return pass(pattern, maybetype, maybeAssign, vardefCont);
+  }
+  function pattern(type, value) {
+    if (type == "variable") { register(value); return cont(); }
+    if (type == "[") return contCommasep(pattern, "]");
+    if (type == "{") return contCommasep(proppattern, "}");
+  }
+  function proppattern(type, value) {
+    if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
+      register(value);
+      return cont(maybeAssign);
+    }
+    if (type == "variable") cx.marked = "property";
+    return cont(expect(":"), pattern, maybeAssign);
+  }
+  function maybeAssign(_type, value) {
+    if (value == "=") return cont(expressionNoComma);
+  }
+  function vardefCont(type) {
+    if (type == ",") return cont(vardef);
+  }
+  function maybeelse(type, value) {
+    if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
+  }
+  function forspec(type) {
+    if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
+  }
+  function forspec1(type) {
+    if (type == "var") return cont(vardef, expect(";"), forspec2);
+    if (type == ";") return cont(forspec2);
+    if (type == "variable") return cont(formaybeinof);
+    return pass(expression, expect(";"), forspec2);
+  }
+  function formaybeinof(_type, value) {
+    if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
+    return cont(maybeoperatorComma, forspec2);
+  }
+  function forspec2(type, value) {
+    if (type == ";") return cont(forspec3);
+    if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
+    return pass(expression, expect(";"), forspec3);
+  }
+  function forspec3(type) {
+    if (type != ")") cont(expression);
+  }
+  function functiondef(type, value) {
+    if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
+    if (type == "variable") {register(value); return cont(functiondef);}
+    if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, statement, popcontext);
+  }
+  function funarg(type) {
+    if (type == "spread") return cont(funarg);
+    return pass(pattern, maybetype);
+  }
+  function className(type, value) {
+    if (type == "variable") {register(value); return cont(classNameAfter);}
+  }
+  function classNameAfter(type, value) {
+    if (value == "extends") return cont(expression, classNameAfter);
+    if (type == "{") return cont(pushlex("}"), classBody, poplex);
+  }
+  function classBody(type, value) {
+    if (type == "variable" || cx.style == "keyword") {
+      cx.marked = "property";
+      if (value == "get" || value == "set") return cont(classGetterSetter, functiondef, classBody);
+      return cont(functiondef, classBody);
+    }
+    if (value == "*") {
+      cx.marked = "keyword";
+      return cont(classBody);
+    }
+    if (type == ";") return cont(classBody);
+    if (type == "}") return cont();
+  }
+  function classGetterSetter(type) {
+    if (type != "variable") return pass();
+    cx.marked = "property";
+    return cont();
+  }
+  function afterModule(type, value) {
+    if (type == "string") return cont(statement);
+    if (type == "variable") { register(value); return cont(maybeFrom); }
+  }
+  function afterExport(_type, value) {
+    if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
+    if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
+    return pass(statement);
+  }
+  function afterImport(type) {
+    if (type == "string") return cont();
+    return pass(importSpec, maybeFrom);
+  }
+  function importSpec(type, value) {
+    if (type == "{") return contCommasep(importSpec, "}");
+    if (type == "variable") register(value);
+    return cont();
+  }
+  function maybeFrom(_type, value) {
+    if (value == "from") { cx.marked = "keyword"; return cont(expression); }
+  }
+  function arrayLiteral(type) {
+    if (type == "]") return cont();
+    return pass(expressionNoComma, maybeArrayComprehension);
+  }
+  function maybeArrayComprehension(type) {
+    if (type == "for") return pass(comprehension, expect("]"));
+    if (type == ",") return cont(commasep(expressionNoComma, "]"));
+    return pass(commasep(expressionNoComma, "]"));
+  }
+  function comprehension(type) {
+    if (type == "for") return cont(forspec, comprehension);
+    if (type == "if") return cont(expression, comprehension);
+  }
+
+  // Interface
+
+  return {
+    startState: function(basecolumn) {
+      var state = {
+        tokenize: tokenBase,
+        lastType: "sof",
+        cc: [],
+        lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
+        localVars: parserConfig.localVars,
+        context: parserConfig.localVars && {vars: parserConfig.localVars},
+        indented: 0
+      };
+      if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
+        state.globalVars = parserConfig.globalVars;
+      return state;
+    },
+
+    token: function(stream, state) {
+      if (stream.sol()) {
+        if (!state.lexical.hasOwnProperty("align"))
+          state.lexical.align = false;
+        state.indented = stream.indentation();
+        findFatArrow(stream, state);
+      }
+      if (state.tokenize != tokenComment && stream.eatSpace()) return null;
+      var style = state.tokenize(stream, state);
+      if (type == "comment") return style;
+      state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
+      return parseJS(state, style, type, content, stream);
+    },
+
+    indent: function(state, textAfter) {
+      if (state.tokenize == tokenComment) return CodeMirror.Pass;
+      if (state.tokenize != tokenBase) return 0;
+      var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
+      // Kludge to prevent 'maybelse' from blocking lexical scope pops
+      if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
+        var c = state.cc[i];
+        if (c == poplex) lexical = lexical.prev;
+        else if (c != maybeelse) break;
+      }
+      if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
+      if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
+        lexical = lexical.prev;
+      var type = lexical.type, closing = firstChar == type;
+
+      if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
+      else if (type == "form" && firstChar == "{") return lexical.indented;
+      else if (type == "form") return lexical.indented + indentUnit;
+      else if (type == "stat")
+        return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? statementIndent || indentUnit : 0);
+      else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
+        return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
+      else if (lexical.align) return lexical.column + (closing ? 0 : 1);
+      else return lexical.indented + (closing ? 0 : indentUnit);
+    },
+
+    electricChars: ":{}",
+    blockCommentStart: jsonMode ? null : "/*",
+    blockCommentEnd: jsonMode ? null : "*/",
+    lineComment: jsonMode ? null : "//",
+    fold: "brace",
+
+    helperType: jsonMode ? "json" : "javascript",
+    jsonldMode: jsonldMode,
+    jsonMode: jsonMode
+  };
+});
+
+CodeMirror.registerHelper("wordChars", "javascript", /[\\w$]/);
+
+CodeMirror.defineMIME("text/javascript", "javascript");
+CodeMirror.defineMIME("text/ecmascript", "javascript");
+CodeMirror.defineMIME("application/javascript", "javascript");
+CodeMirror.defineMIME("application/x-javascript", "javascript");
+CodeMirror.defineMIME("application/ecmascript", "javascript");
+CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
+CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
+CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true});
+CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
+CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
+
+});

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/sparql/sparql.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/sparql/sparql.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/sparql/sparql.js
new file mode 100644
index 0000000..64dbb61
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/sparql/sparql.js
@@ -0,0 +1,160 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+(function(mod) {
+  if (typeof exports == "object" && typeof module == "object") // CommonJS
+    mod(require("../../lib/codemirror"));
+  else if (typeof define == "function" && define.amd) // AMD
+    define(["../../lib/codemirror"], mod);
+  else // Plain browser env
+    mod(CodeMirror);
+})(function(CodeMirror) {
+"use strict";
+
+CodeMirror.defineMode("sparql", function(config) {
+  var indentUnit = config.indentUnit;
+  var curPunc;
+
+  function wordRegexp(words) {
+    return new RegExp("^(?:" + words.join("|") + ")$", "i");
+  }
+  var ops = wordRegexp(["str", "lang", "langmatches", "datatype", "bound", "sameterm", "isiri", "isuri",
+                        "isblank", "isliteral", "a"]);
+  var keywords = wordRegexp(["base", "prefix", "select", "distinct", "reduced", "construct", "describe",
+                             "ask", "from", "named", "where", "order", "limit", "offset", "filter", "optional",
+                             "graph", "by", "asc", "desc", "as", "having", "undef", "values", "group",
+                             "minus", "in", "not", "service", "silent", "using", "insert", "delete", "union",
+                             "data", "copy", "to", "move", "add", "create", "drop", "clear", "load"]);
+  var operatorChars = /[*+\-<>=&|]/;
+
+  function tokenBase(stream, state) {
+    var ch = stream.next();
+    curPunc = null;
+    if (ch == "$" || ch == "?") {
+      stream.match(/^[\w\d]*/);
+      return "variable-2";
+    }
+    else if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) {
+      stream.match(/^[^\s\u00a0>]*>?/);
+      return "atom";
+    }
+    else if (ch == "\"" || ch == "'") {
+      state.tokenize = tokenLiteral(ch);
+      return state.tokenize(stream, state);
+    }
+    else if (/[{}\(\),\.;\[\]]/.test(ch)) {
+      curPunc = ch;
+      return null;
+    }
+    else if (ch == "#") {
+      stream.skipToEnd();
+      return "comment";
+    }
+    else if (operatorChars.test(ch)) {
+      stream.eatWhile(operatorChars);
+      return null;
+    }
+    else if (ch == ":") {
+      stream.eatWhile(/[\w\d\._\-]/);
+      return "atom";
+    }
+    else {
+      stream.eatWhile(/[_\w\d]/);
+      if (stream.eat(":")) {
+        stream.eatWhile(/[\w\d_\-]/);
+        return "atom";
+      }
+      var word = stream.current();
+      if (ops.test(word))
+        return null;
+      else if (keywords.test(word))
+        return "keyword";
+      else
+        return "variable";
+    }
+  }
+
+  function tokenLiteral(quote) {
+    return function(stream, state) {
+      var escaped = false, ch;
+      while ((ch = stream.next()) != null) {
+        if (ch == quote && !escaped) {
+          state.tokenize = tokenBase;
+          break;
+        }
+        escaped = !escaped && ch == "\\";
+      }
+      return "string";
+    };
+  }
+
+  function pushContext(state, type, col) {
+    state.context = {prev: state.context, indent: state.indent, col: col, type: type};
+  }
+  function popContext(state) {
+    state.indent = state.context.indent;
+    state.context = state.context.prev;
+  }
+
+  return {
+    startState: function() {
+      return {tokenize: tokenBase,
+              context: null,
+              indent: 0,
+              col: 0};
+    },
+
+    token: function(stream, state) {
+      if (stream.sol()) {
+        if (state.context && state.context.align == null) state.context.align = false;
+        state.indent = stream.indentation();
+      }
+      if (stream.eatSpace()) return null;
+      var style = state.tokenize(stream, state);
+
+      if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") {
+        state.context.align = true;
+      }
+
+      if (curPunc == "(") pushContext(state, ")", stream.column());
+      else if (curPunc == "[") pushContext(state, "]", stream.column());
+      else if (curPunc == "{") pushContext(state, "}", stream.column());
+      else if (/[\]\}\)]/.test(curPunc)) {
+        while (state.context && state.context.type == "pattern") popContext(state);
+        if (state.context && curPunc == state.context.type) popContext(state);
+      }
+      else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state);
+      else if (/atom|string|variable/.test(style) && state.context) {
+        if (/[\}\]]/.test(state.context.type))
+          pushContext(state, "pattern", stream.column());
+        else if (state.context.type == "pattern" && !state.context.align) {
+          state.context.align = true;
+          state.context.col = stream.column();
+        }
+      }
+
+      return style;
+    },
+
+    indent: function(state, textAfter) {
+      var firstChar = textAfter && textAfter.charAt(0);
+      var context = state.context;
+      if (/[\]\}]/.test(firstChar))
+        while (context && context.type == "pattern") context = context.prev;
+
+      var closing = context && firstChar == context.type;
+      if (!context)
+        return 0;
+      else if (context.type == "pattern")
+        return context.col;
+      else if (context.align)
+        return context.col + (closing ? 0 : 1);
+      else
+        return context.indent + (closing ? 0 : indentUnit);
+    }
+  };
+});
+
+CodeMirror.defineMIME("application/x-sparql-query", "sparql");
+
+});

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/turtle/turtle.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/turtle/turtle.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/turtle/turtle.js
new file mode 100644
index 0000000..a4727ed
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/turtle/turtle.js
@@ -0,0 +1,160 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+(function(mod) {
+  if (typeof exports == "object" && typeof module == "object") // CommonJS
+    mod(require("../../lib/codemirror"));
+  else if (typeof define == "function" && define.amd) // AMD
+    define(["../../lib/codemirror"], mod);
+  else // Plain browser env
+    mod(CodeMirror);
+})(function(CodeMirror) {
+"use strict";
+
+CodeMirror.defineMode("turtle", function(config) {
+  var indentUnit = config.indentUnit;
+  var curPunc;
+
+  function wordRegexp(words) {
+    return new RegExp("^(?:" + words.join("|") + ")$", "i");
+  }
+  var ops = wordRegexp([]);
+  var keywords = wordRegexp(["@prefix", "@base", "a"]);
+  var operatorChars = /[*+\-<>=&|]/;
+
+  function tokenBase(stream, state) {
+    var ch = stream.next();
+    curPunc = null;
+    if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) {
+      stream.match(/^[^\s\u00a0>]*>?/);
+      return "atom";
+    }
+    else if (ch == "\"" || ch == "'") {
+      state.tokenize = tokenLiteral(ch);
+      return state.tokenize(stream, state);
+    }
+    else if (/[{}\(\),\.;\[\]]/.test(ch)) {
+      curPunc = ch;
+      return null;
+    }
+    else if (ch == "#") {
+      stream.skipToEnd();
+      return "comment";
+    }
+    else if (operatorChars.test(ch)) {
+      stream.eatWhile(operatorChars);
+      return null;
+    }
+    else if (ch == ":") {
+          return "operator";
+        } else {
+      stream.eatWhile(/[_\w\d]/);
+      if(stream.peek() == ":") {
+        return "variable-3";
+      } else {
+             var word = stream.current();
+
+             if(keywords.test(word)) {
+                        return "meta";
+             }
+
+             if(ch >= "A" && ch <= "Z") {
+                    return "comment";
+                 } else {
+                        return "keyword";
+                 }
+      }
+      var word = stream.current();
+      if (ops.test(word))
+        return null;
+      else if (keywords.test(word))
+        return "meta";
+      else
+        return "variable";
+    }
+  }
+
+  function tokenLiteral(quote) {
+    return function(stream, state) {
+      var escaped = false, ch;
+      while ((ch = stream.next()) != null) {
+        if (ch == quote && !escaped) {
+          state.tokenize = tokenBase;
+          break;
+        }
+        escaped = !escaped && ch == "\\";
+      }
+      return "string";
+    };
+  }
+
+  function pushContext(state, type, col) {
+    state.context = {prev: state.context, indent: state.indent, col: col, type: type};
+  }
+  function popContext(state) {
+    state.indent = state.context.indent;
+    state.context = state.context.prev;
+  }
+
+  return {
+    startState: function() {
+      return {tokenize: tokenBase,
+              context: null,
+              indent: 0,
+              col: 0};
+    },
+
+    token: function(stream, state) {
+      if (stream.sol()) {
+        if (state.context && state.context.align == null) state.context.align = false;
+        state.indent = stream.indentation();
+      }
+      if (stream.eatSpace()) return null;
+      var style = state.tokenize(stream, state);
+
+      if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") {
+        state.context.align = true;
+      }
+
+      if (curPunc == "(") pushContext(state, ")", stream.column());
+      else if (curPunc == "[") pushContext(state, "]", stream.column());
+      else if (curPunc == "{") pushContext(state, "}", stream.column());
+      else if (/[\]\}\)]/.test(curPunc)) {
+        while (state.context && state.context.type == "pattern") popContext(state);
+        if (state.context && curPunc == state.context.type) popContext(state);
+      }
+      else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state);
+      else if (/atom|string|variable/.test(style) && state.context) {
+        if (/[\}\]]/.test(state.context.type))
+          pushContext(state, "pattern", stream.column());
+        else if (state.context.type == "pattern" && !state.context.align) {
+          state.context.align = true;
+          state.context.col = stream.column();
+        }
+      }
+
+      return style;
+    },
+
+    indent: function(state, textAfter) {
+      var firstChar = textAfter && textAfter.charAt(0);
+      var context = state.context;
+      if (/[\]\}]/.test(firstChar))
+        while (context && context.type == "pattern") context = context.prev;
+
+      var closing = context && firstChar == context.type;
+      if (!context)
+        return 0;
+      else if (context.type == "pattern")
+        return context.col;
+      else if (context.align)
+        return context.col + (closing ? 0 : 1);
+      else
+        return context.indent + (closing ? 0 : indentUnit);
+    }
+  };
+});
+
+CodeMirror.defineMIME("text/turtle", "turtle");
+
+});

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/xml/xml.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/xml/xml.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/xml/xml.js
new file mode 100644
index 0000000..786507d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/mode/xml/xml.js
@@ -0,0 +1,384 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+(function(mod) {
+  if (typeof exports == "object" && typeof module == "object") // CommonJS
+    mod(require("../../lib/codemirror"));
+  else if (typeof define == "function" && define.amd) // AMD
+    define(["../../lib/codemirror"], mod);
+  else // Plain browser env
+    mod(CodeMirror);
+})(function(CodeMirror) {
+"use strict";
+
+CodeMirror.defineMode("xml", function(config, parserConfig) {
+  var indentUnit = config.indentUnit;
+  var multilineTagIndentFactor = parserConfig.multilineTagIndentFactor || 1;
+  var multilineTagIndentPastTag = parserConfig.multilineTagIndentPastTag;
+  if (multilineTagIndentPastTag == null) multilineTagIndentPastTag = true;
+
+  var Kludges = parserConfig.htmlMode ? {
+    autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
+                      'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
+                      'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
+                      'track': true, 'wbr': true},
+    implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
+                       'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
+                       'th': true, 'tr': true},
+    contextGrabbers: {
+      'dd': {'dd': true, 'dt': true},
+      'dt': {'dd': true, 'dt': true},
+      'li': {'li': true},
+      'option': {'option': true, 'optgroup': true},
+      'optgroup': {'optgroup': true},
+      'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
+            'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
+            'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
+            'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
+            'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
+      'rp': {'rp': true, 'rt': true},
+      'rt': {'rp': true, 'rt': true},
+      'tbody': {'tbody': true, 'tfoot': true},
+      'td': {'td': true, 'th': true},
+      'tfoot': {'tbody': true},
+      'th': {'td': true, 'th': true},
+      'thead': {'tbody': true, 'tfoot': true},
+      'tr': {'tr': true}
+    },
+    doNotIndent: {"pre": true},
+    allowUnquoted: true,
+    allowMissing: true,
+    caseFold: true
+  } : {
+    autoSelfClosers: {},
+    implicitlyClosed: {},
+    contextGrabbers: {},
+    doNotIndent: {},
+    allowUnquoted: false,
+    allowMissing: false,
+    caseFold: false
+  };
+  var alignCDATA = parserConfig.alignCDATA;
+
+  // Return variables for tokenizers
+  var type, setStyle;
+
+  function inText(stream, state) {
+    function chain(parser) {
+      state.tokenize = parser;
+      return parser(stream, state);
+    }
+
+    var ch = stream.next();
+    if (ch == "<") {
+      if (stream.eat("!")) {
+        if (stream.eat("[")) {
+          if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
+          else return null;
+        } else if (stream.match("--")) {
+          return chain(inBlock("comment", "-->"));
+        } else if (stream.match("DOCTYPE", true, true)) {
+          stream.eatWhile(/[\w\._\-]/);
+          return chain(doctype(1));
+        } else {
+          return null;
+        }
+      } else if (stream.eat("?")) {
+        stream.eatWhile(/[\w\._\-]/);
+        state.tokenize = inBlock("meta", "?>");
+        return "meta";
+      } else {
+        type = stream.eat("/") ? "closeTag" : "openTag";
+        state.tokenize = inTag;
+        return "tag bracket";
+      }
+    } else if (ch == "&") {
+      var ok;
+      if (stream.eat("#")) {
+        if (stream.eat("x")) {
+          ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
+        } else {
+          ok = stream.eatWhile(/[\d]/) && stream.eat(";");
+        }
+      } else {
+        ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
+      }
+      return ok ? "atom" : "error";
+    } else {
+      stream.eatWhile(/[^&<]/);
+      return null;
+    }
+  }
+
+  function inTag(stream, state) {
+    var ch = stream.next();
+    if (ch == ">" || (ch == "/" && stream.eat(">"))) {
+      state.tokenize = inText;
+      type = ch == ">" ? "endTag" : "selfcloseTag";
+      return "tag bracket";
+    } else if (ch == "=") {
+      type = "equals";
+      return null;
+    } else if (ch == "<") {
+      state.tokenize = inText;
+      state.state = baseState;
+      state.tagName = state.tagStart = null;
+      var next = state.tokenize(stream, state);
+      return next ? next + " tag error" : "tag error";
+    } else if (/[\'\"]/.test(ch)) {
+      state.tokenize = inAttribute(ch);
+      state.stringStartCol = stream.column();
+      return state.tokenize(stream, state);
+    } else {
+      stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
+      return "word";
+    }
+  }
+
+  function inAttribute(quote) {
+    var closure = function(stream, state) {
+      while (!stream.eol()) {
+        if (stream.next() == quote) {
+          state.tokenize = inTag;
+          break;
+        }
+      }
+      return "string";
+    };
+    closure.isInAttribute = true;
+    return closure;
+  }
+
+  function inBlock(style, terminator) {
+    return function(stream, state) {
+      while (!stream.eol()) {
+        if (stream.match(terminator)) {
+          state.tokenize = inText;
+          break;
+        }
+        stream.next();
+      }
+      return style;
+    };
+  }
+  function doctype(depth) {
+    return function(stream, state) {
+      var ch;
+      while ((ch = stream.next()) != null) {
+        if (ch == "<") {
+          state.tokenize = doctype(depth + 1);
+          return state.tokenize(stream, state);
+        } else if (ch == ">") {
+          if (depth == 1) {
+            state.tokenize = inText;
+            break;
+          } else {
+            state.tokenize = doctype(depth - 1);
+            return state.tokenize(stream, state);
+          }
+        }
+      }
+      return "meta";
+    };
+  }
+
+  function Context(state, tagName, startOfLine) {
+    this.prev = state.context;
+    this.tagName = tagName;
+    this.indent = state.indented;
+    this.startOfLine = startOfLine;
+    if (Kludges.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
+      this.noIndent = true;
+  }
+  function popContext(state) {
+    if (state.context) state.context = state.context.prev;
+  }
+  function maybePopContext(state, nextTagName) {
+    var parentTagName;
+    while (true) {
+      if (!state.context) {
+        return;
+      }
+      parentTagName = state.context.tagName;
+      if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) ||
+          !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
+        return;
+      }
+      popContext(state);
+    }
+  }
+
+  function baseState(type, stream, state) {
+    if (type == "openTag") {
+      state.tagStart = stream.column();
+      return tagNameState;
+    } else if (type == "closeTag") {
+      return closeTagNameState;
+    } else {
+      return baseState;
+    }
+  }
+  function tagNameState(type, stream, state) {
+    if (type == "word") {
+      state.tagName = stream.current();
+      setStyle = "tag";
+      return attrState;
+    } else {
+      setStyle = "error";
+      return tagNameState;
+    }
+  }
+  function closeTagNameState(type, stream, state) {
+    if (type == "word") {
+      var tagName = stream.current();
+      if (state.context && state.context.tagName != tagName &&
+          Kludges.implicitlyClosed.hasOwnProperty(state.context.tagName))
+        popContext(state);
+      if (state.context && state.context.tagName == tagName) {
+        setStyle = "tag";
+        return closeState;
+      } else {
+        setStyle = "tag error";
+        return closeStateErr;
+      }
+    } else {
+      setStyle = "error";
+      return closeStateErr;
+    }
+  }
+
+  function closeState(type, _stream, state) {
+    if (type != "endTag") {
+      setStyle = "error";
+      return closeState;
+    }
+    popContext(state);
+    return baseState;
+  }
+  function closeStateErr(type, stream, state) {
+    setStyle = "error";
+    return closeState(type, stream, state);
+  }
+
+  function attrState(type, _stream, state) {
+    if (type == "word") {
+      setStyle = "attribute";
+      return attrEqState;
+    } else if (type == "endTag" || type == "selfcloseTag") {
+      var tagName = state.tagName, tagStart = state.tagStart;
+      state.tagName = state.tagStart = null;
+      if (type == "selfcloseTag" ||
+          Kludges.autoSelfClosers.hasOwnProperty(tagName)) {
+        maybePopContext(state, tagName);
+      } else {
+        maybePopContext(state, tagName);
+        state.context = new Context(state, tagName, tagStart == state.indented);
+      }
+      return baseState;
+    }
+    setStyle = "error";
+    return attrState;
+  }
+  function attrEqState(type, stream, state) {
+    if (type == "equals") return attrValueState;
+    if (!Kludges.allowMissing) setStyle = "error";
+    return attrState(type, stream, state);
+  }
+  function attrValueState(type, stream, state) {
+    if (type == "string") return attrContinuedState;
+    if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return attrState;}
+    setStyle = "error";
+    return attrState(type, stream, state);
+  }
+  function attrContinuedState(type, stream, state) {
+    if (type == "string") return attrContinuedState;
+    return attrState(type, stream, state);
+  }
+
+  return {
+    startState: function() {
+      return {tokenize: inText,
+              state: baseState,
+              indented: 0,
+              tagName: null, tagStart: null,
+              context: null};
+    },
+
+    token: function(stream, state) {
+      if (!state.tagName && stream.sol())
+        state.indented = stream.indentation();
+
+      if (stream.eatSpace()) return null;
+      type = null;
+      var style = state.tokenize(stream, state);
+      if ((style || type) && style != "comment") {
+        setStyle = null;
+        state.state = state.state(type || style, stream, state);
+        if (setStyle)
+          style = setStyle == "error" ? style + " error" : setStyle;
+      }
+      return style;
+    },
+
+    indent: function(state, textAfter, fullLine) {
+      var context = state.context;
+      // Indent multi-line strings (e.g. css).
+      if (state.tokenize.isInAttribute) {
+        if (state.tagStart == state.indented)
+          return state.stringStartCol + 1;
+        else
+          return state.indented + indentUnit;
+      }
+      if (context && context.noIndent) return CodeMirror.Pass;
+      if (state.tokenize != inTag && state.tokenize != inText)
+        return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
+      // Indent the starts of attribute names.
+      if (state.tagName) {
+        if (multilineTagIndentPastTag)
+          return state.tagStart + state.tagName.length + 2;
+        else
+          return state.tagStart + indentUnit * multilineTagIndentFactor;
+      }
+      if (alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
+      var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
+      if (tagAfter && tagAfter[1]) { // Closing tag spotted
+        while (context) {
+          if (context.tagName == tagAfter[2]) {
+            context = context.prev;
+            break;
+          } else if (Kludges.implicitlyClosed.hasOwnProperty(context.tagName)) {
+            context = context.prev;
+          } else {
+            break;
+          }
+        }
+      } else if (tagAfter) { // Opening tag spotted
+        while (context) {
+          var grabbers = Kludges.contextGrabbers[context.tagName];
+          if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))
+            context = context.prev;
+          else
+            break;
+        }
+      }
+      while (context && !context.startOfLine)
+        context = context.prev;
+      if (context) return context.indent + indentUnit;
+      else return 0;
+    },
+
+    electricInput: /<\/[\s\w:]+>$/,
+    blockCommentStart: "<!--",
+    blockCommentEnd: "-->",
+
+    configuration: parserConfig.htmlMode ? "html" : "xml",
+    helperType: parserConfig.htmlMode ? "html" : "xml"
+  };
+});
+
+CodeMirror.defineMIME("text/xml", "xml");
+CodeMirror.defineMIME("application/xml", "xml");
+if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
+  CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
+
+});


[63/93] [abbrv] jena git commit: UI fixes for FF\nThis closes #17

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/4e6da043/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js
index 6cf3527..9b5f81f 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js
@@ -1,5 +1,5 @@
 !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i;"undefined"!=typeof window?i=window:"undefined"!=typeof global?i=global:"undefined"!=typeof self&&(i=self),i.YASQE=e()}}(function(){var e;return function i(e,r,n){function o(s,a){if(!r[s]){if(!e[s]){var p="function"==typeof require&&require;if(!a&&p)return p(s,!0);if(t)return t(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var E=r[s]={exports:{}};e[s][0].call(E.exports,function(i){var r=e[s][1][i];return o(r?r:i)},E,E.exports,i,e,r,n)}return r[s].exports}for(var t="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,i){i.exports=e("./main.js")},{"./main.js":28}],2:[function(e){"use strict";var i=function(){try{return e("jquery")}catch(i){return window.jQuery}}();i.deparam=function(e,r){var n={},o={"true":!0,"false":!1,"null":null};i.each(e.replace(/\+/g,
 " ").split("&"),function(e,t){var s,a=t.split("="),p=decodeURIComponent(a[0]),l=n,E=0,u=p.split("]["),c=u.length-1;if(/\[/.test(u[0])&&/\]$/.test(u[c])){u[c]=u[c].replace(/\]$/,"");u=u.shift().split("[").concat(u);c=u.length-1}else c=0;if(2===a.length){s=decodeURIComponent(a[1]);r&&(s=s&&!isNaN(s)?+s:"undefined"===s?void 0:void 0!==o[s]?o[s]:s);if(c)for(;c>=E;E++){p=""===u[E]?l.length:u[E];l=l[p]=c>E?l[p]||(u[E+1]&&isNaN(u[E+1])?{}:[]):s}else i.isArray(n[p])?n[p].push(s):n[p]=void 0!==n[p]?[n[p],s]:s}else p&&(n[p]=r?void 0:"")});return n}},{jquery:void 0}],3:[function(i,r,n){(function(o){"object"==typeof n&&"object"==typeof r?o(function(){try{return i("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["codemirror"],o):o(CodeMirror)})(function(e){"use strict";e.defineMode("sparql11",function(e){function i(){var e,i,r="<[^<>\"'|{}^\\\x00- ]*>",n="[A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\
 u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]",o=n+"|_",t="("+o+"|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])",s="("+o+"|[0-9])("+o+"|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])*",a="\\?"+s,p="\\$"+s,E="("+n+")((("+t+")|\\.)*("+t+"))?",u="[0-9A-Fa-f]",c="(%"+u+u+")",d="(\\\\[_~\\.\\-!\\$&'\\(\\)\\*\\+,;=/\\?#@%])",N="("+c+"|"+d+")";if("sparql11"==l){e="("+o+"|:|[0-9]|"+N+")(("+t+"|\\.|:|"+N+")*("+t+"|:|"+N+"))?";i="_:("+o+"|[0-9])(("+t+"|\\.)*"+t+")?"}else{e="("+o+"|[0-9])((("+t+")|\\.)*("+t+"))?";i="_:"+e}var I="("+E+")?:",x=I+e,m="@[a-zA-Z]+(-[a-zA-Z0-9]+)*",L="[eE][\\+-]?[0-9]+",T="[0-9]+",A="(([0-9]+\\.[0-9]*)|(\\.[0-9]+))",g="(([0-9]+\\.[0-9]*"+L+")|(\\.[0-9]+"+L+")|([0-9]+"+L+"))",S="\\+"+T,R="\\+"+A,v="\\+"+g,h="-"+T,C="-"+A,f="-"+g,O="\\\\[tbnrf\\\\\"']",y="'(([^\\x27\\x5C\\x0A\\x0D])|"+O+")*'",P='"(([^\\x22\\x5C\\x0A\\x0D])|'+O+')*"',_="'''(('|'')?([^'\\\\]|"+O+"))*'''",D='"""(("|"")?([^"\\\\]|'+O+'))*"""',G="[\\x20\\x09\\x0D\\x0A]",b="#([^\\n\\r]*[\\
 n\\r]|[^\\n\\r]*$)",M="("+G+"|("+b+"))*",U="\\("+M+"\\)",V="\\["+M+"\\]",B={terminal:[{name:"WS",regex:new RegExp("^"+G+"+"),style:"ws"},{name:"COMMENT",regex:new RegExp("^"+b),style:"comment"},{name:"IRI_REF",regex:new RegExp("^"+r),style:"variable-3"},{name:"VAR1",regex:new RegExp("^"+a),style:"atom"},{name:"VAR2",regex:new RegExp("^"+p),style:"atom"},{name:"LANGTAG",regex:new RegExp("^"+m),style:"meta"},{name:"DOUBLE",regex:new RegExp("^"+g),style:"number"},{name:"DECIMAL",regex:new RegExp("^"+A),style:"number"},{name:"INTEGER",regex:new RegExp("^"+T),style:"number"},{name:"DOUBLE_POSITIVE",regex:new RegExp("^"+v),style:"number"},{name:"DECIMAL_POSITIVE",regex:new RegExp("^"+R),style:"number"},{name:"INTEGER_POSITIVE",regex:new RegExp("^"+S),style:"number"},{name:"DOUBLE_NEGATIVE",regex:new RegExp("^"+f),style:"number"},{name:"DECIMAL_NEGATIVE",regex:new RegExp("^"+C),style:"number"},{name:"INTEGER_NEGATIVE",regex:new RegExp("^"+h),style:"number"},{name:"STRING_LITERAL_LONG1",reg
 ex:new RegExp("^"+_),style:"string"},{name:"STRING_LITERAL_LONG2",regex:new RegExp("^"+D),style:"string"},{name:"STRING_LITERAL1",regex:new RegExp("^"+y),style:"string"},{name:"STRING_LITERAL2",regex:new RegExp("^"+P),style:"string"},{name:"NIL",regex:new RegExp("^"+U),style:"punc"},{name:"ANON",regex:new RegExp("^"+V),style:"punc"},{name:"PNAME_LN",regex:new RegExp("^"+x),style:"string-2"},{name:"PNAME_NS",regex:new RegExp("^"+I),style:"string-2"},{name:"BLANK_NODE_LABEL",regex:new RegExp("^"+i),style:"string-2"}]};return B}function r(e){var i=[],r=t[e];if(void 0!=r)for(var n in r)i.push(n.toString());else i.push(e);return i}function n(e,i){function n(){for(var i=null,r=0;r<d.length;++r){i=e.match(d[r].regex,!0,!1);if(i)return{cat:d[r].name,style:d[r].style,text:i[0]}}i=e.match(s,!0,!1);if(i)return{cat:e.current().toUpperCase(),style:"keyword",text:i[0]};i=e.match(a,!0,!1);if(i)return{cat:e.current(),style:"punc",text:i[0]};i=e.match(/^.[A-Za-z0-9]*/,!0,!1);return{cat:"<invalid_tok
 en>",style:"error",text:i[0]}}function o(){var r=e.column();i.errorStartPos=r;i.errorEndPos=r+u.text.length}function p(e){null==i.queryType&&("SELECT"==e||"CONSTRUCT"==e||"ASK"==e||"DESCRIBE"==e||"INSERT"==e||"DELETE"==e||"LOAD"==e||"CLEAR"==e||"CREATE"==e||"DROP"==e||"COPY"==e||"MOVE"==e||"ADD"==e)&&(i.queryType=e)}function l(e){"disallowVars"==e?i.allowVars=!1:"allowVars"==e?i.allowVars=!0:"disallowBnodes"==e?i.allowBnodes=!1:"allowBnodes"==e?i.allowBnodes=!0:"storeProperty"==e&&(i.storeProperty=!0)}function E(e){return(i.allowVars||"var"!=e)&&(i.allowBnodes||"blankNode"!=e&&"blankNodePropertyList"!=e&&"blankNodePropertyListPath"!=e)}0==e.pos&&(i.possibleCurrent=i.possibleNext);var u=n();if("<invalid_token>"==u.cat){if(1==i.OK){i.OK=!1;o()}i.complete=!1;return u.style}if("WS"==u.cat||"COMMENT"==u.cat){i.possibleCurrent=i.possibleNext;return u.style}for(var c,N=!1,I=u.cat;i.stack.length>0&&I&&i.OK&&!N;){c=i.stack.pop();if(t[c]){var x=t[c][I];if(void 0!=x&&E(c)){for(var m=x.length-1
 ;m>=0;--m)i.stack.push(x[m]);l(c)}else{i.OK=!1;i.complete=!1;o();i.stack.push(c)}}else if(c==I){N=!0;p(c);for(var L=!0,T=i.stack.length;T>0;--T){var A=t[i.stack[T-1]];A&&A.$||(L=!1)}i.complete=L;if(i.storeProperty&&"punc"!=I.cat){i.lastProperty=u.text;i.storeProperty=!1}}else{i.OK=!1;i.complete=!1;o()}}if(!N&&i.OK){i.OK=!1;i.complete=!1;o()}i.possibleCurrent=i.possibleNext;i.possibleNext=r(i.stack[i.stack.length-1]);return u.style}function o(i,r){var n=0,o=i.stack.length-1;if(/^[\}\]\)]/.test(r)){for(var t=r.substr(0,1);o>=0;--o)if(i.stack[o]==t){--o;break}}else{var s=N[i.stack[o]];if(s){n+=s;--o}}for(;o>=0;--o){var s=I[i.stack[o]];s&&(n+=s)}return n*e.indentUnit}var t=(e.indentUnit,{"*[&&,valueLogical]":{"&&":["[&&,valueLogical]","*[&&,valueLogical]"],AS:[],")":[],",":[],"||":[],";":[]},"*[,,expression]":{",":["[,,expression]","*[,,expression]"],")":[]},"*[,,objectPath]":{",":["[,,objectPath]","*[,,objectPath]"],".":[],";":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],F
 ILTER:[],BIND:[],VALUES:[],"}":[]},"*[,,object]":{",":["[,,object]","*[,,object]"],".":[],";":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[/,pathEltOrInverse]":{"/":["[/,pathEltOrInverse]","*[/,pathEltOrInverse]"],"|":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[;,?[or([verbPath,verbSimple]),objectList]]":{";":["[;,?[or([verbPath,verbSimple]),objectList]]","*[;,?[or([verbPath,verbSimple]),objectList]]"],".":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[;,?[verb,objectList]]":{";":["[;,?[verb,objectList]]","*[;,?[verb,objectList]]"],".":[],"]":[],"}":[],GRAPH:[],"{":
 [],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[UNION,groupGraphPattern]":{UNION:["[UNION,groupGraphPattern]","*[UNION,groupGraphPattern]"],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[graphPatternNotTriples,?.,?triplesBlock]":{"{":["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["[graphPatternNotTriples,?.,?triplesBlock]","*[gr
 aphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":[]},"*[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["[quadsNotTriples,?.,?triplesTemplate]","*[quadsNotTriples,?.,?triplesTemplate]"],"}":[]},"*[|,pathOneInPropertySet]":{"|":["[|,pathOneInPropertySet]","*[|,pathOneInPropertySet]"],")":[]},"*[|,pathSequence]":{"|":["[|,pathSequence]","*[|,pathSequence]"],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSI
 TIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[||,conditionalAndExpression]":{"||":["[||,conditionalAndExpression]","*[||,conditionalAndExpression]"],AS:[],")":[],",":[],";":[]},"*dataBlockValue":{UNDEF:["dataBlockValue","*dataBlockValue"],IRI_REF:["dataBlockValue","*dataBlockValue"],TRUE:["dataBlockValue","*dataBlockValue"],FALSE:["dataBlockValue","*dataBlockValue"],PNAME_LN:["dataBlockValue","*dataBlockValue"],PNAME_NS:["dataBlockValue","*dataBlockValue"],STRING_LITERAL1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL2:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG2:["dataBlockValue","*dataBlockValue"],INTEGER:["dataBlockValue","*dataBlockValue"],DECIMAL:["dataBlockValue","*dataBlockValue"],DOUBLE:["dataBlockValue","*dataBlockValue"],INTEGER_POSITIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_POSITIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_P
 OSITIVE:["dataBlockValue","*dataBlockValue"],INTEGER_NEGATIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_NEGATIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_NEGATIVE:["dataBlockValue","*dataBlockValue"],"}":[],")":[]},"*datasetClause":{FROM:["datasetClause","*datasetClause"],WHERE:[],"{":[]},"*describeDatasetClause":{FROM:["describeDatasetClause","*describeDatasetClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],VALUES:[],$:[]},"*graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","
 *graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"],")":[]},"*graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNod
 ePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"],")":[]},"*groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCond
 ition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"
 ],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondit
 ion"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"*havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCond
 ition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],S
 HA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","
 *havingCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"*or([[ (,*dataBlockValue,)],NIL])":{"(":["or([[ (,*dataBlockValue,)],NIL])","*or([[ (,*dataBlockValue,)],NIL])"],NIL:["or([[ (,*dataBlockValue,)],NIL])","*or([[ (,*dataBlockValue,)],NIL])"],"}":[]},"*or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],";":[]},"*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[
 or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["or([[+,mult
 iplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpre
 ssion],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"*or([var,[ (,expression,AS,var,)]])":{"(":["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR1:["or([var,[ (,expression,AS,v
 ar,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR2:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],WHERE:[],"{":[],FROM:[]},"*orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["order
 Condition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"
 ],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"*prefixDecl":{PREFIX:["prefixDecl","*prefixDecl"],$:[],CONSTRUCT:
 [],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[]},"*usingClause":{USING:["usingClause","*usingClause"],WHERE:[]},"*var":{VAR1:["var","*var"],VAR2:["var","*var"],")":[]},"*varOrIRIref":{VAR1:["varOrIRIref","*varOrIRIref"],VAR2:["varOrIRIref","*varOrIRIref"],IRI_REF:["varOrIRIref","*varOrIRIref"],PNAME_LN:["varOrIRIref","*varOrIRIref"],PNAME_NS:["varOrIRIref","*varOrIRIref"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],FROM:[],VALUES:[],$:[]},"+graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STR
 ING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"]},"+graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNod
 ePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"]},"+groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition
 "],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*
 groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupConditio
 n","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"]},"+havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCon
 dition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],
 SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition",
 "*havingCondition"]},"+or([var,[ (,expression,AS,var,)]])":{"(":["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR1:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR2:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"]},"+orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondi
 tion"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCond
 ition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNA
 ME_NS:["orderCondition","*orderCondition"]},"+varOrIRIref":{VAR1:["varOrIRIref","*varOrIRIref"],VAR2:["varOrIRIref","*varOrIRIref"],IRI_REF:["varOrIRIref","*varOrIRIref"],PNAME_LN:["varOrIRIref","*varOrIRIref"],PNAME_NS:["varOrIRIref","*varOrIRIref"]},"?.":{".":["."],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?DISTINCT":{DISTINCT:["DISTINCT"],"!":[],"+":[],"-":[],VAR1:[],VAR2:[],"(":[],STR:[],LANG:[],LANGMATCHES:[],DATATYPE:[],BOUND:[],IRI:[],URI:[],BNODE:[],RAND:[],ABS:[],CEIL:[],FLOOR:[],ROUND:[],CONCAT:[],STRLEN:[],UCASE:[],LCASE:[],ENCODE_FOR_URI:[],CONTAINS:[],STRSTARTS:[],STRENDS:[],STRBEF
 ORE:[],STRAFTER:[],YEAR:[],MONTH:[],DAY:[],HOURS:[],MINUTES:[],SECONDS:[],TIMEZONE:[],TZ:[],NOW:[],UUID:[],STRUUID:[],MD5:[],SHA1:[],SHA256:[],SHA384:[],SHA512:[],COALESCE:[],IF:[],STRLANG:[],STRDT:[],SAMETERM:[],ISIRI:[],ISURI:[],ISBLANK:[],ISLITERAL:[],ISNUMERIC:[],TRUE:[],FALSE:[],COUNT:[],SUM:[],MIN:[],MAX:[],AVG:[],SAMPLE:[],GROUP_CONCAT:[],SUBSTR:[],REPLACE:[],REGEX:[],EXISTS:[],NOT:[],IRI_REF:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],PNAME_LN:[],PNAME_NS:[],"*":[]},"?GRAPH":{GRAPH:["GRAPH"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT":{SILENT:["SILENT"],VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_1":{SILENT:["SILENT"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_2":{SILENT:["SILENT"],GRAPH:[],DEFAULT:[],NAMED:[],ALL:[]},"?SILENT_3":{SILENT:["SILENT"],GRAPH:[]},"?SI
 LENT_4":{SILENT:["SILENT"],DEFAULT:[],GRAPH:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?WHERE":{WHERE:["WHERE"],"{":[]},"?[,,expression]":{",":["[,,expression]"],")":[]},"?[.,?constructTriples]":{".":["[.,?constructTriples]"],"}":[]},"?[.,?triplesBlock]":{".":["[.,?triplesBlock]"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[.,?triplesTemplate]":{".":["[.,?triplesTemplate]"],"}":[],GRAPH:[]},"?[;,SEPARATOR,=,string]":{";":["[;,SEPARATOR,=,string]"],")":[]},"?[;,update]":{";":["[;,update]"],$:[]},"?[AS,var]":{AS:["[AS,var]"],")":[]},"?[INTO,graphRef]":{INTO:["[INTO,graphRef]"],";":[],$:[]},"?[or([verbPath,verbSimple]),objectList]":{VAR1:["[or([verbPath,verbSimple]),objectList]"],VAR2:["[or([verbPath,verbSimple]),objectList]"],"^":["[or([verbPath,verbSimple]),objectList]"],a:["[or([verbPath,verbSimple]),objectList]"],"!":["[or([verbPath,verbSimple]),objectList]"],"(":["[or([verbPath,verbSimple]),objectList]"],IRI_REF:["[or([verbPath,verbSimple]),
 objectList]"],PNAME_LN:["[or([verbPath,verbSimple]),objectList]"],PNAME_NS:["[or([verbPath,verbSimple]),objectList]"],";":[],".":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],"^":["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],IRI_REF:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_LN:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_NS:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],")":[]},"?[update1,?[;,update]]":{INSERT:["[update1,?[;,update]]"],DELETE:["[update1,?[;,update]]"],LOAD:["[update1,?[;,update]]"],CLEAR:["[update1,?[;,update]]"],DROP:["[update1,?[;,update]]"],ADD:["[update1,?[;,update]]"],MOVE:["[update1,?[;,update]]"],COPY:["[update1,?[;,update]]"],CREATE:["[update1,?[;,update]]"],WITH:["[update1,?[;,update]]"],$:[]},"?[verb,objectList]":{a:["[verb,objectList]"],VAR1:["[verb,objectLis
 t]"],VAR2:["[verb,objectList]"],IRI_REF:["[verb,objectList]"],PNAME_LN:["[verb,objectList]"],PNAME_NS:["[verb,objectList]"],";":[],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?argList":{NIL:["argList"],"(":["argList"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],"*":[],"/":[],";":[]},"?baseDecl":{BASE:["baseDecl"],$:[],CONSTRUCT:[],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[],PREFIX:[]},"?constructTriples":{VAR1:["constructTriples"],VAR2:["constructTriples"],NIL:["constructTriples"],"(":["constructTriples"],"[":["constructTriples"],IRI_REF:["constructTriples"],TRUE:["constructTriples"],FALSE:["constructTriples"],BLANK_NODE_LABEL:["constructTriples"],ANON:["constructTriples"],PNAME_L
 N:["constructTriples"],PNAME_NS:["constructTriples"],STRING_LITERAL1:["constructTriples"],STRING_LITERAL2:["constructTriples"],STRING_LITERAL_LONG1:["constructTriples"],STRING_LITERAL_LONG2:["constructTriples"],INTEGER:["constructTriples"],DECIMAL:["constructTriples"],DOUBLE:["constructTriples"],INTEGER_POSITIVE:["constructTriples"],DECIMAL_POSITIVE:["constructTriples"],DOUBLE_POSITIVE:["constructTriples"],INTEGER_NEGATIVE:["constructTriples"],DECIMAL_NEGATIVE:["constructTriples"],DOUBLE_NEGATIVE:["constructTriples"],"}":[]},"?groupClause":{GROUP:["groupClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"?havingClause":{HAVING:["havingClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"?insertClause":{INSERT:["insertClause"],WHERE:[],USING:[]},"?limitClause":{LIMIT:["limitClause"],VALUES:[],$:[],"}":[]},"?limitOffsetClauses":{LIMIT:["limitOffsetClauses"],OFFSET:["limitOffsetClauses"],VALUES:[],$:[],"}":[]},"?offsetClause":{OFFSET:["offsetClause"],VALUES:[
 ],$:[],"}":[]},"?or([DISTINCT,REDUCED])":{DISTINCT:["or([DISTINCT,REDUCED])"],REDUCED:["or([DISTINCT,REDUCED])"],"*":[],"(":[],VAR1:[],VAR2:[]},"?or([LANGTAG,[^^,iriRef]])":{LANGTAG:["or([LANGTAG,[^^,iriRef]])"],"^^":["or([LANGTAG,[^^,iriRef]])"],UNDEF:[],IRI_REF:[],TRUE:[],FALSE:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],a:[],VAR1:[],VAR2:[],"^":[],"!":[],"(":[],".":[],";":[],",":[],AS:[],")":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],"*":[],"/":[],"}":[],"[":[],NIL:[],BLANK_NODE_LABEL:[],ANON:[],"]":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unary
 Expression]])"],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"!=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,I
 N,expressionList]])"],">":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IN:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AS:[],")"
 :[],",":[],"||":[],"&&":[],";":[]},"?orderClause":{ORDER:["orderClause"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"?pathMod":{"*":["pathMod"],"?":["pathMod"],"+":["pathMod"],"{":["pathMod"],"|":[],"/":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"?triplesBlock":{VAR1:["triplesBlock"],VAR2:["triplesBlock"],NIL:["triplesBlock"],"(":["triplesBlock"],"[":["triplesBlock"],IRI_REF:["triplesBlock"],TRUE:["triplesBlock"],FALSE:["triplesBlock"],BLANK_NODE_LABEL:["triplesBlock"],ANON:["triplesBlock"],PNAME_LN:["triplesBlock"],PNAME_NS:["triplesBlock"],STRING_LITERAL1:["triplesBlock"],STRING_LITERAL2:["triplesBlock"],STRING_LITERAL_LONG1:["triplesBlock"],STRING_LITERAL_LONG2:["tr
 iplesBlock"],INTEGER:["triplesBlock"],DECIMAL:["triplesBlock"],DOUBLE:["triplesBlock"],INTEGER_POSITIVE:["triplesBlock"],DECIMAL_POSITIVE:["triplesBlock"],DOUBLE_POSITIVE:["triplesBlock"],INTEGER_NEGATIVE:["triplesBlock"],DECIMAL_NEGATIVE:["triplesBlock"],DOUBLE_NEGATIVE:["triplesBlock"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?triplesTemplate":{VAR1:["triplesTemplate"],VAR2:["triplesTemplate"],NIL:["triplesTemplate"],"(":["triplesTemplate"],"[":["triplesTemplate"],IRI_REF:["triplesTemplate"],TRUE:["triplesTemplate"],FALSE:["triplesTemplate"],BLANK_NODE_LABEL:["triplesTemplate"],ANON:["triplesTemplate"],PNAME_LN:["triplesTemplate"],PNAME_NS:["triplesTemplate"],STRING_LITERAL1:["triplesTemplate"],STRING_LITERAL2:["triplesTemplate"],STRING_LITERAL_LONG1:["triplesTemplate"],STRING_LITERAL_LONG2:["triplesTemplate"],INTEGER:["triplesTemplate"],DECIMAL:["triplesTemplate"],DOUBLE:["triplesTemplate"],INTEGER_POSITIVE:["triplesTemplate"],DECIMAL_P
 OSITIVE:["triplesTemplate"],DOUBLE_POSITIVE:["triplesTemplate"],INTEGER_NEGATIVE:["triplesTemplate"],DECIMAL_NEGATIVE:["triplesTemplate"],DOUBLE_NEGATIVE:["triplesTemplate"],"}":[],GRAPH:[]},"?whereClause":{WHERE:["whereClause"],"{":["whereClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],VALUES:[],$:[]},"[ (,*dataBlockValue,)]":{"(":["(","*dataBlockValue",")"]},"[ (,*var,)]":{"(":["(","*var",")"]},"[ (,expression,)]":{"(":["(","expression",")"]},"[ (,expression,AS,var,)]":{"(":["(","expression","AS","var",")"]},"[!=,numericExpression]":{"!=":["!=","numericExpression"]},"[&&,valueLogical]":{"&&":["&&","valueLogical"]},"[*,unaryExpression]":{"*":["*","unaryExpression"]},"[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]":{WHERE:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"],FROM:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"]},"[+,multiplicativeExpression]":{"+":["+","multiplicativeExpression"]},"[,,expression]":{","
 :[",","expression"]},"[,,integer,}]":{",":[",","integer","}"]},"[,,objectPath]":{",":[",","objectPath"]},"[,,object]":{",":[",","object"]},"[,,or([},[integer,}]])]":{",":[",","or([},[integer,}]])"]},"[-,multiplicativeExpression]":{"-":["-","multiplicativeExpression"]},"[.,?constructTriples]":{".":[".","?constructTriples"]},"[.,?triplesBlock]":{".":[".","?triplesBlock"]},"[.,?triplesTemplate]":{".":[".","?triplesTemplate"]},"[/,pathEltOrInverse]":{"/":["/","pathEltOrInverse"]},"[/,unaryExpression]":{"/":["/","unaryExpression"]},"[;,?[or([verbPath,verbSimple]),objectList]]":{";":[";","?[or([verbPath,verbSimple]),objectList]"]},"[;,?[verb,objectList]]":{";":[";","?[verb,objectList]"]},"[;,SEPARATOR,=,string]":{";":[";","SEPARATOR","=","string"]},"[;,update]":{";":[";","update"]},"[<,numericExpression]":{"<":["<","numericExpression"]},"[<=,numericExpression]":{"<=":["<=","numericExpression"]},"[=,numericExpression]":{"=":["=","numericExpression"]},"[>,numericExpression]":{">":[">","nume
 ricExpression"]},"[>=,numericExpression]":{">=":[">=","numericExpression"]},"[AS,var]":{AS:["AS","var"]},"[IN,expressionList]":{IN:["IN","expressionList"]},"[INTO,graphRef]":{INTO:["INTO","graphRef"]},"[NAMED,iriRef]":{NAMED:["NAMED","iriRef"]},"[NOT,IN,expressionList]":{NOT:["NOT","IN","expressionList"]},"[UNION,groupGraphPattern]":{UNION:["UNION","groupGraphPattern"]},"[^^,iriRef]":{"^^":["^^","iriRef"]},"[constructTemplate,*datasetClause,whereClause,solutionModifier]":{"{":["constructTemplate","*datasetClause","whereClause","solutionModifier"]},"[deleteClause,?insertClause]":{DELETE:["deleteClause","?insertClause"]},"[graphPatternNotTriples,?.,?triplesBlock]":{"{":["graphPatternNotTriples","?.","?triplesBlock"],OPTIONAL:["graphPatternNotTriples","?.","?triplesBlock"],MINUS:["graphPatternNotTriples","?.","?triplesBlock"],GRAPH:["graphPatternNotTriples","?.","?triplesBlock"],SERVICE:["graphPatternNotTriples","?.","?triplesBlock"],FILTER:["graphPatternNotTriples","?.","?triplesBlock
 "],BIND:["graphPatternNotTriples","?.","?triplesBlock"],VALUES:["graphPatternNotTriples","?.","?triplesBlock"]},"[integer,or([[,,or([},[integer,}]])],}])]":{INTEGER:["integer","or([[,,or([},[integer,}]])],}])"]},"[integer,}]":{INTEGER:["integer","}"]},"[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]":{INTEGER_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["or([numericLit
 eralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"]},"[or([verbPath,verbSimple]),objectList]":{VAR1:["or([verbPath,verbSimple])","objectList"],VAR2:["or([verbPath,verbSimple])","objectList"],"^":["or([verbPath,verbSimple])","objectList"],a:["or([verbPath,verbSimple])","objectList"],"!":["or([verbPath,verbSimple])","objectList"],"(":["or([verbPath,verbSimple])","objectList"],IRI_REF:["or([verbPath,verbSimple])","objectList"],PNAME_LN:["or([verbPath,verbSimple])","objectList"],PNAME_NS:["or([verbPath,verbSimple])","objectList"]},"[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],"^":["pathOneInPropertySet","*[|,pathOneInPropertySet]"],IRI_REF:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_LN:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_NS:["pathOneInPropertySet","*[|,pathOneInPropertySet]"]},"[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["quadsNotTriples","?.","?trip
 lesTemplate"]},"[update1,?[;,update]]":{INSERT:["update1","?[;,update]"],DELETE:["update1","?[;,update]"],LOAD:["update1","?[;,update]"],CLEAR:["update1","?[;,update]"],DROP:["update1","?[;,update]"],ADD:["update1","?[;,update]"],MOVE:["update1","?[;,update]"],COPY:["update1","?[;,update]"],CREATE:["update1","?[;,update]"],WITH:["update1","?[;,update]"]},"[verb,objectList]":{a:["verb","objectList"],VAR1:["verb","objectList"],VAR2:["verb","objectList"],IRI_REF:["verb","objectList"],PNAME_LN:["verb","objectList"],PNAME_NS:["verb","objectList"]},"[|,pathOneInPropertySet]":{"|":["|","pathOneInPropertySet"]},"[|,pathSequence]":{"|":["|","pathSequence"]},"[||,conditionalAndExpression]":{"||":["||","conditionalAndExpression"]},add:{ADD:["ADD","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},additiveExpression:{"!":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,u
 naryExpression]])]])"],"+":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"(":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpres
 sion],[/,unaryExpression]])]])"],STR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANGMATCHES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DATATYPE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BOUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegati
 ve]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BNODE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],RAND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ABS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLi
 teralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CEIL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FLOOR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ROUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLEN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLitera
 lPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ENCODE_FOR_URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONTAINS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRSTARTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplica
 tiveExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRENDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRBEFORE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRAFTER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],YEAR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MONTH:["multiplicativeExpression","*or([[+,multiplicativ
 eExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DAY:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],HOURS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MINUTES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SECONDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TIMEZONE:["multiplicativeExpression"
 ,"*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TZ:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOW:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRUUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MD5:["multiplicativ
 eExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA256:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA384:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA512:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],C
 OALESCE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRDT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMETERM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,un
 aryExpression]])]])"],ISIRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISURI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISBLANK:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISLITERAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISNUMERIC:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?o
 r([[*,unaryExpression],[/,unaryExpression]])]])"],TRUE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FALSE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COUNT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MIN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteral
 Negative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MAX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AVG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMPLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],GROUP_CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUBSTR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteral
 Positive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REPLACE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REGEX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],EXISTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI_REF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression
 ],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER:["multiplicativeExpr
 ession","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryEx
 pression]])]])"],DOUBLE_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_LN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositi
 ve,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_NS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"]},aggregate:{COUNT:["COUNT","(","?DISTINCT","or([*,expression])",")"],SUM:["SUM","(","?DISTINCT","expression",")"],MIN:["MIN","(","?DISTINCT","expression",")"],MAX:["MAX","(","?DISTINCT","expression",")"],AVG:["AVG","(","?DISTINCT","expression",")"],SAMPLE:["SAMPLE","(","?DISTINCT","expression",")"],GROUP_CONCAT:["GROUP_CONCAT","(","?DISTINCT","expression","?[;,SEPARATOR,=,string]",")"]},allowBnodes:{"}":[]},allowVars:{"}":[]},argList:{NIL:["NIL"],"(":["(","?DISTINCT","expression","*[,,expression]",")"]},askQuery:{ASK:["ASK","*datasetClause","whereClause","solutionModifier"]},baseDecl:{BASE:["BASE","IRI_REF"]},bind:{BIND:["BIND","(","expression","AS","var",")"]},blankNode:{BLANK_NODE_LABEL:["BLANK_NODE_
 LABEL"],ANON:["ANON"]},blankNodePropertyList:{"[":["[","propertyListNotEmpty","]"]},blankNodePropertyListPath:{"[":["[","propertyListPathNotEmpty","]"]},booleanLiteral:{TRUE:["TRUE"],FALSE:["FALSE"]},brackettedExpression:{"(":["(","expression",")"]},builtInCall:{STR:["STR","(","expression",")"],LANG:["LANG","(","expression",")"],LANGMATCHES:["LANGMATCHES","(","expression",",","expression",")"],DATATYPE:["DATATYPE","(","expression",")"],BOUND:["BOUND","(","var",")"],IRI:["IRI","(","expression",")"],URI:["URI","(","expression",")"],BNODE:["BNODE","or([[ (,expression,)],NIL])"],RAND:["RAND","NIL"],ABS:["ABS","(","expression",")"],CEIL:["CEIL","(","expression",")"],FLOOR:["FLOOR","(","expression",")"],ROUND:["ROUND","(","expression",")"],CONCAT:["CONCAT","expressionList"],SUBSTR:["substringExpression"],STRLEN:["STRLEN","(","expression",")"],REPLACE:["strReplaceExpression"],UCASE:["UCASE","(","expression",")"],LCASE:["LCASE","(","expression",")"],ENCODE_FOR_URI:["ENCODE_FOR_URI","(","exp
 ression",")"],CONTAINS:["CONTAINS","(","expression",",","expression",")"],STRSTARTS:["STRSTARTS","(","expression",",","expression",")"],STRENDS:["STRENDS","(","expression",",","expression",")"],STRBEFORE:["STRBEFORE","(","expression",",","expression",")"],STRAFTER:["STRAFTER","(","expression",",","expression",")"],YEAR:["YEAR","(","expression",")"],MONTH:["MONTH","(","expression",")"],DAY:["DAY","(","expression",")"],HOURS:["HOURS","(","expression",")"],MINUTES:["MINUTES","(","expression",")"],SECONDS:["SECONDS","(","expression",")"],TIMEZONE:["TIMEZONE","(","expression",")"],TZ:["TZ","(","expression",")"],NOW:["NOW","NIL"],UUID:["UUID","NIL"],STRUUID:["STRUUID","NIL"],MD5:["MD5","(","expression",")"],SHA1:["SHA1","(","expression",")"],SHA256:["SHA256","(","expression",")"],SHA384:["SHA384","(","expression",")"],SHA512:["SHA512","(","expression",")"],COALESCE:["COALESCE","expressionList"],IF:["IF","(","expression",",","expression",",","expression",")"],STRLANG:["STRLANG","(","expres
 sion",",","expression",")"],STRDT:["STRDT","(","expression",",","expression",")"],SAMETERM:["SAMETERM","(","expression",",","expression",")"],ISIRI:["ISIRI","(","expression",")"],ISURI:["ISURI","(","expression",")"],ISBLANK:["ISBLANK","(","expression",")"],ISLITERAL:["ISLITERAL","(","expression",")"],ISNUMERIC:["ISNUMERIC","(","expression",")"],REGEX:["regexExpression"],EXISTS:["existsFunc"],NOT:["notExistsFunc"]},clear:{CLEAR:["CLEAR","?SILENT_2","graphRefAll"]},collection:{"(":["(","+graphNode",")"]},collectionPath:{"(":["(","+graphNodePath",")"]},conditionalAndExpression:{"!":["valueLogical","*[&&,valueLogical]"],"+":["valueLogical","*[&&,valueLogical]"],"-":["valueLogical","*[&&,valueLogical]"],VAR1:["valueLogical","*[&&,valueLogical]"],VAR2:["valueLogical","*[&&,valueLogical]"],"(":["valueLogical","*[&&,valueLogical]"],STR:["valueLogical","*[&&,valueLogical]"],LANG:["valueLogical","*[&&,valueLogical]"],LANGMATCHES:["valueLogical","*[&&,valueLogical]"],DATATYPE:["valueLogical","
 *[&&,valueLogical]"],BOUND:["valueLogical","*[&&,valueLogical]"],IRI:["valueLogical","*[&&,valueLogical]"],URI:["valueLogical","*[&&,valueLogical]"],BNODE:["valueLogical","*[&&,valueLogical]"],RAND:["valueLogical","*[&&,valueLogical]"],ABS:["valueLogical","*[&&,valueLogical]"],CEIL:["valueLogical","*[&&,valueLogical]"],FLOOR:["valueLogical","*[&&,valueLogical]"],ROUND:["valueLogical","*[&&,valueLogical]"],CONCAT:["valueLogical","*[&&,valueLogical]"],STRLEN:["valueLogical","*[&&,valueLogical]"],UCASE:["valueLogical","*[&&,valueLogical]"],LCASE:["valueLogical","*[&&,valueLogical]"],ENCODE_FOR_URI:["valueLogical","*[&&,valueLogical]"],CONTAINS:["valueLogical","*[&&,valueLogical]"],STRSTARTS:["valueLogical","*[&&,valueLogical]"],STRENDS:["valueLogical","*[&&,valueLogical]"],STRBEFORE:["valueLogical","*[&&,valueLogical]"],STRAFTER:["valueLogical","*[&&,valueLogical]"],YEAR:["valueLogical","*[&&,valueLogical]"],MONTH:["valueLogical","*[&&,valueLogical]"],DAY:["valueLogical","*[&&,valueLog
 ical]"],HOURS:["valueLogical","*[&&,valueLogical]"],MINUTES:["valueLogical","*[&&,valueLogical]"],SECONDS:["valueLogical","*[&&,valueLogical]"],TIMEZONE:["valueLogical","*[&&,valueLogical]"],TZ:["valueLogical","*[&&,valueLogical]"],NOW:["valueLogical","*[&&,valueLogical]"],UUID:["valueLogical","*[&&,valueLogical]"],STRUUID:["valueLogical","*[&&,valueLogical]"],MD5:["valueLogical","*[&&,valueLogical]"],SHA1:["valueLogical","*[&&,valueLogical]"],SHA256:["valueLogical","*[&&,valueLogical]"],SHA384:["valueLogical","*[&&,valueLogical]"],SHA512:["valueLogical","*[&&,valueLogical]"],COALESCE:["valueLogical","*[&&,valueLogical]"],IF:["valueLogical","*[&&,valueLogical]"],STRLANG:["valueLogical","*[&&,valueLogical]"],STRDT:["valueLogical","*[&&,valueLogical]"],SAMETERM:["valueLogical","*[&&,valueLogical]"],ISIRI:["valueLogical","*[&&,valueLogical]"],ISURI:["valueLogical","*[&&,valueLogical]"],ISBLANK:["valueLogical","*[&&,valueLogical]"],ISLITERAL:["valueLogical","*[&&,valueLogical]"],ISNUMER
 IC:["valueLogical","*[&&,valueLogical]"],TRUE:["valueLogical","*[&&,valueLogical]"],FALSE:["valueLogical","*[&&,valueLogical]"],COUNT:["valueLogical","*[&&,valueLogical]"],SUM:["valueLogical","*[&&,valueLogical]"],MIN:["valueLogical","*[&&,valueLogical]"],MAX:["valueLogical","*[&&,valueLogical]"],AVG:["valueLogical","*[&&,valueLogical]"],SAMPLE:["valueLogical","*[&&,valueLogical]"],GROUP_CONCAT:["valueLogical","*[&&,valueLogical]"],SUBSTR:["valueLogical","*[&&,valueLogical]"],REPLACE:["valueLogical","*[&&,valueLogical]"],REGEX:["valueLogical","*[&&,valueLogical]"],EXISTS:["valueLogical","*[&&,valueLogical]"],NOT:["valueLogical","*[&&,valueLogical]"],IRI_REF:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL2:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG2:["valueLogical","*[&&,valueLogical]"],INTEGER:["valueLogical","*[&&,valueLogical]"],DECIMAL:["valueLogica
 l","*[&&,valueLogical]"],DOUBLE:["valueLogical","*[&&,valueLogical]"],INTEGER_POSITIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_POSITIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_POSITIVE:["valueLogical","*[&&,valueLogical]"],INTEGER_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_NEGATIVE:["valueLogical","*[&&,valueLogical]"],PNAME_LN:["valueLogical","*[&&,valueLogical]"],PNAME_NS:["valueLogical","*[&&,valueLogical]"]},conditionalOrExpression:{"!":["conditionalAndExpression","*[||,conditionalAndExpression]"],"+":["conditionalAndExpression","*[||,conditionalAndExpression]"],"-":["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR1:["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR2:["conditionalAndExpression","*[||,conditionalAndExpression]"],"(":["conditionalAndExpression","*[||,conditionalAndExpression]"],STR:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANG:["conditio
 nalAndExpression","*[||,conditionalAndExpression]"],LANGMATCHES:["conditionalAndExpression","*[||,conditionalAndExpression]"],DATATYPE:["conditionalAndExpression","*[||,conditionalAndExpression]"],BOUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],BNODE:["conditionalAndExpression","*[||,conditionalAndExpression]"],RAND:["conditionalAndExpression","*[||,conditionalAndExpression]"],ABS:["conditionalAndExpression","*[||,conditionalAndExpression]"],CEIL:["conditionalAndExpression","*[||,conditionalAndExpression]"],FLOOR:["conditionalAndExpression","*[||,conditionalAndExpression]"],ROUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLEN:["conditionalAndExpression","*[||,conditionalAndExpression]"],UCASE:["conditionalAndExpression","*[||,conditionalAndExpr
 ession]"],LCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],ENCODE_FOR_URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONTAINS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRSTARTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRENDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRBEFORE:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRAFTER:["conditionalAndExpression","*[||,conditionalAndExpression]"],YEAR:["conditionalAndExpression","*[||,conditionalAndExpression]"],MONTH:["conditionalAndExpression","*[||,conditionalAndExpression]"],DAY:["conditionalAndExpression","*[||,conditionalAndExpression]"],HOURS:["conditionalAndExpression","*[||,conditionalAndExpression]"],MINUTES:["conditionalAndExpression","*[||,conditionalAndExpression]"],SECONDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],TIMEZONE:["conditionalAndExpression","*[||,conditionalAndExpression]"],TZ:["c
 onditionalAndExpression","*[||,conditionalAndExpression]"],NOW:["conditionalAndExpression","*[||,conditionalAndExpression]"],UUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRUUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],MD5:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA1:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA256:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA384:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA512:["conditionalAndExpression","*[||,conditionalAndExpression]"],COALESCE:["conditionalAndExpression","*[||,conditionalAndExpression]"],IF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRDT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMETERM:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISIRI:["conditionalAndExpression","*[||,conditiona
 lAndExpression]"],ISURI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISBLANK:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISLITERAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISNUMERIC:["conditionalAndExpression","*[||,conditionalAndExpression]"],TRUE:["conditionalAndExpression","*[||,conditionalAndExpression]"],FALSE:["conditionalAndExpression","*[||,conditionalAndExpression]"],COUNT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUM:["conditionalAndExpression","*[||,conditionalAndExpression]"],MIN:["conditionalAndExpression","*[||,conditionalAndExpression]"],MAX:["conditionalAndExpression","*[||,conditionalAndExpression]"],AVG:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMPLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],GROUP_CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUBSTR:["conditionalAndExpression","*[||,conditionalAndExpression]"],REPLACE:["conditi
 onalAndExpression","*[||,conditionalAndExpression]"],REGEX:["conditionalAndExpression","*[||,conditionalAndExpression]"],EXISTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOT:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI_REF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL2:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG2:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_POSITIVE:["conditionalAndExpression","*[||,conditiona
 lAndExpression]"],DOUBLE_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_LN:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_NS:["conditionalAndExpression","*[||,conditionalAndExpression]"]},constraint:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],S
 TRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"]},constructQuery:{CONSTRUCT:["CONSTRUCT","or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])
 "]},constructTemplate:{"{":["{","?constructTriples","}"]},constructTriples:{VAR1:["triplesSameSubject","?[.,?constructTriples]"],VAR2:["triplesSameSubject","?[.,?constructTriples]"],NIL:["triplesSameSubject","?[.,?constructTriples]"],"(":["triplesSameSubject","?[.,?constructTriples]"],"[":["triplesSameSubject","?[.,?constructTriples]"],IRI_REF:["triplesSameSubject","?[.,?constructTriples]"],TRUE:["triplesSameSubject","?[.,?constructTriples]"],FALSE:["triplesSameSubject","?[.,?constructTriples]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?constructTriples]"],ANON:["triplesSameSubject","?[.,?constructTriples]"],PNAME_LN:["triplesSameSubject","?[.,?constructTriples]"],PNAME_NS:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL2:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?constructTriples]"
 ],INTEGER:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"]},copy:{COPY:["COPY","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},create:{CREATE:["CREATE","?SILENT_3","graphRef"]},dataBlock:{NIL:["or([inlineDataOneVar,inlineDataFull])"],"(":["or([inlineDataOneVar,inlineDataFull])"],VAR1:["or([inlineDataOneVar,inlineDataFull])"],VAR2:["or([inlineDataOneVar,inlineDataFull])"]},dataBlockValue:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERA
 L2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],UNDEF:["UNDEF"]},datasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},defaultGraphClause:{IRI_REF:["sourceSelector"],PNAME_LN:["sourceSelector"],PNAME_NS:["sourceSelector"]},delete1:{DATA:["DATA","quadDataNoBnodes"],WHERE:["WHERE","quadPatternNoBnodes"],"{":["quadPatternNoBnodes","?insertClause","*usingClause","WHERE","groupGraphPattern"]},deleteClause:{DELETE:["DELETE","quadPattern"]},describeDatasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},describeQuery:{DESCRIBE:["DESCRIBE","or([+varOrIRIref,*])","*describeDat
 asetClause","?whereClause","solutionModifier"]},disallowBnodes:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING

<TRUNCATED>

[55/93] [abbrv] jena git commit: Remove dependency on Google Guava to avoid version issues

Posted by rv...@apache.org.
Remove dependency on Google Guava to avoid version issues


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/63228de3
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/63228de3
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/63228de3

Branch: refs/heads/hadoop-rdf
Commit: 63228de326637f1988e906fb167c610e1842150f
Parents: bf21e35
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 18:09:23 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 18:09:23 2015 +0000

----------------------------------------------------------------------
 jena-csv/pom.xml                                |  6 --
 .../impl/PropertyTableHashMapImpl.java          | 59 +++++++++-----------
 2 files changed, 27 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/63228de3/jena-csv/pom.xml
----------------------------------------------------------------------
diff --git a/jena-csv/pom.xml b/jena-csv/pom.xml
index 12602b1..c3c1255 100644
--- a/jena-csv/pom.xml
+++ b/jena-csv/pom.xml
@@ -60,12 +60,6 @@
       <type>pom</type>
     </dependency>
     
-    <!-- Google Code Guava -->
-    <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-    </dependency>
-	
     <!-- Testing support -->
     <dependency>
       <groupId>org.apache.jena</groupId>

http://git-wip-us.apache.org/repos/asf/jena/blob/63228de3/jena-csv/src/main/java/org/apache/jena/propertytable/impl/PropertyTableHashMapImpl.java
----------------------------------------------------------------------
diff --git a/jena-csv/src/main/java/org/apache/jena/propertytable/impl/PropertyTableHashMapImpl.java b/jena-csv/src/main/java/org/apache/jena/propertytable/impl/PropertyTableHashMapImpl.java
index b74925b..dad7615 100644
--- a/jena-csv/src/main/java/org/apache/jena/propertytable/impl/PropertyTableHashMapImpl.java
+++ b/jena-csv/src/main/java/org/apache/jena/propertytable/impl/PropertyTableHashMapImpl.java
@@ -18,25 +18,20 @@
 
 package org.apache.jena.propertytable.impl;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
+import java.util.* ;
+import java.util.Map.Entry ;
 
 import org.apache.jena.atlas.iterator.Iter;
 import org.apache.jena.atlas.iterator.IteratorConcat;
+import org.apache.jena.atlas.lib.MultiMapToSet ;
 import org.apache.jena.propertytable.Column;
 import org.apache.jena.propertytable.PropertyTable;
 import org.apache.jena.propertytable.Row;
 
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.SetMultimap;
 import com.hp.hpl.jena.graph.Node;
 import com.hp.hpl.jena.graph.Triple;
 import com.hp.hpl.jena.util.iterator.ExtendedIterator;
+import com.hp.hpl.jena.util.iterator.NullIterator ;
 import com.hp.hpl.jena.util.iterator.WrappedIterator;
 
 /**
@@ -52,16 +47,11 @@ public class PropertyTableHashMapImpl implements PropertyTable {
 	private List<Row> rowList; // Stores the list of rows in the table
 
 	// PSO index
-	private Map<Node, Map<Node, Node>> valueIndex; // Maps column Node to
-													// (subject Node, value)
-													// pairs
+	// Maps column Node to (subject Node, value) pairs
+	private Map<Node, Map<Node, Node>> valueIndex; 
 	// POS index
-	private Map<Node, SetMultimap<Node, Node>> valueReverseIndex; // Maps column
-																	// Node to
-																	// (value,
-																	// subject
-																	// Node)
-																	// pairs
+	// Maps column Node to (value, subject Node) pairs
+	private Map<Node, MultiMapToSet<Node, Node>> valueReverseIndex; 
 
 	PropertyTableHashMapImpl() {
 		columnIndex = new HashMap<Node, Column>();
@@ -69,7 +59,7 @@ public class PropertyTableHashMapImpl implements PropertyTable {
 		rowIndex = new HashMap<Node, Row>();
 		rowList = new ArrayList<Row>();
 		valueIndex = new HashMap<Node, Map<Node, Node>>();
-		valueReverseIndex = new HashMap<Node, SetMultimap<Node, Node>>();
+		valueReverseIndex = new HashMap<Node, MultiMapToSet<Node, Node>>();
 	}
 
 	@Override
@@ -131,12 +121,13 @@ public class PropertyTableHashMapImpl implements PropertyTable {
 		
 		
 		Node p = column.getColumnKey();
-		final SetMultimap<Node, Node> valueToSubjectMap = valueReverseIndex
-				.get(p);
+		final MultiMapToSet<Node, Node> valueToSubjectMap = valueReverseIndex.get(p);
+		if ( valueToSubjectMap == null ) 
+		    return NullIterator.instance() ;
 		final Set<Node> subjects = valueToSubjectMap.get(value);
 		ArrayList<Triple> triples = new ArrayList<Triple>();
 		for (Node subject : subjects) {
-			triples.add(Triple.create(subject, p, value));
+		    triples.add(Triple.create(subject, p, value));
 		}
 		return WrappedIterator.create(triples.iterator());
 	}
@@ -181,7 +172,7 @@ public class PropertyTableHashMapImpl implements PropertyTable {
 		columnIndex.put(p, new ColumnImpl(this, p));
 		columnList.add(columnIndex.get(p));
 		valueIndex.put(p, new HashMap<Node, Node>());
-		valueReverseIndex.put(p, HashMultimap.<Node, Node> create());
+		valueReverseIndex.put(p, MultiMapToSet.<Node, Node> create());
 		return getColumn(p);
 	}
 
@@ -236,13 +227,15 @@ public class PropertyTableHashMapImpl implements PropertyTable {
 		
 		
 		Node p = column.getColumnKey();
-		final SetMultimap<Node, Node> valueToSubjectMap = valueReverseIndex
-				.get(p);
+		final MultiMapToSet<Node, Node> valueToSubjectMap = valueReverseIndex.get(p);
+		if ( valueToSubjectMap == null )
+		    return Collections.emptyList() ;
 		final Set<Node> subjects = valueToSubjectMap.get(value);
-		
+		if ( subjects == null )
+		    return Collections.emptyList() ;
 		final ArrayList<Row> matchingRows = new ArrayList<Row>();
 		for (Node subject : subjects) {
-			matchingRows.add(this.getRow(subject));
+		    matchingRows.add(this.getRow(subject));
 		}
 		return matchingRows;
 	}
@@ -263,11 +256,11 @@ public class PropertyTableHashMapImpl implements PropertyTable {
 		addToReverseMap(p, s, oldValue, value);
 	}
 
-	private void addToReverseMap(final Node p, final Node s,
-			final Node oldValue, final Node value) {
+	private void addToReverseMap(final Node p, final Node s, final Node oldValue, final Node value) {
 
-		final SetMultimap<Node, Node> valueToSubjectMap = valueReverseIndex
-				.get(p);
+		final MultiMapToSet<Node, Node> valueToSubjectMap = valueReverseIndex.get(p);
+		if ( valueToSubjectMap == null )
+            return ; 
 		valueToSubjectMap.remove(oldValue, s);
 		valueToSubjectMap.put(value, s);
 	}
@@ -289,7 +282,9 @@ public class PropertyTableHashMapImpl implements PropertyTable {
 
 	private void removeFromReverseMap(final Node p, final Node s,
 			final Node value) {
-		final SetMultimap<Node, Node> valueTokeysMap = valueReverseIndex.get(p);
+		final MultiMapToSet<Node, Node> valueTokeysMap = valueReverseIndex.get(p);
+		if ( valueTokeysMap == null )
+		    return ;
 		valueTokeysMap.remove(s, value);
 	}
 


[03/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/JsonConst.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/JsonConst.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/JsonConst.java
deleted file mode 100644
index e943ac1..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/JsonConst.java
+++ /dev/null
@@ -1,52 +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.jena.fuseki.mgt ;
-
-public class JsonConst
-{
-    public static final String taskId       = "taskId" ;
-    public static final String task         = "task" ;
-    public static final String datasets     = "datasets" ;
-
-    public static final String finished     = "finished" ;
-    public static final String started      = "started" ;
-
-    public static final String uptime       = "uptime" ;
-    public static final String startDT      = "startDateTime" ;
-    public static final String server       = "server" ;
-    public static final String port         = "port" ;
-    public static final String hostname     = "hostname" ;
-    public static final String admin        = "admin" ;
-    public static final String version      = "version" ;
-    public static final String built        = "built" ;
-
-    public static final String services     = "services" ;
-    public static final String operation    = "operation" ;
-    public static final String description  = "description" ;
-    public static final String endpoints    = "endpoints" ;
-
-    public static final String dsName       = "ds.name" ;
-    public static final String dsState      = "ds.state" ;
-    public static final String dsService    = "ds.services" ;
-
-    public static final String srvType          = "srv.type" ;
-    public static final String srvDescription   = "srv.description" ;
-    public static final String srvEndpoints     = "srv.endpoints" ;
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/JsonDescription.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/JsonDescription.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/JsonDescription.java
deleted file mode 100644
index f54ead2..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/JsonDescription.java
+++ /dev/null
@@ -1,73 +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.jena.fuseki.mgt;
-
-import java.util.List ;
-
-import org.apache.jena.atlas.json.JsonBuilder ;
-import org.apache.jena.fuseki.server.DataAccessPoint ;
-import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
-import org.apache.jena.fuseki.server.Endpoint ;
-import org.apache.jena.fuseki.server.OperationName ;
-
-/** Create a description of a service */
-public class JsonDescription {
-    
-    public static void arrayDatasets(JsonBuilder builder, DataAccessPointRegistry registry) {
-        builder.startArray() ;
-        for ( String ds : registry.keys() ) {
-            DataAccessPoint access = DataAccessPointRegistry.get().get(ds) ;
-            JsonDescription.describe(builder, access) ;
-        }
-        builder.finishArray() ;
-    }
-    
-    public static void describe(JsonBuilder builder, DataAccessPoint access) {
-        builder.startObject() ;
-        builder.key(JsonConst.dsName).value(access.getName()) ;
-        
-        builder.key(JsonConst.dsState).value(access.getDataService().isAcceptingRequests()) ;
-        
-        builder.key(JsonConst.dsService) ;
-        builder.startArray() ;
-        
-        for ( OperationName opName : access.getDataService().getOperations() ) {
-            List<Endpoint> endpoints = access.getDataService().getOperation(opName) ;
-            describe(builder, opName, endpoints) ;
-        }
-        builder.finishArray() ;
-        builder.finishObject() ;
-    }
-    
-    private static void describe(JsonBuilder builder, OperationName opName, List<Endpoint> endpoints) {
-        builder.startObject() ;
-        
-        builder.key(JsonConst.srvType).value(opName.name()) ;
-        builder.key(JsonConst.srvDescription).value(opName.getDescription()) ;
-
-        builder.key(JsonConst.srvEndpoints) ;
-        builder.startArray() ;
-        for ( Endpoint endpoint : endpoints )
-            builder.value(endpoint.getEndpoint()) ;
-        builder.finishArray() ;
-
-        builder.finishObject() ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/MgtConst.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/MgtConst.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/MgtConst.java
deleted file mode 100644
index e398894..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/MgtConst.java
+++ /dev/null
@@ -1,30 +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.jena.fuseki.mgt;
-
-/** Various contants used in the admin functions */ 
-public class MgtConst {
-    public static final String  opDump      = "dump" ;  
-    public static final String  opPing      = "ping" ;
-    
-    public static final String  opStats     = "stats" ;  
-    public static final String  opDatasets  = "datasets" ;
-    public static final String  opServer    = "server" ;
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/MgtJMX.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/MgtJMX.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/MgtJMX.java
deleted file mode 100644
index f9023fe..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/mgt/MgtJMX.java
+++ /dev/null
@@ -1,61 +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.jena.fuseki.mgt ;
-
-
-public class MgtJMX
-{
-  public static void removeJMX() {  }
-    
-//    public static void addJMX() {
-//        DatasetRegistry registry = DatasetRegistry.get() ;
-//        for (String ds : registry.keys()) {
-//            DataAccessPoint dsRef = registry.get(ds) ;
-//            addJMX(dsRef) ;
-//        }
-//    }
-//
-//    private static void addJMX(DataAccessPoint dapt) {
-//        String x = datasetNames ;
-//        // if ( x.startsWith("/") )
-//        // x = x.substring(1) ;
-//        ARQMgt.register(Fuseki.PATH + ".dataset:name=" + x, dapt) ;
-//        // For all endpoints
-//        for (ServiceRef sRef : dapt.getServiceRefs()) {
-//            ARQMgt.register(Fuseki.PATH + ".dataset:name=" + x + "/" + sRef.name, sRef) ;
-//        }
-//    }
-//
-//    public static void removeJMX() {
-//        DatasetRegistry registry = DatasetRegistry.get() ;
-//        for (String ds : registry.keys()) {
-//            DataAccessPoint ref = registry.get(ds) ;
-//            removeJMX(ref) ;
-//        }
-//    }
-//
-//    private static void removeJMX(DatasetRef dsRef) {
-//        String x = dsRef.getName() ;
-//        ARQMgt.unregister(Fuseki.PATH + ".dataset:name=" + x) ;
-//        for (ServiceRef sRef : dsRef.getServiceRefs()) {
-//            ARQMgt.unregister(Fuseki.PATH + ".dataset:name=" + x + "/" + sRef.name) ;
-//        }
-//    }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/DatasetGraphSwitchable.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/DatasetGraphSwitchable.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/DatasetGraphSwitchable.java
deleted file mode 100644
index 0e075f6..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/DatasetGraphSwitchable.java
+++ /dev/null
@@ -1,88 +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.jena.fuseki.migrate;
-
-import java.util.concurrent.atomic.AtomicReference ;
-
-import org.apache.jena.fuseki.FusekiException ;
-
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-import com.hp.hpl.jena.sparql.core.DatasetGraphWrapper ;
-
-public class DatasetGraphSwitchable extends DatasetGraphWrapper {
-    // **** Associated query engine factory - QueryEngineFactoryWrapper
-    // which executes on the unwrapped DSG.
-    
-    // *** Modify DatasetGraphWrapper to use a get().
-    
-    // Time to have DatasetGraph.getQueryDataset
-    private final DatasetGraph dsg1 ;
-    private final DatasetGraph dsg2 ;
-    private final AtomicReference<DatasetGraph> current = new AtomicReference<DatasetGraph>() ;
-    
-    // Change DatasetGraphWrapper to use protected get() 
-
-    public DatasetGraphSwitchable(DatasetGraph dsg1, DatasetGraph dsg2) {
-        super(null) ;
-        if ( dsg1 == null )
-            // Personally I think IllegalArgumentException is more
-            // appropriate, with NPE for unexpected use of null 
-            // but convention says .... 
-            throw new NullPointerException("First argument is null") ;
-        if ( dsg2 == null )
-            throw new NullPointerException("Second argument is null") ;
-        this.dsg1 = dsg1 ;
-        this.dsg2 = dsg2 ;
-        set(dsg1) ;
-    }
-
-    private void set(DatasetGraph dsg) { current.set(dsg) ; }
-    
-    /** Change to using the other dataset */ 
-    public void flip() {
-        // Don't worry about concurrent calls to flip()
-        // The outcome will be that one call wins (the actual second caller)
-        // and not corrupted data. Noet that get() is only called once per
-        // redirection. 
-        
-        // if dsg1 -- (expected, update)
-        if ( current.compareAndSet(dsg1, dsg2) )
-            return ;
-        // if dsg2 
-        if ( current.compareAndSet(dsg2, dsg1) )
-            return ;
-        throw new FusekiException() ;
-    }
-    
-    /** Current dataset of the switchable pair */
-    public final DatasetGraph getCurrent()  { return get() ; }
-    
-    /** Return dataset1 of the switchable pair */
-    public final DatasetGraph getDataset1() { return dsg1 ; }
-    
-    /** Return dataset2 of the switchable pair */
-    public final DatasetGraph getDataset2() { return dsg2 ; }
-    
-    /** Use dataset1 */
-    public final void useDataset1()         { set(dsg1) ; }
-
-    /** Use dataset2 */
-    public final void useDataset2()         { set(dsg2) ; }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java
deleted file mode 100644
index c5f92ae..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java
+++ /dev/null
@@ -1,76 +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.jena.fuseki.migrate;
-
-import org.apache.jena.atlas.web.TypedInputStream ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.riot.system.StreamRDF ;
-import org.apache.jena.riot.system.StreamRDFLib ;
-
-import com.hp.hpl.jena.graph.Factory ;
-import com.hp.hpl.jena.graph.Graph ;
-import com.hp.hpl.jena.rdf.model.Model ;
-import com.hp.hpl.jena.rdf.model.ModelFactory ;
-
-/** A packaging of code to do a controlled read of a graph or model */
-
-public class GraphLoadUtils
-{
-    // ---- Model level
-    
-    public static Model readModel(String uri, int limit)
-    {
-        Graph g = Factory.createGraphMem() ;
-        readUtil(g, uri, limit) ;
-        return ModelFactory.createModelForGraph(g) ;
-    }
-    
-    public static void loadModel(Model model, String uri, int limit) 
-    {
-        Graph g = model.getGraph() ;
-        readUtil(g, uri, limit) ;
-    }
-
-    // ---- Graph level
-    
-    public static Graph readGraph(String uri, int limit)
-    {
-        Graph g = Factory.createGraphMem() ;
-        readUtil(g, uri, limit) ;
-        return g ;
-    }
-    
-    public static void loadGraph(Graph g, String uri, int limit) 
-    {
-        readUtil(g, uri, limit) ;
-    }
-    
-    // ** Worker.
-    private static void readUtil(Graph graph, String uri, int limit)
-    {
-        // We need to do this ourselves, not via riot, to use the webStreamManager
-        StreamRDF sink = StreamRDFLib.graph(graph) ;
-        sink = new StreamRDFLimited(sink, limit) ;
-
-        TypedInputStream input = Fuseki.webStreamManager.open(uri) ;
-        RDFDataMgr.parse(sink, input, uri) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/Registry.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/Registry.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/Registry.java
deleted file mode 100644
index 9e7f729..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/Registry.java
+++ /dev/null
@@ -1,39 +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.jena.fuseki.migrate;
-
-import java.util.Collection ;
-import java.util.Map ;
-import java.util.concurrent.ConcurrentHashMap ;
-
-public class Registry<K,T>
-{
-    protected Map<K, T> registry = new ConcurrentHashMap<>() ;
-    
-    public Registry() {}
-    
-    public void put(K key, T value)     { registry.put(key, value) ; }
-    public T get(K key)                 { return registry.get(key) ; }
-    public boolean isRegistered(K key)  { return registry.containsKey(key) ; }
-    public void remove(K key)           { registry.remove(key) ; } 
-    public Collection<K> keys()         { return registry.keySet() ; }
-    //public Iterator<String> keys()      { return registry.keySet().iterator() ; }
-    public int size()                   { return registry.size() ; }
-    public boolean isEmpty()            { return registry.isEmpty() ; }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/StreamRDFLimited.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/StreamRDFLimited.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/StreamRDFLimited.java
deleted file mode 100644
index bf9ebf3..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/migrate/StreamRDFLimited.java
+++ /dev/null
@@ -1,63 +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.jena.fuseki.migrate ;
-
-import org.apache.jena.riot.RiotException ;
-import org.apache.jena.riot.system.StreamRDF ;
-import org.apache.jena.riot.system.StreamRDFWrapper ;
-
-import com.hp.hpl.jena.graph.Triple ;
-import com.hp.hpl.jena.sparql.core.Quad ;
-
-/**
- * Limit triples/quads and stop passing through after a limit is reached.
- */
-public class StreamRDFLimited extends StreamRDFWrapper {
-    private long       count = 0 ;
-    private final long limit ;
-
-    public StreamRDFLimited(StreamRDF output, long limit) {
-        super(output) ;
-        this.limit = limit ;
-    }
-
-    @Override
-    public void triple(Triple triple) {
-        count++ ;
-        if ( count > limit )
-            throw new RiotException("Limit ("+limit+") reached") ; 
-        super.triple(triple) ;
-    }
-
-    @Override
-    public void quad(Quad quad) {
-        count++ ;
-        if ( count > limit )
-            throw new RiotException("Limit ("+limit+") reached") ; 
-        super.quad(quad) ;
-    }
-
-    public long getCount() {
-        return count ;
-    }
-
-    public long getLimit() {
-        return limit ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Counter.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Counter.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Counter.java
deleted file mode 100644
index 88d4d37..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Counter.java
+++ /dev/null
@@ -1,34 +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.jena.fuseki.server;
-
-import java.util.concurrent.atomic.AtomicLong ;
-
-/** A statistics counter */
-public class Counter
-{
-    private AtomicLong counter = new AtomicLong(0) ;
-    
-    public Counter()    {}
-    
-    public void inc()   { counter.incrementAndGet() ; } 
-    public void dec()   { counter.decrementAndGet() ; } 
-    public long value() { return counter.get() ; } 
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterMXBean.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterMXBean.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterMXBean.java
deleted file mode 100644
index 2de7658..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterMXBean.java
+++ /dev/null
@@ -1,25 +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.jena.fuseki.server;
-
-public interface CounterMXBean
-{
-    long getValue() ; 
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterName.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterName.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterName.java
deleted file mode 100644
index 7a8d306..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterName.java
+++ /dev/null
@@ -1,84 +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.jena.fuseki.server;
-
-/** Names for all counters */ 
-public enum CounterName {
-    // There are generic names - apply to all services and datasets - and
-    // also specific ones that relate only to a particular kind of service.
-    
-    // Total request received
-    Requests("requests"),
-    // .. of which some and "good" and some are "bad".
-    // #"good" + #"bad" roughly equals #"requests"
-    // except that the total is incremented at the start, and the outcome at the end.
-    // There may also be short term consistency issues.
-    RequestsGood("requests.good"),
-    RequestsBad("requests.bad") ,
-    
-    // SPARQL Protocol - query and update - together with upload.  
-    
-    // Query - standard and ... 
-    QueryTimeouts("query.timeouts") ,
-    QueryExecErrors("query.execerrors") ,
-    QueryIOErrors("query.ioerrors") ,
-    
-    // Update - standard and ...
-    UpdateExecErrors("update.execerrors"),
-    
-    // Upload ... standard counters
-    
-    // Graph Store Protocol. uses HTTP codes.
-
-    // For each HTTP method
-
-    HTTPget("http.get.requests") ,
-    HTTPgetGood("http.get.requests.good") ,
-    HTTPGetBad("http.get.requests.bad") ,
-
-    HTTPpost("http.post.requests") ,
-    HTTPpostGood("http.post.requests.good") ,
-    HTTPpostBad("http.post.requests.bad") ,
-
-    HTTPdelete("http.delete.requests") ,
-    HTTPdeleteGood("http.delete.requests.good") ,
-    HTTPdeleteBad("http.delete.requests.bad") ,
-
-    HTTPput("http.put.requests") ,
-    HTTPputGood("http.put.requests.good") ,
-    HTTPputBad("http.put.requests.bad") ,
-
-    HTTPhead("http.head.requests") ,
-    HTTPheadGood("http.head.requests.good") ,
-    HTTPheadBad("http.head.requests.bad") ,
-
-    HTTPpatch("http.patch.requests") ,
-    HTTPpatchGood("http.patch.requests.good") ,
-    HTTPpatchBad("http.patch.requests.bad") ,
-
-    HTTPoptions("http.options.requests") ,
-    HTTPoptionsGood("http.options.requests.good") ,
-    HTTPoptionsBad("http.options.requests.bad") ,
-    
-    ;
-    
-    public final String name ;
-    private CounterName(String name) { this.name = name ; }
-    
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterSet.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterSet.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterSet.java
deleted file mode 100644
index 9b8231e..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/CounterSet.java
+++ /dev/null
@@ -1,70 +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.jena.fuseki.server ;
-
-import java.util.Collection ;
-import java.util.HashMap ;
-import java.util.Map ;
-
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
-
-/** A collection of counters */
-public class CounterSet {
-    private static Logger             log      = LoggerFactory.getLogger(CounterSet.class) ;
-
-    private Map<CounterName, Counter> counters = new HashMap<>() ;
-
-    public CounterSet() {}
-
-    public Collection<CounterName> counters() {
-        return counters.keySet() ;
-    }
-
-    public void inc(CounterName c) {
-        get(c).inc() ;
-    }
-
-    public void dec(CounterName c) {
-        get(c).dec() ;
-    }
-
-    public long value(CounterName c) {
-        return get(c).value() ;
-    }
-
-    public void add(CounterName counterName) {
-        if ( counters.containsKey(counterName) ) {
-            log.warn("Duplicate counter in counter set: " + counterName) ;
-            return ;
-        }
-        counters.put(counterName, new Counter()) ;
-    }
-
-    public boolean contains(CounterName cn) {
-        return counters.containsKey(cn) ;
-    }
-
-    public Counter get(CounterName cn) {
-        Counter c = counters.get(cn) ;
-        if ( c == null )
-            log.warn("No counter in counter set: " + cn) ;
-        return c ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Counters.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Counters.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Counters.java
deleted file mode 100644
index 4e5ca4b..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Counters.java
+++ /dev/null
@@ -1,25 +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.jena.fuseki.server;
-
-/** Objects that have a counter set */ 
-public interface Counters {
-    public  CounterSet getCounters() ;
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataAccessPoint.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataAccessPoint.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataAccessPoint.java
deleted file mode 100644
index 24275a8..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataAccessPoint.java
+++ /dev/null
@@ -1,75 +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.jena.fuseki.server;
-
-import java.util.concurrent.atomic.AtomicLong ;
-
-import org.apache.jena.fuseki.servlets.HttpAction ;
-
-
-/** A name in the URL space of the server */
-public class DataAccessPoint {
-    private final String name ;
-    private DataService dataService ;
-    private DataAccessPoint link ;             // Symbolic link.
-    private AtomicLong requests = new AtomicLong(0) ;
-    
-    public DataAccessPoint(String name) {
-        this.name = canonical(name) ;
-        this.dataService = null ;
-    }
-    
-    public String getName()     { return name ; }
-    
-    public static String canonical(String datasetPath) {
-        if ( datasetPath == null )
-            return datasetPath ;
-        if ( datasetPath.equals("/") )
-            datasetPath = "" ;
-        else
-            if ( !datasetPath.startsWith("/") )
-                datasetPath = "/" + datasetPath ;
-        if ( datasetPath.endsWith("/") )
-            datasetPath = datasetPath.substring(0, datasetPath.length() - 1) ;
-        return datasetPath ;
-    }
-
-    public DataService getDataService() {
-        return dataService;
-    }
-
-    public void setDataService(DataService dataService) {
-        this.dataService = dataService;
-    }
-
-    public DataAccessPoint getLink() {
-        return link;
-    }
-
-    public void setLink(DataAccessPoint link) {
-        this.link = link;
-    }
-
-    public long requestCount()                          { return requests.get() ; }
-    
-    public void startRequest(HttpAction httpAction)     { requests.incrementAndGet() ; }
-
-    public void finishRequest(HttpAction httpAction)    { requests.getAndDecrement() ; }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataAccessPointRegistry.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataAccessPointRegistry.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataAccessPointRegistry.java
deleted file mode 100644
index 19119a9..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataAccessPointRegistry.java
+++ /dev/null
@@ -1,37 +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.jena.fuseki.server;
-
-import org.apache.jena.fuseki.FusekiException ;
-import org.apache.jena.fuseki.migrate.Registry ;
-
-public class DataAccessPointRegistry extends Registry<String, DataAccessPoint>
-{
-    public static void register(String name, DataAccessPoint accessPt) {
-        if ( get().isRegistered(name) )
-            throw new FusekiException("Already registered: "+name) ;
-        get().put(name, accessPt);
-    }
-    
-    private static DataAccessPointRegistry singleton = new DataAccessPointRegistry() ;
-
-    public static DataAccessPointRegistry get() { return singleton ; }
-    
-    private DataAccessPointRegistry() {}
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataService.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataService.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataService.java
deleted file mode 100644
index df9d2b3..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DataService.java
+++ /dev/null
@@ -1,199 +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.jena.fuseki.server;
-
-import static org.apache.jena.fuseki.server.DatasetStatus.CLOSING ;
-import static org.apache.jena.fuseki.server.DatasetStatus.UNINITIALIZED ;
-
-import java.util.* ;
-import java.util.concurrent.atomic.AtomicBoolean ;
-import java.util.concurrent.atomic.AtomicLong ;
-
-import org.apache.jena.atlas.lib.MultiMap ;
-import org.apache.jena.atlas.lib.MultiMapToList ;
-import org.apache.jena.fuseki.DEF ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.build.DataServiceDesc ;
-
-import com.hp.hpl.jena.query.ReadWrite ;
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
-import com.hp.hpl.jena.sparql.core.DatasetGraphReadOnly ;
-import com.hp.hpl.jena.tdb.StoreConnection ;
-import com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction ;
-
-public class DataService { //implements DatasetMXBean {
-    // XXX Add a "null model assembler".
-    
-    public static DataService serviceOnlyDataService() {
-        return dummy ; 
-    }
-    
-    public static DataService dummy = new DataService(null, null) ;
-    static {
-        dummy.dataset = new DatasetGraphReadOnly(DatasetGraphFactory.createMemFixed()) ;
-        dummy.addEndpoint(OperationName.Query, DEF.ServiceQuery) ;
-        dummy.addEndpoint(OperationName.Query, DEF.ServiceQueryAlt) ;
-    }
-    
-    private final DataServiceDesc svcDesc ;
-    private DatasetGraph dataset = null ;              // Only valid if active.
-
-    private MultiMapToList<OperationName, Endpoint> operations     = MultiMap.createMapList() ;
-    private Map<String, Endpoint> endpoints                        = new HashMap<>() ;
-    
-    private volatile DatasetStatus state = UNINITIALIZED ;
-
-    // DataService-level counters.
-    private final CounterSet counters                   = new CounterSet() ;
-    private final AtomicLong    requestCounter          = new AtomicLong(0) ;   
-    private final AtomicBoolean offlineInProgress       = new AtomicBoolean(false) ;
-    private final AtomicBoolean acceptingRequests       = new AtomicBoolean(true) ;
-
-    public DataService(DataServiceDesc desc, DatasetGraph dataset) {
-        this.svcDesc = desc ;
-        this.dataset = dataset ;
-        counters.add(CounterName.Requests) ;
-        counters.add(CounterName.RequestsGood) ;
-        counters.add(CounterName.RequestsBad) ;
-    }
-    
-    public DatasetGraph getDataset() {
-        return dataset ; 
-    }
-    
-    public void addEndpoint(OperationName operationName, String endpointName) {
-        Endpoint endpoint = new Endpoint(operationName, endpointName) ;
-        endpoints.put(endpointName, endpoint) ;
-        operations.put(operationName, endpoint);
-    }
-    
-    public Endpoint getOperation(String endpointName) {
-        return endpoints.get(endpointName) ;
-    }
-
-    public List<Endpoint> getOperation(OperationName opName) {
-        List<Endpoint> x = operations.get(opName) ;
-        if ( x == null )
-            x = Collections.emptyList() ;
-        return x ;  
-    }
-
-    /** Return the OperationNames available here.
-     *  @see #getOperation(OperationName) to ge the endpoint list
-     */
-    public Collection<OperationName> getOperations() {
-        return operations.keys() ;
-    }
-
-    //@Override
-    public boolean allowUpdate()    { return true ; }
-
-    public void goOffline()         { 
-        offlineInProgress.set(true) ;
-        acceptingRequests.set(false) ;
-        state = DatasetStatus.OFFLINE ; 
-    }
-    
-    public void goActive()         { 
-        offlineInProgress.set(false) ;
-        acceptingRequests.set(true) ;
-        state = DatasetStatus.ACTIVE ; 
-    }
-
-    public boolean isAcceptingRequests() {
-        return acceptingRequests.get() ;
-    }
-    
-    //@Override
-    public  CounterSet getCounters() { return counters ; }
-    
-    //@Override 
-    public long getRequests() { 
-        return counters.value(CounterName.Requests) ;
-    }
-
-    //@Override
-    public long getRequestsGood() {
-        return counters.value(CounterName.RequestsGood) ;
-    }
-    //@Override
-    public long getRequestsBad() {
-        return counters.value(CounterName.RequestsBad) ;
-    }
-
-    /** Counter of active read transactions */
-    public AtomicLong   activeReadTxn           = new AtomicLong(0) ;
-
-    /** Counter of active write transactions */
-    public AtomicLong   activeWriteTxn          = new AtomicLong(0) ;
-
-    /** Cumulative counter of read transactions */
-    public AtomicLong   totalReadTxn            = new AtomicLong(0) ;
-
-    /** Cumulative counter of writer transactions */
-    public AtomicLong   totalWriteTxn           = new AtomicLong(0) ;
-
-    public void startTxn(ReadWrite mode)
-    {
-        switch(mode)
-        {
-            case READ:  
-                activeReadTxn.getAndIncrement() ;
-                totalReadTxn.getAndIncrement() ;
-                break ;
-            case WRITE:
-                activeWriteTxn.getAndIncrement() ;
-                totalWriteTxn.getAndIncrement() ;
-                break ;
-        }
-    }
-
-    public void finishTxn(ReadWrite mode)
-    {
-        switch(mode)
-        {
-            case READ:  
-                activeReadTxn.decrementAndGet() ;
-                break ;
-            case WRITE:
-                activeWriteTxn.decrementAndGet() ;
-                break ;
-        }
-        checkShutdown() ;
-    }
-
-    private void checkShutdown() {
-        if ( state == CLOSING ) {
-            if ( activeReadTxn.get() == 0 && activeWriteTxn.get() == 0 )
-                shutdown() ;
-        }
-    }
-
-    private void shutdown() {
-        Fuseki.serverLog.info("Shutting down dataset") ;
-        dataset.close() ;
-        if ( dataset instanceof DatasetGraphTransaction ) {
-            DatasetGraphTransaction dsgtxn = (DatasetGraphTransaction)dataset ;
-            StoreConnection.release(dsgtxn.getLocation()) ;
-        }
-        dataset = null ; 
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DatasetMXBean.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DatasetMXBean.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DatasetMXBean.java
deleted file mode 100644
index bf38229..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DatasetMXBean.java
+++ /dev/null
@@ -1,35 +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.jena.fuseki.server;
-
-public interface DatasetMXBean
-{
-    String getName() ;
-    
-    long getRequests() ;
-    long getRequestsGood() ;
-    long getRequestsBad() ;
-    
-//    void enable() ;
-//    void disable() ;
-//    void setReadOnly() ;
-//    boolean getReadOnly() ;
-    
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DatasetStatus.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DatasetStatus.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DatasetStatus.java
deleted file mode 100644
index 524b050..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/DatasetStatus.java
+++ /dev/null
@@ -1,40 +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.jena.fuseki.server;
-
-import com.hp.hpl.jena.rdf.model.Resource ;
-
-public enum DatasetStatus {
-    UNINITIALIZED("Uninitialized"), ACTIVE("Active"), OFFLINE("Offline"), CLOSING("Closing"), CLOSED("Closed") ;
-    public final String name ; 
-    DatasetStatus(String string) { name = string ; }
-    
-    public static DatasetStatus status(Resource r) {
-        if ( FusekiVocab.stateActive.equals(r) )
-            return ACTIVE ;
-        if ( FusekiVocab.stateOffline.equals(r) )
-            return OFFLINE ;
-        if ( FusekiVocab.stateClosing.equals(r) )
-            return CLOSING ;
-        if ( FusekiVocab.stateClosed.equals(r) )
-            return CLOSED ;
-        return null ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Endpoint.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Endpoint.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Endpoint.java
deleted file mode 100644
index 6de7062..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/Endpoint.java
+++ /dev/null
@@ -1,68 +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.jena.fuseki.server;
-
-import org.apache.jena.atlas.lib.InternalErrorException ;
-
-public class Endpoint implements Counters {
-    
-    public final OperationName opName ;
-    public final String endpointName ;
-    // Endpoint-level counters.
-    private final CounterSet counters           = new CounterSet() ;
-
-    public Endpoint(OperationName opName, String endpointName) {
-        this.opName = opName ;
-        if ( opName == null )
-            throw new InternalErrorException("opName is null") ;
-        this.endpointName = endpointName ;
-        // Standard counters - there may be others
-        counters.add(CounterName.Requests) ;
-        counters.add(CounterName.RequestsGood) ;
-        counters.add(CounterName.RequestsBad) ;
-    }
-
-    @Override
-    public  CounterSet getCounters()    { return counters ; }
-
-    //@Override
-    public OperationName getOperationName()      { return opName ; }
-    
-    //@Override
-    public boolean isType(OperationName operationName) { 
-        return opName.equals(operationName) ;
-    }
-
-    public String getEndpoint()         { return endpointName ; }
-    
-    //@Override 
-    public long getRequests() { 
-        return counters.value(CounterName.Requests) ;
-    }
-    //@Override
-    public long getRequestsGood() {
-        return counters.value(CounterName.RequestsGood) ;
-    }
-    //@Override
-    public long getRequestsBad() {
-        return counters.value(CounterName.RequestsBad) ;
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java
deleted file mode 100644
index a76be11..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java
+++ /dev/null
@@ -1,114 +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.jena.fuseki.server;
-
-import java.nio.file.Path ;
-import java.nio.file.Paths ;
-
-/** 
- * Separate initialization for FUSEKI_HOME and FUSEKI_BASE so that 
- * Fusekilogging can use these values.
- * This code must not touch Jena.  
- * 
- * @See FusekiServer 
- */ 
-public class FusekiEnv {
-    /** Root of the Fuseki installation for fixed files. 
-     *  This may be null (e.g. running inside a web application container) */ 
-    public static Path FUSEKI_HOME = null ;
-    
-    /** Root of the varying files in this deployment. Often $FUSEKI_HOME/run.
-     * This is not null - it may be /etc/fuseki, which must be writable.
-     */ 
-    public static Path FUSEKI_BASE = null ;
-    
-    static final boolean isWindows = determineIfWindows() ;
-    
-    // Copied from SystemTDB to avoid dependency.
-    // This code must not touch Jena.  
-    private static boolean determineIfWindows() {
-        String s = System.getProperty("os.name") ;
-        if ( s == null )
-            return false ;
-        return s.startsWith("Windows ") ;
-    }
- 
-    /** Unused */
-    // public static final String DFT_FUSEKI_HOME = isWindows 
-    //        ? /*What's correct here?*/ "/usr/share/fuseki"
-    //        : "/usr/share/fuseki" ;
-    static final String  DFT_FUSEKI_BASE = isWindows ? /* What's correct here? */"/etc/fuseki" : "/etc/fuseki" ;
-
-    public static final String   ENV_runArea     = "run" ;
-
-    private static boolean       initialized     = false ;
-    private static final boolean LogInit         = false ;
-    
-    public static synchronized void setEnvironment() {
-        if ( initialized )
-            return ;
-        initialized = true ;
-        logInit("FusekiInitEnv") ;
-        logInit("Start: ENV_FUSEKI_HOME = %s : ENV_FUSEKI_BASE = %s", FUSEKI_HOME, FUSEKI_BASE) ;
-        
-        if ( FUSEKI_HOME == null ) {
-            // Make absolute
-            String x1 = getenv("FUSEKI_HOME") ;
-            if ( x1 != null )
-                FUSEKI_HOME = Paths.get(x1) ;
-        }
-
-        if ( FUSEKI_BASE == null ) {
-            String x2 = getenv("FUSEKI_BASE") ;
-            if ( x2 != null )
-                FUSEKI_BASE = Paths.get(x2) ;
-            else {
-                if ( FUSEKI_HOME != null )
-                    FUSEKI_BASE = FUSEKI_HOME.resolve(ENV_runArea) ;
-                else
-                    // Neither FUSEKI_HOME nor FUSEKI_BASE set.
-                    FUSEKI_BASE = Paths.get(DFT_FUSEKI_BASE) ;
-            }
-        }
-
-        if ( FUSEKI_HOME != null )
-            FUSEKI_HOME = FUSEKI_HOME.toAbsolutePath() ;
-
-        FUSEKI_BASE = FUSEKI_BASE.toAbsolutePath() ;
-
-        logInit("Finish: ENV_FUSEKI_HOME = %s : ENV_FUSEKI_BASE = %s", FUSEKI_HOME, FUSEKI_BASE) ;
-    }
-    
-    private static void logInit(String fmt, Object ... args) {
-        if ( LogInit ) {
-            System.out.printf(fmt, args) ; 
-            System.out.println() ;
-        }
-    }
-    
-    /** Get environment variable value (maybe in system properties) */
-    public static String getenv(String name) {
-        String x = System.getenv(name) ;
-        if ( x == null )
-            x = System.getProperty(name) ;
-        return x ;
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
deleted file mode 100644
index 83d5523..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
+++ /dev/null
@@ -1,395 +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.jena.fuseki.server;
-
-import java.io.File ;
-import java.io.IOException ;
-import java.io.InputStream ;
-import java.io.StringReader ;
-import java.nio.file.Files ;
-import java.nio.file.Path ;
-import java.nio.file.StandardCopyOption ;
-import java.util.ArrayList ;
-import java.util.HashMap ;
-import java.util.List ;
-import java.util.Map ;
-
-import org.apache.jena.atlas.io.IO ;
-import org.apache.jena.atlas.lib.DS ;
-import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.atlas.lib.InternalErrorException ;
-import org.apache.jena.atlas.lib.Lib ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.FusekiConfigException ;
-import org.apache.jena.fuseki.build.Builder ;
-import org.apache.jena.fuseki.build.FusekiConfig ;
-import org.apache.jena.fuseki.build.Template ;
-import org.apache.jena.fuseki.build.TemplateFunctions ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.riot.RDFLanguages ;
-import arq.cmd.CmdException ;
-
-import com.hp.hpl.jena.rdf.model.* ;
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-import com.hp.hpl.jena.tdb.sys.Names ;
-
-public class FusekiServer
-{
-    // Initialization of FUSEKI_HOME and FUSEKI_BASE is done in FusekiEnvInit
-    // so that the code is independent of any logging.  FusekiLogging can use
-    // initialized values of FUSEKI_BASE while looking forlog4j configuration.
-    
-    /** Root of the Fuseki installation for fixed files. 
-     * This may be null (e.g. running inside a web application container) */ 
-    //public static Path FUSEKI_HOME = null ;
-    
-    /** Root of the varying files in this deployment. Often $FUSEKI_HOME/run.
-     * This is not null - it may be /etc/fuseki, which must be writable.
-     */ 
-    //public static Path FUSEKI_BASE = null ;
-    
-    // Relative names of directories in the FUSEKI_BASE area.
-    public static final String     runArea                  = FusekiEnv.ENV_runArea ;
-    public static final String     databasesLocationBase    = "databases" ;
-    // Place to put Lucene text and spatial indexes.
-    //private static final String        databaseIndexesDir       = "indexes" ;
-      
-    public static final String     backupDirNameBase        = "backups" ;
-    public static final String     configDirNameBase        = "configuration" ;
-    public static final String     logsNameBase             = "logs" ;
-    public static final String     systemDatabaseNameBase   = "system" ;
-    public static final String     systemFileAreaBase       = "system_files" ;
-    public static final String     templatesNameBase        = "templates" ;
-    // This name is in web.xml as well.
-    public static final String     DFT_SHIRO_INI            = "shiro.ini" ; 
-    // In FUSEKI_BASE
-    public static final String     DFT_CONFIG               = "config.ttl" ;
-    
-    /** Directory for TDB databases - this is known to the assembler templates */
-    public static Path        dirDatabases       = null ;
-    
-    /** Directory for writing backups */
-    public static Path        dirBackups         = null ;
-
-    /** Directory for assembler files */
-    public static Path        dirConfiguration   = null ;
-    
-    /** Directory for assembler files */
-    public static Path        dirLogs            = null ;
-
-    /** Directory for system database */
-    public static Path        dirSystemDatabase  = null ;
-
-    /** Directory for files uploaded (e.g upload assmbler descriptions); not data uploads. */
-    public static Path        dirFileArea        = null ;
-    
-    /** Directory for assembler files */
-    public static Path        dirTemplates       = null ;
-
-    private static boolean    initialized        = false ;
-    public static boolean     serverInitialized  = false ;
-
-    /** For testing - reset the places which initialize once */
-    public synchronized static void reset() {
-        initialized = false ;
-        FusekiServer.initialized = false ;
-    }
-    
-    public synchronized static void init() {
-        if ( initialized )
-            return ;
-        initialized = true ;
-        try {
-            FusekiEnv.setEnvironment() ;
-            Path FUSEKI_HOME = FusekiEnv.FUSEKI_HOME ;
-            Path FUSEKI_BASE = FusekiEnv.FUSEKI_BASE ;
-            
-            Fuseki.init() ;
-            Fuseki.configLog.info("FUSEKI_HOME="+ ((FUSEKI_HOME==null) ? "unset" : FUSEKI_HOME.toString())) ;
-            Fuseki.configLog.info("FUSEKI_BASE="+FUSEKI_BASE.toString());
-
-            // ----  Check FUSEKI_HOME and FUSEKI_BASE
-            // If FUSEKI_HOME exists, it may be FUSEKI_BASE.
-
-            if ( FUSEKI_HOME != null ) {
-                if ( ! Files.isDirectory(FUSEKI_HOME) )
-                    throw new FusekiConfigException("FUSEKI_HOME is not a directory: "+FUSEKI_HOME) ;
-                if ( ! Files.isReadable(FUSEKI_HOME) )
-                    throw new FusekiConfigException("FUSEKI_HOME is not readable: "+FUSEKI_HOME) ;
-            }
-
-            if ( Files.exists(FUSEKI_BASE) ) {
-                if ( ! Files.isDirectory(FUSEKI_BASE) )
-                    throw new FusekiConfigException("FUSEKI_BASE is not a directory: "+FUSEKI_BASE) ;
-                if ( ! Files.isWritable(FUSEKI_BASE) )
-                    throw new FusekiConfigException("FUSEKI_BASE is not writable: "+FUSEKI_BASE) ;
-            } else {
-                ensureDir(FUSEKI_BASE);
-            }
-
-            // Ensure FUSEKI_BASE has the assumed directories.
-            dirTemplates        = writeableDirectory(FUSEKI_BASE, templatesNameBase) ;
-            dirDatabases        = writeableDirectory(FUSEKI_BASE, databasesLocationBase) ;
-            dirBackups          = writeableDirectory(FUSEKI_BASE, backupDirNameBase) ;
-            dirConfiguration    = writeableDirectory(FUSEKI_BASE, configDirNameBase) ;
-            dirLogs             = writeableDirectory(FUSEKI_BASE, logsNameBase) ;
-            dirSystemDatabase   = writeableDirectory(FUSEKI_BASE, systemDatabaseNameBase) ;
-            dirFileArea         = writeableDirectory(FUSEKI_BASE, systemFileAreaBase) ;
-            //Possible intercept point
-
-            // ---- Initialize with files.
-
-            if ( Files.isRegularFile(FUSEKI_BASE) ) 
-                throw new FusekiConfigException("FUSEKI_BASE exists but is a file") ;
-
-            // Copy missing files into FUSEKI_BASE
-            copyFileIfMissing(null, DFT_SHIRO_INI, FUSEKI_BASE) ;
-            copyFileIfMissing(null, DFT_CONFIG, FUSEKI_BASE) ;
-            for ( String n : Template.templateNames ) {
-                copyFileIfMissing(null, n, FUSEKI_BASE) ;
-            }
-
-            serverInitialized = true ;
-        } catch (RuntimeException ex) {
-            Fuseki.serverLog.error("Exception in server initialization", ex) ;
-            throw ex ;
-        }
-    }
-    
-    private static boolean emptyDir(Path dir) {
-        return dir.toFile().list().length <= 2 ;
-    }
-    
-    /** Copy a file from src to dst under name fn.
-     * If src is null, try as a classpath resource
-     * @param src   Source directory, or null meaning use java resource. 
-     * @param fn    File name, a relative path.
-     * @param dst   Destination directory.
-     * 
-     */
-    private static void copyFileIfMissing(Path src, String fn, Path dst) {
-        
-        Path dstFile = dst.resolve(fn) ;
-        if ( Files.exists(dstFile) )
-            return ;
-        
-        // fn may be a path.
-        if ( src != null ) {
-            try {
-                Files.copy(src.resolve(fn), dstFile, StandardCopyOption.COPY_ATTRIBUTES) ;
-            } catch (IOException e) {
-                IO.exception("Failed to copy file "+src, e);
-                e.printStackTrace();
-            }
-        } else {
-            try {
-                // Get from the file from area "org/apache/jena/fuseki/server"  (our package)
-                InputStream in = FusekiServer.class.getResource(fn).openStream() ;
-                Files.copy(in, dstFile) ;
-            }
-            catch (IOException e) {
-                IO.exception("Failed to copy file from resource: "+src, e);
-                e.printStackTrace();
-            }
-        }
-    }
-
-    public static void initializeDataAccessPoints(ServerInitialConfig initialSetup, String configDir) {
-        List<DataAccessPoint> configFileDBs = initServerConfiguration(initialSetup) ;
-        List<DataAccessPoint> directoryDBs =  FusekiConfig.readConfigurationDirectory(configDir) ;
-        List<DataAccessPoint> systemDBs =     FusekiConfig.readSystemDatabase(SystemState.getDataset()) ;
-        
-        List<DataAccessPoint> datapoints = new ArrayList<DataAccessPoint>() ;
-        datapoints.addAll(configFileDBs) ;
-        datapoints.addAll(directoryDBs) ;
-        datapoints.addAll(systemDBs) ;
-        
-        // Having found them, set them all running.
-        enable(datapoints);
-    }
-
-    private static void enable(List<DataAccessPoint> datapoints) {
-        for ( DataAccessPoint dap : datapoints ) {
-            Fuseki.configLog.info("Register: "+dap.getName()) ;
-            DataAccessPointRegistry.register(dap.getName(), dap); 
-        }
-    }
-
-    private static List<DataAccessPoint> initServerConfiguration(ServerInitialConfig params) { 
-        // Has a side effect of global context setting
-        // when processing a config file.
-        // Compatibility.
-        
-        List<DataAccessPoint> datasets = DS.list() ;
-        if ( params == null )
-            return datasets ;
-
-        if ( params.fusekiConfigFile != null ) {
-            if ( FileOps.exists(params.fusekiConfigFile ) ) {
-                Fuseki.configLog.info("Configuration file: " + params.fusekiConfigFile) ;
-                List<DataAccessPoint> cmdLineDatasets = FusekiConfig.readConfigFile(params.fusekiConfigFile) ;
-                datasets.addAll(cmdLineDatasets) ;
-            } else {
-                Fuseki.configLog.info("Configuration file '" + params.fusekiConfigFile+"' does not exist") ;
-            }
-        } else if ( params.dsg != null ) {
-            DataAccessPoint dap = defaultConfiguration(params.datasetPath, params.dsg, params.allowUpdate) ;
-            datasets.add(dap) ;
-        } else if ( params.templateFile != null ) {
-            Fuseki.configLog.info("Template file: " + params.templateFile) ;
-            String dir = params.params.get(Template.DIR) ;
-            if ( dir != null ) {
-                if ( Lib.equal(dir, Names.memName) ) {
-                    Fuseki.configLog.info("TDB dataset: in-memory") ;
-                } else {
-                    if ( !FileOps.exists(dir) )
-                        throw new CmdException("Directory not found: " + dir) ;
-                    Fuseki.configLog.info("TDB dataset: directory=" + dir) ;
-                }
-            }
-            DataAccessPoint dap = configFromTemplate(params.templateFile, params.datasetPath, params.params) ;
-            datasets.add(dap) ;
-        }
-        // No datasets is valid.
-        return datasets ;
-    }
-    
-    private static DataAccessPoint configFromTemplate(String templateFile, 
-                                                      String datasetPath, 
-                                                      Map<String, String> params) {
-        datasetPath = DataAccessPoint.canonical(datasetPath) ;
-        
-        // DRY -- ActionDatasets (and others?)
-        if ( params == null ) {
-            params = new HashMap<>() ;
-            params.put(Template.NAME, datasetPath) ;
-        } else {
-            if ( ! params.containsKey(Template.NAME) ) {
-                Fuseki.configLog.warn("No NAME found in template parameters (added)") ;
-                params.put(Template.NAME, datasetPath) ;   
-            }
-        }
-        
-        addGlobals(params); 
-
-        String str = TemplateFunctions.templateFile(templateFile, params) ;
-        Lang lang = RDFLanguages.filenameToLang(str, Lang.TTL) ;
-        StringReader sr =  new StringReader(str) ;
-        Model model = ModelFactory.createDefaultModel() ;
-        RDFDataMgr.read(model, sr, datasetPath, lang);
-        
-        // Find DataAccessPoint
-        Statement stmt = getOne(model, null, FusekiVocab.pServiceName, null) ;
-        if ( stmt == null ) {
-            StmtIterator sIter = model.listStatements(null, FusekiVocab.pServiceName, (RDFNode)null ) ;
-            if ( ! sIter.hasNext() )
-                ServletOps.errorBadRequest("No name given in description of Fuseki service") ;
-            sIter.next() ;
-            if ( sIter.hasNext() )
-                ServletOps.errorBadRequest("Multiple names given in description of Fuseki service") ;
-            throw new InternalErrorException("Inconsistent: getOne didn't fail the second time") ;
-        }
-        Resource subject = stmt.getSubject() ;
-        DataAccessPoint dap = Builder.buildDataAccessPoint(subject) ;
-        return dap ;
-    }
-    
-    public static void addGlobals(Map<String, String> params) {
-        if ( params == null ) {
-            Fuseki.configLog.warn("FusekiServer.addGlobals : params is null", new Throwable()) ;
-            return ;
-        }
-        
-        if ( ! params.containsKey("FUSEKI_BASE") )
-            params.put("FUSEKI_BASE", pathStringOrElse(FusekiEnv.FUSEKI_BASE, "unset")) ;
-        if ( ! params.containsKey("FUSEKI_HOME") )
-            params.put("FUSEKI_HOME", pathStringOrElse(FusekiEnv.FUSEKI_HOME, "unset")) ;
-    }
-
-    private static String pathStringOrElse(Path path, String dft) {
-        if ( path == null )
-            return dft ;
-        return path.toString() ;
-    }
-    
-    // DRY -- ActionDatasets (and others?)
-    private static Statement getOne(Model m, Resource s, Property p, RDFNode o) {
-        StmtIterator iter = m.listStatements(s, p, o) ;
-        if ( ! iter.hasNext() )
-            return null ;
-        Statement stmt = iter.next() ;
-        if ( iter.hasNext() )
-            return null ;
-        return stmt ;
-    }
-    
-    private static DataAccessPoint defaultConfiguration( String name, DatasetGraph dsg, boolean updatable) {
-        name = DataAccessPoint.canonical(name) ;
-        DataAccessPoint dap = new DataAccessPoint(name) ;
-        DataService ds = Builder.buildDataService(dsg, updatable) ;
-        dap.setDataService(ds) ;
-        return dap ;
-    }
-    
-    // ---- Helpers
-
-    /** Ensure a directory exists, creating it if necessary.
-     */
-    private static void ensureDir(Path directory) {
-        File dir = directory.toFile() ;
-        if ( ! dir.exists() ) {
-            boolean b = dir.mkdirs() ;
-            if ( ! b )
-                throw new FusekiConfigException("Failed to create directory: "+directory) ;
-        }
-        else if ( ! dir.isDirectory())
-            throw new FusekiConfigException("Not a directory: "+directory) ;
-    }
-
-    private static void mustExist(Path directory) {
-        File dir = directory.toFile() ;
-        if ( ! dir.exists() )
-            throw new FusekiConfigException("Does not exist: "+directory) ; 
-        if ( ! dir.isDirectory())
-            throw new FusekiConfigException("Not a directory: "+directory) ;
-    }
-    
-    private static boolean exists(Path directory) {
-        File dir = directory.toFile() ;
-        return dir.exists() ;
-    }
-
-    private static Path writeableDirectory(Path root , String relName ) {
-        Path p = makePath(root, relName) ;
-        ensureDir(p);
-        if ( ! Files.isWritable(p) )
-            throw new FusekiConfigException("Not writable: "+p) ;
-        return p ;
-    }
-    
-    private static Path makePath(Path root , String relName ) {
-        Path path = root.resolve(relName) ;
-        // Must exist
-//        try { path = path.toRealPath() ; }
-//        catch (IOException e) { IO.exception(e) ; }
-        return path ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServerEnvironmentInit.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServerEnvironmentInit.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServerEnvironmentInit.java
deleted file mode 100644
index 356dc82..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServerEnvironmentInit.java
+++ /dev/null
@@ -1,41 +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.jena.fuseki.server;
-
-import javax.servlet.ServletContextEvent ;
-import javax.servlet.ServletContextListener ;
-
-import org.apache.jena.fuseki.FusekiLogging ;
-
-/** Setup the enviroment and logging.
- *  Runs before the ShiroEnvironmentLoader.
- */
-public class FusekiServerEnvironmentInit implements ServletContextListener {
-
-    public FusekiServerEnvironmentInit() { }
-    
-    @Override
-    public void contextInitialized(ServletContextEvent sce) {
-        FusekiEnv.setEnvironment();
-        FusekiLogging.setLogging();
-    }
-
-    @Override
-    public void contextDestroyed(ServletContextEvent sce) {}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java
deleted file mode 100644
index 334fc73..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java
+++ /dev/null
@@ -1,81 +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.jena.fuseki.server;
-
-import javax.servlet.ServletContext ;
-import javax.servlet.ServletContextEvent ;
-import javax.servlet.ServletContextListener ;
-
-import org.apache.jena.fuseki.Fuseki ;
-
-public class FusekiServerListener implements ServletContextListener {
-
-    public FusekiServerListener() { }
-    
-    public static ServerInitialConfig initialSetup = null ;
-
-    private boolean initialized = false ;
-
-    @Override
-    public void contextInitialized(ServletContextEvent sce) {
-        ServletContext servletContext = sce.getServletContext() ;
-        String x = servletContext.getContextPath() ;
-        if ( ! x.isEmpty() ) 
-            Fuseki.configLog.info("Context path = "+x) ;
-//        String x = System.getProperty("user.dir") ;
-//        Path currentRelativePath = Paths.get("");
-//        String s = currentRelativePath.toAbsolutePath().toString();
-//        confLog.info("dir1 = "+x+" : dir2 = "+s) ;
-        init() ;
-    }
-
-    @Override
-    public void contextDestroyed(ServletContextEvent sce) {}
-
-    public synchronized void init() {
-        if ( initialized )
-            return ;
-        initialized = true ;
-
-        try {
-            FusekiServer.init() ; 
-            if ( ! FusekiServer.serverInitialized ) {
-                Fuseki.serverLog.error("Failed to initialize : Server not running") ;
-                return ;
-            }
-
-            if ( initialSetup == null ) {
-                initialSetup = new ServerInitialConfig() ;
-                String cfg = FusekiEnv.FUSEKI_BASE.resolve(FusekiServer.DFT_CONFIG).toAbsolutePath().toString() ;
-                initialSetup.fusekiConfigFile = cfg ;
-            }
-
-            if ( initialSetup != null ) {
-                FusekiServer.initializeDataAccessPoints(initialSetup, FusekiServer.dirConfiguration.toString()) ;
-            } else {
-                Fuseki.serverLog.error("No configuration") ;
-                System.exit(0) ;
-            }
-        } catch (Throwable th) { 
-            Fuseki.serverLog.error("Exception in initialization: {}", th.getMessage()) ;
-            throw th ;
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiVocab.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiVocab.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiVocab.java
deleted file mode 100644
index ddae32c..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/FusekiVocab.java
+++ /dev/null
@@ -1,77 +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.jena.fuseki.server;
-
-import org.apache.jena.fuseki.FusekiException ;
-import org.apache.jena.iri.IRI ;
-import org.apache.jena.riot.system.IRIResolver ;
-
-import com.hp.hpl.jena.rdf.model.* ;
-
-public class FusekiVocab
-{
-    public static String NS = "http://jena.apache.org/fuseki#" ;
-    private static Model model = ModelFactory.createDefaultModel() ;
-
-    public static final Resource tServer = resource("Server") ;
-
-    public static final Resource fusekiService = resource("Service") ;
-
-    public static final Property pServices = property("services") ;
-    public static final Property pServiceName = property("name") ;
-    
-    public static final Property pServiceQueryEP = property("serviceQuery") ;
-    public static final Property pServiceUpdateEP = property("serviceUpdate") ;
-    public static final Property pServiceUploadEP = property("serviceUpload") ;
-    public static final Property pServiceReadWriteGraphStoreEP = property("serviceReadWriteGraphStore") ;
-    public static final Property pServiceReadgraphStoreEP = property("serviceReadGraphStore") ;
-
-    public static final Property pAllowTimeoutOverride = property("allowTimeoutOverride");
-    public static final Property pMaximumTimeoutOverride = property("maximumTimeoutOverride");
-    
-    // Internal
-    
-    private static final String stateNameActive      = DatasetStatus.ACTIVE.name ;
-    private static final String stateNameOffline     = DatasetStatus.OFFLINE.name ;
-    private static final String stateNameClosing     = DatasetStatus.CLOSING.name ;
-    private static final String stateNameClosed      = DatasetStatus.CLOSED.name ;
-    
-    public static final Resource stateActive        = resource(stateNameActive) ;
-    public static final Resource stateOffline       = resource(stateNameOffline) ;
-    public static final Resource stateClosing       = resource(stateNameClosing) ;
-    public static final Resource stateClosed        = resource(stateNameClosed) ;
-    
-    public static final Property pStatus = property("status") ;
-
-    private static Resource resource(String localname) { return model.createResource(iri(localname)) ; }
-    private static Property property(String localname) { return model.createProperty(iri(localname)) ; }
-        
-    private static String iri(String localname)
-    {
-        String uri = NS+localname ;
-        IRI iri = IRIResolver.parseIRI(uri) ;
-        if ( iri.hasViolation(true) )
-            throw new FusekiException("Bad IRI: "+iri) ;
-        if ( ! iri.isAbsolute() )
-            throw new FusekiException("Bad IRI: "+iri) ;
-        
-        return uri ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/OperationName.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/OperationName.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/OperationName.java
deleted file mode 100644
index 0abcf20..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/OperationName.java
+++ /dev/null
@@ -1,37 +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.jena.fuseki.server;
-
-public enum OperationName {
-    // Fixed names give the codebase some resilience.
-    
-    Query("SPARQL Query"),
-    Update("SPARQL Update"),
-    Upload("File Upload"),
-    GSP("Graph Store Protocol"),
-    GSP_R("Graph Store Protocol (Read)"),
-    Quads("HTTP Quads")
-    ;
-    
-    private final String description ;
-    private OperationName(String description) { this.description = description ; }
-    public String getDescription() { return description ; }
-    
-}
-


[58/93] [abbrv] jena git commit: JENA-844 : Set large header size for oversized HTTP GET requests.

Posted by rv...@apache.org.
JENA-844 : Set large header size for oversized HTTP GET requests.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/3042cf91
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/3042cf91
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/3042cf91

Branch: refs/heads/hadoop-rdf
Commit: 3042cf9166c2f7645ea48a16257bd46aa267ae42
Parents: e376e75
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 18:59:00 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 18:59:00 2015 +0000

----------------------------------------------------------------------
 .../java/org/apache/jena/fuseki/jetty/JettyFuseki.java   | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/3042cf91/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
index 8d9046c..b354296 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
@@ -290,11 +290,16 @@ public class JettyFuseki {
 
     private void defaultServerConfig(int port, boolean loopback) {
         server = new Server() ;
-        ConnectionFactory f1 = new HttpConnectionFactory() ;
-        ConnectionFactory f2 = new SslConnectionFactory() ;
+        HttpConnectionFactory f1 = new HttpConnectionFactory() ;
+        // Some people do try very large operations ...
+        f1.getHttpConfiguration().setRequestHeaderSize(64 * 1024);
+        f1.getHttpConfiguration().setOutputBufferSize(5 * 1024 * 1024) ;
+        
+        //SslConnectionFactory f2 = new SslConnectionFactory() ;
         
         ServerConnector connector = new ServerConnector(server, f1) ; //, f2) ;
-        connector.setPort(port);
+        connector.setPort(port) ;
+        
         server.addConnector(connector);
         
         if ( loopback )


[18/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/pivot.min.js.map
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/pivot.min.js.map b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/pivot.min.js.map
new file mode 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O,EAAE,SAAS,KAAK,GAAM,KACjC,SAAW,WACX,eAAe,MACf,gBAAgB,SAEpB,EAAK,KAAI,QAAW,EAAE,cAAe,MAAO,aAAc,WAAU,KAAK,OA3BpE,MA6ByB,EAAA,EAAA,EAAA,GAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,GAAA,IAAA,IAAA,EAAtC,EAAY,cAAa,EAGzB,OAFA,GAAW,sBAEJ","file":"pivot.min.js","sourcesContent":["call
 WithJQuery = (pivotModule) ->\n    if typeof exports is \"object\" and typeof module is \"object\" # CommonJS\n        pivotModule require(\"jquery\")\n    else if typeof define is \"function\" and define.amd # AMD\n        define [\"jquery\"], pivotModule\n    # Plain browser env\n    else\n        pivotModule jQuery\n        \ncallWithJQuery ($) ->\n\n    ###\n    Utilities\n    ###\n\n    addSeparators = (nStr, thousandsSep, decimalSep) ->\n        nStr += ''\n        x = nStr.split('.')\n        x1 = x[0]\n        x2 = if x.length > 1 then  decimalSep + x[1] else ''\n        rgx = /(\\d+)(\\d{3})/\n        x1 = x1.replace(rgx, '$1' + thousandsSep + '$2') while rgx.test(x1)\n        return x1 + x2\n\n    numberFormat = (opts) ->\n        defaults = \n            digitsAfterDecimal: 2, scaler: 1, \n            thousandsSep: \",\", decimalSep: \".\"\n            prefix: \"\", suffix: \"\"\n            showZero: false\n        opts = $.extend defaults, opts\n        (x) ->\n        
     return \"\" if isNaN(x) or not isFinite(x)\n            return \"\" if x == 0 and not opts.showZero\n            result = addSeparators (opts.scaler*x).toFixed(opts.digitsAfterDecimal), opts.thousandsSep, opts.decimalSep\n            return \"\"+opts.prefix+result+opts.suffix\n\n    #aggregator templates default to US number formatting but this is overrideable\n    usFmt = numberFormat()\n    usFmtInt = numberFormat(digitsAfterDecimal: 0)\n    usFmtPct = numberFormat(digitsAfterDecimal:1, scaler: 100, suffix: \"%\")\n\n    aggregatorTemplates =\n        count: (formatter=usFmtInt) -> () -> (data, rowKey, colKey) ->\n            count: 0\n            push:  -> @count++\n            value: -> @count\n            format: formatter\n\n        countUnique: (formatter=usFmtInt) -> ([attr]) -> (data, rowKey, colKey) ->\n            uniq: []\n            push: (record) -> @uniq.push(record[attr]) if record[attr] not in @uniq\n            value: -> @uniq.length\n            format: forma
 tter\n            numInputs: if attr? then 0 else 1\n\n        listUnique: (sep) -> ([attr]) -> (data, rowKey, colKey)  ->\n            uniq: []\n            push: (record) -> @uniq.push(record[attr]) if record[attr] not in @uniq\n            value: -> @uniq.join sep\n            format: (x) -> x\n            numInputs: if attr? then 0 else 1\n\n        sum: (formatter=usFmt) -> ([attr]) -> (data, rowKey, colKey) ->\n            sum: 0\n            push: (record) -> @sum += parseFloat(record[attr]) if not isNaN parseFloat(record[attr])\n            value: -> @sum\n            format: formatter\n            numInputs: if attr? then 0 else 1\n\n        average:  (formatter=usFmt) -> ([attr]) -> (data, rowKey, colKey) ->\n            sum: 0\n            len: 0\n            push: (record) ->\n                if not isNaN parseFloat(record[attr])\n                    @sum += parseFloat(record[attr])\n                    @len++\n            value: -> @sum/@len\n            format: formatt
 er\n            numInputs: if attr? then 0 else 1\n\n        sumOverSum: (formatter=usFmt) -> ([num, denom]) -> (data, rowKey, colKey) ->\n            sumNum: 0\n            sumDenom: 0\n            push: (record) ->\n                @sumNum   += parseFloat(record[num])   if not isNaN parseFloat(record[num])\n                @sumDenom += parseFloat(record[denom]) if not isNaN parseFloat(record[denom])\n            value: -> @sumNum/@sumDenom\n            format: formatter\n            numInputs: if num? and denom? then 0 else 2\n\n        sumOverSumBound80: (upper=true, formatter=usFmt) -> ([num, denom]) -> (data, rowKey, colKey) ->\n            sumNum: 0\n            sumDenom: 0\n            push: (record) ->\n                @sumNum   += parseFloat(record[num])   if not isNaN parseFloat(record[num])\n                @sumDenom += parseFloat(record[denom]) if not isNaN parseFloat(record[denom])\n            value: ->\n                sign = if upper then 1 else -1\n                (
 0.821187207574908/@sumDenom + @sumNum/@sumDenom + 1.2815515655446004*sign*\n                    Math.sqrt(0.410593603787454/ (@sumDenom*@sumDenom) + (@sumNum*(1 - @sumNum/ @sumDenom))/ (@sumDenom*@sumDenom)))/\n                    (1 + 1.642374415149816/@sumDenom)\n            format: formatter\n            numInputs: if num? and denom? then 0 else 2\n\n        fractionOf: (wrapped, type=\"total\", formatter=usFmtPct) -> (x...) -> (data, rowKey, colKey) ->\n            selector: {total:[[],[]],row:[rowKey,[]],col:[[],colKey]}[type]\n            inner: wrapped(x...)(data, rowKey, colKey)\n            push: (record) -> @inner.push record\n            format: formatter\n            value: -> @inner.value() / data.getAggregator(@selector...).inner.value()\n            numInputs: wrapped(x...)().numInputs\n\n    #default aggregators & renderers use US naming and number formatting\n    aggregators = do (tpl = aggregatorTemplates) -> \n        \"Count\":                tpl.count(usFmtInt)\
 n        \"Count Unique Values\":  tpl.countUnique(usFmtInt)\n        \"List Unique Values\":   tpl.listUnique(\", \")\n        \"Sum\":                  tpl.sum(usFmt)\n        \"Integer Sum\":          tpl.sum(usFmtInt)\n        \"Average\":              tpl.average(usFmt)\n        \"Sum over Sum\":         tpl.sumOverSum(usFmt)\n        \"80% Upper Bound\":      tpl.sumOverSumBound80(true, usFmt)\n        \"80% Lower Bound\":      tpl.sumOverSumBound80(false, usFmt)\n        \"Sum as Fraction of Total\":     tpl.fractionOf(tpl.sum(),   \"total\", usFmtPct)\n        \"Sum as Fraction of Rows\":      tpl.fractionOf(tpl.sum(),   \"row\",   usFmtPct)\n        \"Sum as Fraction of Columns\":   tpl.fractionOf(tpl.sum(),   \"col\",   usFmtPct)\n        \"Count as Fraction of Total\":   tpl.fractionOf(tpl.count(), \"total\", usFmtPct)\n        \"Count as Fraction of Rows\":    tpl.fractionOf(tpl.count(), \"row\",   usFmtPct)\n        \"Count as Fraction of Columns\": tpl.fractionOf(tpl.c
 ount(), \"col\",   usFmtPct)\n\n    renderers =\n        \"Table\":          (pvtData, opts) ->   pivotTableRenderer(pvtData, opts)\n        \"Table Barchart\": (pvtData, opts) -> $(pivotTableRenderer(pvtData, opts)).barchart()\n        \"Heatmap\":        (pvtData, opts) -> $(pivotTableRenderer(pvtData, opts)).heatmap()\n        \"Row Heatmap\":    (pvtData, opts) -> $(pivotTableRenderer(pvtData, opts)).heatmap(\"rowheatmap\")\n        \"Col Heatmap\":    (pvtData, opts) -> $(pivotTableRenderer(pvtData, opts)).heatmap(\"colheatmap\")\n\n    locales = \n        en: \n            aggregators: aggregators\n            renderers: renderers\n            localeStrings: \n                renderError: \"An error occurred rendering the PivotTable results.\"\n                computeError: \"An error occurred computing the PivotTable results.\"\n                uiRenderError: \"An error occurred rendering the PivotTable UI.\"\n                selectAll: \"Select All\"\n                selectN
 one: \"Select None\"\n                tooMany: \"(too many to list)\"\n                filterResults: \"Filter results\"\n                totals: \"Totals\" #for table renderer\n                vs: \"vs\" #for gchart renderer\n                by: \"by\" #for gchart renderer\n\n    #dateFormat deriver l10n requires month and day names to be passed in directly\n    mthNamesEn = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]\n    dayNamesEn = [\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"]\n    zeroPad = (number) -> (\"0\"+number).substr(-2,2)\n\n    derivers =\n        bin: (col, binWidth) -> (record) -> record[col] - record[col] % binWidth\n        dateFormat: (col, formatString, mthNames=mthNamesEn, dayNames=dayNamesEn) ->\n            (record) -> #thanks http://stackoverflow.com/a/12213072/112871\n                date = new Date(Date.parse(record[col]))\n                if isNaN(date) then return \"\"\n                for
 matString.replace /%(.)/g, (m, p) ->\n                    switch p\n                        when \"y\" then date.getFullYear()\n                        when \"m\" then zeroPad(date.getMonth()+1)\n                        when \"n\" then mthNames[date.getMonth()]\n                        when \"d\" then zeroPad(date.getDate())\n                        when \"w\" then dayNames[date.getDay()]\n                        when \"x\" then date.getDay()\n                        when \"H\" then zeroPad(date.getHours())\n                        when \"M\" then zeroPad(date.getMinutes())\n                        when \"S\" then zeroPad(date.getSeconds())\n                        else \"%\" + p\n\n    naturalSort = (as, bs) => #thanks http://stackoverflow.com/a/4373421/112871\n        rx = /(\\d+)|(\\D+)/g\n        rd = /\\d/\n        rz = /^0/\n        if typeof as is \"number\" or typeof bs is \"number\"\n            return 1  if isNaN(as)\n            return -1  if isNaN(bs)\n            return
  as - bs\n        a = String(as).toLowerCase()\n        b = String(bs).toLowerCase()\n        return 0  if a is b\n        return (if a > b then 1 else -1)  unless rd.test(a) and rd.test(b)\n        a = a.match(rx)\n        b = b.match(rx)\n        while a.length and b.length\n            a1 = a.shift()\n            b1 = b.shift()\n            if a1 isnt b1\n                if rd.test(a1) and rd.test(b1)\n                    return a1.replace(rz, \".0\") - b1.replace(rz, \".0\")\n                else\n                    return (if a1 > b1 then 1 else -1)\n        a.length - b.length\n\n    #expose these to the outside world\n    $.pivotUtilities = {aggregatorTemplates, aggregators, renderers, derivers, locales,\n        naturalSort, numberFormat}\n\n    ###\n    Data Model class\n    ###\n\n    class PivotData\n        constructor: (input, opts) ->\n            @aggregator = opts.aggregator\n            @aggregatorName = opts.aggregatorName\n            @colAttrs = opts.cols\n     
        @rowAttrs = opts.rows\n            @valAttrs = opts.vals\n            @tree = {}\n            @rowKeys = []\n            @colKeys = []\n            @rowTotals = {}\n            @colTotals = {}\n            @allTotal = @aggregator(this, [], [])\n            @sorted = false\n\n            # iterate through input, accumulating data for cells\n            PivotData.forEachRecord input, opts.derivedAttributes, (record) =>\n                @processRecord(record) if opts.filter(record)\n\n        #can handle arrays or jQuery selections of tables\n        @forEachRecord = (input, derivedAttributes, f) ->\n            if $.isEmptyObject derivedAttributes\n                addRecord = f\n            else\n                addRecord = (record) -> \n                    record[k] = v(record) ? record[k] for k, v of derivedAttributes\n                    f(record)\n\n            #if it's a function, have it call us back\n            if $.isFunction(input)\n                input(addRecord)\n 
            else if $.isArray(input)\n                if $.isArray(input[0]) #array of arrays\n                    for own i, compactRecord of input when i > 0\n                        record = {}\n                        record[k] = compactRecord[j] for own j, k of input[0]\n                        addRecord(record)\n                else #array of objects\n                    addRecord(record) for record in input\n            else if input instanceof jQuery\n                tblCols = []\n                $(\"thead > tr > th\", input).each (i) -> tblCols.push $(this).text()\n                $(\"tbody > tr\", input).each (i) ->\n                    record = {}\n                    $(\"td\", this).each (j) -> record[tblCols[j]] = $(this).text()\n                    addRecord(record)\n            else\n                throw new Error(\"unknown input format\")\n\n        #converts to [{attr:val, attr:val},{attr:val, attr:val}] using method above\n        @convertToArray = (input) ->\n    
         result = []\n            PivotData.forEachRecord input, {}, (record) -> result.push record\n            return result\n\n        natSort: (as, bs) => naturalSort(as, bs)\n\n        arrSort: (a,b) => @natSort a.join(), b.join()\n\n        sortKeys: () =>\n            if not @sorted\n                @rowKeys.sort @arrSort\n                @colKeys.sort @arrSort\n            @sorted = true\n\n        getColKeys: () =>\n            @sortKeys()\n            return @colKeys\n\n        getRowKeys: () =>\n            @sortKeys()\n            return @rowKeys\n\n        processRecord: (record) -> #this code is called in a tight loop\n            colKey = []\n            rowKey = []\n            colKey.push record[x] ? \"null\" for x in @colAttrs \n            rowKey.push record[x] ? \"null\" for x in @rowAttrs\n            flatRowKey = rowKey.join(String.fromCharCode(0))\n            flatColKey = colKey.join(String.fromCharCode(0))\n\n            @allTotal.push record\n\n            i
 f rowKey.length != 0\n                if not @rowTotals[flatRowKey]\n                    @rowKeys.push rowKey\n                    @rowTotals[flatRowKey] = @aggregator(this, rowKey, [])\n                @rowTotals[flatRowKey].push record\n\n            if colKey.length != 0\n                if not @colTotals[flatColKey]\n                    @colKeys.push colKey\n                    @colTotals[flatColKey] = @aggregator(this, [], colKey)\n                @colTotals[flatColKey].push record\n\n            if colKey.length != 0 and rowKey.length != 0\n                if not @tree[flatRowKey]\n                    @tree[flatRowKey] = {}\n                if not @tree[flatRowKey][flatColKey]\n                    @tree[flatRowKey][flatColKey] = @aggregator(this, rowKey, colKey)\n                @tree[flatRowKey][flatColKey].push record\n\n        getAggregator: (rowKey, colKey) =>\n            flatRowKey = rowKey.join(String.fromCharCode(0))\n            flatColKey = colKey.join(String.fromCh
 arCode(0))\n            if rowKey.length == 0 and colKey.length == 0\n                agg = @allTotal\n            else if rowKey.length == 0\n                agg = @colTotals[flatColKey]\n            else if colKey.length == 0\n                agg = @rowTotals[flatRowKey]\n            else\n                agg = @tree[flatRowKey][flatColKey]\n            return agg ? {value: (-> null), format: -> \"\"}\n\n    ###\n    Default Renderer for hierarchical table layout\n    ###\n\n    pivotTableRenderer = (pivotData, opts) ->\n\n        defaults =\n            localeStrings:\n                totals: \"Totals\"\n\n        opts = $.extend defaults, opts\n\n        colAttrs = pivotData.colAttrs\n        rowAttrs = pivotData.rowAttrs\n        rowKeys = pivotData.getRowKeys()\n        colKeys = pivotData.getColKeys()\n\n        #now actually build the output\n        result = document.createElement(\"table\")\n        result.className = \"pvtTable\"\n\n        #helper function for setting ro
 w/col-span in pivotTableRenderer\n        spanSize = (arr, i, j) ->\n            if i != 0\n                noDraw = true\n                for x in [0..j]\n                    if arr[i-1][x] != arr[i][x]\n                        noDraw = false\n                if noDraw\n                  return -1 #do not draw cell\n            len = 0\n            while i+len < arr.length\n                stop = false\n                for x in [0..j]\n                    stop = true if arr[i][x] != arr[i+len][x]\n                break if stop\n                len++\n            return len\n\n        #the first few rows are for col headers\n        for own j, c of colAttrs\n            tr = document.createElement(\"tr\")\n            if parseInt(j) == 0 and rowAttrs.length != 0\n                th = document.createElement(\"th\")\n                th.setAttribute(\"colspan\", rowAttrs.length)\n                th.setAttribute(\"rowspan\", colAttrs.length)\n                tr.appendChild th\n         
    th = document.createElement(\"th\")\n            th.className = \"pvtAxisLabel\"\n            th.textContent = c\n            tr.appendChild th\n            for own i, colKey of colKeys\n                x = spanSize(colKeys, parseInt(i), parseInt(j))\n                if x != -1\n                    th = document.createElement(\"th\")\n                    th.className = \"pvtColLabel\"\n                    th.textContent = colKey[j]\n                    th.setAttribute(\"colspan\", x)\n                    if parseInt(j) == colAttrs.length-1 and rowAttrs.length != 0\n                        th.setAttribute(\"rowspan\", 2)\n                    tr.appendChild th\n            if parseInt(j) == 0\n                th = document.createElement(\"th\")\n                th.className = \"pvtTotalLabel\"\n                th.innerHTML = opts.localeStrings.totals\n                th.setAttribute(\"rowspan\", colAttrs.length + (if rowAttrs.length ==0 then 0 else 1))\n                tr.appendChi
 ld th\n            result.appendChild tr\n\n        #then a row for row header headers\n        if rowAttrs.length !=0\n            tr = document.createElement(\"tr\")\n            for own i, r of rowAttrs\n                th = document.createElement(\"th\")\n                th.className = \"pvtAxisLabel\"\n                th.textContent = r\n                tr.appendChild th \n            th = document.createElement(\"th\")\n            if colAttrs.length ==0\n                th.className = \"pvtTotalLabel\"\n                th.innerHTML = opts.localeStrings.totals\n            tr.appendChild th\n            result.appendChild tr\n\n        #now the actual data rows, with their row headers and totals\n        for own i, rowKey of rowKeys\n            tr = document.createElement(\"tr\")\n            for own j, txt of rowKey\n                x = spanSize(rowKeys, parseInt(i), parseInt(j))\n                if x != -1\n                    th = document.createElement(\"th\")\n          
           th.className = \"pvtRowLabel\"\n                    th.textContent = txt\n                    th.setAttribute(\"rowspan\", x)\n                    if parseInt(j) == rowAttrs.length-1 and colAttrs.length !=0\n                        th.setAttribute(\"colspan\",2)\n                    tr.appendChild th\n            for own j, colKey of colKeys #this is the tight loop\n                aggregator = pivotData.getAggregator(rowKey, colKey)\n                val = aggregator.value()\n                td = document.createElement(\"td\")\n                td.className = \"pvtVal row#{i} col#{j}\"\n                td.innerHTML = aggregator.format(val)\n                td.setAttribute(\"data-value\", val)\n                tr.appendChild td\n\n            totalAggregator = pivotData.getAggregator(rowKey, [])\n            val = totalAggregator.value()\n            td = document.createElement(\"td\")\n            td.className = \"pvtTotal rowTotal\"\n            td.innerHTML = totalAggrega
 tor.format(val)\n            td.setAttribute(\"data-value\", val)\n            td.setAttribute(\"data-for\", \"row\"+i)\n            tr.appendChild td\n            result.appendChild tr\n\n        #finally, the row for col totals, and a grand total\n        tr = document.createElement(\"tr\")\n        th = document.createElement(\"th\")\n        th.className = \"pvtTotalLabel\"\n        th.innerHTML = opts.localeStrings.totals\n        th.setAttribute(\"colspan\", rowAttrs.length + (if colAttrs.length == 0 then 0 else 1))\n        tr.appendChild th\n        for own j, colKey of colKeys\n            totalAggregator = pivotData.getAggregator([], colKey)\n            val = totalAggregator.value()\n            td = document.createElement(\"td\")\n            td.className = \"pvtTotal colTotal\"\n            td.innerHTML = totalAggregator.format(val)\n            td.setAttribute(\"data-value\", val)\n            td.setAttribute(\"data-for\", \"col\"+j)\n            tr.appendChild td\n   
      totalAggregator = pivotData.getAggregator([], [])\n        val = totalAggregator.value()\n        td = document.createElement(\"td\")\n        td.className = \"pvtGrandTotal\"\n        td.innerHTML = totalAggregator.format(val)\n        td.setAttribute(\"data-value\", val)\n        tr.appendChild td\n        result.appendChild tr\n\n        #squirrel this away for later\n        result.setAttribute(\"data-numrows\", rowKeys.length)\n        result.setAttribute(\"data-numcols\", colKeys.length)\n\n        return result\n\n    ###\n    Pivot Table core: create PivotData object and call Renderer on it\n    ###\n\n    $.fn.pivot = (input, opts) ->\n        defaults =\n            cols : []\n            rows: []\n            filter: -> true\n            aggregator: aggregatorTemplates.count()()\n            aggregatorName: \"Count\"\n            derivedAttributes: {},\n            renderer: pivotTableRenderer\n            rendererOptions: null\n            localeStrings: locales.en.
 localeStrings\n\n        opts = $.extend defaults, opts\n\n        result = null\n        try\n            pivotData = new PivotData(input, opts)\n            try\n                result = opts.renderer(pivotData, opts.rendererOptions)\n            catch e\n                console.error(e.stack) if console?\n                result = $(\"<span>\").html opts.localeStrings.renderError\n        catch e\n            console.error(e.stack) if console?\n            result = $(\"<span>\").html opts.localeStrings.computeError\n        \n        x = this[0]\n        x.removeChild(x.lastChild) while x.hasChildNodes()\n        return @append result\n\n\n    ###\n    Pivot Table UI: calls Pivot Table core above with options set by user\n    ###\n\n    $.fn.pivotUI = (input, inputOpts, overwrite = false, locale=\"en\") ->\n        defaults =\n            derivedAttributes: {}\n            aggregators: locales[locale].aggregators\n            renderers: locales[locale].renderers\n            hidde
 nAttributes: []\n            menuLimit: 200\n            cols: [], rows: [], vals: []\n            exclusions: {}\n            unusedAttrsVertical: \"auto\"\n            autoSortUnusedAttrs: false\n            rendererOptions: localeStrings: locales[locale].localeStrings\n            onRefresh: null\n            filter: -> true\n            localeStrings: locales[locale].localeStrings\n\n        existingOpts = @data \"pivotUIOptions\"\n        if not existingOpts? or overwrite\n            opts = $.extend defaults, inputOpts\n        else\n            opts = existingOpts\n\n        try\n            #cache the input in some useful form\n            input = PivotData.convertToArray(input)\n            tblCols = (k for own k of input[0])\n            tblCols.push c for own c of opts.derivedAttributes when (c not in tblCols)\n\n            #figure out the cardinality and some stats\n            axisValues = {}\n            axisValues[x] = {} for x in tblCols\n\n            PivotData.for
 EachRecord input, opts.derivedAttributes, (record) ->\n                for own k, v of record when opts.filter(record)\n                    v ?= \"null\"\n                    axisValues[k][v] ?= 0\n                    axisValues[k][v]++\n\n            #start building the output\n            uiTable = $(\"<table cellpadding='5'>\")\n\n            #renderer control\n            rendererControl = $(\"<td>\")\n\n            renderer = $(\"<select class='pvtRenderer'>\")\n                .appendTo(rendererControl)\n                .bind \"change\", -> refresh() #capture reference\n            for own x of opts.renderers\n                $(\"<option>\").val(x).html(x).appendTo(renderer)\n\n\n            #axis list, including the double-click menu\n            colList = $(\"<td class='pvtAxisContainer pvtUnused'>\")\n            shownAttributes = (c for c in tblCols when c not in opts.hiddenAttributes)\n\n            unusedAttrsVerticalAutoOverride = false\n            if opts.unusedAttrsV
 ertical == \"auto\"\n                attrLength = 0\n                attrLength += a.length for a in shownAttributes\n                unusedAttrsVerticalAutoOverride = attrLength > 120\n\n            if opts.unusedAttrsVertical == true or unusedAttrsVerticalAutoOverride\n                colList.addClass('pvtVertList')\n            else\n                colList.addClass('pvtHorizList')\n\n            for i, c of shownAttributes\n                do (c) ->\n                    keys = (k for k of axisValues[c])\n                    hasExcludedItem = false\n                    valueList = $(\"<div>\").addClass('pvtFilterBox').hide()\n\n                    valueList.append $(\"<h4>\").text(\"#{c} (#{keys.length})\")\n                    if keys.length > opts.menuLimit\n                        valueList.append $(\"<p>\").html(opts.localeStrings.tooMany)\n                    else\n                        btns = $(\"<p>\").appendTo(valueList)\n                        btns.append $(\"<button>
 \", {type:\"button\"}).html(opts.localeStrings.selectAll).bind \"click\", ->\n                            valueList.find(\"input:visible\").prop \"checked\", true\n                        btns.append $(\"<button>\", {type:\"button\"}).html(opts.localeStrings.selectNone).bind \"click\", ->\n                            valueList.find(\"input:visible\").prop \"checked\", false\n                        btns.append $(\"<input>\").addClass(\"pvtSearch\").attr(\"placeholder\", opts.localeStrings.filterResults).bind \"keyup\", ->\n                            filter = $(this).val().toLowerCase()\n                            $(this).parents(\".pvtFilterBox\").find('label span').each ->\n                                testString = $(this).text().toLowerCase().indexOf(filter)\n                                if testString isnt -1\n                                    $(this).parent().show()\n                                else\n                                    $(this).parent().hide()\n\n   
                      checkContainer = $(\"<div>\").addClass(\"pvtCheckContainer\").appendTo(valueList)\n\n                        for k in keys.sort(naturalSort)\n                             v = axisValues[c][k]\n                             filterItem = $(\"<label>\")\n                             filterItemExcluded = if opts.exclusions[c] then (k in opts.exclusions[c]) else false\n                             hasExcludedItem ||= filterItemExcluded\n                             $(\"<input type='checkbox' class='pvtFilter'>\")\n                                .attr(\"checked\", !filterItemExcluded).data(\"filter\", [c,k])\n                                .appendTo filterItem\n                             filterItem.append $(\"<span>\").text \"#{k} (#{v})\"\n                             checkContainer.append $(\"<p>\").append(filterItem)\n\n                    updateFilter = ->\n                        unselectedCount = $(valueList).find(\"[type='checkbox']\").length -\n            
                               $(valueList).find(\"[type='checkbox']:checked\").length\n                        if unselectedCount > 0\n                            attrElem.addClass \"pvtFilteredAttribute\"\n                        else\n                            attrElem.removeClass \"pvtFilteredAttribute\"\n                        if keys.length > opts.menuLimit\n                            valueList.toggle()\n                        else\n                            valueList.toggle(0, refresh)\n\n                    $(\"<p>\").appendTo(valueList)\n                        .append $(\"<button>\", {type:\"button\"}).text(\"OK\").bind \"click\", updateFilter\n\n                    showFilterList = (e) ->\n                        valueList.css(left: e.pageX, top: e.pageY).toggle()\n                        $('.pvtSearch').val('')\n                        $('label').show()\n\n                    triangleLink = $(\"<span class='pvtTriangle'>\").html(\" &#x25BE;\")\n                    
     .bind \"click\", showFilterList\n\n                    attrElem = $(\"<li class='axis_#{i}'>\")\n                        .append $(\"<span class='pvtAttr'>\").text(c).data(\"attrName\", c).append(triangleLink)\n                    attrElem.addClass('pvtFilteredAttribute') if hasExcludedItem\n                    colList.append(attrElem).append(valueList)\n\n                    attrElem.bind \"dblclick\", showFilterList\n\n            tr1 = $(\"<tr>\").appendTo(uiTable)\n\n            #aggregator menu and value area\n\n            aggregator = $(\"<select class='pvtAggregator'>\")\n                .bind \"change\", -> refresh() #capture reference\n            for own x of opts.aggregators\n                aggregator.append $(\"<option>\").val(x).html(x)\n\n            $(\"<td class='pvtVals'>\")\n              .appendTo(tr1)\n              .append(aggregator)\n              .append($(\"<br>\"))\n\n            #column axes\n            $(\"<td class='pvtAxisContainer pvtHorizList p
 vtCols'>\").appendTo(tr1)\n\n            tr2 = $(\"<tr>\").appendTo(uiTable)\n\n            #row axes\n            tr2.append $(\"<td valign='top' class='pvtAxisContainer pvtRows'>\")\n\n            #the actual pivot table container\n            pivotTable = $(\"<td valign='top' class='pvtRendererArea'>\").appendTo(tr2)\n\n            #finally the renderer dropdown and unused attribs are inserted at the requested location\n            if opts.unusedAttrsVertical == true or unusedAttrsVerticalAutoOverride\n                uiTable.find('tr:nth-child(1)').prepend rendererControl\n                uiTable.find('tr:nth-child(2)').prepend colList\n            else\n                uiTable.prepend $(\"<tr>\").append(rendererControl).append(colList)\n\n            #render the UI in its default state\n            @html uiTable\n\n            #set up the UI initial state as requested by moving elements around\n\n            for x in opts.cols\n                @find(\".pvtCols\").append @find(\
 ".axis_#{shownAttributes.indexOf(x)}\")\n            for x in opts.rows\n                @find(\".pvtRows\").append @find(\".axis_#{shownAttributes.indexOf(x)}\")\n            if opts.aggregatorName?\n                @find(\".pvtAggregator\").val opts.aggregatorName\n            if opts.rendererName?\n                @find(\".pvtRenderer\").val opts.rendererName\n\n            initialRender = true\n\n            #set up for refreshing\n            refreshDelayed = =>\n                subopts =\n                    derivedAttributes: opts.derivedAttributes\n                    localeStrings: opts.localeStrings\n                    rendererOptions: opts.rendererOptions\n                    cols: [], rows: []\n\n                numInputsToProcess = opts.aggregators[aggregator.val()]([])().numInputs ? 0\n                vals = []\n                @find(\".pvtRows li span.pvtAttr\").each -> subopts.rows.push $(this).data(\"attrName\")\n                @find(\".pvtCols li span.pvtAttr\").
 each -> subopts.cols.push $(this).data(\"attrName\")\n                @find(\".pvtVals select.pvtAttrDropdown\").each ->\n                    if numInputsToProcess == 0\n                        $(this).remove()\n                    else\n                        numInputsToProcess--\n                        vals.push $(this).val() if $(this).val() != \"\"\n\n                if numInputsToProcess != 0\n                    pvtVals = @find(\".pvtVals\")\n                    for x in [0...numInputsToProcess]\n                        newDropdown = $(\"<select class='pvtAttrDropdown'>\")\n                            .append($(\"<option>\"))\n                            .bind \"change\", -> refresh()\n                        for attr in shownAttributes\n                            newDropdown.append($(\"<option>\").val(attr).text(attr))\n                        pvtVals.append(newDropdown)\n\n                if initialRender\n                    vals = opts.vals\n                    i = 0\n 
                    @find(\".pvtVals select.pvtAttrDropdown\").each ->\n                        $(this).val vals[i]\n                        i++\n                    initialRender = false\n\n                subopts.aggregatorName = aggregator.val()\n                subopts.vals = vals\n                subopts.aggregator = opts.aggregators[aggregator.val()](vals)\n                subopts.renderer = opts.renderers[renderer.val()]\n\n                #construct filter here\n                exclusions = {}\n                @find('input.pvtFilter').not(':checked').each ->\n                    filter = $(this).data(\"filter\")\n                    if exclusions[filter[0]]?\n                        exclusions[filter[0]].push( filter[1] )\n                    else\n                        exclusions[filter[0]] = [ filter[1] ]\n\n                subopts.filter = (record) ->\n                    return false if not opts.filter(record)\n                    for k,excludedItems of exclusions\n    
                     return false if \"\"+record[k] in excludedItems\n                    return true\n\n                pivotTable.pivot(input,subopts)\n                pivotUIOptions = $.extend opts,\n                    cols: subopts.cols\n                    rows: subopts.rows\n                    vals: vals\n                    exclusions: exclusions\n                    aggregatorName: aggregator.val()\n                    rendererName: renderer.val()\n\n                @data \"pivotUIOptions\", pivotUIOptions\n\n                # if requested make sure unused columns are in alphabetical order\n                if opts.autoSortUnusedAttrs\n                    natSort = $.pivotUtilities.naturalSort\n                    unusedAttrsContainer = @find(\"td.pvtUnused.pvtAxisContainer\")\n                    $(unusedAttrsContainer).children(\"li\")\n                        .sort((a, b) => natSort($(a).text(), $(b).text()))\n                        .appendTo unusedAttrsContainer\n\n    
             pivotTable.css(\"opacity\", 1)\n                opts.onRefresh(pivotUIOptions) if opts.onRefresh?\n\n            refresh = =>\n                pivotTable.css(\"opacity\", 0.5)\n                setTimeout refreshDelayed, 10\n\n            #the very first refresh will actually display the table\n            refresh()\n\n            @find(\".pvtAxisContainer\").sortable\n                    update: (e, ui) -> refresh() if not ui.sender?\n                    connectWith: @find(\".pvtAxisContainer\")\n                    items: 'li'\n                    placeholder: 'pvtPlaceholder'\n        catch e\n            console.error(e.stack) if console?\n            @html opts.localeStrings.uiRenderError\n        return this\n\n    ###\n    Heatmap post-processing\n    ###\n\n    $.fn.heatmap = (scope = \"heatmap\") ->\n        numRows = @data \"numrows\"\n        numCols = @data \"numcols\"\n\n        colorGen = (color, min, max) ->\n            hexGen = switch color\n             
    when \"red\"   then (hex) -> \"ff#{hex}#{hex}\"\n                when \"green\" then (hex) -> \"#{hex}ff#{hex}\"\n                when \"blue\"  then (hex) -> \"#{hex}#{hex}ff\"\n\n            return (x) ->\n                intensity = 255 - Math.round 255*(x-min)/(max-min)\n                hex = intensity.toString(16).split(\".\")[0]\n                hex = 0+hex if hex.length == 1\n                return hexGen(hex)\n\n        heatmapper = (scope, color) =>\n            forEachCell = (f) =>\n                @find(scope).each ->\n                    x = $(this).data(\"value\")\n                    f(x, $(this)) if x? and isFinite(x)\n\n            values = []\n            forEachCell (x) -> values.push x\n            colorFor = colorGen color, Math.min(values...), Math.max(values...)\n            forEachCell (x, elem) -> elem.css \"background-color\", \"#\" + colorFor(x)\n\n        switch scope\n            when \"heatmap\"\n                heatmapper \".pvtVal\", \"red\"\n      
       when \"rowheatmap\"\n                heatmapper \".pvtVal.row#{i}\", \"red\" for i in [0...numRows]\n            when \"colheatmap\"\n                heatmapper \".pvtVal.col#{j}\", \"red\" for j in [0...numCols]\n\n        heatmapper \".pvtTotal.rowTotal\", \"red\"\n        heatmapper \".pvtTotal.colTotal\", \"red\"\n\n        return this\n\n    ###\n    Barchart post-processing\n    ###\n\n    $.fn.barchart =  ->\n        numRows = @data \"numrows\"\n        numCols = @data \"numcols\"\n\n        barcharter = (scope) =>\n            forEachCell = (f) =>\n                @find(scope).each ->\n                    x = $(this).data(\"value\")\n                    f(x, $(this)) if x? and isFinite(x)\n\n            values = []\n            forEachCell (x) -> values.push x\n            max = Math.max(values...)\n            scaler = (x) -> 100*x/(1.4*max)\n            forEachCell (x, elem) ->\n                text = elem.text()\n                wrapper = $(\"<div>\").css\n         
            \"position\": \"relative\"\n                    \"height\": \"55px\"\n                wrapper.append $(\"<div>\").css\n                    \"position\": \"absolute\"\n                    \"bottom\": 0\n                    \"left\": 0\n                    \"right\": 0\n                    \"height\": scaler(x) + \"%\"\n                    \"background-color\": \"gray\"\n                wrapper.append $(\"<div>\").text(text).css\n                    \"position\":\"relative\"\n                    \"padding-left\":\"5px\"\n                    \"padding-right\":\"5px\"\n\n                elem.css(\"padding\": 0,\"padding-top\": \"5px\", \"text-align\": \"center\").html wrapper\n\n        barcharter \".pvtVal.row#{i}\" for i in [0...numRows]\n        barcharter \".pvtTotal.colTotal\"\n\n        return this\n\n\n"],"sourceRoot":"/source/"}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/plugins/text.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/plugins/text.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/plugins/text.js
new file mode 100644
index 0000000..1e4fc96
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/plugins/text.js
@@ -0,0 +1,386 @@
+/**
+ * @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/requirejs/text for details
+ */
+/*jslint regexp: true */
+/*global require, XMLHttpRequest, ActiveXObject,
+  define, window, process, Packages,
+  java, location, Components, FileUtils */
+
+define(['module'], function (module) {
+    'use strict';
+
+    var text, fs, Cc, Ci, xpcIsWindows,
+        progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'],
+        xmlRegExp = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,
+        bodyRegExp = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,
+        hasLocation = typeof location !== 'undefined' && location.href,
+        defaultProtocol = hasLocation && location.protocol && location.protocol.replace(/\:/, ''),
+        defaultHostName = hasLocation && location.hostname,
+        defaultPort = hasLocation && (location.port || undefined),
+        buildMap = {},
+        masterConfig = (module.config && module.config()) || {};
+
+    text = {
+        version: '2.0.10',
+
+        strip: function (content) {
+            //Strips <?xml ...?> declarations so that external SVG and XML
+            //documents can be added to a document without worry. Also, if the string
+            //is an HTML document, only the part inside the body tag is returned.
+            if (content) {
+                content = content.replace(xmlRegExp, "");
+                var matches = content.match(bodyRegExp);
+                if (matches) {
+                    content = matches[1];
+                }
+            } else {
+                content = "";
+            }
+            return content;
+        },
+
+        jsEscape: function (content) {
+            return content.replace(/(['\\])/g, '\\$1')
+                .replace(/[\f]/g, "\\f")
+                .replace(/[\b]/g, "\\b")
+                .replace(/[\n]/g, "\\n")
+                .replace(/[\t]/g, "\\t")
+                .replace(/[\r]/g, "\\r")
+                .replace(/[\u2028]/g, "\\u2028")
+                .replace(/[\u2029]/g, "\\u2029");
+        },
+
+        createXhr: masterConfig.createXhr || function () {
+            //Would love to dump the ActiveX crap in here. Need IE 6 to die first.
+            var xhr, i, progId;
+            if (typeof XMLHttpRequest !== "undefined") {
+                return new XMLHttpRequest();
+            } else if (typeof ActiveXObject !== "undefined") {
+                for (i = 0; i < 3; i += 1) {
+                    progId = progIds[i];
+                    try {
+                        xhr = new ActiveXObject(progId);
+                    } catch (e) {}
+
+                    if (xhr) {
+                        progIds = [progId];  // so faster next time
+                        break;
+                    }
+                }
+            }
+
+            return xhr;
+        },
+
+        /**
+         * Parses a resource name into its component parts. Resource names
+         * look like: module/name.ext!strip, where the !strip part is
+         * optional.
+         * @param {String} name the resource name
+         * @returns {Object} with properties "moduleName", "ext" and "strip"
+         * where strip is a boolean.
+         */
+        parseName: function (name) {
+            var modName, ext, temp,
+                strip = false,
+                index = name.indexOf("."),
+                isRelative = name.indexOf('./') === 0 ||
+                             name.indexOf('../') === 0;
+
+            if (index !== -1 && (!isRelative || index > 1)) {
+                modName = name.substring(0, index);
+                ext = name.substring(index + 1, name.length);
+            } else {
+                modName = name;
+            }
+
+            temp = ext || modName;
+            index = temp.indexOf("!");
+            if (index !== -1) {
+                //Pull off the strip arg.
+                strip = temp.substring(index + 1) === "strip";
+                temp = temp.substring(0, index);
+                if (ext) {
+                    ext = temp;
+                } else {
+                    modName = temp;
+                }
+            }
+
+            return {
+                moduleName: modName,
+                ext: ext,
+                strip: strip
+            };
+        },
+
+        xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
+
+        /**
+         * Is an URL on another domain. Only works for browser use, returns
+         * false in non-browser environments. Only used to know if an
+         * optimized .js version of a text resource should be loaded
+         * instead.
+         * @param {String} url
+         * @returns Boolean
+         */
+        useXhr: function (url, protocol, hostname, port) {
+            var uProtocol, uHostName, uPort,
+                match = text.xdRegExp.exec(url);
+            if (!match) {
+                return true;
+            }
+            uProtocol = match[2];
+            uHostName = match[3];
+
+            uHostName = uHostName.split(':');
+            uPort = uHostName[1];
+            uHostName = uHostName[0];
+
+            return (!uProtocol || uProtocol === protocol) &&
+                   (!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) &&
+                   ((!uPort && !uHostName) || uPort === port);
+        },
+
+        finishLoad: function (name, strip, content, onLoad) {
+            content = strip ? text.strip(content) : content;
+            if (masterConfig.isBuild) {
+                buildMap[name] = content;
+            }
+            onLoad(content);
+        },
+
+        load: function (name, req, onLoad, config) {
+            //Name has format: some.module.filext!strip
+            //The strip part is optional.
+            //if strip is present, then that means only get the string contents
+            //inside a body tag in an HTML string. For XML/SVG content it means
+            //removing the <?xml ...?> declarations so the content can be inserted
+            //into the current doc without problems.
+
+            // Do not bother with the work if a build and text will
+            // not be inlined.
+            if (config.isBuild && !config.inlineText) {
+                onLoad();
+                return;
+            }
+
+            masterConfig.isBuild = config.isBuild;
+
+            var parsed = text.parseName(name),
+                nonStripName = parsed.moduleName +
+                    (parsed.ext ? '.' + parsed.ext : ''),
+                url = req.toUrl(nonStripName),
+                useXhr = (masterConfig.useXhr) ||
+                         text.useXhr;
+
+            // Do not load if it is an empty: url
+            if (url.indexOf('empty:') === 0) {
+                onLoad();
+                return;
+            }
+
+            //Load the text. Use XHR if possible and in a browser.
+            if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, defaultPort)) {
+                text.get(url, function (content) {
+                    text.finishLoad(name, parsed.strip, content, onLoad);
+                }, function (err) {
+                    if (onLoad.error) {
+                        onLoad.error(err);
+                    }
+                });
+            } else {
+                //Need to fetch the resource across domains. Assume
+                //the resource has been optimized into a JS module. Fetch
+                //by the module name + extension, but do not include the
+                //!strip part to avoid file system issues.
+                req([nonStripName], function (content) {
+                    text.finishLoad(parsed.moduleName + '.' + parsed.ext,
+                                    parsed.strip, content, onLoad);
+                });
+            }
+        },
+
+        write: function (pluginName, moduleName, write, config) {
+            if (buildMap.hasOwnProperty(moduleName)) {
+                var content = text.jsEscape(buildMap[moduleName]);
+                write.asModule(pluginName + "!" + moduleName,
+                               "define(function () { return '" +
+                                   content +
+                               "';});\n");
+            }
+        },
+
+        writeFile: function (pluginName, moduleName, req, write, config) {
+            var parsed = text.parseName(moduleName),
+                extPart = parsed.ext ? '.' + parsed.ext : '',
+                nonStripName = parsed.moduleName + extPart,
+                //Use a '.js' file name so that it indicates it is a
+                //script that can be loaded across domains.
+                fileName = req.toUrl(parsed.moduleName + extPart) + '.js';
+
+            //Leverage own load() method to load plugin value, but only
+            //write out values that do not have the strip argument,
+            //to avoid any potential issues with ! in file names.
+            text.load(nonStripName, req, function (value) {
+                //Use own write() method to construct full module value.
+                //But need to create shell that translates writeFile's
+                //write() to the right interface.
+                var textWrite = function (contents) {
+                    return write(fileName, contents);
+                };
+                textWrite.asModule = function (moduleName, contents) {
+                    return write.asModule(moduleName, fileName, contents);
+                };
+
+                text.write(pluginName, nonStripName, textWrite, config);
+            }, config);
+        }
+    };
+
+    if (masterConfig.env === 'node' || (!masterConfig.env &&
+            typeof process !== "undefined" &&
+            process.versions &&
+            !!process.versions.node &&
+            !process.versions['node-webkit'])) {
+        //Using special require.nodeRequire, something added by r.js.
+        fs = require.nodeRequire('fs');
+
+        text.get = function (url, callback, errback) {
+            try {
+                var file = fs.readFileSync(url, 'utf8');
+                //Remove BOM (Byte Mark Order) from utf8 files if it is there.
+                if (file.indexOf('\uFEFF') === 0) {
+                    file = file.substring(1);
+                }
+                callback(file);
+            } catch (e) {
+                errback(e);
+            }
+        };
+    } else if (masterConfig.env === 'xhr' || (!masterConfig.env &&
+            text.createXhr())) {
+        text.get = function (url, callback, errback, headers) {
+            var xhr = text.createXhr(), header;
+            xhr.open('GET', url, true);
+
+            //Allow plugins direct access to xhr headers
+            if (headers) {
+                for (header in headers) {
+                    if (headers.hasOwnProperty(header)) {
+                        xhr.setRequestHeader(header.toLowerCase(), headers[header]);
+                    }
+                }
+            }
+
+            //Allow overrides specified in config
+            if (masterConfig.onXhr) {
+                masterConfig.onXhr(xhr, url);
+            }
+
+            xhr.onreadystatechange = function (evt) {
+                var status, err;
+                //Do not explicitly handle errors, those should be
+                //visible via console output in the browser.
+                if (xhr.readyState === 4) {
+                    status = xhr.status;
+                    if (status > 399 && status < 600) {
+                        //An http 4xx or 5xx error. Signal an error.
+                        err = new Error(url + ' HTTP status: ' + status);
+                        err.xhr = xhr;
+                        errback(err);
+                    } else {
+                        callback(xhr.responseText);
+                    }
+
+                    if (masterConfig.onXhrComplete) {
+                        masterConfig.onXhrComplete(xhr, url);
+                    }
+                }
+            };
+            xhr.send(null);
+        };
+    } else if (masterConfig.env === 'rhino' || (!masterConfig.env &&
+            typeof Packages !== 'undefined' && typeof java !== 'undefined')) {
+        //Why Java, why is this so awkward?
+        text.get = function (url, callback) {
+            var stringBuffer, line,
+                encoding = "utf-8",
+                file = new java.io.File(url),
+                lineSeparator = java.lang.System.getProperty("line.separator"),
+                input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)),
+                content = '';
+            try {
+                stringBuffer = new java.lang.StringBuffer();
+                line = input.readLine();
+
+                // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324
+                // http://www.unicode.org/faq/utf_bom.html
+
+                // Note that when we use utf-8, the BOM should appear as "EF BB BF", but it doesn't due to this bug in the JDK:
+                // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
+                if (line && line.length() && line.charAt(0) === 0xfeff) {
+                    // Eat the BOM, since we've already found the encoding on this file,
+                    // and we plan to concatenating this buffer with others; the BOM should
+                    // only appear at the top of a file.
+                    line = line.substring(1);
+                }
+
+                if (line !== null) {
+                    stringBuffer.append(line);
+                }
+
+                while ((line = input.readLine()) !== null) {
+                    stringBuffer.append(lineSeparator);
+                    stringBuffer.append(line);
+                }
+                //Make sure we return a JavaScript string and not a Java string.
+                content = String(stringBuffer.toString()); //String
+            } finally {
+                input.close();
+            }
+            callback(content);
+        };
+    } else if (masterConfig.env === 'xpconnect' || (!masterConfig.env &&
+            typeof Components !== 'undefined' && Components.classes &&
+            Components.interfaces)) {
+        //Avert your gaze!
+        Cc = Components.classes,
+        Ci = Components.interfaces;
+        Components.utils['import']('resource://gre/modules/FileUtils.jsm');
+        xpcIsWindows = ('@mozilla.org/windows-registry-key;1' in Cc);
+
+        text.get = function (url, callback) {
+            var inStream, convertStream, fileObj,
+                readData = {};
+
+            if (xpcIsWindows) {
+                url = url.replace(/\//g, '\\');
+            }
+
+            fileObj = new FileUtils.File(url);
+
+            //XPCOM, you so crazy
+            try {
+                inStream = Cc['@mozilla.org/network/file-input-stream;1']
+                           .createInstance(Ci.nsIFileInputStream);
+                inStream.init(fileObj, 1, 0, false);
+
+                convertStream = Cc['@mozilla.org/intl/converter-input-stream;1']
+                                .createInstance(Ci.nsIConverterInputStream);
+                convertStream.init(inStream, "utf-8", inStream.available(),
+                Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);
+
+                convertStream.readString(inStream.available(), readData);
+                convertStream.close();
+                inStream.close();
+                callback(readData.value);
+            } catch (e) {
+                throw new Error((fileObj && fileObj.path || '') + ': ' + e);
+            }
+        };
+    }
+    return text;
+});


[45/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/JsonDescription.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/JsonDescription.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/JsonDescription.java
new file mode 100644
index 0000000..f54ead2
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/JsonDescription.java
@@ -0,0 +1,73 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import java.util.List ;
+
+import org.apache.jena.atlas.json.JsonBuilder ;
+import org.apache.jena.fuseki.server.DataAccessPoint ;
+import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
+import org.apache.jena.fuseki.server.Endpoint ;
+import org.apache.jena.fuseki.server.OperationName ;
+
+/** Create a description of a service */
+public class JsonDescription {
+    
+    public static void arrayDatasets(JsonBuilder builder, DataAccessPointRegistry registry) {
+        builder.startArray() ;
+        for ( String ds : registry.keys() ) {
+            DataAccessPoint access = DataAccessPointRegistry.get().get(ds) ;
+            JsonDescription.describe(builder, access) ;
+        }
+        builder.finishArray() ;
+    }
+    
+    public static void describe(JsonBuilder builder, DataAccessPoint access) {
+        builder.startObject() ;
+        builder.key(JsonConst.dsName).value(access.getName()) ;
+        
+        builder.key(JsonConst.dsState).value(access.getDataService().isAcceptingRequests()) ;
+        
+        builder.key(JsonConst.dsService) ;
+        builder.startArray() ;
+        
+        for ( OperationName opName : access.getDataService().getOperations() ) {
+            List<Endpoint> endpoints = access.getDataService().getOperation(opName) ;
+            describe(builder, opName, endpoints) ;
+        }
+        builder.finishArray() ;
+        builder.finishObject() ;
+    }
+    
+    private static void describe(JsonBuilder builder, OperationName opName, List<Endpoint> endpoints) {
+        builder.startObject() ;
+        
+        builder.key(JsonConst.srvType).value(opName.name()) ;
+        builder.key(JsonConst.srvDescription).value(opName.getDescription()) ;
+
+        builder.key(JsonConst.srvEndpoints) ;
+        builder.startArray() ;
+        for ( Endpoint endpoint : endpoints )
+            builder.value(endpoint.getEndpoint()) ;
+        builder.finishArray() ;
+
+        builder.finishObject() ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/MgtConst.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/MgtConst.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/MgtConst.java
new file mode 100644
index 0000000..e398894
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/MgtConst.java
@@ -0,0 +1,30 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+/** Various contants used in the admin functions */ 
+public class MgtConst {
+    public static final String  opDump      = "dump" ;  
+    public static final String  opPing      = "ping" ;
+    
+    public static final String  opStats     = "stats" ;  
+    public static final String  opDatasets  = "datasets" ;
+    public static final String  opServer    = "server" ;
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/MgtJMX.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/MgtJMX.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/MgtJMX.java
new file mode 100644
index 0000000..f9023fe
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/MgtJMX.java
@@ -0,0 +1,61 @@
+/**
+ * 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.jena.fuseki.mgt ;
+
+
+public class MgtJMX
+{
+  public static void removeJMX() {  }
+    
+//    public static void addJMX() {
+//        DatasetRegistry registry = DatasetRegistry.get() ;
+//        for (String ds : registry.keys()) {
+//            DataAccessPoint dsRef = registry.get(ds) ;
+//            addJMX(dsRef) ;
+//        }
+//    }
+//
+//    private static void addJMX(DataAccessPoint dapt) {
+//        String x = datasetNames ;
+//        // if ( x.startsWith("/") )
+//        // x = x.substring(1) ;
+//        ARQMgt.register(Fuseki.PATH + ".dataset:name=" + x, dapt) ;
+//        // For all endpoints
+//        for (ServiceRef sRef : dapt.getServiceRefs()) {
+//            ARQMgt.register(Fuseki.PATH + ".dataset:name=" + x + "/" + sRef.name, sRef) ;
+//        }
+//    }
+//
+//    public static void removeJMX() {
+//        DatasetRegistry registry = DatasetRegistry.get() ;
+//        for (String ds : registry.keys()) {
+//            DataAccessPoint ref = registry.get(ds) ;
+//            removeJMX(ref) ;
+//        }
+//    }
+//
+//    private static void removeJMX(DatasetRef dsRef) {
+//        String x = dsRef.getName() ;
+//        ARQMgt.unregister(Fuseki.PATH + ".dataset:name=" + x) ;
+//        for (ServiceRef sRef : dsRef.getServiceRefs()) {
+//            ARQMgt.unregister(Fuseki.PATH + ".dataset:name=" + x + "/" + sRef.name) ;
+//        }
+//    }
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/DatasetGraphSwitchable.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/DatasetGraphSwitchable.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/DatasetGraphSwitchable.java
new file mode 100644
index 0000000..0e075f6
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/DatasetGraphSwitchable.java
@@ -0,0 +1,88 @@
+/**
+ * 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.jena.fuseki.migrate;
+
+import java.util.concurrent.atomic.AtomicReference ;
+
+import org.apache.jena.fuseki.FusekiException ;
+
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphWrapper ;
+
+public class DatasetGraphSwitchable extends DatasetGraphWrapper {
+    // **** Associated query engine factory - QueryEngineFactoryWrapper
+    // which executes on the unwrapped DSG.
+    
+    // *** Modify DatasetGraphWrapper to use a get().
+    
+    // Time to have DatasetGraph.getQueryDataset
+    private final DatasetGraph dsg1 ;
+    private final DatasetGraph dsg2 ;
+    private final AtomicReference<DatasetGraph> current = new AtomicReference<DatasetGraph>() ;
+    
+    // Change DatasetGraphWrapper to use protected get() 
+
+    public DatasetGraphSwitchable(DatasetGraph dsg1, DatasetGraph dsg2) {
+        super(null) ;
+        if ( dsg1 == null )
+            // Personally I think IllegalArgumentException is more
+            // appropriate, with NPE for unexpected use of null 
+            // but convention says .... 
+            throw new NullPointerException("First argument is null") ;
+        if ( dsg2 == null )
+            throw new NullPointerException("Second argument is null") ;
+        this.dsg1 = dsg1 ;
+        this.dsg2 = dsg2 ;
+        set(dsg1) ;
+    }
+
+    private void set(DatasetGraph dsg) { current.set(dsg) ; }
+    
+    /** Change to using the other dataset */ 
+    public void flip() {
+        // Don't worry about concurrent calls to flip()
+        // The outcome will be that one call wins (the actual second caller)
+        // and not corrupted data. Noet that get() is only called once per
+        // redirection. 
+        
+        // if dsg1 -- (expected, update)
+        if ( current.compareAndSet(dsg1, dsg2) )
+            return ;
+        // if dsg2 
+        if ( current.compareAndSet(dsg2, dsg1) )
+            return ;
+        throw new FusekiException() ;
+    }
+    
+    /** Current dataset of the switchable pair */
+    public final DatasetGraph getCurrent()  { return get() ; }
+    
+    /** Return dataset1 of the switchable pair */
+    public final DatasetGraph getDataset1() { return dsg1 ; }
+    
+    /** Return dataset2 of the switchable pair */
+    public final DatasetGraph getDataset2() { return dsg2 ; }
+    
+    /** Use dataset1 */
+    public final void useDataset1()         { set(dsg1) ; }
+
+    /** Use dataset2 */
+    public final void useDataset2()         { set(dsg2) ; }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java
new file mode 100644
index 0000000..c5f92ae
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java
@@ -0,0 +1,76 @@
+/*
+ * 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.jena.fuseki.migrate;
+
+import org.apache.jena.atlas.web.TypedInputStream ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.system.StreamRDF ;
+import org.apache.jena.riot.system.StreamRDFLib ;
+
+import com.hp.hpl.jena.graph.Factory ;
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.ModelFactory ;
+
+/** A packaging of code to do a controlled read of a graph or model */
+
+public class GraphLoadUtils
+{
+    // ---- Model level
+    
+    public static Model readModel(String uri, int limit)
+    {
+        Graph g = Factory.createGraphMem() ;
+        readUtil(g, uri, limit) ;
+        return ModelFactory.createModelForGraph(g) ;
+    }
+    
+    public static void loadModel(Model model, String uri, int limit) 
+    {
+        Graph g = model.getGraph() ;
+        readUtil(g, uri, limit) ;
+    }
+
+    // ---- Graph level
+    
+    public static Graph readGraph(String uri, int limit)
+    {
+        Graph g = Factory.createGraphMem() ;
+        readUtil(g, uri, limit) ;
+        return g ;
+    }
+    
+    public static void loadGraph(Graph g, String uri, int limit) 
+    {
+        readUtil(g, uri, limit) ;
+    }
+    
+    // ** Worker.
+    private static void readUtil(Graph graph, String uri, int limit)
+    {
+        // We need to do this ourselves, not via riot, to use the webStreamManager
+        StreamRDF sink = StreamRDFLib.graph(graph) ;
+        sink = new StreamRDFLimited(sink, limit) ;
+
+        TypedInputStream input = Fuseki.webStreamManager.open(uri) ;
+        RDFDataMgr.parse(sink, input, uri) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/Registry.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/Registry.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/Registry.java
new file mode 100644
index 0000000..9e7f729
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/Registry.java
@@ -0,0 +1,39 @@
+/*
+ * 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.jena.fuseki.migrate;
+
+import java.util.Collection ;
+import java.util.Map ;
+import java.util.concurrent.ConcurrentHashMap ;
+
+public class Registry<K,T>
+{
+    protected Map<K, T> registry = new ConcurrentHashMap<>() ;
+    
+    public Registry() {}
+    
+    public void put(K key, T value)     { registry.put(key, value) ; }
+    public T get(K key)                 { return registry.get(key) ; }
+    public boolean isRegistered(K key)  { return registry.containsKey(key) ; }
+    public void remove(K key)           { registry.remove(key) ; } 
+    public Collection<K> keys()         { return registry.keySet() ; }
+    //public Iterator<String> keys()      { return registry.keySet().iterator() ; }
+    public int size()                   { return registry.size() ; }
+    public boolean isEmpty()            { return registry.isEmpty() ; }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/StreamRDFLimited.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/StreamRDFLimited.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/StreamRDFLimited.java
new file mode 100644
index 0000000..bf9ebf3
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/migrate/StreamRDFLimited.java
@@ -0,0 +1,63 @@
+/*
+ * 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.jena.fuseki.migrate ;
+
+import org.apache.jena.riot.RiotException ;
+import org.apache.jena.riot.system.StreamRDF ;
+import org.apache.jena.riot.system.StreamRDFWrapper ;
+
+import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.sparql.core.Quad ;
+
+/**
+ * Limit triples/quads and stop passing through after a limit is reached.
+ */
+public class StreamRDFLimited extends StreamRDFWrapper {
+    private long       count = 0 ;
+    private final long limit ;
+
+    public StreamRDFLimited(StreamRDF output, long limit) {
+        super(output) ;
+        this.limit = limit ;
+    }
+
+    @Override
+    public void triple(Triple triple) {
+        count++ ;
+        if ( count > limit )
+            throw new RiotException("Limit ("+limit+") reached") ; 
+        super.triple(triple) ;
+    }
+
+    @Override
+    public void quad(Quad quad) {
+        count++ ;
+        if ( count > limit )
+            throw new RiotException("Limit ("+limit+") reached") ; 
+        super.quad(quad) ;
+    }
+
+    public long getCount() {
+        return count ;
+    }
+
+    public long getLimit() {
+        return limit ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Counter.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Counter.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Counter.java
new file mode 100644
index 0000000..88d4d37
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Counter.java
@@ -0,0 +1,34 @@
+/**
+ * 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.jena.fuseki.server;
+
+import java.util.concurrent.atomic.AtomicLong ;
+
+/** A statistics counter */
+public class Counter
+{
+    private AtomicLong counter = new AtomicLong(0) ;
+    
+    public Counter()    {}
+    
+    public void inc()   { counter.incrementAndGet() ; } 
+    public void dec()   { counter.decrementAndGet() ; } 
+    public long value() { return counter.get() ; } 
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterMXBean.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterMXBean.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterMXBean.java
new file mode 100644
index 0000000..2de7658
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterMXBean.java
@@ -0,0 +1,25 @@
+/**
+ * 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.jena.fuseki.server;
+
+public interface CounterMXBean
+{
+    long getValue() ; 
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterName.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterName.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterName.java
new file mode 100644
index 0000000..7a8d306
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterName.java
@@ -0,0 +1,84 @@
+/**
+ * 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.jena.fuseki.server;
+
+/** Names for all counters */ 
+public enum CounterName {
+    // There are generic names - apply to all services and datasets - and
+    // also specific ones that relate only to a particular kind of service.
+    
+    // Total request received
+    Requests("requests"),
+    // .. of which some and "good" and some are "bad".
+    // #"good" + #"bad" roughly equals #"requests"
+    // except that the total is incremented at the start, and the outcome at the end.
+    // There may also be short term consistency issues.
+    RequestsGood("requests.good"),
+    RequestsBad("requests.bad") ,
+    
+    // SPARQL Protocol - query and update - together with upload.  
+    
+    // Query - standard and ... 
+    QueryTimeouts("query.timeouts") ,
+    QueryExecErrors("query.execerrors") ,
+    QueryIOErrors("query.ioerrors") ,
+    
+    // Update - standard and ...
+    UpdateExecErrors("update.execerrors"),
+    
+    // Upload ... standard counters
+    
+    // Graph Store Protocol. uses HTTP codes.
+
+    // For each HTTP method
+
+    HTTPget("http.get.requests") ,
+    HTTPgetGood("http.get.requests.good") ,
+    HTTPGetBad("http.get.requests.bad") ,
+
+    HTTPpost("http.post.requests") ,
+    HTTPpostGood("http.post.requests.good") ,
+    HTTPpostBad("http.post.requests.bad") ,
+
+    HTTPdelete("http.delete.requests") ,
+    HTTPdeleteGood("http.delete.requests.good") ,
+    HTTPdeleteBad("http.delete.requests.bad") ,
+
+    HTTPput("http.put.requests") ,
+    HTTPputGood("http.put.requests.good") ,
+    HTTPputBad("http.put.requests.bad") ,
+
+    HTTPhead("http.head.requests") ,
+    HTTPheadGood("http.head.requests.good") ,
+    HTTPheadBad("http.head.requests.bad") ,
+
+    HTTPpatch("http.patch.requests") ,
+    HTTPpatchGood("http.patch.requests.good") ,
+    HTTPpatchBad("http.patch.requests.bad") ,
+
+    HTTPoptions("http.options.requests") ,
+    HTTPoptionsGood("http.options.requests.good") ,
+    HTTPoptionsBad("http.options.requests.bad") ,
+    
+    ;
+    
+    public final String name ;
+    private CounterName(String name) { this.name = name ; }
+    
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterSet.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterSet.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterSet.java
new file mode 100644
index 0000000..9b8231e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/CounterSet.java
@@ -0,0 +1,70 @@
+/**
+ * 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.jena.fuseki.server ;
+
+import java.util.Collection ;
+import java.util.HashMap ;
+import java.util.Map ;
+
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
+
+/** A collection of counters */
+public class CounterSet {
+    private static Logger             log      = LoggerFactory.getLogger(CounterSet.class) ;
+
+    private Map<CounterName, Counter> counters = new HashMap<>() ;
+
+    public CounterSet() {}
+
+    public Collection<CounterName> counters() {
+        return counters.keySet() ;
+    }
+
+    public void inc(CounterName c) {
+        get(c).inc() ;
+    }
+
+    public void dec(CounterName c) {
+        get(c).dec() ;
+    }
+
+    public long value(CounterName c) {
+        return get(c).value() ;
+    }
+
+    public void add(CounterName counterName) {
+        if ( counters.containsKey(counterName) ) {
+            log.warn("Duplicate counter in counter set: " + counterName) ;
+            return ;
+        }
+        counters.put(counterName, new Counter()) ;
+    }
+
+    public boolean contains(CounterName cn) {
+        return counters.containsKey(cn) ;
+    }
+
+    public Counter get(CounterName cn) {
+        Counter c = counters.get(cn) ;
+        if ( c == null )
+            log.warn("No counter in counter set: " + cn) ;
+        return c ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Counters.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Counters.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Counters.java
new file mode 100644
index 0000000..4e5ca4b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Counters.java
@@ -0,0 +1,25 @@
+/**
+ * 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.jena.fuseki.server;
+
+/** Objects that have a counter set */ 
+public interface Counters {
+    public  CounterSet getCounters() ;
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataAccessPoint.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataAccessPoint.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataAccessPoint.java
new file mode 100644
index 0000000..24275a8
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataAccessPoint.java
@@ -0,0 +1,75 @@
+/**
+ * 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.jena.fuseki.server;
+
+import java.util.concurrent.atomic.AtomicLong ;
+
+import org.apache.jena.fuseki.servlets.HttpAction ;
+
+
+/** A name in the URL space of the server */
+public class DataAccessPoint {
+    private final String name ;
+    private DataService dataService ;
+    private DataAccessPoint link ;             // Symbolic link.
+    private AtomicLong requests = new AtomicLong(0) ;
+    
+    public DataAccessPoint(String name) {
+        this.name = canonical(name) ;
+        this.dataService = null ;
+    }
+    
+    public String getName()     { return name ; }
+    
+    public static String canonical(String datasetPath) {
+        if ( datasetPath == null )
+            return datasetPath ;
+        if ( datasetPath.equals("/") )
+            datasetPath = "" ;
+        else
+            if ( !datasetPath.startsWith("/") )
+                datasetPath = "/" + datasetPath ;
+        if ( datasetPath.endsWith("/") )
+            datasetPath = datasetPath.substring(0, datasetPath.length() - 1) ;
+        return datasetPath ;
+    }
+
+    public DataService getDataService() {
+        return dataService;
+    }
+
+    public void setDataService(DataService dataService) {
+        this.dataService = dataService;
+    }
+
+    public DataAccessPoint getLink() {
+        return link;
+    }
+
+    public void setLink(DataAccessPoint link) {
+        this.link = link;
+    }
+
+    public long requestCount()                          { return requests.get() ; }
+    
+    public void startRequest(HttpAction httpAction)     { requests.incrementAndGet() ; }
+
+    public void finishRequest(HttpAction httpAction)    { requests.getAndDecrement() ; }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataAccessPointRegistry.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataAccessPointRegistry.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataAccessPointRegistry.java
new file mode 100644
index 0000000..19119a9
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataAccessPointRegistry.java
@@ -0,0 +1,37 @@
+/*
+ * 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.jena.fuseki.server;
+
+import org.apache.jena.fuseki.FusekiException ;
+import org.apache.jena.fuseki.migrate.Registry ;
+
+public class DataAccessPointRegistry extends Registry<String, DataAccessPoint>
+{
+    public static void register(String name, DataAccessPoint accessPt) {
+        if ( get().isRegistered(name) )
+            throw new FusekiException("Already registered: "+name) ;
+        get().put(name, accessPt);
+    }
+    
+    private static DataAccessPointRegistry singleton = new DataAccessPointRegistry() ;
+
+    public static DataAccessPointRegistry get() { return singleton ; }
+    
+    private DataAccessPointRegistry() {}
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
new file mode 100644
index 0000000..df9d2b3
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
@@ -0,0 +1,199 @@
+/**
+ * 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.jena.fuseki.server;
+
+import static org.apache.jena.fuseki.server.DatasetStatus.CLOSING ;
+import static org.apache.jena.fuseki.server.DatasetStatus.UNINITIALIZED ;
+
+import java.util.* ;
+import java.util.concurrent.atomic.AtomicBoolean ;
+import java.util.concurrent.atomic.AtomicLong ;
+
+import org.apache.jena.atlas.lib.MultiMap ;
+import org.apache.jena.atlas.lib.MultiMapToList ;
+import org.apache.jena.fuseki.DEF ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.build.DataServiceDesc ;
+
+import com.hp.hpl.jena.query.ReadWrite ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphReadOnly ;
+import com.hp.hpl.jena.tdb.StoreConnection ;
+import com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction ;
+
+public class DataService { //implements DatasetMXBean {
+    // XXX Add a "null model assembler".
+    
+    public static DataService serviceOnlyDataService() {
+        return dummy ; 
+    }
+    
+    public static DataService dummy = new DataService(null, null) ;
+    static {
+        dummy.dataset = new DatasetGraphReadOnly(DatasetGraphFactory.createMemFixed()) ;
+        dummy.addEndpoint(OperationName.Query, DEF.ServiceQuery) ;
+        dummy.addEndpoint(OperationName.Query, DEF.ServiceQueryAlt) ;
+    }
+    
+    private final DataServiceDesc svcDesc ;
+    private DatasetGraph dataset = null ;              // Only valid if active.
+
+    private MultiMapToList<OperationName, Endpoint> operations     = MultiMap.createMapList() ;
+    private Map<String, Endpoint> endpoints                        = new HashMap<>() ;
+    
+    private volatile DatasetStatus state = UNINITIALIZED ;
+
+    // DataService-level counters.
+    private final CounterSet counters                   = new CounterSet() ;
+    private final AtomicLong    requestCounter          = new AtomicLong(0) ;   
+    private final AtomicBoolean offlineInProgress       = new AtomicBoolean(false) ;
+    private final AtomicBoolean acceptingRequests       = new AtomicBoolean(true) ;
+
+    public DataService(DataServiceDesc desc, DatasetGraph dataset) {
+        this.svcDesc = desc ;
+        this.dataset = dataset ;
+        counters.add(CounterName.Requests) ;
+        counters.add(CounterName.RequestsGood) ;
+        counters.add(CounterName.RequestsBad) ;
+    }
+    
+    public DatasetGraph getDataset() {
+        return dataset ; 
+    }
+    
+    public void addEndpoint(OperationName operationName, String endpointName) {
+        Endpoint endpoint = new Endpoint(operationName, endpointName) ;
+        endpoints.put(endpointName, endpoint) ;
+        operations.put(operationName, endpoint);
+    }
+    
+    public Endpoint getOperation(String endpointName) {
+        return endpoints.get(endpointName) ;
+    }
+
+    public List<Endpoint> getOperation(OperationName opName) {
+        List<Endpoint> x = operations.get(opName) ;
+        if ( x == null )
+            x = Collections.emptyList() ;
+        return x ;  
+    }
+
+    /** Return the OperationNames available here.
+     *  @see #getOperation(OperationName) to ge the endpoint list
+     */
+    public Collection<OperationName> getOperations() {
+        return operations.keys() ;
+    }
+
+    //@Override
+    public boolean allowUpdate()    { return true ; }
+
+    public void goOffline()         { 
+        offlineInProgress.set(true) ;
+        acceptingRequests.set(false) ;
+        state = DatasetStatus.OFFLINE ; 
+    }
+    
+    public void goActive()         { 
+        offlineInProgress.set(false) ;
+        acceptingRequests.set(true) ;
+        state = DatasetStatus.ACTIVE ; 
+    }
+
+    public boolean isAcceptingRequests() {
+        return acceptingRequests.get() ;
+    }
+    
+    //@Override
+    public  CounterSet getCounters() { return counters ; }
+    
+    //@Override 
+    public long getRequests() { 
+        return counters.value(CounterName.Requests) ;
+    }
+
+    //@Override
+    public long getRequestsGood() {
+        return counters.value(CounterName.RequestsGood) ;
+    }
+    //@Override
+    public long getRequestsBad() {
+        return counters.value(CounterName.RequestsBad) ;
+    }
+
+    /** Counter of active read transactions */
+    public AtomicLong   activeReadTxn           = new AtomicLong(0) ;
+
+    /** Counter of active write transactions */
+    public AtomicLong   activeWriteTxn          = new AtomicLong(0) ;
+
+    /** Cumulative counter of read transactions */
+    public AtomicLong   totalReadTxn            = new AtomicLong(0) ;
+
+    /** Cumulative counter of writer transactions */
+    public AtomicLong   totalWriteTxn           = new AtomicLong(0) ;
+
+    public void startTxn(ReadWrite mode)
+    {
+        switch(mode)
+        {
+            case READ:  
+                activeReadTxn.getAndIncrement() ;
+                totalReadTxn.getAndIncrement() ;
+                break ;
+            case WRITE:
+                activeWriteTxn.getAndIncrement() ;
+                totalWriteTxn.getAndIncrement() ;
+                break ;
+        }
+    }
+
+    public void finishTxn(ReadWrite mode)
+    {
+        switch(mode)
+        {
+            case READ:  
+                activeReadTxn.decrementAndGet() ;
+                break ;
+            case WRITE:
+                activeWriteTxn.decrementAndGet() ;
+                break ;
+        }
+        checkShutdown() ;
+    }
+
+    private void checkShutdown() {
+        if ( state == CLOSING ) {
+            if ( activeReadTxn.get() == 0 && activeWriteTxn.get() == 0 )
+                shutdown() ;
+        }
+    }
+
+    private void shutdown() {
+        Fuseki.serverLog.info("Shutting down dataset") ;
+        dataset.close() ;
+        if ( dataset instanceof DatasetGraphTransaction ) {
+            DatasetGraphTransaction dsgtxn = (DatasetGraphTransaction)dataset ;
+            StoreConnection.release(dsgtxn.getLocation()) ;
+        }
+        dataset = null ; 
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DatasetMXBean.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DatasetMXBean.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DatasetMXBean.java
new file mode 100644
index 0000000..bf38229
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DatasetMXBean.java
@@ -0,0 +1,35 @@
+/**
+ * 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.jena.fuseki.server;
+
+public interface DatasetMXBean
+{
+    String getName() ;
+    
+    long getRequests() ;
+    long getRequestsGood() ;
+    long getRequestsBad() ;
+    
+//    void enable() ;
+//    void disable() ;
+//    void setReadOnly() ;
+//    boolean getReadOnly() ;
+    
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DatasetStatus.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DatasetStatus.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DatasetStatus.java
new file mode 100644
index 0000000..524b050
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DatasetStatus.java
@@ -0,0 +1,40 @@
+/**
+ * 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.jena.fuseki.server;
+
+import com.hp.hpl.jena.rdf.model.Resource ;
+
+public enum DatasetStatus {
+    UNINITIALIZED("Uninitialized"), ACTIVE("Active"), OFFLINE("Offline"), CLOSING("Closing"), CLOSED("Closed") ;
+    public final String name ; 
+    DatasetStatus(String string) { name = string ; }
+    
+    public static DatasetStatus status(Resource r) {
+        if ( FusekiVocab.stateActive.equals(r) )
+            return ACTIVE ;
+        if ( FusekiVocab.stateOffline.equals(r) )
+            return OFFLINE ;
+        if ( FusekiVocab.stateClosing.equals(r) )
+            return CLOSING ;
+        if ( FusekiVocab.stateClosed.equals(r) )
+            return CLOSED ;
+        return null ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Endpoint.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Endpoint.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Endpoint.java
new file mode 100644
index 0000000..6de7062
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Endpoint.java
@@ -0,0 +1,68 @@
+/**
+ * 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.jena.fuseki.server;
+
+import org.apache.jena.atlas.lib.InternalErrorException ;
+
+public class Endpoint implements Counters {
+    
+    public final OperationName opName ;
+    public final String endpointName ;
+    // Endpoint-level counters.
+    private final CounterSet counters           = new CounterSet() ;
+
+    public Endpoint(OperationName opName, String endpointName) {
+        this.opName = opName ;
+        if ( opName == null )
+            throw new InternalErrorException("opName is null") ;
+        this.endpointName = endpointName ;
+        // Standard counters - there may be others
+        counters.add(CounterName.Requests) ;
+        counters.add(CounterName.RequestsGood) ;
+        counters.add(CounterName.RequestsBad) ;
+    }
+
+    @Override
+    public  CounterSet getCounters()    { return counters ; }
+
+    //@Override
+    public OperationName getOperationName()      { return opName ; }
+    
+    //@Override
+    public boolean isType(OperationName operationName) { 
+        return opName.equals(operationName) ;
+    }
+
+    public String getEndpoint()         { return endpointName ; }
+    
+    //@Override 
+    public long getRequests() { 
+        return counters.value(CounterName.Requests) ;
+    }
+    //@Override
+    public long getRequestsGood() {
+        return counters.value(CounterName.RequestsGood) ;
+    }
+    //@Override
+    public long getRequestsBad() {
+        return counters.value(CounterName.RequestsBad) ;
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java
new file mode 100644
index 0000000..a76be11
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java
@@ -0,0 +1,114 @@
+/**
+ * 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.jena.fuseki.server;
+
+import java.nio.file.Path ;
+import java.nio.file.Paths ;
+
+/** 
+ * Separate initialization for FUSEKI_HOME and FUSEKI_BASE so that 
+ * Fusekilogging can use these values.
+ * This code must not touch Jena.  
+ * 
+ * @See FusekiServer 
+ */ 
+public class FusekiEnv {
+    /** Root of the Fuseki installation for fixed files. 
+     *  This may be null (e.g. running inside a web application container) */ 
+    public static Path FUSEKI_HOME = null ;
+    
+    /** Root of the varying files in this deployment. Often $FUSEKI_HOME/run.
+     * This is not null - it may be /etc/fuseki, which must be writable.
+     */ 
+    public static Path FUSEKI_BASE = null ;
+    
+    static final boolean isWindows = determineIfWindows() ;
+    
+    // Copied from SystemTDB to avoid dependency.
+    // This code must not touch Jena.  
+    private static boolean determineIfWindows() {
+        String s = System.getProperty("os.name") ;
+        if ( s == null )
+            return false ;
+        return s.startsWith("Windows ") ;
+    }
+ 
+    /** Unused */
+    // public static final String DFT_FUSEKI_HOME = isWindows 
+    //        ? /*What's correct here?*/ "/usr/share/fuseki"
+    //        : "/usr/share/fuseki" ;
+    static final String  DFT_FUSEKI_BASE = isWindows ? /* What's correct here? */"/etc/fuseki" : "/etc/fuseki" ;
+
+    public static final String   ENV_runArea     = "run" ;
+
+    private static boolean       initialized     = false ;
+    private static final boolean LogInit         = false ;
+    
+    public static synchronized void setEnvironment() {
+        if ( initialized )
+            return ;
+        initialized = true ;
+        logInit("FusekiInitEnv") ;
+        logInit("Start: ENV_FUSEKI_HOME = %s : ENV_FUSEKI_BASE = %s", FUSEKI_HOME, FUSEKI_BASE) ;
+        
+        if ( FUSEKI_HOME == null ) {
+            // Make absolute
+            String x1 = getenv("FUSEKI_HOME") ;
+            if ( x1 != null )
+                FUSEKI_HOME = Paths.get(x1) ;
+        }
+
+        if ( FUSEKI_BASE == null ) {
+            String x2 = getenv("FUSEKI_BASE") ;
+            if ( x2 != null )
+                FUSEKI_BASE = Paths.get(x2) ;
+            else {
+                if ( FUSEKI_HOME != null )
+                    FUSEKI_BASE = FUSEKI_HOME.resolve(ENV_runArea) ;
+                else
+                    // Neither FUSEKI_HOME nor FUSEKI_BASE set.
+                    FUSEKI_BASE = Paths.get(DFT_FUSEKI_BASE) ;
+            }
+        }
+
+        if ( FUSEKI_HOME != null )
+            FUSEKI_HOME = FUSEKI_HOME.toAbsolutePath() ;
+
+        FUSEKI_BASE = FUSEKI_BASE.toAbsolutePath() ;
+
+        logInit("Finish: ENV_FUSEKI_HOME = %s : ENV_FUSEKI_BASE = %s", FUSEKI_HOME, FUSEKI_BASE) ;
+    }
+    
+    private static void logInit(String fmt, Object ... args) {
+        if ( LogInit ) {
+            System.out.printf(fmt, args) ; 
+            System.out.println() ;
+        }
+    }
+    
+    /** Get environment variable value (maybe in system properties) */
+    public static String getenv(String name) {
+        String x = System.getenv(name) ;
+        if ( x == null )
+            x = System.getProperty(name) ;
+        return x ;
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
new file mode 100644
index 0000000..83d5523
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
@@ -0,0 +1,395 @@
+/**
+ * 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.jena.fuseki.server;
+
+import java.io.File ;
+import java.io.IOException ;
+import java.io.InputStream ;
+import java.io.StringReader ;
+import java.nio.file.Files ;
+import java.nio.file.Path ;
+import java.nio.file.StandardCopyOption ;
+import java.util.ArrayList ;
+import java.util.HashMap ;
+import java.util.List ;
+import java.util.Map ;
+
+import org.apache.jena.atlas.io.IO ;
+import org.apache.jena.atlas.lib.DS ;
+import org.apache.jena.atlas.lib.FileOps ;
+import org.apache.jena.atlas.lib.InternalErrorException ;
+import org.apache.jena.atlas.lib.Lib ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.FusekiConfigException ;
+import org.apache.jena.fuseki.build.Builder ;
+import org.apache.jena.fuseki.build.FusekiConfig ;
+import org.apache.jena.fuseki.build.Template ;
+import org.apache.jena.fuseki.build.TemplateFunctions ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.RDFLanguages ;
+import arq.cmd.CmdException ;
+
+import com.hp.hpl.jena.rdf.model.* ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.tdb.sys.Names ;
+
+public class FusekiServer
+{
+    // Initialization of FUSEKI_HOME and FUSEKI_BASE is done in FusekiEnvInit
+    // so that the code is independent of any logging.  FusekiLogging can use
+    // initialized values of FUSEKI_BASE while looking forlog4j configuration.
+    
+    /** Root of the Fuseki installation for fixed files. 
+     * This may be null (e.g. running inside a web application container) */ 
+    //public static Path FUSEKI_HOME = null ;
+    
+    /** Root of the varying files in this deployment. Often $FUSEKI_HOME/run.
+     * This is not null - it may be /etc/fuseki, which must be writable.
+     */ 
+    //public static Path FUSEKI_BASE = null ;
+    
+    // Relative names of directories in the FUSEKI_BASE area.
+    public static final String     runArea                  = FusekiEnv.ENV_runArea ;
+    public static final String     databasesLocationBase    = "databases" ;
+    // Place to put Lucene text and spatial indexes.
+    //private static final String        databaseIndexesDir       = "indexes" ;
+      
+    public static final String     backupDirNameBase        = "backups" ;
+    public static final String     configDirNameBase        = "configuration" ;
+    public static final String     logsNameBase             = "logs" ;
+    public static final String     systemDatabaseNameBase   = "system" ;
+    public static final String     systemFileAreaBase       = "system_files" ;
+    public static final String     templatesNameBase        = "templates" ;
+    // This name is in web.xml as well.
+    public static final String     DFT_SHIRO_INI            = "shiro.ini" ; 
+    // In FUSEKI_BASE
+    public static final String     DFT_CONFIG               = "config.ttl" ;
+    
+    /** Directory for TDB databases - this is known to the assembler templates */
+    public static Path        dirDatabases       = null ;
+    
+    /** Directory for writing backups */
+    public static Path        dirBackups         = null ;
+
+    /** Directory for assembler files */
+    public static Path        dirConfiguration   = null ;
+    
+    /** Directory for assembler files */
+    public static Path        dirLogs            = null ;
+
+    /** Directory for system database */
+    public static Path        dirSystemDatabase  = null ;
+
+    /** Directory for files uploaded (e.g upload assmbler descriptions); not data uploads. */
+    public static Path        dirFileArea        = null ;
+    
+    /** Directory for assembler files */
+    public static Path        dirTemplates       = null ;
+
+    private static boolean    initialized        = false ;
+    public static boolean     serverInitialized  = false ;
+
+    /** For testing - reset the places which initialize once */
+    public synchronized static void reset() {
+        initialized = false ;
+        FusekiServer.initialized = false ;
+    }
+    
+    public synchronized static void init() {
+        if ( initialized )
+            return ;
+        initialized = true ;
+        try {
+            FusekiEnv.setEnvironment() ;
+            Path FUSEKI_HOME = FusekiEnv.FUSEKI_HOME ;
+            Path FUSEKI_BASE = FusekiEnv.FUSEKI_BASE ;
+            
+            Fuseki.init() ;
+            Fuseki.configLog.info("FUSEKI_HOME="+ ((FUSEKI_HOME==null) ? "unset" : FUSEKI_HOME.toString())) ;
+            Fuseki.configLog.info("FUSEKI_BASE="+FUSEKI_BASE.toString());
+
+            // ----  Check FUSEKI_HOME and FUSEKI_BASE
+            // If FUSEKI_HOME exists, it may be FUSEKI_BASE.
+
+            if ( FUSEKI_HOME != null ) {
+                if ( ! Files.isDirectory(FUSEKI_HOME) )
+                    throw new FusekiConfigException("FUSEKI_HOME is not a directory: "+FUSEKI_HOME) ;
+                if ( ! Files.isReadable(FUSEKI_HOME) )
+                    throw new FusekiConfigException("FUSEKI_HOME is not readable: "+FUSEKI_HOME) ;
+            }
+
+            if ( Files.exists(FUSEKI_BASE) ) {
+                if ( ! Files.isDirectory(FUSEKI_BASE) )
+                    throw new FusekiConfigException("FUSEKI_BASE is not a directory: "+FUSEKI_BASE) ;
+                if ( ! Files.isWritable(FUSEKI_BASE) )
+                    throw new FusekiConfigException("FUSEKI_BASE is not writable: "+FUSEKI_BASE) ;
+            } else {
+                ensureDir(FUSEKI_BASE);
+            }
+
+            // Ensure FUSEKI_BASE has the assumed directories.
+            dirTemplates        = writeableDirectory(FUSEKI_BASE, templatesNameBase) ;
+            dirDatabases        = writeableDirectory(FUSEKI_BASE, databasesLocationBase) ;
+            dirBackups          = writeableDirectory(FUSEKI_BASE, backupDirNameBase) ;
+            dirConfiguration    = writeableDirectory(FUSEKI_BASE, configDirNameBase) ;
+            dirLogs             = writeableDirectory(FUSEKI_BASE, logsNameBase) ;
+            dirSystemDatabase   = writeableDirectory(FUSEKI_BASE, systemDatabaseNameBase) ;
+            dirFileArea         = writeableDirectory(FUSEKI_BASE, systemFileAreaBase) ;
+            //Possible intercept point
+
+            // ---- Initialize with files.
+
+            if ( Files.isRegularFile(FUSEKI_BASE) ) 
+                throw new FusekiConfigException("FUSEKI_BASE exists but is a file") ;
+
+            // Copy missing files into FUSEKI_BASE
+            copyFileIfMissing(null, DFT_SHIRO_INI, FUSEKI_BASE) ;
+            copyFileIfMissing(null, DFT_CONFIG, FUSEKI_BASE) ;
+            for ( String n : Template.templateNames ) {
+                copyFileIfMissing(null, n, FUSEKI_BASE) ;
+            }
+
+            serverInitialized = true ;
+        } catch (RuntimeException ex) {
+            Fuseki.serverLog.error("Exception in server initialization", ex) ;
+            throw ex ;
+        }
+    }
+    
+    private static boolean emptyDir(Path dir) {
+        return dir.toFile().list().length <= 2 ;
+    }
+    
+    /** Copy a file from src to dst under name fn.
+     * If src is null, try as a classpath resource
+     * @param src   Source directory, or null meaning use java resource. 
+     * @param fn    File name, a relative path.
+     * @param dst   Destination directory.
+     * 
+     */
+    private static void copyFileIfMissing(Path src, String fn, Path dst) {
+        
+        Path dstFile = dst.resolve(fn) ;
+        if ( Files.exists(dstFile) )
+            return ;
+        
+        // fn may be a path.
+        if ( src != null ) {
+            try {
+                Files.copy(src.resolve(fn), dstFile, StandardCopyOption.COPY_ATTRIBUTES) ;
+            } catch (IOException e) {
+                IO.exception("Failed to copy file "+src, e);
+                e.printStackTrace();
+            }
+        } else {
+            try {
+                // Get from the file from area "org/apache/jena/fuseki/server"  (our package)
+                InputStream in = FusekiServer.class.getResource(fn).openStream() ;
+                Files.copy(in, dstFile) ;
+            }
+            catch (IOException e) {
+                IO.exception("Failed to copy file from resource: "+src, e);
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public static void initializeDataAccessPoints(ServerInitialConfig initialSetup, String configDir) {
+        List<DataAccessPoint> configFileDBs = initServerConfiguration(initialSetup) ;
+        List<DataAccessPoint> directoryDBs =  FusekiConfig.readConfigurationDirectory(configDir) ;
+        List<DataAccessPoint> systemDBs =     FusekiConfig.readSystemDatabase(SystemState.getDataset()) ;
+        
+        List<DataAccessPoint> datapoints = new ArrayList<DataAccessPoint>() ;
+        datapoints.addAll(configFileDBs) ;
+        datapoints.addAll(directoryDBs) ;
+        datapoints.addAll(systemDBs) ;
+        
+        // Having found them, set them all running.
+        enable(datapoints);
+    }
+
+    private static void enable(List<DataAccessPoint> datapoints) {
+        for ( DataAccessPoint dap : datapoints ) {
+            Fuseki.configLog.info("Register: "+dap.getName()) ;
+            DataAccessPointRegistry.register(dap.getName(), dap); 
+        }
+    }
+
+    private static List<DataAccessPoint> initServerConfiguration(ServerInitialConfig params) { 
+        // Has a side effect of global context setting
+        // when processing a config file.
+        // Compatibility.
+        
+        List<DataAccessPoint> datasets = DS.list() ;
+        if ( params == null )
+            return datasets ;
+
+        if ( params.fusekiConfigFile != null ) {
+            if ( FileOps.exists(params.fusekiConfigFile ) ) {
+                Fuseki.configLog.info("Configuration file: " + params.fusekiConfigFile) ;
+                List<DataAccessPoint> cmdLineDatasets = FusekiConfig.readConfigFile(params.fusekiConfigFile) ;
+                datasets.addAll(cmdLineDatasets) ;
+            } else {
+                Fuseki.configLog.info("Configuration file '" + params.fusekiConfigFile+"' does not exist") ;
+            }
+        } else if ( params.dsg != null ) {
+            DataAccessPoint dap = defaultConfiguration(params.datasetPath, params.dsg, params.allowUpdate) ;
+            datasets.add(dap) ;
+        } else if ( params.templateFile != null ) {
+            Fuseki.configLog.info("Template file: " + params.templateFile) ;
+            String dir = params.params.get(Template.DIR) ;
+            if ( dir != null ) {
+                if ( Lib.equal(dir, Names.memName) ) {
+                    Fuseki.configLog.info("TDB dataset: in-memory") ;
+                } else {
+                    if ( !FileOps.exists(dir) )
+                        throw new CmdException("Directory not found: " + dir) ;
+                    Fuseki.configLog.info("TDB dataset: directory=" + dir) ;
+                }
+            }
+            DataAccessPoint dap = configFromTemplate(params.templateFile, params.datasetPath, params.params) ;
+            datasets.add(dap) ;
+        }
+        // No datasets is valid.
+        return datasets ;
+    }
+    
+    private static DataAccessPoint configFromTemplate(String templateFile, 
+                                                      String datasetPath, 
+                                                      Map<String, String> params) {
+        datasetPath = DataAccessPoint.canonical(datasetPath) ;
+        
+        // DRY -- ActionDatasets (and others?)
+        if ( params == null ) {
+            params = new HashMap<>() ;
+            params.put(Template.NAME, datasetPath) ;
+        } else {
+            if ( ! params.containsKey(Template.NAME) ) {
+                Fuseki.configLog.warn("No NAME found in template parameters (added)") ;
+                params.put(Template.NAME, datasetPath) ;   
+            }
+        }
+        
+        addGlobals(params); 
+
+        String str = TemplateFunctions.templateFile(templateFile, params) ;
+        Lang lang = RDFLanguages.filenameToLang(str, Lang.TTL) ;
+        StringReader sr =  new StringReader(str) ;
+        Model model = ModelFactory.createDefaultModel() ;
+        RDFDataMgr.read(model, sr, datasetPath, lang);
+        
+        // Find DataAccessPoint
+        Statement stmt = getOne(model, null, FusekiVocab.pServiceName, null) ;
+        if ( stmt == null ) {
+            StmtIterator sIter = model.listStatements(null, FusekiVocab.pServiceName, (RDFNode)null ) ;
+            if ( ! sIter.hasNext() )
+                ServletOps.errorBadRequest("No name given in description of Fuseki service") ;
+            sIter.next() ;
+            if ( sIter.hasNext() )
+                ServletOps.errorBadRequest("Multiple names given in description of Fuseki service") ;
+            throw new InternalErrorException("Inconsistent: getOne didn't fail the second time") ;
+        }
+        Resource subject = stmt.getSubject() ;
+        DataAccessPoint dap = Builder.buildDataAccessPoint(subject) ;
+        return dap ;
+    }
+    
+    public static void addGlobals(Map<String, String> params) {
+        if ( params == null ) {
+            Fuseki.configLog.warn("FusekiServer.addGlobals : params is null", new Throwable()) ;
+            return ;
+        }
+        
+        if ( ! params.containsKey("FUSEKI_BASE") )
+            params.put("FUSEKI_BASE", pathStringOrElse(FusekiEnv.FUSEKI_BASE, "unset")) ;
+        if ( ! params.containsKey("FUSEKI_HOME") )
+            params.put("FUSEKI_HOME", pathStringOrElse(FusekiEnv.FUSEKI_HOME, "unset")) ;
+    }
+
+    private static String pathStringOrElse(Path path, String dft) {
+        if ( path == null )
+            return dft ;
+        return path.toString() ;
+    }
+    
+    // DRY -- ActionDatasets (and others?)
+    private static Statement getOne(Model m, Resource s, Property p, RDFNode o) {
+        StmtIterator iter = m.listStatements(s, p, o) ;
+        if ( ! iter.hasNext() )
+            return null ;
+        Statement stmt = iter.next() ;
+        if ( iter.hasNext() )
+            return null ;
+        return stmt ;
+    }
+    
+    private static DataAccessPoint defaultConfiguration( String name, DatasetGraph dsg, boolean updatable) {
+        name = DataAccessPoint.canonical(name) ;
+        DataAccessPoint dap = new DataAccessPoint(name) ;
+        DataService ds = Builder.buildDataService(dsg, updatable) ;
+        dap.setDataService(ds) ;
+        return dap ;
+    }
+    
+    // ---- Helpers
+
+    /** Ensure a directory exists, creating it if necessary.
+     */
+    private static void ensureDir(Path directory) {
+        File dir = directory.toFile() ;
+        if ( ! dir.exists() ) {
+            boolean b = dir.mkdirs() ;
+            if ( ! b )
+                throw new FusekiConfigException("Failed to create directory: "+directory) ;
+        }
+        else if ( ! dir.isDirectory())
+            throw new FusekiConfigException("Not a directory: "+directory) ;
+    }
+
+    private static void mustExist(Path directory) {
+        File dir = directory.toFile() ;
+        if ( ! dir.exists() )
+            throw new FusekiConfigException("Does not exist: "+directory) ; 
+        if ( ! dir.isDirectory())
+            throw new FusekiConfigException("Not a directory: "+directory) ;
+    }
+    
+    private static boolean exists(Path directory) {
+        File dir = directory.toFile() ;
+        return dir.exists() ;
+    }
+
+    private static Path writeableDirectory(Path root , String relName ) {
+        Path p = makePath(root, relName) ;
+        ensureDir(p);
+        if ( ! Files.isWritable(p) )
+            throw new FusekiConfigException("Not writable: "+p) ;
+        return p ;
+    }
+    
+    private static Path makePath(Path root , String relName ) {
+        Path path = root.resolve(relName) ;
+        // Must exist
+//        try { path = path.toRealPath() ; }
+//        catch (IOException e) { IO.exception(e) ; }
+        return path ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerEnvironmentInit.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerEnvironmentInit.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerEnvironmentInit.java
new file mode 100644
index 0000000..356dc82
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerEnvironmentInit.java
@@ -0,0 +1,41 @@
+/**
+ * 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.jena.fuseki.server;
+
+import javax.servlet.ServletContextEvent ;
+import javax.servlet.ServletContextListener ;
+
+import org.apache.jena.fuseki.FusekiLogging ;
+
+/** Setup the enviroment and logging.
+ *  Runs before the ShiroEnvironmentLoader.
+ */
+public class FusekiServerEnvironmentInit implements ServletContextListener {
+
+    public FusekiServerEnvironmentInit() { }
+    
+    @Override
+    public void contextInitialized(ServletContextEvent sce) {
+        FusekiEnv.setEnvironment();
+        FusekiLogging.setLogging();
+    }
+
+    @Override
+    public void contextDestroyed(ServletContextEvent sce) {}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java
new file mode 100644
index 0000000..334fc73
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java
@@ -0,0 +1,81 @@
+/**
+ * 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.jena.fuseki.server;
+
+import javax.servlet.ServletContext ;
+import javax.servlet.ServletContextEvent ;
+import javax.servlet.ServletContextListener ;
+
+import org.apache.jena.fuseki.Fuseki ;
+
+public class FusekiServerListener implements ServletContextListener {
+
+    public FusekiServerListener() { }
+    
+    public static ServerInitialConfig initialSetup = null ;
+
+    private boolean initialized = false ;
+
+    @Override
+    public void contextInitialized(ServletContextEvent sce) {
+        ServletContext servletContext = sce.getServletContext() ;
+        String x = servletContext.getContextPath() ;
+        if ( ! x.isEmpty() ) 
+            Fuseki.configLog.info("Context path = "+x) ;
+//        String x = System.getProperty("user.dir") ;
+//        Path currentRelativePath = Paths.get("");
+//        String s = currentRelativePath.toAbsolutePath().toString();
+//        confLog.info("dir1 = "+x+" : dir2 = "+s) ;
+        init() ;
+    }
+
+    @Override
+    public void contextDestroyed(ServletContextEvent sce) {}
+
+    public synchronized void init() {
+        if ( initialized )
+            return ;
+        initialized = true ;
+
+        try {
+            FusekiServer.init() ; 
+            if ( ! FusekiServer.serverInitialized ) {
+                Fuseki.serverLog.error("Failed to initialize : Server not running") ;
+                return ;
+            }
+
+            if ( initialSetup == null ) {
+                initialSetup = new ServerInitialConfig() ;
+                String cfg = FusekiEnv.FUSEKI_BASE.resolve(FusekiServer.DFT_CONFIG).toAbsolutePath().toString() ;
+                initialSetup.fusekiConfigFile = cfg ;
+            }
+
+            if ( initialSetup != null ) {
+                FusekiServer.initializeDataAccessPoints(initialSetup, FusekiServer.dirConfiguration.toString()) ;
+            } else {
+                Fuseki.serverLog.error("No configuration") ;
+                System.exit(0) ;
+            }
+        } catch (Throwable th) { 
+            Fuseki.serverLog.error("Exception in initialization: {}", th.getMessage()) ;
+            throw th ;
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiVocab.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiVocab.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiVocab.java
new file mode 100644
index 0000000..ddae32c
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiVocab.java
@@ -0,0 +1,77 @@
+/*
+ * 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.jena.fuseki.server;
+
+import org.apache.jena.fuseki.FusekiException ;
+import org.apache.jena.iri.IRI ;
+import org.apache.jena.riot.system.IRIResolver ;
+
+import com.hp.hpl.jena.rdf.model.* ;
+
+public class FusekiVocab
+{
+    public static String NS = "http://jena.apache.org/fuseki#" ;
+    private static Model model = ModelFactory.createDefaultModel() ;
+
+    public static final Resource tServer = resource("Server") ;
+
+    public static final Resource fusekiService = resource("Service") ;
+
+    public static final Property pServices = property("services") ;
+    public static final Property pServiceName = property("name") ;
+    
+    public static final Property pServiceQueryEP = property("serviceQuery") ;
+    public static final Property pServiceUpdateEP = property("serviceUpdate") ;
+    public static final Property pServiceUploadEP = property("serviceUpload") ;
+    public static final Property pServiceReadWriteGraphStoreEP = property("serviceReadWriteGraphStore") ;
+    public static final Property pServiceReadgraphStoreEP = property("serviceReadGraphStore") ;
+
+    public static final Property pAllowTimeoutOverride = property("allowTimeoutOverride");
+    public static final Property pMaximumTimeoutOverride = property("maximumTimeoutOverride");
+    
+    // Internal
+    
+    private static final String stateNameActive      = DatasetStatus.ACTIVE.name ;
+    private static final String stateNameOffline     = DatasetStatus.OFFLINE.name ;
+    private static final String stateNameClosing     = DatasetStatus.CLOSING.name ;
+    private static final String stateNameClosed      = DatasetStatus.CLOSED.name ;
+    
+    public static final Resource stateActive        = resource(stateNameActive) ;
+    public static final Resource stateOffline       = resource(stateNameOffline) ;
+    public static final Resource stateClosing       = resource(stateNameClosing) ;
+    public static final Resource stateClosed        = resource(stateNameClosed) ;
+    
+    public static final Property pStatus = property("status") ;
+
+    private static Resource resource(String localname) { return model.createResource(iri(localname)) ; }
+    private static Property property(String localname) { return model.createProperty(iri(localname)) ; }
+        
+    private static String iri(String localname)
+    {
+        String uri = NS+localname ;
+        IRI iri = IRIResolver.parseIRI(uri) ;
+        if ( iri.hasViolation(true) )
+            throw new FusekiException("Bad IRI: "+iri) ;
+        if ( ! iri.isAbsolute() )
+            throw new FusekiException("Bad IRI: "+iri) ;
+        
+        return uri ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/OperationName.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/OperationName.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/OperationName.java
new file mode 100644
index 0000000..0abcf20
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/OperationName.java
@@ -0,0 +1,37 @@
+/**
+ * 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.jena.fuseki.server;
+
+public enum OperationName {
+    // Fixed names give the codebase some resilience.
+    
+    Query("SPARQL Query"),
+    Update("SPARQL Update"),
+    Upload("File Upload"),
+    GSP("Graph Store Protocol"),
+    GSP_R("Graph Store Protocol (Read)"),
+    Quads("HTTP Quads")
+    ;
+    
+    private final String description ;
+    private OperationName(String description) { this.description = description ; }
+    public String getDescription() { return description ; }
+    
+}
+


[37/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/codemirror.min.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/codemirror.min.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/codemirror.min.css
new file mode 100644
index 0000000..d2366ca
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/codemirror.min.css
@@ -0,0 +1 @@
+.CodeMirror{font-family:monospace;height:300px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #000}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes bl
 ink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@-webkit-keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default
  .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-invalidchar,.cm-s-default .cm-error{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-sizer{position:relative;border-right:30px solid transparent;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6
 ;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;padding-bottom:30px;margin-bottom:-32px;display:inline-block}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wr
 ap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/font-awesome.min.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/font-awesome.min.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/font-awesome.min.css
new file mode 100644
index 0000000..3d920fc
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/font-awesome.min.css
@@ -0,0 +1,4 @@
+/*!
+ *  Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
+ *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.1.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-l
 g{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-
 rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-al
 ign:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{conten
 t:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035
 "}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.f
 a-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\
 f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.f
 a-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-le
 ft:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:
 before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment
 -o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-do
 uble-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.
 fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"
 \f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\
 f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content
 :"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"
 \f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-
 yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:b
 efore{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empi
 re:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/fui.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/fui.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/fui.css
new file mode 100644
index 0000000..b2445e3
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/fui.css
@@ -0,0 +1,191 @@
+h1 {
+  margin-top: 0;
+  font-size: 18pt;
+}
+
+h1 + p {
+  margin-bottom: 20px;
+}
+
+h2 {
+  margin-top: 0;
+  font-size: 16pt;
+}
+
+h2 + p {
+  margin-bottom: 18px;
+}
+
+h3 {
+  font-size: 13pt;
+}
+
+a#server-status-light {
+  display: inline-block;
+  margin: 0;
+  padding-left: 8px;
+  padding-top: 2px;
+}
+#server-status-light span {
+  width: 24px;
+  height: 24px;
+  border-radius: 12px;
+  display: inline-block;
+  margin-bottom: -8px;
+}
+#server-status-light span.server-up {
+  background-color: #38a800;
+  border:1px solid #4b9b23;
+
+  background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #59e811), color-stop(1, #38a800));
+  background:-moz-linear-gradient(top, #59e811 5%, #38a800 100%);
+  background:-webkit-linear-gradient(top, #59e811 5%, #38a800 100%);
+  background:-o-linear-gradient(top, #59e811 5%, #38a800 100%);
+  background:-ms-linear-gradient(top, #59e811 5%, #38a800 100%);
+  background:linear-gradient(to bottom, #59e811 5%, #38a800 100%);
+  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#59e811', endColorstr='#38a800',GradientType=0);
+}
+
+#server-status-light span.server-down {
+  background-color: #d21e1e;
+  border:1px solid #a02323;
+
+  background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ed2424), color-stop(1, #d21e1e));
+  background:-moz-linear-gradient(top, #ed2424 5%, #d21e1e 100%);
+  background:-webkit-linear-gradient(top, #ed2424 5%, #d21e1e 100%);
+  background:-o-linear-gradient(top, #ed2424 5%, #d21e1e 100%);
+  background:-ms-linear-gradient(top, #ed2424 5%, #d21e1e 100%);
+  background:linear-gradient(to bottom, #ed2424 5%, #d21e1e 100%);
+  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89306',GradientType=0);
+}
+
+a.navbar-brand {
+  padding-top: 0;
+  padding-bottom: 0;
+  font-size: 15px;
+  line-height: 1.0;
+}
+
+a.navbar-brand div {
+  display: inline-block;
+}
+
+a.navbar-brand img {
+  margin-top: -25px;
+}
+
+.navbar-right {
+  color: #777;
+  line-height: 1.0;
+}
+
+.navbar-item {
+  padding-top: 15px;
+  padding-right: 4px;
+}
+
+.navbar-nav > li > a > i {
+  color: #428bca;
+}
+
+.options-list {
+  margin-bottom: 5px;
+}
+
+.validation-warning {
+  display:none;
+}
+.has-error .validation-warning, .has-warning .validation-warning {
+  display:block;
+}
+
+.current-dataset {
+  margin-right: 20px;
+}
+
+.current-datasets {
+  margin-top: 20px;
+  margin-bottom: 20px;
+}
+
+.status-indicator {
+  padding-top: 10px;
+}
+
+.select-picker-label {
+  height: 30px;
+  vertical-align: middle;
+  display: inline-block;
+}
+
+.content-frame {
+  background-color: #eee;
+  border: 1px solid #aaa;
+  border-radius: 5px;
+  padding: 5px;
+}
+
+.tab-pane > div {
+  background-color: white;
+  border-radius: 3px;
+}
+
+#sparqlEndpoint {
+  min-width: 300px;
+}
+
+#fileuploadForm .progress {
+  margin-top: 0;
+  margin-bottom: 5px;
+}
+
+.tab-pane .with-dataset {
+  padding: 5px;
+}
+
+.file-description {
+  margin-top: 10px;
+}
+
+.graph-label label {
+  text-align: right;
+  padding-top: 5px;
+}
+
+.dl-horizontal dt {
+  width: 240px;
+}
+
+.dl-horizontal dd {
+  margin-left: 260px
+}
+
+dt span.heading, dd span.heading {
+  font-weight: bold;
+  background-color: #eee;
+  padding: 3px 8px;
+}
+
+dt span.heading {
+  padding-right: 2px;
+}
+dd span.heading {
+  padding-left: 2px;
+}
+dt.font-weight-normal {
+  font-weight: normal;
+}
+dd .numeric {
+  display: inline-block;
+  min-width: 4em;
+  text-align: right;
+}
+
+.bordered-box {
+  border: 1px solid #ccc;
+  border-radius: 5px;
+}
+
+.pull-right > button {
+  margin: 10px 2px 0 0;
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-noscript.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-noscript.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-noscript.css
new file mode 100644
index 0000000..64d728f
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-noscript.css
@@ -0,0 +1,22 @@
+@charset "UTF-8";
+/*
+ * jQuery File Upload Plugin NoScript CSS 1.2.0
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2013, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ */
+
+.fileinput-button input {
+  position: static;
+  opacity: 1;
+  filter: none;
+  font-size: inherit;
+  direction: inherit;
+}
+.fileinput-button span {
+  display: none;
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-ui-noscript.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-ui-noscript.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-ui-noscript.css
new file mode 100644
index 0000000..87f110c
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-ui-noscript.css
@@ -0,0 +1,17 @@
+@charset "UTF-8";
+/*
+ * jQuery File Upload UI Plugin NoScript CSS 8.8.5
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2012, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ */
+
+.fileinput-button i,
+.fileupload-buttonbar .delete,
+.fileupload-buttonbar .toggle {
+  display: none;
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-ui.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-ui.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-ui.css
new file mode 100644
index 0000000..76fb376
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload-ui.css
@@ -0,0 +1,57 @@
+@charset "UTF-8";
+/*
+ * jQuery File Upload UI Plugin CSS 9.0.0
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2010, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ */
+
+.fileupload-buttonbar .btn,
+.fileupload-buttonbar .toggle {
+  margin-bottom: 5px;
+}
+.progress-animated .progress-bar,
+.progress-animated .bar {
+  background: url("../img/progressbar.gif") !important;
+  filter: none;
+}
+.fileupload-process {
+  float: right;
+  display: none;
+}
+.fileupload-processing .fileupload-process,
+.files .processing .preview {
+  display: block;
+  width: 32px;
+  height: 32px;
+  background: url("../img/loading.gif") center no-repeat;
+  background-size: contain;
+}
+.files audio,
+.files video {
+  max-width: 300px;
+}
+
+@media (max-width: 767px) {
+  .fileupload-buttonbar .toggle,
+  .files .toggle,
+  .files .btn span {
+    display: none;
+  }
+  .files .name {
+    width: 80px;
+    word-wrap: break-word;
+  }
+  .files audio,
+  .files video {
+    max-width: 80px;
+  }
+  .files img,
+  .files canvas {
+    max-width: 100%;
+  }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload.css
new file mode 100644
index 0000000..fb6044d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/jquery.fileupload.css
@@ -0,0 +1,36 @@
+@charset "UTF-8";
+/*
+ * jQuery File Upload Plugin CSS 1.3.0
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2013, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ */
+
+.fileinput-button {
+  position: relative;
+  overflow: hidden;
+}
+.fileinput-button input {
+  position: absolute;
+  top: 0;
+  right: 0;
+  margin: 0;
+  opacity: 0;
+  -ms-filter: 'alpha(opacity=0)';
+  font-size: 200px;
+  direction: ltr;
+  cursor: pointer;
+}
+
+/* Fixes for IE < 8 */
+@media screen\9 {
+  .fileinput-button input {
+    filter: alpha(opacity=0);
+    font-size: 100%;
+    height: 100%;
+  }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/pivot.min.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/pivot.min.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/pivot.min.css
new file mode 100644
index 0000000..b489e1e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/pivot.min.css
@@ -0,0 +1 @@
+table.pvtTable{font-family:arial;font-size:8pt;text-align:left;border-collapse:collapse}table.pvtTable tr th{background-color:#e6EEEE;border:1px solid #CDCDCD;font-size:8pt;padding:5px}table.pvtTable .pvtColLabel{text-align:center}table.pvtTable .pvtTotalLabel{text-align:right}table.pvtTable tr td{color:#3D3D3D;padding:5px;background-color:#FFF;border:1px solid #CDCDCD;vertical-align:top;text-align:right}.pvtGrandTotal,.pvtTotal{font-weight:700}.pvtVals{text-align:center}.pvtAggregator{margin-bottom:5px}.pvtAxisContainer,.pvtVals{border:1px solid gray;background:#EEE;padding:5px;min-width:20px;min-height:20px}.pvtAxisContainer li{padding:8px 6px;list-style-type:none;cursor:move}.pvtAxisContainer li.pvtPlaceholder{-webkit-border-radius:5px;padding:3px 15px;-moz-border-radius:5px;border-radius:5px;border:1px dashed #aaa}.pvtAxisContainer li span.pvtAttr{background:#F3F3F3;border:1px solid #DEDEDE;padding:2px 5px;white-space:nowrap;-webkit-border-radius:5px;-moz-border-radius:5px;borde
 r-radius:5px}.pvtTriangle{cursor:pointer;color:grey}.pvtHorizList li{display:inline}.pvtVertList{vertical-align:top}.pvtFilteredAttribute{font-style:italic}.pvtFilterBox{z-index:100;width:280px;border:1px solid gray;background-color:#fff;position:absolute;padding:20px;text-align:center}.pvtFilterBox h4{margin:0}.pvtCheckContainer{text-align:left;overflow:scroll;width:100%;max-height:200px}.pvtCheckContainer p{margin:5px}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/qonsole.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/qonsole.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/qonsole.css
new file mode 100644
index 0000000..99180cb
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/qonsole.css
@@ -0,0 +1,172 @@
+/* Copyright (c) 2012-2013 Epimorphics Ltd. Released under Apache License 2.0 http://www.apache.org/licenses/ */
+
+.qonsole h2, .query-chrome label {
+  font-size: 10px;
+  color: #666666;
+  margin: 0;
+  text-transform: uppercase;
+  display: block;
+  font-weight: normal;
+}
+
+.qonsole .well {
+  padding: 5px;
+}
+
+.qonsole h2+ul {
+  display: inline-block;
+}
+
+.navbar h1.brand, .navbar h2.brand {
+  line-height: 12px;
+}
+
+.navbar h1.brand {
+  font-weight: bold;
+  font-size: 16pt;
+  display: inline-block;
+}
+
+h2.brand {
+  display: inline-block;
+  font-size: 14pt;
+}
+
+.query-chrome {
+  margin-top: 1em;
+}
+
+.timeTaken {
+  font-style: italic;
+  text-transform: none;
+  color: #666;
+  margin-bottom: 5px;
+}
+
+pre.results-plain {
+  overflow: auto;
+  word-wrap: normal;
+  white-space: pre;
+}
+
+.well ul {
+  margin-bottom: 0;
+}
+
+.well ul li {
+  margin-bottom: 2px;
+  margin-top: 2px;
+}
+
+a.run-query {
+  margin-left: 10px;
+}
+
+footer {
+  font-size: smaller;
+  color: #99999f;
+  border: 1px solid #ddd;
+  border-radius: 5px;
+  padding: 5px;
+}
+
+footer p {
+  margin: 0;
+}
+
+/* Custom buttons */
+
+.btn-custom1, .btn-custom2.active {
+  background-color: hsl(201, 91%, 39%) !important;
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#087ebd", endColorstr="#087ebd");
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#087ebd), to(#087ebd));
+  background-image: -moz-linear-gradient(top, #087ebd, #087ebd);
+  background-image: -ms-linear-gradient(top, #087ebd, #087ebd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #087ebd), color-stop(100%, #087ebd));
+  background-image: -webkit-linear-gradient(top, #087ebd, #087ebd);
+  background-image: -o-linear-gradient(top, #087ebd, #087ebd);
+  background-image: linear-gradient(#087ebd, #087ebd);
+  border-color: #087ebd #087ebd hsl(201, 91%, 39%);
+  color: #fff !important;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.00);
+  -webkit-font-smoothing: antialiased;
+}
+
+.btn-custom1:hover, .btn-custom2.active:hover {
+  background-color: hsl(201, 91%, 43%) !important;
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#098bd1", endColorstr="#098bd1");
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#098bd1), to(#098bd1));
+  background-image: -moz-linear-gradient(top, #098bd1, #098bd1);
+  background-image: -ms-linear-gradient(top, #098bd1, #098bd1);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #098bd1), color-stop(100%, #098bd1));
+  background-image: -webkit-linear-gradient(top, #098bd1, #098bd1);
+  background-image: -o-linear-gradient(top, #098bd1, #098bd1);
+  background-image: linear-gradient(#098bd1, #098bd1);
+  border-color: #098bd1 #098bd1 hsl(201, 91%, 43%);
+  color: #fff !important;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.00);
+  -webkit-font-smoothing: antialiased;
+}
+
+
+.btn-custom2 {
+  background-color: hsl(193, 32%, 75%) !important;
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#aacad3", endColorstr="#aacad3");
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#aacad3), to(#aacad3));
+  background-image: -moz-linear-gradient(top, #aacad3, #aacad3);
+  background-image: -ms-linear-gradient(top, #aacad3, #aacad3);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #aacad3), color-stop(100%, #aacad3));
+  background-image: -webkit-linear-gradient(top, #aacad3, #aacad3);
+  background-image: -o-linear-gradient(top, #aacad3, #aacad3);
+  background-image: linear-gradient(#aacad3, #aacad3);
+  border-color: #aacad3 #aacad3 hsl(193, 32%, 75%);
+  color: #333 !important;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.00);
+  -webkit-font-smoothing: antialiased;
+}
+
+.btn-custom2:hover {
+  background-color: hsl(193, 31%, 70%) !important;
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#9abfca", endColorstr="#9abfca");
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#9abfca), to(#9abfca));
+  background-image: -moz-linear-gradient(top, #9abfca, #9abfca);
+  background-image: -ms-linear-gradient(top, #9abfca, #9abfca);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #9abfca), color-stop(100%, #9abfca));
+  background-image: -webkit-linear-gradient(top, #9abfca, #9abfca);
+  background-image: -o-linear-gradient(top, #9abfca, #9abfca);
+  background-image: linear-gradient(#9abfca, #9abfca);
+  border-color: #9abfca #9abfca hsl(193, 31%, 70%);
+  color: #333 !important;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.00);
+  -webkit-font-smoothing: antialiased;
+}
+
+.auto-overflow {
+  overflow: auto;
+}
+
+.CodeMirror-foldmarker {
+  color: blue;
+  text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
+  font-family: arial;
+  line-height: .3;
+  cursor: pointer;
+}
+.CodeMirror-foldgutter {
+  width: .7em;
+}
+.CodeMirror-foldgutter-open,
+.CodeMirror-foldgutter-folded {
+  color: #555;
+  cursor: pointer;
+}
+.CodeMirror-foldgutter-open:after {
+  content: "\25BE";
+}
+.CodeMirror-foldgutter-folded:after {
+  content: "\25B8";
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasqe.min.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasqe.min.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasqe.min.css
new file mode 100644
index 0000000..04fb1ff
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasqe.min.css
@@ -0,0 +1 @@
+.yasqe{@-moz-keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@-webkit-keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}}.yasqe .CodeMirror{font-family:monospace;height:300px}.yasqe .CodeMirror-scroll{overflow:auto}.yasqe .CodeMirror-lines{padding:4px 0}.yasqe .CodeMirror pre{padding:0 4px}.yasqe .CodeMirror-scrollbar-filler,.yasqe .CodeMirror-gutter-filler{background-color:#fff}.yasqe .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.yasqe .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;-moz-box-sizing:content-box;box-sizing:content-box}.yasqe .CodeMirror-guttermarker{color:#000}.yasqe .CodeMirror-guttermarker-subtle{color:#999}.yasqe .CodeMirror div.CodeMirror-cursor{border-left:1px solid #000}.yasqe .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.
 yasqe .CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.yasqe .CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.yasqe .cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.yasqe .cm-tab{display:inline-block;text-decoration:inherit}.yasqe .CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.yasqe .cm-s-default .cm-keyword{color:#708}.yasqe .cm-s-default .cm-atom{color:#219}.yasqe .cm-s-default .cm-number{color:#164}.yasqe .cm-s-default .cm-def{color:#00f}.yasqe .cm-s-default .cm-variable-2{color:#05a}.yasqe .cm-s-default .cm-variable-3{color:#085}.yasqe .cm-s-default .cm-comment{color:#a50}.yasqe .cm-s-default .cm-string{color:#a11}.yasqe .cm-s-default .cm-string-2{color:#f50}.yasqe .cm-s-default .cm-meta{color:#555}.yasqe .cm-s-default .cm-qualifier{color:#555}.yasqe .cm-s-default .cm-builtin{color:#30a}.ya
 sqe .cm-s-default .cm-bracket{color:#997}.yasqe .cm-s-default .cm-tag{color:#170}.yasqe .cm-s-default .cm-attribute{color:#00c}.yasqe .cm-s-default .cm-header{color:#00f}.yasqe .cm-s-default .cm-quote{color:#090}.yasqe .cm-s-default .cm-hr{color:#999}.yasqe .cm-s-default .cm-link{color:#00c}.yasqe .cm-negative{color:#d44}.yasqe .cm-positive{color:#292}.yasqe .cm-header,.yasqe .cm-strong{font-weight:700}.yasqe .cm-em{font-style:italic}.yasqe .cm-link{text-decoration:underline}.yasqe .cm-strikethrough{text-decoration:line-through}.yasqe .cm-s-default .cm-error{color:red}.yasqe .cm-invalidchar{color:red}.yasqe div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}.yasqe div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.yasqe .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.yasqe .CodeMirror-activeline-background{background:#e8f2ff}.yasqe .CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.yasqe .CodeMirror-scroll{margin-bottom:-
 30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative;-moz-box-sizing:content-box;box-sizing:content-box}.yasqe .CodeMirror-sizer{position:relative;border-right:30px solid transparent;-moz-box-sizing:content-box;box-sizing:content-box}.yasqe .CodeMirror-vscrollbar,.yasqe .CodeMirror-hscrollbar,.yasqe .CodeMirror-scrollbar-filler,.yasqe .CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.yasqe .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.yasqe .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.yasqe .CodeMirror-scrollbar-filler{right:0;bottom:0}.yasqe .CodeMirror-gutter-filler{left:0;bottom:0}.yasqe .CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.yasqe .CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;padding-bottom:30px;margin-bottom:-32px;display:inline-block;;}.yasqe .CodeMirror-gutter-wrapper{posit
 ion:absolute;z-index:4;height:100%}.yasqe .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.yasqe .CodeMirror-lines{cursor:text;min-height:1px}.yasqe .CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.yasqe .CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.yasqe .CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.yasqe .CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.yasqe .CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.yasqe .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.yasqe .CodeMirror-measure pre{position:static}.yasqe .CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}.yasqe div.CodeMirro
 r-cursors{visibility:hidden;position:relative;z-index:3}.yasqe .CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.yasqe .CodeMirror-selected{background:#d9d9d9}.yasqe .CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.yasqe .CodeMirror-crosshair{cursor:crosshair}.yasqe .cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.yasqe .cm-force-border{padding-right:.1px}@media print{.yasqe .CodeMirror div.CodeMirror-cursors{visibility:hidden}}.yasqe .cm-tab-wrap-hack:after{content:''}.yasqe span.CodeMirror-selectedtext{background:0 0}.yasqe .CodeMirror-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;height:auto;z-index:9}.yasqe .CodeMirror-foldmarker{color:#00f;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.yasqe .CodeMirror-foldgutter{width:.7em}.yasqe .CodeMirror-foldgutter-open,.yasqe .CodeMirror-foldgutter-folded{cursor:pointer}.yasqe .CodeMirror-foldgutter-open:af
 ter{content:"\25BE"}.yasqe .CodeMirror-foldgutter-folded:after{content:"\25B8"}.yasqe .svgImg{display:inline-block}.yasqe .CodeMirror{line-height:1.5em;border:1px solid #d1d1d1}.yasqe pre{font-size:13px}.yasqe span.cm-error{border-bottom:2px dotted red}.yasqe .gutterErrorBar{width:4px}.yasqe .yasqe_buttons{position:absolute;top:5px;right:5px;z-index:5}.yasqe .yasqe_buttons div{vertical-align:top;margin-left:5px}.yasqe .yasqe_queryButton{display:inline-block;cursor:pointer}.yasqe .yasqe_share{cursor:pointer;height:20px;width:20px;margin-top:3px}.yasqe .yasqe_sharePopup{position:absolute;padding:6px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05);width:400px;height:auto}.yasqe .yasqe_sharePopup textarea{width:100%}.yasqe .completionNotification{color:#999;background-color:#f7f7f7;position:absolute;padding:0 5px;right:0;bottom:0;font-size:90%}.yasqe .CodeMirror-fullscreen .
 fullscreenToggleBtns .yasqe_smallscreenBtn{display:inline-block}.yasqe .CodeMirror-fullscreen .fullscreenToggleBtns .yasqe_fullscreenBtn{display:none}.yasqe .fullscreenToggleBtns{display:inline-block;margin-top:3px}.yasqe .fullscreenToggleBtns div{cursor:pointer;width:20px;height:20px}.yasqe .fullscreenToggleBtns .yasqe_smallscreenBtn{display:none}.yasqe .parseErrorIcon{width:15px;height:15px}.yasqe .yasqe_tooltip{display:inline;position:absolute;background:#333;background:rgba(0,0,0,.8);border-radius:5px;bottom:26px;color:#fff;left:20%;padding:5px 15px;position:absolute;width:220px;white-space:-moz-pre-wrap!important;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;white-space:normal}.yasqe .notificationLoader{width:18px;height:18px;vertical-align:middle}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px r
 gba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}.CodeMirror-hint{max-width:30em}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasr.min.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasr.min.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasr.min.css
new file mode 100644
index 0000000..25c9265
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/yasr.min.css
@@ -0,0 +1 @@
+.yasr{padding-top:5px;background-color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857;color:#333;@-moz-keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@-webkit-keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}}.yasr .svgImg{display:inline-block;bottom:-2px}.yasr button.btn_smallscreen{display:none}.yasr button.btn_smallscreen div,.yasr button.btn_fullscreen div{width:15px;height:15px}.yasr.yasr_fullscreen{z-index:10;position:fixed;top:0;bottom:0;left:0;right:0}.yasr.yasr_fullscreen .btn_smallscreen{display:inline-block}.yasr.yasr_fullscreen .btn_fullscreen{display:none}.yasr table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}.yasr table.dataTable thead th,.yasr table.dataTable tfoot th{font-weight:700}.yasr table.dataTable thead th,.yasr table.dataTable thead td{
 padding:10px 18px;border-bottom:1px solid #111}.yasr table.dataTable thead th:active,.yasr table.dataTable thead td:active{outline:0}.yasr table.dataTable tfoot th,.yasr table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}.yasr table.dataTable thead .sorting_asc,.yasr table.dataTable thead .sorting_desc,.yasr table.dataTable thead .sorting{cursor:pointer;}.yasr table.dataTable thead .sorting{background:url(../images/sort_both.png) no-repeat center right}.yasr table.dataTable thead .sorting_asc{background:url(../images/sort_asc.png) no-repeat center right}.yasr table.dataTable thead .sorting_desc{background:url(../images/sort_desc.png) no-repeat center right}.yasr table.dataTable thead .sorting_asc_disabled{background:url(../images/sort_asc_disabled.png) no-repeat center right}.yasr table.dataTable thead .sorting_desc_disabled{background:url(../images/sort_desc_disabled.png) no-repeat center right}.yasr table.dataTable tbody tr{background-color:#fff}.yasr ta
 ble.dataTable tbody tr.selected{background-color:#b0bed9}.yasr table.dataTable tbody th,.yasr table.dataTable tbody td{padding:8px 10px}.yasr table.dataTable.row-border tbody th,.yasr table.dataTable.row-border tbody td,.yasr table.dataTable.display tbody th,.yasr table.dataTable.display tbody td{border-top:1px solid #ddd}.yasr table.dataTable.row-border tbody tr:first-child th,.yasr table.dataTable.row-border tbody tr:first-child td,.yasr table.dataTable.display tbody tr:first-child th,.yasr table.dataTable.display tbody tr:first-child td{border-top:none}.yasr table.dataTable.cell-border tbody th,.yasr table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}.yasr table.dataTable.cell-border tbody tr th:first-child,.yasr table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}.yasr table.dataTable.cell-border tbody tr:first-child th,.yasr table.dataTable.cell-border tbody tr:first-child td{border-top:none}.yasr table.dataTabl
 e.stripe tbody tr.odd,.yasr table.dataTable.display tbody tr.odd{background-color:#f9f9f9}.yasr table.dataTable.stripe tbody tr.odd.selected,.yasr table.dataTable.display tbody tr.odd.selected{background-color:#abb9d3}.yasr table.dataTable.hover tbody tr:hover,.yasr table.dataTable.hover tbody tr.odd:hover,.yasr table.dataTable.hover tbody tr.even:hover,.yasr table.dataTable.display tbody tr:hover,.yasr table.dataTable.display tbody tr.odd:hover,.yasr table.dataTable.display tbody tr.even:hover{background-color:#f5f5f5}.yasr table.dataTable.hover tbody tr:hover.selected,.yasr table.dataTable.hover tbody tr.odd:hover.selected,.yasr table.dataTable.hover tbody tr.even:hover.selected,.yasr table.dataTable.display tbody tr:hover.selected,.yasr table.dataTable.display tbody tr.odd:hover.selected,.yasr table.dataTable.display tbody tr.even:hover.selected{background-color:#a9b7d1}.yasr table.dataTable.order-column tbody tr>.sorting_1,.yasr table.dataTable.order-column tbody tr>.sorting_2,.
 yasr table.dataTable.order-column tbody tr>.sorting_3,.yasr table.dataTable.display tbody tr>.sorting_1,.yasr table.dataTable.display tbody tr>.sorting_2,.yasr table.dataTable.display tbody tr>.sorting_3{background-color:#f9f9f9}.yasr table.dataTable.order-column tbody tr.selected>.sorting_1,.yasr table.dataTable.order-column tbody tr.selected>.sorting_2,.yasr table.dataTable.order-column tbody tr.selected>.sorting_3,.yasr table.dataTable.display tbody tr.selected>.sorting_1,.yasr table.dataTable.display tbody tr.selected>.sorting_2,.yasr table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad4}.yasr table.dataTable.display tbody tr.odd>.sorting_1,.yasr table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}.yasr table.dataTable.display tbody tr.odd>.sorting_2,.yasr table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}.yasr table.dataTable.display tbody tr.odd>.sorting_3,.yasr table.dataTable.order-co
 lumn.stripe tbody tr.odd>.sorting_3{background-color:#f5f5f5}.yasr table.dataTable.display tbody tr.odd.selected>.sorting_1,.yasr table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b3cd}.yasr table.dataTable.display tbody tr.odd.selected>.sorting_2,.yasr table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a7b5ce}.yasr table.dataTable.display tbody tr.odd.selected>.sorting_3,.yasr table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b6d0}.yasr table.dataTable.display tbody tr.even>.sorting_1,.yasr table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#f9f9f9}.yasr table.dataTable.display tbody tr.even>.sorting_2,.yasr table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fbfbfb}.yasr table.dataTable.display tbody tr.even>.sorting_3,.yasr table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fdfdfd}.yasr 
 table.dataTable.display tbody tr.even.selected>.sorting_1,.yasr table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad4}.yasr table.dataTable.display tbody tr.even.selected>.sorting_2,.yasr table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#adbbd6}.yasr table.dataTable.display tbody tr.even.selected>.sorting_3,.yasr table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}.yasr table.dataTable.display tbody tr:hover>.sorting_1,.yasr table.dataTable.display tbody tr.odd:hover>.sorting_1,.yasr table.dataTable.display tbody tr.even:hover>.sorting_1,.yasr table.dataTable.order-column.hover tbody tr:hover>.sorting_1,.yasr table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_1,.yasr table.dataTable.order-column.hover tbody tr.even:hover>.sorting_1{background-color:#eaeaea}.yasr table.dataTable.display tbody tr:hover>.sorting_2,.yasr table.dataTable.display tbody tr.o
 dd:hover>.sorting_2,.yasr table.dataTable.display tbody tr.even:hover>.sorting_2,.yasr table.dataTable.order-column.hover tbody tr:hover>.sorting_2,.yasr table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_2,.yasr table.dataTable.order-column.hover tbody tr.even:hover>.sorting_2{background-color:#ebebeb}.yasr table.dataTable.display tbody tr:hover>.sorting_3,.yasr table.dataTable.display tbody tr.odd:hover>.sorting_3,.yasr table.dataTable.display tbody tr.even:hover>.sorting_3,.yasr table.dataTable.order-column.hover tbody tr:hover>.sorting_3,.yasr table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_3,.yasr table.dataTable.order-column.hover tbody tr.even:hover>.sorting_3{background-color:#eee}.yasr table.dataTable.display tbody tr:hover.selected>.sorting_1,.yasr table.dataTable.display tbody tr.odd:hover.selected>.sorting_1,.yasr table.dataTable.display tbody tr.even:hover.selected>.sorting_1,.yasr table.dataTable.order-column.hover tbody tr:hover.selected>.so
 rting_1,.yasr table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_1,.yasr table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_1{background-color:#a1aec7}.yasr table.dataTable.display tbody tr:hover.selected>.sorting_2,.yasr table.dataTable.display tbody tr.odd:hover.selected>.sorting_2,.yasr table.dataTable.display tbody tr.even:hover.selected>.sorting_2,.yasr table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2,.yasr table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_2,.yasr table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_2{background-color:#a2afc8}.yasr table.dataTable.display tbody tr:hover.selected>.sorting_3,.yasr table.dataTable.display tbody tr.odd:hover.selected>.sorting_3,.yasr table.dataTable.display tbody tr.even:hover.selected>.sorting_3,.yasr table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3,.yasr table.dataTable.order-column.hover tbody tr.odd:hov
 er.selected>.sorting_3,.yasr table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_3{background-color:#a4b2cb}.yasr table.dataTable.no-footer{border-bottom:1px solid #111}.yasr table.dataTable.nowrap th,.yasr table.dataTable.nowrap td{white-space:nowrap}.yasr table.dataTable.compact thead th,.yasr table.dataTable.compact thead td{padding:5px 9px}.yasr table.dataTable.compact tfoot th,.yasr table.dataTable.compact tfoot td{padding:5px 9px 3px 9px}.yasr table.dataTable.compact tbody th,.yasr table.dataTable.compact tbody td{padding:4px 5px}.yasr table.dataTable th.dt-left,.yasr table.dataTable td.dt-left{text-align:left}.yasr table.dataTable th.dt-center,.yasr table.dataTable td.dt-center,.yasr table.dataTable td.dataTables_empty{text-align:center}.yasr table.dataTable th.dt-right,.yasr table.dataTable td.dt-right{text-align:right}.yasr table.dataTable th.dt-justify,.yasr table.dataTable td.dt-justify{text-align:justify}.yasr table.dataTable th.dt-nowrap,.yasr table
 .dataTable td.dt-nowrap{white-space:nowrap}.yasr table.dataTable thead th.dt-head-left,.yasr table.dataTable thead td.dt-head-left,.yasr table.dataTable tfoot th.dt-head-left,.yasr table.dataTable tfoot td.dt-head-left{text-align:left}.yasr table.dataTable thead th.dt-head-center,.yasr table.dataTable thead td.dt-head-center,.yasr table.dataTable tfoot th.dt-head-center,.yasr table.dataTable tfoot td.dt-head-center{text-align:center}.yasr table.dataTable thead th.dt-head-right,.yasr table.dataTable thead td.dt-head-right,.yasr table.dataTable tfoot th.dt-head-right,.yasr table.dataTable tfoot td.dt-head-right{text-align:right}.yasr table.dataTable thead th.dt-head-justify,.yasr table.dataTable thead td.dt-head-justify,.yasr table.dataTable tfoot th.dt-head-justify,.yasr table.dataTable tfoot td.dt-head-justify{text-align:justify}.yasr table.dataTable thead th.dt-head-nowrap,.yasr table.dataTable thead td.dt-head-nowrap,.yasr table.dataTable tfoot th.dt-head-nowrap,.yasr table.dataTa
 ble tfoot td.dt-head-nowrap{white-space:nowrap}.yasr table.dataTable tbody th.dt-body-left,.yasr table.dataTable tbody td.dt-body-left{text-align:left}.yasr table.dataTable tbody th.dt-body-center,.yasr table.dataTable tbody td.dt-body-center{text-align:center}.yasr table.dataTable tbody th.dt-body-right,.yasr table.dataTable tbody td.dt-body-right{text-align:right}.yasr table.dataTable tbody th.dt-body-justify,.yasr table.dataTable tbody td.dt-body-justify{text-align:justify}.yasr table.dataTable tbody th.dt-body-nowrap,.yasr table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}.yasr table.dataTable,.yasr table.dataTable th,.yasr table.dataTable td{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.yasr .dataTables_wrapper{position:relative;clear:both;;zoom:1}.yasr .dataTables_wrapper .dataTables_length{float:left}.yasr .dataTables_wrapper .dataTables_filter{float:right;text-align:right}.yasr .dataTables_wrapper .dataTables_filter input{margin-
 left:.5em}.yasr .dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:.755em}.yasr .dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:.25em}.yasr .dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:.5em 1em;margin-left:2px;text-align:center;text-decoration:none!important;cursor:pointer;;color:#333!important;border:1px solid transparent}.yasr .dataTables_wrapper .dataTables_paginate .paginate_button.current,.yasr .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333!important;border:1px solid #cacaca;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#fff),color-stop(100%,#dcdcdc));background:-webkit-linear-gradient(top,#fff 0,#dcdcdc 100%);background:-moz-linear-gradient(top,#fff 0,#dcdcdc 100%);background:-ms-linear-gradient(top,#fff 0,#dcdcdc 100%);background:-o-linear-gradient(top,#fff 0,#dcd
 cdc 100%);background:linear-gradient(to bottom,#fff 0,#dcdcdc 100%)}.yasr .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.yasr .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.yasr .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666!important;border:1px solid transparent;background:0 0;box-shadow:none}.yasr .dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:#fff!important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#585858),color-stop(100%,#111));background:-webkit-linear-gradient(top,#585858 0,#111 100%);background:-moz-linear-gradient(top,#585858 0,#111 100%);background:-ms-linear-gradient(top,#585858 0,#111 100%);background:-o-linear-gradient(top,#585858 0,#111 100%);background:linear-gradient(to bottom,#585858 0,#111 100%)}.yasr .dataTables_wrapper .dataTables_paginate .paginate_button:active{outl
 ine:0;background-color:#2b2b2b;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#2b2b2b),color-stop(100%,#0c0c0c));background:-webkit-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:-moz-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:-ms-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:-o-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:linear-gradient(to bottom,#2b2b2b 0,#0c0c0c 100%);box-shadow:inset 0 0 3px #111}.yasr .dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:#fff;background:-webkit-gradient(linear,left top,right top,color-stop(0%,rgba(255,255,255,0)),color-stop(25%,rgba(255,255,255,.9)),color-stop(75%,rgba(255,255,255,.9)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgb
 a(255,255,255,0) 100%);background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%)}.yasr .dataTables_wrapper .dataTables_length,.yasr .dataTables_wrapper .dataTables_filter,.yasr .dataTables_wrapper .dataTables_info,.yasr .dataTables_wrapper .dataTables_processing,.yasr .dataTables_wrapper .dataTables_paginate{color:#333}.yasr .dataTables_wrapper .dataTables_scroll{clear:both}.yasr .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{;-webkit-overflow-scrolling:touch}.yasr .dataTables_wrapper .dataTables
 _scroll div.dataTables_scrollBody th>div.dataTables_sizing,.yasr .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td>div.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}.yasr .dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.yasr .dataTables_wrapper.no-footer div.dataTables_scrollHead table,.yasr .dataTables_wrapper.no-footer div.dataTables_scrollBody table{border-bottom:none}.yasr .dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width:767px){.yasr .dataTables_wrapper .dataTables_info,.yasr .dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.yasr .dataTables_wrapper .dataTables_paginate{margin-top:.5em}}@media screen and (max-width:640px){.yasr .dataTables_wrapper .dataTables_length,.yasr .dataTables_wrapper .dataTables_filter{float:none;text-align:center}.yasr .dataTables_wrapper .dataTables_filter{margin-top:.5em}}.yas
 r table.pvtTable{font-family:arial;font-size:8pt;text-align:left;border-collapse:collapse}.yasr table.pvtTable tr th,.yasr table.pvtTable tr th{background-color:#e6EEEE;border:1px solid #CDCDCD;font-size:8pt;padding:5px}.yasr table.pvtTable .pvtColLabel{text-align:center}.yasr table.pvtTable .pvtTotalLabel{text-align:right}.yasr table.pvtTable tr td{color:#3D3D3D;padding:5px;background-color:#FFF;border:1px solid #CDCDCD;vertical-align:top;text-align:right}.yasr .pvtTotal,.yasr .pvtGrandTotal{font-weight:700}.yasr .pvtVals{text-align:center}.yasr .pvtAggregator{margin-bottom:5px}.yasr .pvtAxisContainer,.yasr .pvtVals{border:1px solid gray;background:#EEE;padding:5px;min-width:20px;min-height:20px}.yasr .pvtAxisContainer li{padding:8px 6px;list-style-type:none;cursor:move}.yasr .pvtAxisContainer li.pvtPlaceholder{-webkit-border-radius:5px;padding:3px 15px;-moz-border-radius:5px;border-radius:5px;border:1px dashed #aaa}.yasr .pvtAxisContainer li span.pvtAttr{background:#F3F3F3;border:
 1px solid #DEDEDE;padding:2px 5px;white-space:nowrap;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.yasr .pvtTriangle{cursor:pointer;color:grey}.yasr .pvtHorizList li{display:inline}.yasr .pvtVertList{vertical-align:top}.yasr .pvtFilteredAttribute{font-style:italic}.yasr .pvtFilterBox{z-index:100;width:280px;border:1px solid gray;background-color:#fff;position:absolute;padding:20px;text-align:center}.yasr .pvtFilterBox h4{margin:0}.yasr .pvtCheckContainer{text-align:left;overflow:scroll;width:100%;max-height:200px}.yasr .pvtCheckContainer p{margin:5px}.yasr .CodeMirror{font-family:monospace;height:300px}.yasr .CodeMirror-scroll{overflow:auto}.yasr .CodeMirror-lines{padding:4px 0}.yasr .CodeMirror pre{padding:0 4px}.yasr .CodeMirror-scrollbar-filler,.yasr .CodeMirror-gutter-filler{background-color:#fff}.yasr .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.yasr .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;t
 ext-align:right;color:#999;-moz-box-sizing:content-box;box-sizing:content-box}.yasr .CodeMirror-guttermarker{color:#000}.yasr .CodeMirror-guttermarker-subtle{color:#999}.yasr .CodeMirror div.CodeMirror-cursor{border-left:1px solid #000}.yasr .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.yasr .CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.yasr .CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.yasr .cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.yasr .cm-tab{display:inline-block;text-decoration:inherit}.yasr .CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.yasr .cm-s-default .cm-keyword{color:#708}.yasr .cm-s-default .cm-atom{color:#219}.yasr .cm-s-default .cm-number{color:#164}.yasr .cm-s-default .cm-def{color:#00f}.yasr .cm-s-default .cm-variable-2{color:#05a}.yasr .c
 m-s-default .cm-variable-3{color:#085}.yasr .cm-s-default .cm-comment{color:#a50}.yasr .cm-s-default .cm-string{color:#a11}.yasr .cm-s-default .cm-string-2{color:#f50}.yasr .cm-s-default .cm-meta{color:#555}.yasr .cm-s-default .cm-qualifier{color:#555}.yasr .cm-s-default .cm-builtin{color:#30a}.yasr .cm-s-default .cm-bracket{color:#997}.yasr .cm-s-default .cm-tag{color:#170}.yasr .cm-s-default .cm-attribute{color:#00c}.yasr .cm-s-default .cm-header{color:#00f}.yasr .cm-s-default .cm-quote{color:#090}.yasr .cm-s-default .cm-hr{color:#999}.yasr .cm-s-default .cm-link{color:#00c}.yasr .cm-negative{color:#d44}.yasr .cm-positive{color:#292}.yasr .cm-header,.yasr .cm-strong{font-weight:700}.yasr .cm-em{font-style:italic}.yasr .cm-link{text-decoration:underline}.yasr .cm-strikethrough{text-decoration:line-through}.yasr .cm-s-default .cm-error{color:red}.yasr .cm-invalidchar{color:red}.yasr div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}.yasr div.CodeMirror span.CodeMirror-nonmat
 chingbracket{color:#f22}.yasr .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.yasr .CodeMirror-activeline-background{background:#e8f2ff}.yasr .CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.yasr .CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative;-moz-box-sizing:content-box;box-sizing:content-box}.yasr .CodeMirror-sizer{position:relative;border-right:30px solid transparent;-moz-box-sizing:content-box;box-sizing:content-box}.yasr .CodeMirror-vscrollbar,.yasr .CodeMirror-hscrollbar,.yasr .CodeMirror-scrollbar-filler,.yasr .CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.yasr .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.yasr .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.yasr .CodeMirror-scrollbar-filler{right:0;bottom:0}.yasr .CodeMirror-gutter-filler{left:0;bottom:0}.yasr .CodeMirror-gutters{posit
 ion:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.yasr .CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;padding-bottom:30px;margin-bottom:-32px;display:inline-block;;}.yasr .CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%}.yasr .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.yasr .CodeMirror-lines{cursor:text;min-height:1px}.yasr .CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.yasr .CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.yasr .CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.yasr .CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.yasr .CodeMirror-wrap .CodeMirror-scroll{overflow-x:h
 idden}.yasr .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.yasr .CodeMirror-measure pre{position:static}.yasr .CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}.yasr div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.yasr .CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.yasr .CodeMirror-selected{background:#d9d9d9}.yasr .CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.yasr .CodeMirror-crosshair{cursor:crosshair}.yasr .cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.yasr .cm-force-border{padding-right:.1px}@media print{.yasr .CodeMirror div.CodeMirror-cursors{visibility:hidden}}.yasr .cm-tab-wrap-hack:after{content:''}.yasr span.CodeMirror-selectedtext{background:0 0}.yasr .CodeMirror-foldmarker{color:#00f;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.yasr .CodeMirror-f
 oldgutter{width:.7em}.yasr .CodeMirror-foldgutter-open,.yasr .CodeMirror-foldgutter-folded{cursor:pointer}.yasr .CodeMirror-foldgutter-open:after{content:"\25BE"}.yasr .CodeMirror-foldgutter-folded:after{content:"\25B8"}.yasr a{color:#428bca;text-decoration:none}.yasr a:hover,.yasr a:active{outline:0;color:#2a6496;text-decoration:underline}.yasr th{text-align:left}.yasr .yasr_header *{z-index:5;position:relative}.yasr .yasr_header>*{margin-left:6px}.yasr .yasr_btn{color:#333;border:1px solid transparent;background-color:#fff;border-color:#ccc;border-width:1px;display:inline-block;text-align:center;vertical-align:middle;cursor:pointer;white-space:nowrap;padding:6px 12px;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:button;overflow:visible;box-sizing:border-box}.yasr .yasr_btn.btn_icon{padding:4px 8px}.yasr .yasr_btn[disabled],.yasr .yasr_btn.disabled{cursor:default;opacity:.5;filter:alpha(opacity=50);-webkit-
 box-shadow:none;box-shadow:none}.yasr .yasr_btn:hover{outline:0;background-color:#ebebeb;border-color:#adadad}.yasr .yasr_btn:focus,.yasr .yasr_btn.selected{color:#fff;outline:0;background-color:#337ab7;border-color:#337ab7}.yasr .yasr_btn.btn_icon:focus{color:#333;border:1px solid transparent;background-color:#fff;border-color:#ccc}.yasr .yasr_downloadIcon div{height:15px;width:15px}.yasr .yasr_btnGroup{display:inline-block;vertical-align:middle}.yasr .yasr_btnGroup>button:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.yasr .yasr_btnGroup>button:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.yasr .yasr_btnGroup>button:not(:first-child):not(:last-child){border-radius:0}.yasr .yasr_btnGroup button+button{margin-left:-1px}.yasr .booleanResult{width:70px;margin:0 auto;vertical-align:middle}.yasr .booleanResult svg{margin-bottom:-10px;margin-right:7px}.yasr .errorResult{padding:10px}.yasr .errorResult span.excepti
 on{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;background-color:#d9534f}.yasr .errorResult pre{display:block;padding:10px;margin:10px 0 10px;font-size:13px;line-height:1.42857;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.yasr .yasr_results .CodeMirror{border:1px solid #d1d1d1;margin-top:5px;height:100%}.yasr .dataTables_wrapper .dataTables_length{float:right;margin-left:10px}.yasr .dataTables_wrapper .dataTables_length label,.yasr .dataTables_wrapper .dataTables_length select{vertical-align:middle}.yasr table.dataTable thead th{background:none!important;border-right:1px dotted gray;padding:7px 0}.yasr table.dataTable thead th:first-child,.yasr table.dataTable thead th:last-child{border-right:0}.yasr table.dataTable thead th span{margin-left:5px}.yasr table.dataTable td div{-ms-word-
 break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;padding:0 5px}.yasr .sortIcons{float:right;width:8px;height:13px;margin-right:10px}.yasr .pivotTable{margin-top:5px}.yasr .pivotTable>table{background-color:#fff}.yasr .pivotTable td.pvtAxisContainer,.yasr .pivotTable td.pvtVals{border:1px solid #ddd;background-color:transparent}.yasr .pivotTable li span.pvtAttr{background-color:#337ab7;color:#fff;padding:4px 7px}.yasr .pivotTable li span.pvtAttr svg{fill:#fff}.yasr .pivotTable li span.pvtAttr div{margin-left:6px;vertical-align:middle}.yasr .pivotTable .pvtCols{vertical-align:top}.yasr .pivotTable table.pvtTable tr th{background-color:#f2f2f2}.yasr .pivotTable table.pvtTable tr th.pvtAxisLabel{background-color:#337ab7;color:#fff}.yasr .pivotTable .containerHeader{margin-left:8px;margin-bottom:8px;font-style:italic;font-size:110%;color:#999;text-align:left}.yasr .pivotTable .pvtAttr .svgImg{width:14px;height
 :14px}.yasr .pivotTable .node{border:solid 1px #fff;font:10px sans-serif;line-height:12px;overflow:hidden;position:absolute;text-indent:2px}.yasr .openPivotGchart{float:right;position:relative;display:none;top:-38px;margin-bottom:-38px}.yasr .openGchartBtn{float:right;position:relative;top:-33px;margin-bottom:-33px}.yasr .gchartWrapper{width:100%;height:600px}.modal-dialog.google-visualization-charteditor-dialog{z-index:11;width:auto;margin:inherit}
\ No newline at end of file


[11/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasr.min.js.map
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasr.min.js.map b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasr.min.js.map
new file mode 100644
index 0000000..dd4748b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasr.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["node_modules/browserify/node_modules/browser-pack/_prelude.js","src/entry.js","lib/colResizable-1.4.js","lib/jquery.csv-0.71.js","node_modules/browserify/node_modules/events/events.js","node_modules/codemirror/addon/edit/matchbrackets.js","node_modules/codemirror/addon/fold/brace-fold.js","node_modules/codemirror/addon/fold/foldcode.js","node_modules/codemirror/addon/fold/foldgutter.js","node_modules/codemirror/addon/fold/xml-fold.js","node_modules/codemirror/mode/javascript/javascript.js","node_modules/codemirror/mode/xml/xml.js","node_modules/pivottable/dist/d3_renderers.js","node_modules/pivottable/dist/gchart_renderers.js","node_modules/yasgui-utils/node_modules/store/store.js","node_modules/yasgui-utils/package.json","node_modules/yasgui-utils/src/main.js","node_modules/yasgui-utils/src/storage.js","node_modules/yasgui-utils/src/svg.js","package.json","src/bindingsToCsv.js","src/boolean.js","src/defaults.js","src/error.js","src/gChartLoader.js","src/gch
 art.js","src/imgs.js","src/main.js","src/parsers/csv.js","src/parsers/dlv.js","src/parsers/json.js","src/parsers/tsv.js","src/parsers/wrapper.js","src/parsers/xml.js","src/pivot.js","src/rawRespon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ACA,IAAA,6CACA,IAAA,wCACA,IAAA,0CACA,MAAA,QACA,KAAA,wCACA,MAAA,MACA,KAAA,4CACA,MAAA,UACA,KAAA,wCACA,MAAA,WACA,SACA,MAAA,WAMA,eAAA,SAAA,EAAA,GACA,GAAA,MAAA,EACA,MAAA,KAEA,IAAA,MAAA,EAAA,MAAA,kBAAA,EAAA,MAAA,YAAA,EAAA,KAqBA,OAAA,EAAA,KAAA,OACA,EAAA,QAAA,cAAA,EAAA,EAAA,OAEA,EAAA,KAvBA,QAAA,EAAA,UACA,IAAA,yCACA,IAAA,2CACA,IAAA,uCACA,IAAA,2CACA,I
 AAA,wCACA,IAAA,8CACA,IAAA,yCACA,IAAA,6CACA,IAAA,wCACA,IAAA,0CACA,MAAA,QAAA,EAAA,MACA,KAAA,wCACA,IAAA,4CACA,IAAA,wCACA,MAAA,IAAA,MAAA,EAAA,MACA,SACA,MAAA,GAAA","file":"yasr.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})","//this is the entry-point for browserify.\n//the current browserify version does not support require-ing js files which are used as entry-point\n//this way, we can still require our main.js file\nmodule.exports = require('./main.js');","/**\n               _ _____           _          _     _      \n              | |  __ \\         (_)      
   | |   | |     \n      ___ ___ | | |__) |___  ___ _ ______ _| |__ | | ___ \n     / __/ _ \\| |  _  // _ \\/ __| |_  / _` | '_ \\| |/ _ \\\n    | (_| (_) | | | \\ \\  __/\\__ \\ |/ / (_| | |_) | |  __/\n     \\___\\___/|_|_|  \\_\\___||___/_/___\\__,_|_.__/|_|\\___|\n\t \n\tv 1.4 - a jQuery plugin by Alvaro Prieto Lauroba\n\t\n\tLicences: MIT & GPL\n\tFeel free to use or modify this plugin as far as my full name is kept\t\n\t\n\tIf you are going to use this plugin in production environments it is \n\tstrongly recomended to use its minified version: colResizable.min.js\n\n*/\n\nvar $ = (function(){try{return require('jquery')}catch(e){return window.jQuery}})();\t\n\tvar d = $(document); \t\t//window object\n\tvar h = $(\"head\");\t\t\t//head object\n\tvar drag = null;\t\t\t//reference to the current grip that is being dragged\n\tvar tables = [];\t\t\t//array of the already processed tables (table.id as key)\n\tvar\tcount = 0;\t\t\t\t//internal count to create unique IDs when needed.\
 t\n\t\n\t//common strings for minification\t(in the minified version there are plenty more)\n\tvar ID = \"id\";\t\n\tvar PX = \"px\";\n\tvar SIGNATURE =\"JColResizer\";\n\t\n\t//shortcuts\n\tvar I = parseInt;\n\tvar M = Math;\n\tvar ie = navigator.userAgent.indexOf('Trident/4.0')>0;\n\tvar S;\n\ttry{S = sessionStorage;}catch(e){}\t//Firefox crashes when executed as local file system\n\t\n\t//append required CSS rules  \n\th.append(\"<style type='text/css'>  .JColResizer{table-layout:fixed;} .JColResizer td, .JColResizer th{overflow:hidden;padding-left:0!important; padding-right:0!important;}  .JCLRgrips{ height:0px; position:relative;} .JCLRgrip{margin-left:-5px; position:absolute; z-index:5; } .JCLRgrip .JColResizer{position:absolute;background-color:red;filter:alpha(opacity=1);opacity:0;width:10px;height:100%;top:0px} .JCLRLastGrip{position:absolute; width:1px; } .JCLRgripDrag{ border-left:1px dotted black;\t}</style>\");\n\n\t\n\t/**\n\t * Function to allow column resizing for ta
 ble objects. It is the starting point to apply the plugin.\n\t * @param {DOM node} tb - refrence to the DOM table object to be enhanced\n\t * @param {Object} options\t- some customization values\n\t */\n\tvar init = function( tb, options){\t\n\t\tvar t = $(tb);\t\t\t\t\t\t\t\t\t\t//the table object is wrapped\n\t\tif(options.disable) return destroy(t);\t\t\t\t//the user is asking to destroy a previously colResized table\n\t\tvar\tid = t.id = t.attr(ID) || SIGNATURE+count++;\t//its id is obtained, if null new one is generated\t\t\n\t\tt.p = options.postbackSafe; \t\t\t\t\t\t//shortcut to detect postback safe \t\t\n\t\tif(!t.is(\"table\") || tables[id]) return; \t\t\t//if the object is not a table or if it was already processed then it is ignored.\n\t\tt.addClass(SIGNATURE).attr(ID, id).before('<div class=\"JCLRgrips\"/>');\t//the grips container object is added. Signature class forces table rendering in fixed-layout mode to prevent column's min-width\n\t\tt.opt = options; t.g = []; t
 .c = []; t.w = t.width(); t.gc = t.prev();\t//t.c and t.g are arrays of columns and grips respectively\t\t\t\t\n\t\tif(options.marginLeft) t.gc.css(\"marginLeft\", options.marginLeft);  \t//if the table contains margins, it must be specified\n\t\tif(options.marginRight) t.gc.css(\"marginRight\", options.marginRight);  \t//since there is no (direct) way to obtain margin values in its original units (%, em, ...)\n\t\tt.cs = I(ie? tb.cellSpacing || tb.currentStyle.borderSpacing :t.css('border-spacing'))||2;\t//table cellspacing (not even jQuery is fully cross-browser)\n\t\tt.b  = I(ie? tb.border || tb.currentStyle.borderLeftWidth :t.css('border-left-width'))||1;\t//outer border width (again cross-browser isues)\n\t\t// if(!(tb.style.width || tb.width)) t.width(t.width()); //I am not an IE fan at all, but it is a pitty that only IE has the currentStyle attribute working as expected. For this reason I can not check easily if the table has an explicit width or if it is rendered as \"auto\
 "\n\t\ttables[id] = t; \t//the table object is stored using its id as key\t\n\t\tcreateGrips(t);\t\t//grips are created\n\t\n\t};\n\n\n\t/**\n\t * This function allows to remove any enhancements performed by this plugin on a previously processed table.\n\t * @param {jQuery ref} t - table object\n\t */\n\tvar destroy = function(t){\n\t\tvar id=t.attr(ID), t=tables[id];\t\t//its table object is found\n\t\tif(!t||!t.is(\"table\")) return;\t\t\t//if none, then it wasnt processed\t \n\t\tt.removeClass(SIGNATURE).gc.remove();\t//class and grips are removed\n\t\tdelete tables[id];\t\t\t\t\t\t//clean up data\n\t};\n\n\n\t/**\n\t * Function to create all the grips associated with the table given by parameters \n\t * @param {jQuery ref} t - table object\n\t */\n\tvar createGrips = function(t){\t\n\t\n\t\tvar th = t.find(\">thead>tr>th,>thead>tr>td\");\t//if table headers are specified in its semantically correct tag, are obtained\n\t\tif(!th.length) th = t.find(\">tbody>tr:first>th,>tr:first>
 th,>tbody>tr:first>td, >tr:first>td\");\t //but headers can also be included in different ways\n\t\tt.cg = t.find(\"col\"); \t\t\t\t\t\t//a table can also contain a colgroup with col elements\t\t\n\t\tt.ln = th.length;\t\t\t\t\t\t\t//table length is stored\t\n\t\tif(t.p && S && S[t.id])memento(t,th);\t\t//if 'postbackSafe' is enabled and there is data for the current table, its coloumn layout is restored\n\t\tth.each(function(i){\t\t\t\t\t\t//iterate through the table column headers\t\t\t\n\t\t\tvar c = $(this); \t\t\t\t\t\t//jquery wrap for the current column\t\t\t\n\t\t\tvar g = $(t.gc.append('<div class=\"JCLRgrip\"></div>')[0].lastChild); //add the visual node to be used as grip\n\t\t\tg.t = t; g.i = i; g.c = c;\tc.w =c.width();\t\t//some values are stored in the grip's node data\n\t\t\tt.g.push(g); t.c.push(c);\t\t\t\t\t\t//the current grip and column are added to its table object\n\t\t\tc.width(c.w).removeAttr(\"width\");\t\t\t\t//the width of the column is converted into pixe
 l-based measurements\n\t\t\tif (i < t.ln-1) {\n\t\t\t\tg.bind('touchstart mousedown', onGripMouseDown).append(t.opt.gripInnerHtml).append('<div class=\"'+SIGNATURE+'\" style=\"cursor:'+t.opt.hoverCursor+'\"></div>'); //bind the mousedown event to start dragging \n\t\t\t} else g.addClass(\"JCLRLastGrip\").removeClass(\"JCLRgrip\");\t//the last grip is used only to store data\t\t\t\n\t\t\tg.data(SIGNATURE, {i:i, t:t.attr(ID)});\t\t\t\t\t\t//grip index and its table name are stored in the HTML \t\t\t\t\t\t\t\t\t\t\t\t\n\t\t}); \t\n\t\tt.cg.removeAttr(\"width\");\t//remove the width attribute from elements in the colgroup (in any)\n\t\tsyncGrips(t); \t\t\t\t//the grips are positioned according to the current table layout\t\t\t\n\t\t//there is a small problem, some cells in the table could contain dimension values interfering with the \n\t\t//width value set by this plugin. Those values are removed\n\t\tt.find('td, th').not(th).not('table th, table td').each(function(){  \n\t\t\t$(this).
 removeAttr('width');\t//the width attribute is removed from all table cells which are not nested in other tables and dont belong to the header\n\t\t});\t\t\n\n\t\t\n\t};\n\t\n\n\t/**\n\t * Function to allow the persistence of columns dimensions after a bro

<TRUNCATED>

[91/93] [abbrv] jena git commit: Format XML.

Posted by rv...@apache.org.
Format XML.

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

Branch: refs/heads/hadoop-rdf
Commit: 7e256560e11940ab0a1769945b6fa8781c4aec24
Parents: 2941cf7
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 12 20:23:08 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 12 20:23:08 2015 +0000

----------------------------------------------------------------------
 .../test/resources/org/apache/jena/iri/test.xml | 18422 ++++++++---------
 1 file changed, 9211 insertions(+), 9211 deletions(-)
----------------------------------------------------------------------



[13/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js.map
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js.map b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js.map
new file mode 100644
index 0000000..4738eb3
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["node_modules/browserify/node_modules/browser-pack/_prelude.js","src/entry.js","lib/deparam.js","lib/flint.js","lib/trie.js","node_modules/codemirror/addon/display/fullscreen.js","node_modules/codemirror/addon/edit/matchbrackets.js","node_modules/codemirror/addon/fold/brace-fold.js","node_modules/codemirror/addon/fold/foldcode.js","node_modules/codemirror/addon/fold/foldgutter.js","node_modules/codemirror/addon/fold/xml-fold.js","node_modules/codemirror/addon/hint/show-hint.js","node_modules/codemirror/addon/runmode/runmode.js","node_modules/codemirror/addon/search/searchcursor.js","node_modules/yasgui-utils/node_modules/store/store.js","node_modules/yasgui-utils/package.json","node_modules/yasgui-utils/src/main.js","node_modules/yasgui-utils/src/storage.js","node_modules/yasgui-utils/src/svg.js","package.json","src/autocompleters/autocompleterBase.js","src/autocompleters/classes.js","src/autocompleters/prefixes.js","src/autocompleters/properties.js","src/aut
 ocompleters/utils.js","src/autocompleters/variables.js","src/defaults.js","src/imgs.js","src/main.js","src/prefixUtils.js","src/sparql.js","src/tokenUtils.js","src/tooltip.js","src/utils.js"],"names":[],"mappings":"CAAA,SAAA,GAAA,GAAA,gBAAA,UAAA,mBAAA,QAAA,OAAA,QAAA,QAAA,IAAA,kBAAA,SAAA,OAAA,IAAA,UAAA,OAAA,CAAA,GAAA,EAAA,oBAAA,QAAA,EAAA,OAAA,mBAAA,QAAA,EAAA,OAAA,mBAAA,QAAA,EAAA,MAAA,EAAA,MAAA,MAAA,WAAA,GAAA,EAAA,OAAA,SAAA,GAAA,EAAA,EAAA,GAAA,QAAA,GAAA,EAAA,GAAA,IAAA,EAAA,GAAA,CAAA,IAAA,EAAA,GAAA,CAAA,GAAA,GAAA,kBAAA,UAAA,OAAA,KAAA,GAAA,EAAA,MAAA,GAAA,GAAA,EAAA,IAAA,EAAA,MAAA,GAAA,GAAA,EAAA,IAAA,GAAA,GAAA,OAAA,uBAAA,EAAA,IAAA,MAAA,GAAA,KAAA,mBAAA,EAAA,GAAA,GAAA,EAAA,IAAA,WAAA,GAAA,GAAA,GAAA,KAAA,EAAA,QAAA,SAAA,GAAA,GAAA,GAAA,EAAA,GAAA,GAAA,EAAA,OAAA,GA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A,IAGA,IADA,GAAA,GAAA,EAAA,OAAA,EAAA,GACA,GAAA,IAAA,EAEA,GAAA,EAAA,MAAA,IAAA,EACA,GAAA,CAAA,YAEA,CAEA,GAAA,GAAA,EAAA,EAAA,MAAA,GACA,IAAA,EAAA,CACA,GAAA,IAAA,GAGA,KAAA,GAAA,IAAA,EACA,CACA,GAAA,GAAA,EAAA,EAAA,MAAA,GACA,KACA,GAAA,GAGA,MAAA,GAAA,EAAA,WA9tIA,GAKA,IALA,EAAA,YAOA,sBACA,MAAA,oBAAA,sBACA,MACA,OACA,OACA,QACA,QACA,mBACA,KAAA,iBAAA,mBACA,QACA,mBACA,KAAA,iBAAA,mBACA,OACA,OACA,OACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,eACA,KAAA,aAAA,eACA,OACA,OACA,OACA,OACA,SACA,OACA,YACA,SACA,WACA,UACA,QACA,WACA,yBACA,KAAA,uBAAA,yBACA,OACA,OACA,OACA,OACA,QACA,QACA,OACA,WACA,QACA,SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,oBACA,gDACA,KAAA,8CAAA,gDACA,OACA,OACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,2BACA,KAAA,yBAAA,2BACA,OACA,OACA,OACA,SACA,OACA,YACA,SACA,WACA,UACA,QACA,WACA,8BACA,OAAA,4BAAA,8BACA,QACA,QACA,OACA,OACA,OACA,WACA,QACA,SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,w
 BACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,mBACA,OACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,8CACA,KAAA,4CAAA,8CACA,UAAA,4CAAA,8CACA,OAAA,4CAAA,8CACA,OAAA,4CAAA,8CACA,SAAA,4CAAA,8CACA,QAAA,4CAAA,8CACA,MAAA,4CAAA,8CACA,QAAA,4CAAA,8CACA,QACA,0CACA,OAAA,wCAAA,0CACA,QACA,6BACA,KAAA,2BAAA,6BACA,QACA,qBACA,KAAA,mBAAA,qBACA,OACA,OACA,OACA,QACA,QACA,OACA,WACA,QACA,SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,oBACA,kCACA,MAAA,gCAAA,kCACA,MACA,OACA,OACA,QACA,mBACA,OAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,MAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,UAAA,iBAAA,mBACA,UAAA,iBAAA,mBACA,iBAAA,iBAAA,mBACA,iBAAA,iBAAA,mBACA,sBAAA,iBAAA,mBACA,sBAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,QAAA,iBAAA,mBACA,kBAAA,iBAAA,mBACA,kBAAA,iBAAA,mBACA,iBAAA,iBAAA,mBACA,kBAAA,iBAAA,mBACA,kBAAA,iBAAA,mBACA,iBAAA,iBAAA,mBACA,OACA,QACA,kBACA,MAAA,gBAAA,kBACA,SACA,QACA,0BACA,MAAA,wBAAA,0BACA,SACA,UACA,SACA,SACA,UACA,SACA,OACA,UACA,MACA,cACA,KAAA,YAAA,cACA,KAAA,
 YAAA,cACA,MAAA,YAAA,cACA,MAAA,YAAA,cACA,KAAA,YAAA,cACA,SAAA,YAAA,cACA,MAAA,YAAA,cACA,OAAA,YAAA,cACA,kBAAA,YAAA,cACA,MAAA,YAAA,cACA,UAAA,YAAA,cACA,UAAA,YAAA,cACA,iBAAA,YAAA,cACA,iBAAA,YAAA,cACA,sBAAA,YAAA,cACA,sBAAA,YAAA,cACA,SAAA,YAAA,cACA,SAAA,YAAA,cACA,QAAA,YAAA,cACA,kBAAA,YAAA,cACA,kBAAA,YAAA,cACA,iBAAA,YAAA,cACA,kBAAA,YAAA,cACA,kBAAA,YAAA,cACA,iBAAA,YAAA,cACA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iBAAA,mBACA,OAAA,iBAAA,mBACA,gBAAA,iBAAA,mBACA,UAAA,iBAAA,mBACA,WAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,WAAA,iBAAA,mBACA,UAAA,iBAAA,mBACA,MAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,KAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,UAAA,iBAAA,mBACA,IAAA,iBAAA,mBACA,KAAA,iBAAA,mBACA,MAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,KAAA,iBAAA,mBACA,MAAA,iBAAA,mBACA,QAAA,iBAAA,mBACA,QAAA,iBAAA,mBACA,QAAA,iBAAA,mBACA,UAAA,iBAAA,mBACA,IAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,UAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,WAAA,iBAAA,mBACA,WAAA,iBAAA,mBACA,QAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,OAAA,iBAAA,mBACA,QAAA,iBAAA,mBACA,KAAA,iBAAA,mBACA,SAAA,iBAAA,mBACA,UAAA,iBAAA,mBACA,UAAA,iBAAA,oBACA,gBACA,MAAA,cAAA,gBACA,MAAA,cAAA,gBACA,SAAA,cAAA,gBACA,UAAA,cAAA,gBACA,UAAA,cAAA,iBACA,MACA,KAAA,KACA,QACA,QACA,OACA,OACA,OACA,WACA,QACA,SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA
 ,oBACA,mBACA,SACA,OACA,YACA,SACA,WACA,UACA,QACA,UACA,QACA,aACA,UAAA,YACA,OACA,OACA,OACA,QACA,QACA,OACA,OACA,QACA,eACA,YACA,SACA,OACA,OACA,SACA,QACA,OACA,QACA,SACA,SACA,UACA,UACA,SACA,SACA,kBACA,YACA,aACA,WACA,aACA,YACA,QACA,SACA,OACA,SACA,WACA,WACA,YACA,MACA,OACA,QACA,WACA,OACA,QACA,UACA,UACA,UACA,YACA,MACA,WACA,SACA,YACA,SACA,SACA,WACA,aACA,aACA,QACA,SACA,SACA,OACA,OACA,OACA,OACA,UACA,gBACA,UACA,WACA,SACA,UACA,OACA,WACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,mBACA,YACA,YACA,QACA,UACA,OAAA,SACA,WACA,YACA,aACA,WACA,QAAA,UACA,QACA,QACA,WACA,YACA,aACA,aACA,QAAA,UACA,WACA,YACA,aACA,aACA,QAAA,UACA,SACA,WACA,SACA,QACA,aACA,QAAA,UACA,UACA,aACA,QAAA,UACA,WACA,SACA,WACA,YACA,aACA,UACA,OAAA,SACA,QACA,mBACA,KAAA,kBACA,QACA,0BACA,KAAA,yBACA,QACA,sBACA,KAAA,qBACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,yBACA,KAAA,wBACA,OACA,UACA,2BACA,KAAA,0BACA,QACA,eACA,KAAA,cACA,MACA,aACA,IAAA,YACA,QACA,oBACA,MAAA,mBACA,OACA,MACA,2CACA,MAAA,0CACA,MAAA,0CACA,KAAA,0CACA,GAAA,0
 CACA,KAAA,0CACA,KAAA,0CACA,SAAA,0CACA,UAAA,0CACA,UAAA,0CACA,OACA,OACA,OACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,qDACA,GAAA,oDACA,KAAA,oDACA,SAAA,oDACA,UAAA,oDACA,UAAA,oDACA,QACA,0BACA,QAAA,yBACA,QAAA,yBACA,MAAA,yBACA,OAAA,yBACA,MAAA,yBACA,KAAA,yBACA,MAAA,yBACA,MAAA,yBACA,QAAA,yBACA,MAAA,yBACA,MACA,sBACA,GAAA,qBACA,MAAA,qBACA,MAAA,qBACA,SAAA,qBACA,UAAA,qBACA,UAAA,qBACA,OACA,OACA,OACA,OACA,SACA,OACA,YACA,SACA,WACA,UACA,QACA,WACA,YACA,KAAA,WACA,KAAA,WACA,MACA,OACA,OACA,QACA,QACA,OACA,QACA,OACA,OACA,QACA,QACA,MACA,OACA,OACA,OACA,oBACA,oBACA,mBACA,oBACA,oBACA,mBACA,OACA,OACA,QACA,aACA,MAAA,YACA,KACA,aACA,YACA,OACA,UACA,UACA,UACA,QACA,SACA,QACA,OACA,QACA,QACA,UACA,QACA,WACA,qBACA,MAAA,oBACA,MAAA,oBACA,KAAA,oBACA,KAAA,oBACA,KAAA,oBACA,SAAA,oBACA,MAAA,oBACA,OAAA,oBACA,kBAAA,oBACA,MAAA,oBACA,UAAA,oBACA,UAAA,oBACA,iBAAA,oBACA,iBAAA,oBACA,sBAAA,oBACA,sBAAA,oBACA,SAAA,oBACA,SAAA,oBACA,QAAA,oBACA,kBAAA,oBACA,kBAAA,oBACA,iBAAA,oBACA,kBAAA,oBACA,kBAAA,oBACA,iBAAA,oBACA,QACA,gBACA,OAAA,eACA
 ,UACA,SACA,UACA,SACA,UACA,KACA,QACA,iBACA,QAAA,gBACA,UACA,SACA,UACA,SACA,KACA,QACA,iBACA,QAAA,gBACA,SACA,UACA,gBACA,OAAA,eACA,UACA,KACA,QACA,uBACA,OAAA,sBACA,QAAA,sBACA,UACA,KACA,QACA,iBACA,QAAA,gBACA,UACA,KACA,QACA,2BACA,UAAA,0BACA,SAAA,0BACA,OACA,OACA,QACA,SACA,8BACA,SAAA,6BACA,MAAA,6BACA,SACA,WACA,QACA,SACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,mBACA,KACA,QACA,QACA,OACA,OACA,OACA,OACA,OACA,OACA,MACA,OACA,QACA,QACA,OACA,QACA,OACA,OACA,QACA,QACA,MACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,oBACA,QACA,OACA,SACA,OACA,YACA,SACA,WACA,UACA,QACA,WACA,kDACA,KAAA,iDACA,KAAA,iDACA,OACA,OACA,oBACA,oBACA,mBACA,oBACA,oBACA,mBACA,MACA,OACA,OACA,QACA,QACA,OACA,QACA,OACA,OACA,QACA,QACA,MACA,OACA,QACA,6LACA,KAAA,4LACA,MAAA,4LACA,KAAA,4LACA,KAAA,4LACA,MAAA,4LACA,MAAA,4LACA,IAAA,4LACA,KAAA,4LACA,MACA,OACA,OACA,QACA,QACA,QACA,gBACA,OAAA,eACA,UACA,SACA,UACA,KACA,QACA,YACA,KAAA,WACA,KAAA,WACA,KAAA,WACA,KAAA,WACA,OACA,OACA,OACA,OACA,OACA,QACA,QACA,OACA,WACA,QACA,
 SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,oBACA,iBACA,MAAA,gBACA,MAAA,gBACA,KAAA,gBACA,KAAA,gBACA,KAAA,gBACA,SAAA,gBACA,MAAA,gBACA,OAAA,gBACA,kBAAA,gBACA,MAAA,gBACA,UAAA,gBACA,UAAA,gBACA,iBAAA,gBACA,iBAAA,gBACA,sBAAA,gBACA,sBAAA,gBACA,SAAA,gBACA,SAAA,gBACA,QAAA,gBACA,kBAAA,gBACA,kBAAA,gBACA,iBAAA,gBACA,kBAAA,gBACA,kBAAA,gBACA,iBAAA,gBACA,OACA,YACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,oBACA,MAAA,mBACA,MAAA,mBACA,KAAA,mBACA,KAAA,mBACA,KAAA,mBACA,SAAA,mBACA,MAAA,mBACA,OAAA,mBACA,kBAAA,mBACA,MAAA,mBACA,UAAA,mBACA,UAAA,mBACA,iBAAA,mBACA,iBAAA,mBACA,sBAAA,mBACA,sBAAA,mBACA,SAAA,mBACA,SAAA,mBACA,QAAA,mBACA,kBAAA,mBACA,kBAAA,mBACA,iBAAA,mBACA,kBAAA,mBACA,kBAAA,mBACA,iBAAA,mBACA,OACA,UACA,gBACA,OAAA,eACA,KAAA,eACA,SACA,UACA,SACA,SACA,UACA,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mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,oBACA,cACA,OACA,SACA,QACA,QACA,OACA,OACA,OACA,WACA,QACA,SACA,oBACA,QACA,YACA,YACA,mBACA,mBACA,wBACA,wBACA,WACA,WACA,UACA,oBACA,oBACA,mBACA,oBACA,oBACA,oBACA,MACA,MAAA,OAAA,YAAA,gBACA,YACA,QAAA,SAAA,sBACA,YACA,KAAA,2BACA,KAAA,2BACA,KAAA,2BACA,MAAA,2BACA,MAAA,2BACA,KAAA,2BACA,K
 AAA,2BACA,MAAA,2BACA,aAAA,2BACA,UAAA,2BACA,OAAA,2BACA,KAAA,2BACA,KAAA,2BACA,OAAA,2BACA,MAAA,2BACA,KAAA,2BACA,MAAA,2BACA,OAAA,2BACA,OAAA,2BACA,QAAA,2BACA,QAAA,2BACA,OAAA,2BACA,OAAA,2BACA,gBAAA,2BACA,UAAA,2BACA,WAAA,2BACA,SAAA,2BACA,WAAA,2BACA,UAAA,2BACA,MAAA,2BACA,OAAA,2BACA,KAAA,2BACA,OAAA,2BACA,SAAA,2BACA,SAAA,2BACA,UAAA,2BACA,IAAA,2BACA,KAAA,2BACA,MAAA,2BACA,SAAA,2BACA,KAAA,2BACA,MAAA,2BACA,QAAA,2BACA,QAAA,2BACA,QAAA,2BACA,UAAA,2BACA,IAAA,2BACA,SAAA,2BACA,OAAA,2BACA,UAAA,2BACA,OAAA,2BACA,OAAA,2BACA,SAAA,2BACA,WAAA,2BACA,WAAA,2BACA,MAAA,2BACA,OAAA,2BACA,OAAA,2BACA,KAAA,2BACA,KAAA,2BACA,KAAA,2BACA,KAAA,2BACA,QAAA,2BACA,cAAA,2BACA,QAAA,2BACA,SAAA,2BACA,OAAA,2BACA,QAAA,2BACA,KAAA,2BACA,SAAA,2BACA,iBAAA,2BACA,iBAAA,2BACA,sBAAA,2BACA,sBAAA,2BACA,SAAA,2BACA,SAAA,2BACA,QAAA,2BACA,kBAAA,2BACA,kBAAA,2BACA,iBAAA,2BACA,kBAAA,2BACA,kBAAA,2BACA,iBAAA,2BACA,UAAA,2BACA,UAAA,4BACA,gBACA,KAAA,OACA,KAAA,IAAA,aAAA,kBAAA,MACA,QACA,QAAA,SAAA,eACA,cACA,SAAA,SAAA,WACA,UAAA,SAAA,WACA,UAAA,SAAA,YACA,mBACA,
 OAAA,QAAA,cAAA,sBACA,WACA,MAAA,aACA,MAAA,aACA,KAAA,aACA,SAAA,aACA,MAAA,aACA,OAAA,aACA,kBAAA,aACA,MAAA,aACA,UAAA,aACA,UAAA,aACA,iBAAA,aACA,iBAAA,aACA,sBAAA,aACA,sBAAA,aACA,SAAA,aACA,SAAA,aACA,QAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,aACA,KAAA,eACA,KAAA,gBACA,eACA,MAAA,aACA,MAAA,aACA,KAAA,aACA,SAAA,aACA,MAAA,aACA,OAAA,aACA,kBAAA,aACA,MAAA,aACA,UAAA,aACA,UAAA,aACA,iBAAA,aACA,iBAAA,aACA,sBAAA,aACA,sBAAA,aACA,SAAA,aACA,SAAA,aACA,QAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,aACA,KAAA,mBACA,KAAA,oBACA,gBACA,SAAA,WACA,SAAA,SAAA,UACA,UAAA,SAAA,UACA,UAAA,SAAA,UACA,OAAA,SAAA,WACA,wBACA,KAAA,4BACA,UAAA,wBACA,OAAA,qBACA,OAAA,qBACA,SAAA,uBACA,QAAA,UACA,MAAA,QACA,QAAA,eACA,UACA,OAAA,QAAA,WACA,aACA,OAAA,YACA,SAAA,WACA,OAAA,SACA,KAAA,QACA,WACA,SAAA,UACA,UAAA,UACA,UAAA,UACA,iBAAA,cACA,iBAAA,cACA,sBAAA,cACA,sBAAA,cACA,SAAA,kBACA,SAAA,kBACA,QAAA,kBACA,kBAAA,kBACA,kBAAA,kBACA,iBAAA,kBACA,k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sBACA,MAAA,sBACA,SAAA,sBACA,KAAA,sBACA,MAAA,sBACA,QAAA,sBACA,QAAA,sBACA,QAAA,sBACA,UAAA,sBACA,IAAA,sBACA,SAAA,sBACA,OAAA,sBACA,UAAA,sBACA,OAAA,sBACA,OAAA,sBACA,SAAA,sBACA,WAAA,sBACA,WAAA,sBACA,MAAA,sBACA,OAAA,sBACA,OAAA,sBACA,KAAA,sBACA,KAAA,sBACA,KAAA,sBACA,KAAA,sBACA,QAAA,sBACA,cAAA,sBACA,QAAA,sBACA,SAAA,sBACA,OAAA,sBACA,QAAA,sBACA,KAAA,sBACA,SAAA,sBACA,iBAAA,sBACA,iBAAA,sBACA,sBAAA,sBACA,sBAAA,sBACA,SAAA,sBACA,SAAA,sBACA,QAAA,sBACA,kBAAA,sBACA,kBAAA,sBACA,iBAAA,sBACA,kBAAA,sBACA,kBAAA,sBACA,iBAAA,sBACA,UAAA,sBACA,UAAA,uBACA,gBACA,SAAA,0BACA,SAAA,0BACA,QAAA,0BACA,kBAAA,0BACA,kBAAA,0BACA,iBAAA,0BACA,kBAAA,0BACA,kBAAA,
 0BACA,iBAAA,2BACA,wBACA,kBAAA,oBACA,kBAAA,oBACA,iBAAA,oBACA,wBACA,kBAAA,oBACA,kBAAA,oBACA,iBAAA,oBACA,wBACA,SAAA,WACA,SAAA,WACA,QAAA,WACA,QACA,KAAA,aACA,KAAA,aACA,MAAA,aACA,MAAA,aACA,KAAA,aACA,SAAA,aACA,MAAA,aACA,OAAA,aACA,kBAAA,aACA,MAAA,aACA,UAAA,aACA,UAAA,aACA,iBAAA,aACA,iBAAA,aACA,sBAAA,aACA,sBAAA,aACA,SAAA,aACA,SAAA,aACA,QAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,aACA,kBAAA,aACA,kBAAA,aACA,iBAAA,cACA,YACA,KAAA,SAAA,eACA,KAAA,SAAA,eACA,MAAA,SAAA,eACA,MAAA,SAAA,eACA,KAAA,SAAA,eACA,SAAA,SAAA,eACA,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MAAA,cACA,KAAA,cACA,KAAA,cACA,MAAA,cACA,aAAA,cACA,UAAA,cACA,OAAA,cACA,KAAA,cACA,KAAA,cACA,OAAA,cACA,MAAA,cACA,KAAA,cACA,MAAA,cACA,OAAA,cACA,OAAA,cACA,QAAA,cACA,QAAA,cACA,OAAA,cACA,OAAA,cACA,gBAAA,cACA,UAAA,cACA,WAAA,cACA,SAAA,cACA,WAAA,cACA,UAAA,cACA,MAAA,cACA,OAAA,cACA,KAAA,cACA,OAAA,cACA,SAAA,cACA,SAAA,cACA,UAAA,cACA,IAAA,cACA,KAAA,cACA,MAAA,cACA,SAAA,cACA,KAAA,cACA,MAAA,cACA,QAAA,cACA,Q
 AAA,cACA,QAAA,cACA,UAAA,cACA,IAAA,cACA,SAAA,cACA,OAAA,cACA,UAAA,cACA,OAAA,cACA,OAAA,cACA,SAAA,cACA,WAAA,cACA,WAAA,cACA,MAAA,cACA,OAAA,cACA,OAAA,cACA,KAAA,cACA,KAAA,cACA,KAAA,cACA,KAAA,cACA,QAAA,cACA,cAAA,cACA,QAAA,cACA,SAAA,cACA,OAAA,cACA,QAAA,cACA,KAAA,cACA,SAAA,cACA,iBAAA,cACA,iBAAA,cACA,sBAAA,cACA,sBAAA,cACA,SAAA,cACA,SAAA,cACA,QAAA,cACA,kBAAA,cACA,kBAAA,cACA,iBAAA,cACA,kBAAA,cACA,kBAAA,cACA,iBAAA,cACA,UAAA,cACA,UAAA,eACA,+CACA,KAAA,uCACA,MAAA,uCACA,MAAA,uCACA,KAAA,MACA,wBACA,MAAA,gBACA,MAAA,gBACA,SAAA,gBACA,UAAA,gBACA,UAAA,gBACA,KAAA,MACA,kBACA,KAAA,OACA,MAAA,SACA,0BACA,UAAA,YACA,SAAA,YACA,6BACA,SAAA,WACA,MAAA,gBACA,yBACA,KAAA,OACA,KAAA,gBACA,oCACA,KAAA,0BACA,KAAA,QACA,+BACA,KAAA,qBACA,KAAA,QACA,iDACA,KAAA,uBACA,KAAA,wBACA,wKACA,KAAA,gCACA,KAAA,gCACA,kBAAA,wGACA,kBAAA,wGACA,iBAAA,wGACA,kBAAA,wGACA,kBAAA,wGACA,iBAAA,yGACA,mCACA,KAAA,2BACA,KAAA,MACA,4LACA,KAAA,yBACA,MAAA,0BACA,KAAA,yBACA,KAAA,yBACA,MAAA,0BACA,MAAA,0BACA,IAAA,uBACA,KAAA,4BACA,sIACA,KAAA,mEACA,OAAA,gEACA,MAAA,iEACA,
 mDACA,QAAA,gCACA,QAAA,iBACA,iEACA,SAAA,6CACA,KAAA,kBACA,6CACA,SAAA,sBACA,UAAA,sBACA,UAAA,sBACA,OAAA,qBACA,yCACA,MAAA,oBACA,MAAA,oBACA,KAAA,kBACA,KAAA,mBACA,+BACA,SAAA,UACA,UAAA,UACA,UAAA,UACA,OAAA,mBACA,kBACA,SAAA,UACA,UAAA,UACA,UAAA,UACA,GAAA,MACA,uDACA,kBAAA,0BACA,kBAAA,0BACA,iBAAA,0BACA,kBAAA,0BACA,kBAAA,0BACA,iBAAA,2BACA,4BACA,WAAA,YACA,UAAA,YACA,KAAA,YACA,QAAA,YACA,QAAA,aACA,QAAA,aACA,MAAA,aACA,OAAA,aACA,MAAA,aACA,KAAA,aACA,MAAA,aACA,MAAA,aACA,QAAA,aACA,MAAA,aACA,GAAA,cACA,2DACA,QAAA,eACA,WAAA,kBACA,UAAA,iBACA,KAAA,aACA,wCACA,QAAA,aACA,KAAA,wBACA,UAAA,wBACA,OAAA,wBACA,OAAA,wBACA,SAAA,wBACA,QAAA,wBACA,MAAA,wBACA,QAAA,wBACA,MAAA,wBACA,MAAA,wBACA,KAAA,wBACA,KAAA,wBACA,KAAA,wBACA,SAAA,wBACA,MAAA,wBACA,OAAA,wBACA,kBAAA,wBACA,MAAA,wBACA,UAAA,wBACA,UAAA,wBACA,iBAAA,wBACA,iBAAA,wBACA,sBAAA,wBACA,sBAAA,wBACA,SAAA,wBACA,SAAA,wBACA,QAAA,wBACA,kBAAA,wBACA,kBAAA,wBACA,iBAAA,wBACA,kBAAA,wBACA,kBAAA,wBACA,iBAAA,wBACA,KAAA,yBACA,sCACA,MAAA,OACA,MAAA,OACA,KAAA,6BACA,6BACA,KAAA,YACA,GAAA,YACA,KA
 AA,YACA,KAAA,YACA,SAAA,YACA,UAAA,YACA,UAAA,YACA,MAAA,cACA,MAAA,eACA,uBACA,KAAA,KACA,SAAA,gBACA,aACA,OAAA,QAAA,KAAA,oBACA,gBACA,KAAA,iBAAA,wBACA,MAAA,iBAAA,wBACA,KAAA,cACA,KAAA,cACA,MAAA,cACA,aAAA,cACA,UAAA,cACA,OAAA,cACA,KAAA,cACA,KAAA,cACA,OAAA,cACA,MAAA,cACA,KAAA,cACA,MAAA,cACA,OAAA,cACA,OAAA,cACA,QAAA,cACA,QAAA,cACA,OAAA,cACA,OAAA,cACA,gBAAA,cACA,UAAA,cACA,WAAA,cACA,SAAA,cACA,WAAA,cACA,UAAA,cACA,MAAA,cACA,OAAA,cACA,KAAA,cACA,OAAA,cACA,SAAA,cACA,SAAA,cACA,UAAA,cACA,IAAA,cACA,KAAA,cACA,MAAA,cACA,SAAA,cACA,KAAA,cACA,MAAA,cACA,QAAA,cACA,QAAA,cACA,QAAA,cACA,UAAA,cACA,IAAA,cACA,SAAA,cACA,OAAA,cACA,UAAA,cACA,OAAA,cACA,OAAA,cACA,SAAA,cACA,WAAA,cACA,WAAA,cACA,QAAA,cACA,SAAA,cACA,OAAA,cACA,QAAA,cACA,KAAA,cACA,SAAA,cACA,UAAA,cACA,UAAA,cACA,MAAA,OACA,MAAA,QACA,MACA,KAAA,mBACA,GAAA,mBACA,KAAA,mBACA,KAAA,mBACA,SAAA,mBACA,UAAA,mBACA,UAAA,oBACA,iBACA,KAAA,eAAA,qBACA,GAAA,eAAA,qBACA,KAAA,eAAA,qBACA,KAAA,eAAA,qBACA,SAAA,eAAA,qBACA,UAAA,eAAA,qBACA,UAAA,eAAA,sBACA,SACA,GAAA,cAAA,YACA,KAAA,cAAA,YACA,
 KAAA,cAAA,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wBACA,KAAA,wBACA,MAAA,wBACA,aAAA,wBACA,UAAA,wBACA,OAAA,wBACA,KAAA,wBACA,KAAA,wBACA,OAAA,wBACA,MAAA,wBACA,KAAA,wBACA,MAAA,wBACA,OAAA,wBACA,OAAA,wBACA,QAAA,wBACA,QAAA,w
 BACA,OAAA,wBACA,OAAA,wBACA,gBAAA,wBACA,UAAA,wBACA,WAAA,wBACA,SAAA,wBACA,WAAA,wBACA,UAAA,wBACA,MAAA,wBACA,OAAA,wBACA,KAAA,wBACA,OAAA,wBACA,SAAA,wBACA,SAAA,wBACA,UAAA,wBACA,IAAA,wBACA,KAAA,wBACA,MAAA,wBACA,SAAA,wBACA,KAAA,wBACA,MAAA,wBACA,QAAA,wBACA,QAAA,wBACA,QAAA,wBACA,UAAA,wBACA,IAAA,wBACA,SAAA,wBACA,OAAA,wBACA,UAAA,wBACA,OAAA,wBACA,OAAA,wBACA,SAAA,wBACA,WAAA,wBACA,WAAA,wBACA,MAAA,wBACA,OAAA,wBACA,OAAA,wBACA,KAAA,wBACA,KAAA,wBACA,KAAA,wBACA,KAAA,wBACA,QAAA,wBACA,cAAA,wBACA,QAAA,wBACA,SAAA,wBACA,OAAA,wBACA,QAAA,wBACA,KAAA,wBACA,SAAA,wBACA,iBAAA,wBACA,iBAAA,wBACA,sBAAA,wBACA,sBAAA,wBACA,SAAA,wBACA,SAAA,wBACA,QAAA,wBACA,kBAAA,wBACA,kBAAA,wBACA,iBAAA,wBACA,kBAAA,wBACA,kBAAA,wBACA,iBAAA,wBACA,UAAA,wBACA,UAAA,yBACA,cACA,QAAA,SAAA,aACA,KACA,QACA,OACA,MAAA,QACA,MAAA,SACA,aACA,MAAA,OACA,MAAA,OACA,SAAA,UACA,UAAA,UACA,UAAA,WACA,WACA,MAAA,OACA,MAAA,OACA,KAAA,aACA,SAAA,aACA,MAAA,aACA,OAAA,aACA,kBAAA,aACA,MAAA,aACA,UAAA,aACA,UAAA,aACA,iBAAA,aACA,iBAAA,aACA,sBAA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AA,EAAA,MAAA,aAAA,OACA,IAAA,kBAAA,GAAA,KAAA,GAAA,EAAA,MACA,EAAA,EAAA,IAAA,OACA,IAAA,gBAA
 A,GAAA,IAEA,IAAA,GADA,GAAA,EAAA,OACA,EAAA,EAAA,EAAA,EAAA,IAAA,OAAA,IAAA,CACA,GAAA,GAAA,EAAA,IAAA,EACA,GAAA,MAAA,EAAA,IAAA,GACA,EAAA,KAAA,GAIA,MAAA,GAAA,EAAA,EAAA,IAKA,EAAA,EAAA,kBACA,GAAA,kBACA,EAAA,EAAA,gBAAA,GAGA,IAAA,EAAA,CAKA,GAAA,EAAA,OAAA,EAAA,MA

<TRUNCATED>

[82/93] [abbrv] jena git commit: JENA-846 : Add IRI.toURI.

Posted by rv...@apache.org.
JENA-846 : Add IRI.toURI.

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

Branch: refs/heads/hadoop-rdf
Commit: 1e18e1d2a101dfe0f386f3cfbb4b44ef4112f76b
Parents: b659de1
Author: Andy Seaborne <an...@apache.org>
Authored: Sat Jan 10 19:07:30 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat Jan 10 19:07:30 2015 +0000

----------------------------------------------------------------------
 jena-iri/src/main/java/org/apache/jena/iri/IRI.java | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/1e18e1d2/jena-iri/src/main/java/org/apache/jena/iri/IRI.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/IRI.java b/jena-iri/src/main/java/org/apache/jena/iri/IRI.java
index 5319a83..8fbe519 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/IRI.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/IRI.java
@@ -18,9 +18,10 @@
 
 package org.apache.jena.iri;
 
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Iterator;
+import java.net.MalformedURLException ;
+import java.net.URI ;
+import java.net.URL ;
+import java.util.Iterator ;
 
 import org.apache.jena.iri.impl.AbsIRIFactoryImpl ;
 import org.apache.jena.iri.impl.Main ;
@@ -406,6 +407,13 @@ abstract public class IRI  extends AbsIRIFactoryImpl implements IRIFactoryI, IRI
     abstract public URL toURL() throws MalformedURLException;
     
     /**
+     * Converts the IRI to an ASCII string, and then to a java.net.URI.
+     * 
+     * @return a URL corresponding to this IRI.
+     */
+    abstract public URI toURI() ;
+
+    /**
      * Resolves an IRI against this one.
      * This method is an alias for
      * {@link IRIFactory#create(IRI)}.


[12/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasr.min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasr.min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasr.min.js
new file mode 100644
index 0000000..dfd98cb
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasr.min.js
@@ -0,0 +1,5 @@
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.YASR=e()}}(function(){var e;return function t(e,r,n){function o(a,s){if(!r[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};e[a][0].call(c.exports,function(t){var r=e[a][1][t];return o(r?r:t)},c,c.exports,t,e,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(e,t){t.exports=e("./main.js")},{"./main.js":27}],2:[function(e){var t,r=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),n=r(document),o=r("head"),i=null,a=[],s=0,l="id",u="px",c="JColResizer",f=parseInt,d=Math,p=navigator.use
 rAgent.indexOf("Trident/4.0")>0;try{t=sessionStorage}catch(g){}o.append("<style type='text/css'>  .JColResizer{table-layout:fixed;} .JColResizer td, .JColResizer th{overflow:hidden;padding-left:0!important; padding-right:0!important;}  .JCLRgrips{ height:0px; position:relative;} .JCLRgrip{margin-left:-5px; position:absolute; z-index:5; } .JCLRgrip .JColResizer{position:absolute;background-color:red;filter:alpha(opacity=1);opacity:0;width:10px;height:100%;top:0px} .JCLRLastGrip{position:absolute; width:1px; } .JCLRgripDrag{ border-left:1px dotted black;	}</style>");var h=function(e,t){var n=r(e);if(t.disable)return v(n);var o=n.id=n.attr(l)||c+s++;n.p=t.postbackSafe;if(n.is("table")&&!a[o]){n.addClass(c).attr(l,o).before('<div class="JCLRgrips"/>');n.opt=t;n.g=[];n.c=[];n.w=n.width();n.gc=n.prev();t.marginLeft&&n.gc.css("marginLeft",t.marginLeft);t.marginRight&&n.gc.css("marginRight",t.marginRight);n.cs=f(p?e.cellSpacing||e.currentStyle.borderSpacing:n.css("border-spacing"))||2;n.b=f
 (p?e.border||e.currentStyle.borderLeftWidth:n.css("border-left-width"))||1;a[o]=n;m(n)}},v=function(e){var t=e.attr(l),e=a[t];if(e&&e.is("table")){e.removeClass(c).gc.remove();delete a[t]}},m=function(e){var n=e.find(">thead>tr>th,>thead>tr>td");n.length||(n=e.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td"));e.cg=e.find("col");e.ln=n.length;e.p&&t&&t[e.id]&&w(e,n);n.each(function(t){var n=r(this),o=r(e.gc.append('<div class="JCLRgrip"></div>')[0].lastChild);o.t=e;o.i=t;o.c=n;n.w=n.width();e.g.push(o);e.c.push(n);n.width(n.w).removeAttr("width");t<e.ln-1?o.bind("touchstart mousedown",j).append(e.opt.gripInnerHtml).append('<div class="'+c+'" style="cursor:'+e.opt.hoverCursor+'"></div>'):o.addClass("JCLRLastGrip").removeClass("JCLRgrip");o.data(c,{i:t,t:e.attr(l)})});e.cg.removeAttr("width");y(e);e.find("td, th").not(n).not("table th, table td").each(function(){r(this).removeAttr("width")})},w=function(e,r){var n,o=0,i=0,a=[];if(r){e.cg.removeAttr("width");if(e
 .opt.flush){t[e.id]="";return}n=t[e.id].split(";");for(;i<e.ln;i++){a.push(100*n[i]/n[e.ln]+"%");r.eq(i).css("width",a[i])}for(i=0;i<e.ln;i++)e.cg.eq(i).css("width",a[i])}else{t[e.id]="";for(;i<e.c.length;i++){n=e.c[i].width();t[e.id]+=n+";";o+=n}t[e.id]+=o}},y=function(e){e.gc.width(e.w);for(var t=0;t<e.ln;t++){var r=e.c[t];e.g[t].css({left:r.offset().left-e.offset().left+r.outerWidth(!1)+e.cs/2+u,height:e.opt.headerOnly?e.c[0].outerHeight(!1):e.outerHeight(!1)})}},b=function(e,t,r){var n=i.x-i.l,o=e.c[t],a=e.c[t+1],s=o.w+n,l=a.w-n;o.width(s+u);a.width(l+u);e.cg.eq(t).width(s+u);e.cg.eq(t+1).width(l+u);if(r){o.w=s;a.w=l}},x=function(e){if(i){var t=i.t;if(e.originalEvent.touches)var r=e.originalEvent.touches[0].pageX-i.ox+i.l;else var r=e.pageX-i.ox+i.l;var n=t.opt.minWidth,o=i.i,a=1.5*t.cs+n+t.b,s=o==t.ln-1?t.w-a:t.g[o+1].position().left-t.cs-n,l=o?t.g[o-1].position().left+t.cs+n:a;r=d.max(l,d.min(s,r));i.x=r;i.css("left",r+u);if(t.opt.liveDrag){b(t,o);y(t);var c=t.opt.onDrag;if(c)
 {e.currentTarget=t[0];c(e)}}return!1}},k=function(e){n.unbind("touchend."+c+" mouseup."+c).unbind("touchmove."+c+" mousemove."+c);r("head :last-child").remove();if(i){i.removeClass(i.t.opt.draggingClass);var o=i.t,a=o.opt.onResize;if(i.x){b(o,i.i,!0);y(o);if(a){e.currentTarget=o[0];a(e)}}o.p&&t&&w(o);i=null}},j=function(e){var t=r(this).data(c),s=a[t.t],l=s.g[t.i];l.ox=e.originalEvent.touches?e.originalEvent.touches[0].pageX:e.pageX;l.l=l.position().left;n.bind("touchmove."+c+" mousemove."+c,x).bind("touchend."+c+" mouseup."+c,k);o.append("<style type='text/css'>*{cursor:"+s.opt.dragCursor+"!important}</style>");l.addClass(s.opt.draggingClass);i=l;if(s.c[t.i].l)for(var u,f=0;f<s.ln;f++){u=s.c[f];u.l=!1;u.w=u.width()}return!1},C=function(){for(t in a){var e,t=a[t],r=0;t.removeClass(c);if(t.w!=t.width()){t.w=t.width();for(e=0;e<t.ln;e++)r+=t.c[e].w;for(e=0;e<t.ln;e++)t.c[e].css("width",d.round(1e3*t.c[e].w/r)/10+"%").l=!0}y(t.addClass(c))}};r(window).bind("resize."+c,C);r.fn.extend({c
 olResizable:function(e){var t={draggingClass:"JCLRgripDrag",gripInnerHtml:"",liveDrag:!1,minWidth:15,headerOnly:!1,hoverCursor:"e-resize",dragCursor:"e-resize",postbackSafe:!1,flush:!1,marginLeft:null,marginRight:null,disable:!1,onDrag:null,onResize:null},e=r.extend(t,e);return this.each(function(){h(this,e)})}})},{jquery:void 0}],3:[function(){RegExp.escape=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};(function(e){"use strict";e.csv={defaults:{separator:",",delimiter:'"',headers:!0},hooks:{castToScalar:function(e){var t=/\./;if(isNaN(e))return e;if(t.test(e))return parseFloat(e);var r=parseInt(e);return isNaN(r)?null:r}},parsers:{parse:function(e,t){function r(){l=0;u="";if(t.start&&t.state.rowNum<t.start){s=[];t.state.rowNum++;t.state.colNum=1}else{if(void 0===t.onParseEntry)a.push(s);else{var e=t.onParseEntry(s,t.state);e!==!1&&a.push(e)}s=[];t.end&&t.state.rowNum>=t.end&&(c=!0);t.state.rowNum++;t.state.colNum=1}}function n(){if(void 0===t.onParseValue)s.push(u)
 ;else{var e=t.onParseValue(u,t.state);e!==!1&&s.push(e)}u="";l=0;t.state.colNum++}var o=t.separator,i=t.delimiter;t.state.rowNum||(t.state.rowNum=1);t.state.colNum||(t.state.colNum=1);var a=[],s=[],l=0,u="",c=!1,f=RegExp.escape(o),d=RegExp.escape(i),p=/(D|S|\n|\r|[^DS\r\n]+)/,g=p.source;g=g.replace(/S/g,f);g=g.replace(/D/g,d);p=RegExp(g,"gm");e.replace(p,function(e){if(!c)switch(l){case 0:if(e===o){u+="";n();break}if(e===i){l=1;break}if("\n"===e){n();r();break}if(/^\r$/.test(e))break;u+=e;l=3;break;case 1:if(e===i){l=2;break}u+=e;l=1;break;case 2:if(e===i){u+=e;l=1;break}if(e===o){n();break}if("\n"===e){n();r();break}if(/^\r$/.test(e))break;throw new Error("CSVDataError: Illegal State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");case 3:if(e===o){n();break}if("\n"===e){n();r();break}if(/^\r$/.test(e))break;if(e===i)throw new Error("CSVDataError: Illegal Quote [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");throw new Error("CSVDataError: Illegal Data [Row:"+t.state.rowNum+"][
 Col:"+t.state.colNum+"]");default:throw new Error("CSVDataError: Unknown State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]")}});if(0!==s.length){n();r()}return a},splitLines:function(e,t){function r(){a=0;if(t.start&&t.state.rowNum<t.start){s="";t.state.rowNum++}else{if(void 0===t.onParseEntry)i.push(s);else{var e=t.onParseEntry(s,t.state);e!==!1&&i.push(e)}s="";t.end&&t.state.rowNum>=t.end&&(l=!0);t.state.rowNum++}}var n=t.separator,o=t.delimiter;t.state.rowNum||(t.state.rowNum=1);var i=[],a=0,s="",l=!1,u=RegExp.escape(n),c=RegExp.escape(o),f=/(D|S|\n|\r|[^DS\r\n]+)/,d=f.source;d=d.replace(/S/g,u);d=d.replace(/D/g,c);f=RegExp(d,"gm");e.replace(f,function(e){if(!l)switch(a){case 0:if(e===n){s+=e;a=0;break}if(e===o){s+=e;a=1;break}if("\n"===e){r();break}if(/^\r$/.test(e))break;s+=e;a=3;break;case 1:if(e===o){s+=e;a=2;break}s+=e;a=1;break;case 2:var i=s.substr(s.length-1);if(e===o&&i===o){s+=e;a=1;break}if(e===n){s+=e;a=0;break}if("\n"===e){r();break}if("\r"===e)break;throw new E
 rror("CSVDataError: Illegal state [Row:"+t.state.rowNum+"]");case 3:if(e===n){s+=e;a=0;break}if("\n"===e){r();break}if("\r"===e)break;if(e===o)throw new Error("CSVDataError: Illegal quote [Row:"+t.state.rowNum+"]");throw new Error("CSVDataError: Illegal state [Row:"+t.state.rowNum+"]");default:throw new Error("CSVDataError: Unknown state [Row:"+t.state.rowNum+"]")}});""!==s&&r();return i},parseEntry:function(e,t){function r(){if(void 0===t.onParseValue)i.push(s);else{var e=t.onParseValue(s,t.state);e!==!1&&i.push(e)}s="";a=0;t.state.colNum++}var n=t.separator,o=t.delimiter;t.state.rowNum||(t.state.rowNum=1);t.state.colNum||(t.state.colNum=1);var i=[],a=0,s="";if(!t.match){var l=RegExp.escape(n),u=RegExp.escape(o),c=/(D|S|\n|\r|[^DS\r\n]+)/,f=c.source;f=f.replace(/S/g,l);f=f.replace(/D/g,u);t.match=RegExp(f,"gm")}e.replace(t.match,function(e){switch(a){case 0:if(e===n){s+="";r();break}if(e===o){a=1;break}if("\n"===e||"\r"===e)break;s+=e;a=3;break;case 1:if(e===o){a=2;break}s+=e;a=1;b
 reak;case 2:if(e===o){s+=e;a=1;break}if(e===n){r();break}if("\n"===e||"\r"===e)break;throw new Error("CSVDataError: Illegal State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");case 3:if(e===n){r();break}if("\n"===e||"\r"===e)break;if(e===o)throw new Error("CSVDataError: Illegal Quote [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");throw new Error("CSVDataError: Illegal Data [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");default:throw new Error("CSVDataError: Unknown State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]")}});r();return i}},toArray:function(t,r,n){var r=void 0!==r?r:{},o={};o.callback=void 0!==n&&"function"==typeof n?n:!1;o.separator="separator"in r?r.separator:e.csv.defaults.separator;o.delimiter="delimiter"in r?r.delimiter:e.csv.defaults.delimiter;var i=void 0!==r.state?r.state:{},r={delimiter:o.delimiter,separator:o.separator,onParseEntry:r.onParseEntry,onParseValue:r.onParseValue,state:i},a=e.csv.parsers.parseEntry(t,r);if(!o.callback)return a;o.callb
 ack("",a);return void 0},toArrays:function(t,r,n){var r=void 0!==r?r:{},o={};o.callback=void 0!==n&&"function"==typeof n?n:!1;o.separator="separator"in r?r.separator:e.csv.defaults.separator;o.delimiter="delimiter"in r?r.delimiter:e.csv.defaults.delimiter;var i=[],r={delimiter:o.delimiter,separator:o.separator,onParseEntry:r.onParseEntry,onParseValue:r.onParseValue,start:r.start,end:r.end,state:{rowNum:1,colNum:1}};i=e.csv.parsers.parse(t,r);if(!o.callback)return i;o.callback("",i);return void 0},toObjects:function(t,r,n){var r=void 0!==r?r:{},o={};o.callback=void 0!==n&&"function"==typeof n?n:!1;o.separator="separator"in r?r.separator:e.csv.defaults.separator;o.delimiter="delimiter"in r?r.delimiter:e.csv.defaults.delimiter;o.headers="headers"in r?r.headers:e.csv.defaults.headers;r.start="start"in r?r.start:1;o.headers&&r.start++;r.end&&o.headers&&r.end++;var i=[],a=[],r={delimiter:o.delimiter,separator:o.separator,onParseEntry:r.onParseEntry,onParseValue:r.onParseValue,start:r.star
 t,end:r.end,state:{rowNum:1,colNum:1},match:!1},s={delimiter:o.delimiter,separator:o.separator,start:1,end:1,state:{rowNum:1,colNum:1}},l=e.csv.parsers.splitLines(t,s),u=e.csv.toArray(l[0],r),i=e.csv.parsers.splitLines(t,r);r.state.colNum=1;r.state.rowNum=u?2:1;for(var c=0,f=i.length;f>c;c++){var d=e.csv.toArray(i[c],r),p={};for(var g in u)p[u[g]]=d[g];a.push(p);r.state.rowNum++}if(!o.callback)return a;o.callback("",a);return void 0},fromArrays:function(t,r,n){var r=void 0!==r?r:{},o={};o.callback=void 0!==n&&"function"==typeof n?n:!1;o.separator="separator"in r?r.separator:e.csv.defaults.separator;o.delimiter="delimiter"in r?r.delimiter:e.csv.defaults.delimiter;o.escaper="escaper"in r?r.escaper:e.csv.defaults.escaper;o.experimental="experimental"in r?r.experimental:!1;if(!o.experimental)throw new Error("not implemented");var a=[];for(i in t)a.push(t[i]);if(!o.callback)return a;o.callback("",a);return void 0},fromObjects2CSV:function(t,r,n){var r=void 0!==r?r:{},o={};o.callback=void
  0!==n&&"function"==typeof n?n:!1;o.separator="separator"in r?r.separator:e.csv.defaults.separator;o.delimiter="delimiter"in r?r.delimiter:e.csv.defaults.delimiter;o.experimental="experimental"in r?r.experimental:!1;if(!o.experimental)throw new Error("not implemented");var a=[];for(i in t)a.push(arrays[i]);if(!o.callback)return a;o.callback("",a);return void 0}};e.csvEntry2Array=e.csv.toArray;e.csv2Array=e.csv.toArrays;e.csv2Dictionary=e.csv.toObjects})(jQuery)},{}],4:[function(e,t){function r(){this._events=this._events||{};this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function o(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r;r.EventEmitter=r;r.prototype._events=void 0;r.prototype._maxListeners=void 0;r.defaultMaxListeners=10;r.prototype.setMaxListeners=function(e){if(!o(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");this._maxListeners=e;return this};
 r.prototype.emit=function(e){var t,r,o,s,l,u;this._events||(this._events={});if("error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){t=arguments[1];if(t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}r=this._events[e];if(a(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:o=arguments.length;s=new Array(o-1);for(l=1;o>l;l++)s[l-1]=arguments[l];r.apply(this,s)}else if(i(r)){o=arguments.length;s=new Array(o-1);for(l=1;o>l;l++)s[l-1]=arguments[l];u=r.slice();o=u.length;for(l=0;o>l;l++)u[l].apply(this,s)}return!0};r.prototype.addListener=function(e,t){var o;if(!n(t))throw TypeError("listener must be a function");this._events||(this._events={});this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t);this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._
 events[e],t]:this._events[e]=t;if(i(this._events[e])&&!this._events[e].warned){var o;o=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners;if(o&&o>0&&this._events[e].length>o){this._events[e].warned=!0;console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length);"function"==typeof console.trace&&console.trace()}}return this};r.prototype.on=r.prototype.addListener;r.prototype.once=function(e,t){function r(){this.removeListener(e,r);if(!o){o=!0;t.apply(this,arguments)}}if(!n(t))throw TypeError("listener must be a function");var o=!1;r.listener=t;this.on(e,r);return this};r.prototype.removeListener=function(e,t){var r,o,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;r=this._events[e];a=r.length;o=-1;if(r===t||n(r.listener)&&r.listener===t){delete this._events[e];this._events.removeListener&&this.emit("removeLi
 stener",e,t)}else if(i(r)){for(s=a;s-->0;)if(r[s]===t||r[s].listener&&r[s].listener===t){o=s;break}if(0>o)return this;if(1===r.length){r.length=0;delete this._events[e]}else r.splice(o,1);this._events.removeListener&&this.emit("removeListener",e,t)}return this};r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener){0===arguments.length?this._events={}:this._events[e]&&delete this._events[e];return this}if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);this.removeAllListeners("removeListener");this._events={};return this}r=this._events[e];if(n(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);delete this._events[e];return this};r.prototype.listeners=function(e){var t;t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[];return t};r.listenerCount=function(e,t){var r;r=e._events&&e._events[t]?n(e._events[t])
 ?1:e._events[t].length:0;return r}},{}],5:[function(t,r,n){(function(o){"object"==typeof n&&"object"==typeof r?o(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],o):o(CodeMirror)})(function(e){function t(e,t,n,o){var i=e.getLineHandle(t.line),l=t.ch-1,u=l>=0&&s[i.text.charAt(l)]||s[i.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(n&&c>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(a(t.line,l+1)),d=r(e,a(t.line,l+(c>0?1:0)),c,f||null,o);return null==d?null:{from:a(t.line,l),to:d&&d.pos,match:d&&d.ch==u.charAt(0),forward:c>0}}function r(e,t,r,n,o){for(var i=o&&o.maxScanLineLength||1e4,l=o&&o.maxScanLines||1e3,u=[],c=o&&o.bracketRegex?o.bracketRegex:/[(){}[\]]/,f=r>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),d=t.line;d!=f;d+=r){var p=e.getLine(d);if(p){var g=r>0?0:p.length-1,h=r>0?p.length:-1;if(!(p.length>i)){d==t.line&&(g=t.ch-(0>r?1:0));for(;g!=h;g+=r){v
 ar v=p.charAt(g);if(c.test(v)&&(void 0===n||e.getTokenTypeAt(a(d,g+1))==n)){var m=s[v];if(">"==m.charAt(1)==r>0)u.push(v);else{if(!u.length)return{pos:a(d,g),ch:v};u.pop()}}}}}}return d-r==(r>0?e.lastLine():e.firstLine())?!1:null}function n(e,r,n){for(var o=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),u=0;u<l.length;u++){var c=l[u].empty()&&t(e,l[u].head,!1,n);if(c&&e.getLine(c.from.line).length<=o){var f=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";s.push(e.markText(c.from,a(c.from.line,c.from.ch+1),{className:f}));c.to&&e.getLine(c.to.line).length<=o&&s.push(e.markText(c.to,a(c.to.line,c.to.ch+1),{className:f}))}}if(s.length){i&&e.state.focused&&e.display.input.focus();var d=function(){e.operation(function(){for(var e=0;e<s.length;e++)s[e].clear()})};if(!r)return d;setTimeout(d,800)}}function o(e){e.operation(function(){if(l){l();l=null}l=n(e,!1,e.state.matchBrackets)})}var i=/MSIE \d/.test(navigator.userAgent)&&(null==documen
 t.documentMode||document.documentMode<8),a=e.Pos,s={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,r,n){n&&n!=e.Init&&t.off("cursorActivity",o);if(r){t.state.matchBrackets="object"==typeof r?r:{};t.on("cursorActivity",o)}});e.defineExtension("matchBrackets",function(){n(this,!0)});e.defineExtension("findMatchingBracket",function(e,r,n){return t(this,e,r,n)});e.defineExtension("scanForBracket",function(e,t,n,o){return r(this,e,t,n,o)})})},{codemirror:void 0}],6:[function(t,r,n){(function(o){"object"==typeof n&&"object"==typeof r?o(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],o):o(CodeMirror)})(function(e){"use strict";e.registerHelper("fold","brace",function(t,r){function n(n){for(var o=r.ch,l=0;;){var u=0>=o?-1:s.lastIndexOf(n,o-1);if(-1!=u){if(1==l&&u<r.ch)break;i=t.getTokenTypeAt(e.Pos(a,u+1));if(!/^(comment|string)/.test(i))return u+1;
 o=u-1}else{if(1==l)break;l=1;o=s.length}}}var o,i,a=r.line,s=t.getLine(a),l="{",u="}",o=n("{");if(null==o){l="[",u="]";o=n("[")}if(null!=o){var c,f,d=1,p=t.lastLine();e:for(var g=a;p>=g;++g)for(var h=t.getLine(g),v=g==a?o:0;;){var m=h.indexOf(l,v),w=h.indexOf(u,v);0>m&&(m=h.length);0>w&&(w=h.length);v=Math.min(m,w);if(v==h.length)break;if(t.getTokenTypeAt(e.Pos(g,v+1))==i)if(v==m)++d;else if(!--d){c=g;f=v;break e}++v}if(null!=c&&(a!=c||f!=o))return{from:e.Pos(a,o),to:e.Pos(c,f)}}});e.registerHelper("fold","import",function(t,r){function n(r){if(r<t.firstLine()||r>t.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1)));if("keyword"!=n.type||"import"!=n.string)return null;for(var o=r,i=Math.min(t.lastLine(),r+10);i>=o;++o){var a=t.getLine(o),s=a.indexOf(";");if(-1!=s)return{startCh:n.end,end:e.Pos(o,s)}}}var o,r=r.line,i=n(r);if(!i||n(r-1)||(o=n(r-2))&&o.end.line==r-1)return null;for(var a=i.end;;){var s=n(a.line+1);if(null==s)br
 eak;a=s.end}return{from:t.clipPos(e.Pos(r,i.startCh+1)),to:a}});e.registerHelper("fold","include",function(t,r){function n(r){if(r<t.firstLine()||r>t.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1)));return"meta"==n.type&&"#include"==n.string.slice(0,8)?n.start+8:void 0}var r=r.line,o=n(r);if(null==o||null!=n(r-1))return null;for(var i=r;;){var a=n(i+1);if(null==a)break;++i}return{from:e.Pos(r,o+1),to:t.clipPos(e.Pos(i))}})})},{codemirror:void 0}],7:[function(t,r,n){(function(o){"object"==typeof n&&"object"==typeof r?o(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],o):o(CodeMirror)})(function(e){"use strict";function t(t,o,i,a){function s(e){var r=l(t,o);if(!r||r.to.line-r.from.line<u)return null;for(var n=t.findMarksAt(r.from),i=0;i<n.length;++i)if(n[i].__isFold&&"fold"!==a){if(!e)return null;r.cleared=!0;n[i].clear()}return r}if(i&&i.call
 ){var l=i;i=null}else var l=n(t,i,"rangeFinder");"number"==typeof o&&(o=e.Pos(o,0));var u=n(t,i,"minFoldSize"),c=s(!0);if(n(t,i,"scanUp"))for(;!c&&o.line>t.firstLine();){o=e.Pos(o.line-1,0);c=s(!1)}if(c&&!c.cleared&&"unfold"!==a){var f=r(t,i);e.on(f,"mousedown",function(t){d.clear();e.e_preventDefault(t)});var d=t.markText(c.from,c.to,{replacedWith:f,clearOnEnter:!0,__isFold:!0});d.on("clear",function(r,n){e.signal(t,"unfold",t,r,n)});e.signal(t,"fold",t,c.from,c.to)}}function r(e,t){var r=n(e,t,"widget");if("string"==typeof r){var o=document.createTextNode(r);r=document.createElement("span");r.appendChild(o);r.className="CodeMirror-foldmarker"}return r}function n(e,t,r){if(t&&void 0!==t[r])return t[r];var n=e.options.foldOptions;return n&&void 0!==n[r]?n[r]:o[r]}e.newFoldFunction=function(e,r){return function(n,o){t(n,o,{rangeFinder:e,widget:r})}};e.defineExtension("foldCode",function(e,r,n){t(this,e,r,n)});e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),r=0;
 r<t.length;++r)if(t[r].__isFold)return!0});e.commands.toggleFold=function(e){e.foldCode(e.getCursor())};e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")};e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")};e.commands.foldAll=function(t){t.operation(function(){for(var r=t.firstLine(),n=t.lastLine();n>=r;r++)t.foldCode(e.Pos(r,0),null,"fold")})};e.commands.unfoldAll=function(t){t.operation(function(){for(var r=t.firstLine(),n=t.lastLine();n>=r;r++)t.foldCode(e.Pos(r,0),null,"unfold")})};e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,r){for(var n=0;n<e.length;++n){var o=e[n](t,r);if(o)return o}}});e.registerHelper("fold","auto",function(e,t){for(var r=e.getHelpers(t,"fold"),n=0;n<r.length;n++){var o=r[n](e,t);if(o)return o}});var o={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1};e.defineOption("foldOptions",null)})},{codemirror:void 0}],8:[function(t,r,n){(function(o){"objec
 t"==typeof n&&"object"==typeof r?o(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}(),t("./foldcode")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","./foldcode"],o):o(CodeMirror)})(function(e){"use strict";function t(e){this.options=e;this.from=this.to=0}function r(e){e===!0&&(e={});null==e.gutter&&(e.gutter="CodeMirror-foldgutter");null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open");null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded");return e}function n(e,t){for(var r=e.findMarksAt(f(t)),n=0;n<r.length;++n)if(r[n].__isFold&&r[n].find().from.line==t)return!0}function o(e){if("string"==typeof e){var t=document.createElement("div");t.className=e+" CodeMirror-guttermarker-subtle";return t}return e.cloneNode(!0)}function i(t,r,i){var a=t.state.foldGutter.options,s=r;t.eachLine(r,i,function(r){var i=null;if(n(t,s))i=o(a.indicatorFolded);else{var l=f(s,0),u=a.rangeFinder||e.fold.auto,c=u&&u(t,l);c&&c.from.line+1<c
 .to.line&&(i=o(a.indicatorOpen))}t.setGutterMarker(r,a.gutter,i);++s})}function a(e){var t=e.getViewport(),r=e.state.foldGutter;if(r){e.operation(function(){i(e,t.from,t.to)});r.from=t.from;r.to=t.to}}function s(e,t,r){var n=e.state.foldGutter.options;r==n.gutter&&e.foldCode(f(t,0),n.rangeFinder)}function l(e){var t=e.state.foldGutter,r=e.state.foldGutter.options;t.from=t.to=0;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){a(e)},r.foldOnChangeTimeSpan||600)}function u(e){var t=e.state.foldGutter,r=e.state.foldGutter.options;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){var r=e.getViewport();t.from==t.to||r.from-t.to>20||t.from-r.to>20?a(e):e.operation(function(){if(r.from<t.from){i(e,r.from,t.from);t.from=r.from}if(r.to>t.to){i(e,t.to,r.to);t.to=r.to}})},r.updateViewportTimeSpan||400)}function c(e,t){var r=e.state.foldGutter,n=t.line;n>=r.from&&n<r.to&&i(e,n,n+1)}e.defineOption("foldGutter",!1,function(n,o,i){if(i&&i!=e.Init){n.clearGutter(n.st
 ate.foldGutter.options.gutter);n.state.foldGutter=null;n.off("gutterClick",s);n.off("change",l);n.off("viewportChange",u);n.off("fold",c);n.off("unfold",c);n.off("swapDoc",a)}if(o){n.state.foldGutter=new t(r(o));a(n);n.on("gutterClick",s);n.on("change",l);n.on("viewportChange",u);n.on("fold",c);n.on("unfold",c);n.on("swapDoc",a)}});var f=e.Pos})},{"./foldcode":7,codemirror:void 0}],9:[function(t,r,n){(function(o){"object"==typeof n&&"object"==typeof r?o(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],o):o(CodeMirror)})(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function r(e,t,r,n){this.line=t;this.ch=r;this.cm=e;this.text=e.getLine(t);this.min=n?n.from:e.firstLine();this.max=n?n.to-1:e.lastLine()}function n(e,t){var r=e.cm.getTokenTypeAt(d(e.line,t));return r&&/\btag\b/.test(r)}function o(e){if(!(e.line>=e.max)){e.ch=0;e.text=e.cm.getLine(++e.line);return!0}}function i(e
 ){if(!(e.line<=e.min)){e.text=e.cm.getLine(--e.line);e.ch=e.text.length;return!0}}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(o(e))continue;return}if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),i=r>-1&&!/\S/.test(e.text.slice(r+1,t));e.ch=t+1;return i?"selfClose":"regular"}e.ch=t+1}}function s(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(i(e))continue;return}if(n(e,t+1)){h.lastIndex=t;e.ch=t;var r=h.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function l(e){for(;;){h.lastIndex=e.ch;var t=h.exec(e.text);if(!t){if(o(e))continue;return}if(n(e,t.index+1)){e.ch=t.index+t[0].length;return t}e.ch=t.index+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(i(e))continue;return}if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),o=r>-1&&!/\S/.test(e.text.slice(r+1,t));e.ch=t+1;return o?"selfClose":"regular"}e.ch=t}}function c(e,t){for(var r=[];;){var n,o=l(e),i=e.line,s=e.ch-(o?o[0].length:0);if(!o||!(n=a(e)))return;i
 f("selfClose"!=n)if(o[1]){for(var u=r.length-1;u>=0;--u)if(r[u]==o[2]){r.length=u;break}if(0>u&&(!t||t==o[2]))return{tag:o[2],from:d(i,s),to:d(e.line,e.ch)}}else r.push(o[2])}}function f(e,t){for(var r=[];;){var n=u(e);if(!n)return;if("selfClose"!=n){var o=e.line,i=e.ch,a=s(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(0>l&&(!t||t==a[2]))return{tag:a[2],from:d(e.line,e.ch),to:d(o,i)}}}else s(e)}}var d=e.Pos,p="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",g=p+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",h=new RegExp("<(/?)(["+p+"]["+g+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var n=new r(e,t.line,0);;){var o,i=l(n);if(!i||n.line!=t.line||!(o=a(n)))return;if(!i[1]&&"selfClose"!=o){var t=d(n.line,n.ch),s=c(n,i[2]);return s&&{from:t,to:s.from}}}});e.findMatchingTag=function(e,n,o){v
 ar i=new r(e,n.line,n.ch,o);if(-1!=i.text.indexOf(">")||-1!=i.text.indexOf("<")){var l=a(i),u=l&&d(i.line,i.ch),p=l&&s(i);if(l&&p&&!(t(i,n)>0)){var g={from:d(i.line,i.ch),to:u,tag:p[2]};if("selfClose"==l)return{open:g,close:null,at:"open"};if(p[1])return{open:f(i,p[2]),close:g,at:"close"};i=new r(e,u.line,u.ch,o);return{open:g,close:c(i,p[2]),at:"open"}}}};e.findEnclosingTag=function(e,t,n){for(var o=new r(e,t.line,t.ch,n);;){var i=f(o);if(!i)break;var a=new r(e,t.line,t.ch,n),s=c(a,i.tag);if(s)return{open:i,close:s}}};e.scanForClosingTag=function(e,t,n,o){var i=new r(e,t.line,t.ch,o?{from:0,to:o}:null);return c(i,n)}})},{codemirror:void 0}],10:[function(t,r,n){(function(o){"object"==typeof n&&"object"==typeof r?o(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],o):o(CodeMirror)})(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if
 (!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){gt=e;ht=r;return t}function i(e,t){var r=e.next();if('"'==r||"'"==r){t.tokenize=a(r);return t.tokenize(e,t)}if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i)){e.eatWhile(/[\da-f]/i);return o("number","number")}if(/\d/.test(r)){e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return o("number","number")}if("/"==r){if(e.eat("*")){t.tokenize=s;return s(e,t)}if(e.eat("/")){e.skipToEnd();return o("comment","comment")}if("operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)){n(e);e.eatWhile(/[gimy]/);return o("regexp","string-2")}e.eatWhile(jt);return o("operator","operator",e.current())}if("`"==r){t.tokenize=l;return l(e,t)}if("#"==r){e.skipToEnd();return o("error","error")
 }if(jt.test(r)){e.eatWhile(jt);return o("operator","operator",e.current())}if(xt.test(r)){e.eatWhile(xt);var i=e.current(),u=kt.propertyIsEnumerable(i)&&kt[i];return u&&"."!=t.lastType?o(u.type,u.style,i):o("variable","variable",i)}}function a(e){return function(t,r){var n,a=!1;if(wt&&"@"==t.peek()&&t.match(Ct)){r.tokenize=i;return o("jsonld-keyword","meta")}for(;null!=(n=t.next())&&(n!=e||a);)a=!a&&"\\"==n;a||(r.tokenize=i);return o("string","string")}}function s(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return o("comment","comment")}function l(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(0>r)){for(var n=0,o=!1,i=r-1;i>=0;--i){var a=e.string.charAt(i),s=Lt.indexOf(a);if(s>=0&&3>s){if(!n){++i;break}if(0==--n)break}else if(s>=3&&6>s)++n;else if(xt.test(a))
 o=!0;else if(o&&!n){++i;break}}o&&!n&&(t.fatArrowAt=i)}}function c(e,t,r,n,o,i){this.indented=e;this.column=t;this.type=r;this.prev=o;this.info=i;null!=n&&(this.align=n)}function f(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function d(e,t,r,n,o){var i=e.cc;St.state=e;St.stream=o;St.marked=null,St.cc=i;St.style=t;e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);for(;;){var a=i.length?i.pop():yt?k:x;if(a(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return St.marked?St.marked:"variable"==r&&f(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)St.cc.push(arguments[e])}function g(){p.apply(null,arguments);return!0}function h(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=St.state;if(n.context){St.marked="def";if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars
 ={name:e,next:n.globalVars})}}function v(){St.state.context={prev:St.state.context,vars:St.state.localVars};
+St.state.localVars=Mt}function m(){St.state.localVars=St.state.context.vars;St.state.context=St.state.context.prev}function w(e,t){var r=function(){var r=St.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new c(n,St.stream.column(),e,null,r.lexical,t)};r.lex=!0;return r}function y(){var e=St.state;if(e.lexical.prev){")"==e.lexical.type&&(e.indented=e.lexical.indented);e.lexical=e.lexical.prev}}function b(e){function t(r){return r==e?g():";"==e?p():g(t)}return t}function x(e,t){if("var"==e)return g(w("vardef",t.length),G,b(";"),y);if("keyword a"==e)return g(w("form"),k,x,y);if("keyword b"==e)return g(w("form"),x,y);if("{"==e)return g(w("}"),U,y);if(";"==e)return g();if("if"==e){"else"==St.state.lexical.info&&St.state.cc[St.state.cc.length-1]==y&&St.state.cc.pop()();return g(w("form"),k,x,y,B)}return"function"==e?g(et):"for"==e?g(w("form"),J,x,y):"variable"==e?g(w("stat"),N):"switch"==e?
 g(w("form"),k,w("}","switch"),b("{"),U,y,y):"case"==e?g(k,b(":")):"default"==e?g(b(":")):"catch"==e?g(w("form"),v,b("("),tt,b(")"),x,y,m):"module"==e?g(w("form"),v,at,m,y):"class"==e?g(w("form"),rt,y):"export"==e?g(w("form"),st,y):"import"==e?g(w("form"),lt,y):p(w("stat"),k,b(";"),y)}function k(e){return C(e,!1)}function j(e){return C(e,!0)}function C(e,t){if(St.state.fatArrowAt==St.stream.start){var r=t?R:A;if("("==e)return g(v,w(")"),O(H,")"),y,b("=>"),r,m);if("variable"==e)return p(v,H,b("=>"),r,m)}var n=t?M:S;return Tt.hasOwnProperty(e)?g(n):"function"==e?g(et,n):"keyword c"==e?g(t?T:L):"("==e?g(w(")"),L,pt,b(")"),y,n):"operator"==e||"spread"==e?g(t?j:k):"["==e?g(w("]"),ft,y,n):"{"==e?q(z,"}",null,n):"quasi"==e?p(E,n):g()}function L(e){return e.match(/[;\}\)\],]/)?p():p(k)}function T(e){return e.match(/[;\}\)\],]/)?p():p(j)}function S(e,t){return","==e?g(k):M(e,t,!1)}function M(e,t,r){var n=0==r?S:M,o=0==r?k:j;return"=>"==e?g(v,r?R:A,m):"operator"==e?/\+\+|--/.test(t)?g(n):"?"==
 t?g(k,b(":"),o):g(o):"quasi"==e?p(E,n):";"!=e?"("==e?q(j,")","call",n):"."==e?g(D,n):"["==e?g(w("]"),L,b("]"),y,n):void 0:void 0}function E(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?g(E):g(k,_)}function _(e){if("}"==e){St.marked="string-2";St.state.tokenize=l;return g(E)}}function A(e){u(St.stream,St.state);return p("{"==e?x:k)}function R(e){u(St.stream,St.state);return p("{"==e?x:j)}function N(e){return":"==e?g(y,x):p(S,b(";"),y)}function D(e){if("variable"==e){St.marked="property";return g()}}function z(e,t){if("variable"==e||"keyword"==St.style){St.marked="property";return g("get"==t||"set"==t?P:I)}if("number"==e||"string"==e){St.marked=wt?"property":St.style+" property";return g(I)}return"jsonld-keyword"==e?g(I):"["==e?g(k,b("]"),I):void 0}function P(e){if("variable"!=e)return p(I);St.marked="property";return g(et)}function I(e){return":"==e?g(j):"("==e?p(et):void 0}function O(e,t){function r(n){if(","==n){var o=St.state.lexical;"call"==o.info&&(o.pos=(o.pos||0)+1);ret
 urn g(e,r)}return n==t?g():g(b(t))}return function(n){return n==t?g():p(e,r)}}function q(e,t,r){for(var n=3;n<arguments.length;n++)St.cc.push(arguments[n]);return g(w(t,r),O(e,t),y)}function U(e){return"}"==e?g():p(x,U)}function V(e){return bt&&":"==e?g(F):void 0}function F(e){if("variable"==e){St.marked="variable-3";return g()}}function G(){return p(H,V,X,Q)}function H(e,t){if("variable"==e){h(t);return g()}return"["==e?q(H,"]"):"{"==e?q(W,"}"):void 0}function W(e,t){if("variable"==e&&!St.stream.match(/^\s*:/,!1)){h(t);return g(X)}"variable"==e&&(St.marked="property");return g(b(":"),H,X)}function X(e,t){return"="==t?g(j):void 0}function Q(e){return","==e?g(G):void 0}function B(e,t){return"keyword b"==e&&"else"==t?g(w("form","else"),x,y):void 0}function J(e){return"("==e?g(w(")"),Y,b(")"),y):void 0}function Y(e){return"var"==e?g(G,b(";"),K):";"==e?g(K):"variable"==e?g($):p(k,b(";"),K)}function $(e,t){if("in"==t||"of"==t){St.marked="keyword";return g(k)}return g(S,K)}function K(e,t)
 {if(";"==e)return g(Z);if("in"==t||"of"==t){St.marked="keyword";return g(k)}return p(k,b(";"),Z)}function Z(e){")"!=e&&g(k)}function et(e,t){if("*"==t){St.marked="keyword";return g(et)}if("variable"==e){h(t);return g(et)}return"("==e?g(v,w(")"),O(tt,")"),y,x,m):void 0}function tt(e){return"spread"==e?g(tt):p(H,V)}function rt(e,t){if("variable"==e){h(t);return g(nt)}}function nt(e,t){return"extends"==t?g(k,nt):"{"==e?g(w("}"),ot,y):void 0}function ot(e,t){if("variable"==e||"keyword"==St.style){St.marked="property";return"get"==t||"set"==t?g(it,et,ot):g(et,ot)}if("*"==t){St.marked="keyword";return g(ot)}return";"==e?g(ot):"}"==e?g():void 0}function it(e){if("variable"!=e)return p();St.marked="property";return g()}function at(e,t){if("string"==e)return g(x);if("variable"==e){h(t);return g(ct)}}function st(e,t){if("*"==t){St.marked="keyword";return g(ct,b(";"))}if("default"==t){St.marked="keyword";return g(k,b(";"))}return p(x)}function lt(e){return"string"==e?g():p(ut,ct)}function ut(e
 ,t){if("{"==e)return q(ut,"}");"variable"==e&&h(t);return g()}function ct(e,t){if("from"==t){St.marked="keyword";return g(k)}}function ft(e){return"]"==e?g():p(j,dt)}function dt(e){return"for"==e?p(pt,b("]")):","==e?g(O(T,"]")):p(O(j,"]"))}function pt(e){return"for"==e?g(J,pt):"if"==e?g(k,pt):void 0}var gt,ht,vt=t.indentUnit,mt=r.statementIndent,wt=r.jsonld,yt=r.json||wt,bt=r.typescript,xt=r.wordCharacters||/[\w$\xa1-\uffff]/,kt=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("operator"),i={type:"atom",style:"atom"},a={"if":e("if"),"while":t,"with":t,"else":r,"do":r,"try":r,"finally":r,"return":n,"break":n,"continue":n,"new":n,"delete":n,"throw":n,"debugger":n,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":o,"typeof":o,"instanceof":o,"true":i,"false":i,"null":i,undefined:i,NaN:i,Infinity:i,"this"
 :e("this"),module:e("module"),"class":e("class"),"super":e("atom"),"yield":n,"export":e("export"),"import":e("import"),"extends":n};if(bt){var s={type:"variable",style:"variable-3"},l={"interface":e("interface"),"extends":e("extends"),constructor:e("constructor"),"public":e("public"),"private":e("private"),"protected":e("protected"),"static":e("static"),string:s,number:s,bool:s,any:s};for(var u in l)a[u]=l[u]}return a}(),jt=/[+\-*&%=<>!?|~^]/,Ct=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Lt="([{}])",Tt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},St={state:null,column:null,marked:null,cc:null},Mt={name:"this",next:{name:"arguments"}};y.lex=!0;return{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new c((e||0)-vt,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:0};r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars);return t},
 token:function(e,t){if(e.sol()){t.lexical.hasOwnProperty("align")||(t.lexical.align=!1);t.indented=e.indentation();u(e,t)}if(t.tokenize!=s&&e.eatSpace())return null;var r=t.tokenize(e,t);if("comment"==gt)return r;t.lastType="operator"!=gt||"++"!=ht&&"--"!=ht?gt:"incdec";return d(t,r,gt,ht,e)},indent:function(t,n){if(t.tokenize==s)return e.Pass;if(t.tokenize!=i)return 0;var o=n&&n.charAt(0),a=t.lexical;if(!/^\s*else\b/.test(n))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==y)a=a.prev;else if(u!=B)break}"stat"==a.type&&"}"==o&&(a=a.prev);mt&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c=a.type,f=o==c;return"vardef"==c?a.indented+("operator"==t.lastType||","==t.lastType?a.info+1:0):"form"==c&&"{"==o?a.indented:"form"==c?a.indented+vt:"stat"==c?a.indented+("operator"==t.lastType||","==t.lastType?mt||vt:0):"switch"!=a.info||f||0==r.doubleIndentSwitch?a.align?a.column+(f?0:1):a.indented+(f?0:vt):a.indented+(/^(?:case|default)\b/.test(n)?vt:2*vt)},electricInput:/^\s*(?:case .*?
 :|default:|\{|\})$/,blockCommentStart:yt?null:"/*",blockCommentEnd:yt?null:"*/",lineComment:yt?null:"//",fold:"brace",helperType:yt?"json":"javascript",jsonldMode:wt,jsonMode:yt}});e.registerHelper("wordChars","javascript",/[\w$]/);e.defineMIME("text/javascript","javascript");e.defineMIME("text/ecmascript","javascript");e.defineMIME("application/javascript","javascript");e.defineMIME("application/x-javascript","javascript");e.defineMIME("application/ecmascript","javascript");e.defineMIME("application/json",{name:"javascript",json:!0});e.defineMIME("application/x-json",{name:"javascript",json:!0});e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0});e.defineMIME("text/typescript",{name:"javascript",typescript:!0});e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},{codemirror:void 0}],11:[function(t,r,n){(function(o){"object"==typeof n&&"object"==typeof r?o(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==t
 ypeof e&&e.amd?e(["../../lib/codemirror"],o):o(CodeMirror)})(function(e){"use strict";e.defineMode("xml",function(t,r){function n(e,t){function r(r){t.tokenize=r;return r(e,t)}var n=e.next();if("<"==n){if(e.eat("!")){if(e.eat("["))return e.match("CDATA[")?r(a("atom","]]>")):null;if(e.match("--"))return r(a("comment","-->"));if(e.match("DOCTYPE",!0,!0)){e.eatWhile(/[\w\._\-]/);return r(s(1))}return null}if(e.eat("?")){e.eatWhile(/[\w\._\-]/);t.tokenize=a("meta","?>");return"meta"}j=e.eat("/")?"closeTag":"openTag";t.tokenize=o;return"tag bracket"}if("&"==n){var i;i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";");return i?"atom":"error"}e.eatWhile(/[^&<]/);return null}function o(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">")){t.tokenize=n;j=">"==r?"endTag":"selfcloseTag";return"tag bracket"}if("="==r){j="equals";return null}if("<"==r){t.tokenize=n;t.state=f;t.tagName=t.tagStart=null;var o=t.tokenize(e,t);r
 eturn o?o+" tag error":"tag error"}if(/[\'\"]/.test(r)){t.tokenize=i(r);t.stringStartCol=e.column();return t.tokenize(e,t)}e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}function i(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=o;break}return"string"};t.isInAttribute=!0;return t}function a(e,t){return function(r,o){for(;!r.eol();){if(r.match(t)){o.tokenize=n;break}r.next()}return e}}function s(e){return function(t,r){for(var o;null!=(o=t.next());){if("<"==o){r.tokenize=s(e+1);return r.tokenize(t,r)}if(">"==o){if(1==e){r.tokenize=n;break}r.tokenize=s(e-1);return r.tokenize(t,r)}}return"meta"}}function l(e,t,r){this.prev=e.context;this.tagName=t;this.indent=e.indented;this.startOfLine=r;(L.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function c(e,t){for(var r;;){if(!e.context)return;r=e.context.tagName;if(!L.contextGrabbers.hasOwnProperty(r)||!L.contextGrabbers[
 r].hasOwnProperty(t))return;u(e)}}function f(e,t,r){if("openTag"==e){r.tagStart=t.column();return d}return"closeTag"==e?p:f}function d(e,t,r){if("word"==e){r.tagName=t.current();C="tag";return v}C="error";return d}function p(e,t,r){if("word"==e){var n=t.current();r.context&&r.context.tagName!=n&&L.implicitlyClosed.hasOwnProperty(r.context.tagName)&&u(r);if(r.context&&r.context.tagName==n){C="tag";return g}C="tag error";return h}C="error";return h}function g(e,t,r){if("endTag"!=e){C="error";return g}u(r);return f}function h(e,t,r){C="error";return g(e,t,r)}function v(e,t,r){if("word"==e){C="attribute";return m}if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,o=r.tagStart;r.tagName=r.tagStart=null;if("selfcloseTag"==e||L.autoSelfClosers.hasOwnProperty(n))c(r,n);else{c(r,n);r.context=new l(r,n,o==r.indented)}return f}C="error";return v}function m(e,t,r){if("equals"==e)return w;L.allowMissing||(C="error");return v(e,t,r)}function w(e,t,r){if("string"==e)return y;if("word"==e&&L.allowU
 nquoted){C="string";return v}C="error";return v(e,t,r)}function y(e,t,r){return"string"==e?y:v(e,t,r)}var b=t.indentUnit,x=r.multilineTagIndentFactor||1,k=r.multilineTagIndentPastTag;null==k&&(k=!0);var j,C,L=r.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{p
 re:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},T=r.alignCDATA;return{startState:function(){return{tokenize:n,state:f,indented:0,tagName:null,tagStart:null,context:null}},token:function(e,t){!t.tagName&&e.sol()&&(t.indented=e.indentation());if(e.eatSpace())return null;j=null;var r=t.tokenize(e,t);if((r||j)&&"comment"!=r){C=null;t.state=t.state(j||r,e,t);C&&(r="error"==C?r+" error":C)}return r},indent:function(t,r,i){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+b;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=o&&t.tokenize!=n)return i?i.match(/^(\s*)/)[0].length:0;if(t.tagName)return k?t.tagStart+t.tagName.length+2:t.tagStart+b*x;if(T&&/<!\[CDATA\[/.test(r))return 0;var s=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(s&&s[1])for(;a;){if(a.tagName==s[2]){a=a.prev;break}if(!L.implicitlyClosed.hasOwnProperty(a.tagNam
 e))break;a=a.prev}else if(s)for(;a;){var l=L.contextGrabbers[a.tagName];if(!l||!l.hasOwnProperty(s[2]))break;a=a.prev}for(;a&&!a.startOfLine;)a=a.prev;return a?a.indent+b:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:r.htmlMode?"html":"xml",helperType:r.htmlMode?"html":"xml"}});e.defineMIME("text/xml","xml");e.defineMIME("application/xml","xml");e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{codemirror:void 0}],12:[function(t,r,n){(function(){(function(o){if("object"==typeof n&&"object"==typeof r)return o(function(){try{return t("jquery")}catch(e){return window.jQuery}}());if("function"==typeof e&&e.amd)return e(["jquery"],o);o(jQuery);return void 0})(function(e){var t;t=e;return t.pivotUtilities.d3_renderers={Treemap:function(e,r){var n,o,i,a,s,l,u,c,f,d,p,g,h,v;i={localeStrings:{}};r=t.extend(i,r);l=t("<div style='width: 100%; height: 100%;'>");c={name:"All",children:[]};n=function(e,t
 ,r){var o,i,a,s,l,u,c;if(0!==t.length){null==(u=e.children)&&(e.children=[]);a=t.shift();c=e.children;for(s=0,l=c.length;l>s;s++){o=c[s];if(o.name===a){n(o,t,r);return}}i={name:a};n(i,t,r);return e.children.push(i)}e.value=r};v=e.getRowKeys();for(g=0,h=v.length;h>g;g++){u=v[g];d=e.getAggregator(u,[]).value();null!=d&&n(c,u,d)}o=d3.scale.category10();p=t(window).width()/1.4;a=t(window).height()/1.4;s=10;f=d3.layout.treemap().size([p,a]).sticky(!0).value(function(e){return e.size});d3.select(l[0]).append("div").style("position","relative").style("width",p+2*s+"px").style("height",a+2*s+"px").style("left",s+"px").style("top",s+"px").datum(c).selectAll(".node").data(f.padding([15,0,0,0]).value(function(e){return e.value}).nodes).enter().append("div").attr("class","node").style("background",function(e){return null!=e.children?"lightgrey":o(e.name)}).text(function(e){return e.name}).call(function(){this.style("left",function(e){return e.x+"px"}).style("top",function(e){return e.y+"px"}).s
 tyle("width",function(e){return Math.max(0,e.dx-1)+"px"}).style("height",function(e){return Math.max(0,e.dy-1)+"px"})});return l}}})}).call(this)},{jquery:void 0}],13:[function(t,r,n){(function(){(function(o){if("object"==typeof n&&"object"==typeof r)return o(function(){try{return t("jquery")}catch(e){return window.jQuery}}());if("function"==typeof e&&e.amd)return e(["jquery"],o);o(jQuery);return void 0})(function(e){var t,r;t=e;r=function(e,r){return function(n,o){var i,a,s,l,u,c,f,d,p,g,h,v,m,w,y,b,x,k,j,C,L,T,S,M,E;c={localeStrings:{vs:"vs",by:"by"}};o=t.extend(c,o);x=n.getRowKeys();0===x.length&&x.push([]);s=n.getColKeys();0===s.length&&s.push([]);g=function(){var e,t,r;r=[];for(e=0,t=x.length;t>e;e++){d=x[e];r.push(d.join("-"))}return r}();g.unshift("");v=0;l=[g];for(T=0,M=s.length;M>T;T++){a=s[T];y=[a.join("-")];v+=y[0].length;for(S=0,E=x.length;E>S;S++){b=x[S];i=n.getAggregator(b,a);y.push(null!=i.value()?i.value():null)}l.push(y)}k=C=n.aggregatorName+(n.valAttrs.length?"("+n
 .valAttrs.join(", ")+")":"");p=n.colAttrs.join("-");""!==p&&(k+=" "+o.localeStrings.vs+" "+p);f=n.rowAttrs.join("-");""!==f&&(k+=" "+o.localeStrings.by+" "+f);m={width:t(window).width()/1.4,height:t(window).height()/1.4,title:k,hAxis:{title:p,slantedText:v>50},vAxis:{title:C}};2===l[0].length&&""===l[0][1]&&(m.legend={position:"none"});for(h in r){j=r[h];m[h]=j}u=google.visualization.arrayToDataTable(l);w=t("<div style='width: 100%; height: 100%;'>");L=new google.visualization.ChartWrapper({dataTable:u,chartType:e,options:m});L.draw(w[0]);w.bind("dblclick",function(){var e;e=new google.visualization.ChartEditor;google.visualization.events.addListener(e,"ok",function(){return e.getChartWrapper().draw(w[0])});return e.openDialog(L)});return w}};return t.pivotUtilities.gchart_renderers={"Line Chart":r("LineChart"),"Bar Chart":r("ColumnChart"),"Stacked Bar Chart":r("ColumnChart",{isStacked:!0}),"Area Chart":r("AreaChart",{isStacked:!0})}})}).call(this)},{jquery:void 0}],14:[function(t,r
 ){(function(t){function n(){try{return l in t&&t[l]}catch(e){return!1}}function o(e){return e.replace(/^d/,"___$&").replace(g,"___")}var i,a={},s=t.document,l="localStorage",u="script";a.disabled=!1;a.version="1.3.17";a.set=function(){};a.get=function(){};a.has=function(e){return void 0!==a.get(e)};a.remove=function(){};a.clear=function(){};a.transact=function(e,t,r){if(null==r){r=t;t=null}null==t&&(t={});var n=a.get(e,t);r(n);a.set(e,n)};a.getAll=function(){};a.forEach=function(){};a.serialize=function(e){return JSON.stringify(e)};a.deserialize=function(e){if("string"!=typeof e)return void 0;try{return JSON.parse(e)}catch(t){return e||void 0}};if(n()){i=t[l];a.set=function(e,t){if(void 0===t)return a.remove(e);i.setItem(e,a.serialize(t));return t};a.get=function(e,t){var r=a.deserialize(i.getItem(e));return void 0===r?t:r};a.remove=function(e){i.removeItem(e)};a.clear=function(){i.clear()};a.getAll=function(){var e={};a.forEach(function(t,r){e[t]=r});return e};a.forEach=function(e)
 {for(var t=0;t<i.length;t++){var r=i.key(t);e(r,a.get(r))}}}else if(s.documentElement.addBehavior){var c,f;try{f=new ActiveXObject("htmlfile");f.open();f.write("<"+u+">document.w=window</"+u+'><iframe src="/favicon.ico"></iframe>');f.close();c=f.w.frames[0].document;i=c.createElement("div")}catch(d){i=s.createElement("div");c=s.body}var p=function(e){return function(){var t=Array.prototype.slice.call(arguments,0);t.unshift(i);c.appendChild(i);i.addBehavior("#default#userData");i.load(l);var r=e.apply(a,t);c.removeChild(i);return r}},g=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");a.set=p(function(e,t,r){t=o(t);if(void 0===r)return a.remove(t);e.setAttribute(t,a.serialize(r));e.save(l);return r});a.get=p(function(e,t,r){t=o(t);var n=a.deserialize(e.getAttribute(t));return void 0===n?r:n});a.remove=p(function(e,t){t=o(t);e.removeAttribute(t);e.save(l)});a.clear=p(function(e){var t=e.XMLDocument.documentElement.attributes;e.load(l);for(var r,n=0;r=t[n];n++)e.removeAttribute(r
 .name);e.save(l)});a.getAll=function(){var e={};a.forEach(function(t,r){e[t]=r});return e};a.forEach=p(function(e,t){for(var r,n=e.XMLDocument.documentElement.attributes,o=0;r=n[o];++o)t(r.name,a.deserialize(e.getAttribute(r.name)))})}try{var h="__storejs__";a.set(h,h);a.get(h)!=h&&(a.disabled=!0);a.remove(h)}catch(d){a.disabled=!0}a.enabled=!a.disabled;"undefined"!=typeof r&&r.exports&&this.module!==r?r.exports=a:"function"==typeof e&&e.amd?e(a):t.store=a})(Function("return this")())},{}],15:[function(e,t){t.exports={name:"yasgui-utils",version:"1.5.0",description:"Utils for YASGUI libs",main:"src/main.js",repository:{type:"git",url:"git://github.com/YASGUI/Utils.git"},licenses:[{type:"MIT",url:"http://yasgui.github.io/license.txt"}],author:"Laurens Rietveld",maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],bugs:{url:"https://github.com/YASGUI/Utils/issues"},homepage:"https://github.com/YASGUI/Utils",dependencies:{store:"^1.
 3.14"}}},{}],16:[function(e,t){window.console=window.console||{log:function(){}};t.exports={storage:e("./storage.js"),svg:e("./svg.js"),version:{"yasgui-utils":e("../package.json").version}}},{"../package.json":15,"./storage.js":17,"./svg.js":18}],17:[function(e,t){{var r=e("store"),n={day:function(){return 864e5},month:function(){30*n.day()},year:function(){12*n.month()}};t.exports={set:function(e,t,o){if(e&&t){"string"==typeof o&&(o=n[o]());t.documentElement&&(t=(new XMLSerializer).serializeToString(t.documentElement));r.set(e,{val:t,exp:o,time:(new Date).getTime()})}},remove:function(e){e&&r.remove(e)},get:function(e){if(e){var t=r.get(e);return t?t.exp&&(new Date).getTime()-t.time>t.exp?null:t.val:null}return null}}}},{store:14}],18:[function(e,t){t.exports={draw:function(e,r){if(e){var n=t.exports.getElement(r);n&&(e.append?e.append(n):e.appendChild(n))}},getElement:function(e){if(e&&0==e.indexOf("<svg")){var t=new DOMParser,r=t.parseFromString(e,"text/xml"),n=r.documentElement
 ,o=document.createElement("div");o.className="svgImg";o.appendChild(n);return o}return!1}}},{}],19:[function(e,t){t.exports={name:"yasgui-yasr",description:"Yet Another SPARQL Resultset GUI",version:"2.4.0",main:"src/main.js",licenses:[{type:"MIT",url:"http://yasr.yasgui.org/license.txt"}],author:"Laurens Rietveld",homepage:"http://yasr.yasgui.org",devDependencies:{browserify:"^6.1.0",gulp:"~3.6.0","gulp-bump":"^0.1.11","gulp-concat":"^2.4.1","gulp-connect":"^2.0.5","gulp-embedlr":"^0.5.2","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jsvalidate":"^0.2.0","gulp-livereload":"^1.3.1","gulp-minify-css":"^0.3.11","gulp-notify":"^2.0.1","gulp-rename":"^1.2.0","gulp-streamify":"0.0.5","gulp-tag-version":"^1.1.0","gulp-uglify":"^1.0.1","require-dir":"^0.1.0","run-sequence":"^1.0.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"~0.1.1",watchify:"^0.6.4","gulp-sourcemaps":"^1.2.8",exorcist:"^0.1.6","vinyl-transform":"0.0.1","gulp-sass":"^1.2.2","bootstrap-sass":"^3.3.1","browserify-trans
 form-tools":"^1.2.1","gulp-cssimport":"^1.3.1","gulp-html-replace":"^1.4.1","browserify-shim":"^3.8.1"},bugs:"https://github.com/YASGUI/YASR/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"https://github.com/YASGUI/YASR.git"},dependencies:{jquery:"~ 1.11.0",codemirror:"^4.7.0","yasgui-utils":"^1.4.1",pivottable:"^1.2.2","jquery-ui":"^1.10.5",d3:"^3.4.13"},"browserify-shim":{google:"global:google"},browserify:{transform:["browserify-shim"]},optionalShim:{codemirror:{require:"codemirror",global:"CodeMirror"},jquery:{require:"jquery",global:"jQuery"},"../../lib/codemirror":{require:"codemirror",global:"CodeMirror"},"../lib/DataTables/media/js/jquery.dataTables.js":{require:"datatables",global:"jQuery"},datatables:{require:"datatables",global:"jQuery"},d3:{require:"d3",global:"d3"},"jquery-ui/sortable":{require:"jquery-ui/
 sortable",global:"jQuery"},pivottable:{require:"pivottable",global:"jQuery"}}}},{}],20:[function(e,t){"use strict";t.exports=function(e){var t='"',r=",",n="\n",o=e.head.vars,i=e.results.bindings,a=function(){for(var e=0;e<o.length;e++)u(o[e]);f+=n},s=function(){for(var e=0;e<i.length;e++){l(i[e]);f+=n}},l=function(e){for(var t=0;t<o.length;t++){var r=o[t];u(e.hasOwnProperty(r)?e[r].value:"")}},u=function(e){e.replace(t,t+t);c(e)&&(e=t+e+t);f+=" "+e+" "+r},c=function(e){var n=!1;e.match("[\\w|"+r+"|"+t+"]")&&(n=!0);return n},f="";a();s();return f}},{}],21:[function(e,t){"use strict";var r=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),n=t.exports=function(t){var n=r("<div class='booleanResult'></div>"),o=function(){n.empty().appendTo(t.resultsContainer);var o=t.results.getBoolean(),i=null,a=null;if(o===!0){i="check";a="True"}else if(o===!1){i="cross";a="False"}else{n.width("140");a="Could not find boolean value in response"}i&&e("yasgui-utils").svg.draw(n,e("./im
 gs.js")[i]);r("<span></span>").text(a).appendTo(n)},i=function(){return t.results.getBoolean&&(t.results.getBoolean()===!0||0==t.results.getBoolean())};return{name:null,draw:o,hideFromSelection:!0,getPriority:10,canHandleResults:i}};n.version={"YASR-boolean":e("../package.json").version,jquery:r.fn.jquery}},{"../package.json":19,"./imgs.js":26,jquery:void 0,"yasgui-utils":16}],22:[function(e,t){"use strict";var r=function(){try{return e("jquery")}catch(t){return window.jQuery}}();t.exports={output:"table",useGoogleCharts:!0,outputPlugins:["table","error","boolean","rawResponse"],drawOutputSelector:!0,drawDownloadIcon:!0,getUsedPrefixes:null,persistency:{prefix:function(e){return"yasr_"+r(e.container).closest("[id]").attr("id")+"_"},outputSelector:function(){return"selector"},results:{id:function(e){return"results_"+r(e.container).closest("[id]").attr("id")},key:"results",maxSize:1e5}}}},{jquery:void 0}],23:[function(e,t){"use strict";var r=function(){try{return e("jquery")}catch(t){
 return window.jQuery}}(),n=t.exports=function(e){var t=r("<div class='errorResult'></div>"),o=(r.extend(!0,{},n.defaults),function(){var n=e.results.getException();t.empty().appendTo(e.resultsContainer);var o="Error";n.statusText&&n.statusText.length<100&&(o=n.statusText);void 0!=n.status&&(o+=" (#"+n.status+")");t.append(r("<span>",{"class":"exception"}).text(o));var i=null;n.responseText?i=n.responseText:"string"==typeof n&&(i=n);i&&t.append(r("<pre>").text(i))}),i=function(e){return e.results.getException()||!1};return{name:null,draw:o,getPriority:20,hideFromSelection:!0,canHandleResults:i}};n.defaults={}},{jquery:void 0}],24:[function(e,t){(function(r){var n=e("events").EventEmitter,o=(function(){try{return e("jquery")}catch(t){return window.jQuery}}(),!1),i=!1,a=function(){n.call(this);var e=this;this.init=function(){if(i||("undefined"!=typeof window?window.google:"undefined"!=typeof r?r.google:null)||o)("undefined"!=typeof window?window.google:"undefined"!=typeof r?r.google:nu
 ll)?e.emit("initError"):i&&e.emit("initError");else{o=!0;s("//google.com/jsapi",function(){o=!1;e.emit("initDone")});var t=100,n=6e3,a=+new Date,l=function(){if(!("undefined"!=typeof window?window.google:"undefined"!=typeof r?r.google:null))if(+new Date-a>n){i=!0;o=!1;e.emit("initError")}else setTimeout(l,t)};l()}};this.googleLoad=function(){var t=function(){("undefined"!=typeof window?window.google:"undefined"!=typeof r?r.google:null).load("visualization","1",{packages:["corechart","charteditor"],callback:function(){e.emit("done")}})};if(o){e.once("initDone",t);e.once("initError",function(){e.emit("error","Could not load google loader")})}else if("undefined"!=typeof window?window.google:"undefined"!=typeof r?r.google:null)t();else if(i)e.emit("error","Could not load google loader");else{e.once("initDone",t);e.once("initError",function(){e.emit("error","Could not load google loader")})}}},s=function(e,t){var r=document.createElement("script");r.type="text/javascript";r.readyState?r.
 onreadystatechange=function(){if("loaded"==r.readyState||"complete"==r.readyState){r.onreadystatechange=null;t()}}:r.onload=function(){t()};r.src=e;document.body.appendChild(r)};a.prototype=new n;t.exports=new a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{events:4,jquery:void 0}],25:[function(e,t){(function(r){"use strict";function n(e,t,r){function n(e,t,i){var l,u,c,f,d,p,g,h;if(null==e||null==t)return e===t;if(e.__placeholder__||t.__placeholder__)return!0;if(e===t)return 0!==e||1/e==1/t;l=o.call(e);if(o.call(t)!=l)return!1;switch(l){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;u=i.length;for(;u--;)if(i[u]==e)return!0;i.push(e);
 c=0;f=!0;if("[object Array]"==l){d=e.length;p=t.length;if(s){switch(r){case"===":f=d===p;break;case"<==":f=p>=d;break;case"<<=":f=p>d}c=d;s=!1}else{f=d===p;c=d}if(f)for(;c--&&(f=c in e==c in t&&n(e[c],t[c],i)););}else{if("constructor"in e!="constructor"in t||e.constructor!=t.constructor)return!1;for(g in e)if(a(e,g)){c++;if(!(f=a(t,g)&&n(e[g],t[g],i)))break}if(f){h=0;for(g in t)a(t,g)&&++h;if(s)f="<<="===r?h>c:"<=="===r?h>=c:c===h;else{s=!1;f=c===h}}}i.pop();return f}var o={}.toString,i={}.hasOwnProperty,a=function(e,t){return i.call(e,t)},s=!0;return n(e,t,[])}var o=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),i=e("./utils.js"),a=e("yasgui-utils"),s=t.exports=function(t){var l=o.extend(!0,{},s.defaults),u=t.container.closest("[id]").attr("id");null==t.options.gchart&&(t.options.gchart={});var c=t.getPersistencyId("motionchart"),f=t.getPersistencyId("chartConfig");null==t.options.gchart.motionChartState&&(t.options.gchart.motionChartState=a.storage.get(c));nul
 l==t.options.gchart.chartConfig&&(t.options.gchart.chartConfig=a.storage.get(f));var d=null,p=function(e){var o="undefined"!=typeof window?window.google:"undefined"!=typeof r?r.google:null;d=new o.visualization.ChartEditor;o.visualization.events.addListener(d,"ok",function(){var e,r;e=d.getChartWrapper();if(!n(e.getChartType,"MotionChart","===")){t.options.gchart.motionChartState=e.n;a.storage.set(c,t.options.gchart.motionChartState);e.setOption("state",t.options.gchart.motionChartState);o.visualization.events.addListener(e,"ready",function(){var r;r=e.getChart();o.visualization.events.addListener(r,"statechange",function(){t.options.gchart.motionChartState=r.getState();a.storage.set(c,t.options.gchart.motionChartState)})})}r=e.getDataTable();e.setDataTable(null);t.options.gchart.chartConfig=e.toJSON();a.storage.set(f,t.options.gchart.chartConfig);e.setDataTable(r);e.draw()});e&&e()};return{name:"Google Chart",hideFromSelection:!1,priority:7,canHandleResults:function(e){var t,r;retu
 rn null!=(t=e.results)&&(r=t.getVariables())&&r.length>0},getDownloadInfo:function(){if(!t.results)return null;var e=t.resultsContainer.find("svg");return 0==e.length?null:{getContent:function(){return e[0].outerHTML},filename:"queryResults.svg",contentType:"image/svg+xml",buttonTitle:"Download SVG Image"}},draw:function(){var n=function(){t.resultsContainer.empty();var e=u+"_gchartWrapper",r=null;t.resultsContainer.append(o("<button>",{"class":"openGchartBtn yasr_btn"}).text("Chart Config").click(function(){d.openDialog(r)})).append(o("<div>",{id:e,"class":"gchartWrapper"}));var n=new google.visualization.DataTable,s=t.results.getAsJson();s.head.vars.forEach(function(e){var t=i.getGoogleType(s.results.bindings[0][e]);n.addColumn(t,e)});var f=null;t.options.getUsedPrefixes&&(f="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes);s.results.bindings.forEach(function(e){var t=[];s.head.vars.forEach(function(r){t.push(i.castGoogleType(e[r]
 ,f))});n.addRow(t)});if(t.options.gchart.chartConfig){r=new google.visualization.ChartWrapper(t.options.gchart.chartConfig);
+if("MotionChart"===r.getChartType()&&null!=t.options.gchart.motionChartState){r.setOption("state",t.options.gchart.motionChartState);google.visualization.events.addListener(r,"ready",function(){var e;e=r.getChart();google.visualization.events.addListener(e,"statechange",function(){t.options.gchart.motionChartState=e.getState();a.storage.set(c,t.options.gchart.motionChartState)})})}r.setDataTable(n)}else r=new google.visualization.ChartWrapper({chartType:"Table",dataTable:n,containerId:e});r.setOption("width",l.width);r.setOption("height",l.height);r.draw();t.updateHeader()};("undefined"!=typeof window?window.google:"undefined"!=typeof r?r.google:null)&&("undefined"!=typeof window?window.google:"undefined"!=typeof r?r.google:null).visualization&&d?n():e("./gChartLoader.js").on("done",function(){p();n()}).on("error",function(){console.log("errorrr")}).googleLoad()}}};s.defaults={height:"600px",width:"100%",persistencyId:"gchart"}}).call(this,"undefined"!=typeof global?global:"undefine
 d"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gChartLoader.js":24,"./utils.js":37,jquery:void 0,"yasgui-utils":16}],26:[function(e,t){"use strict";t.exports={cross:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><g>	<path d="M83.288,88.13c-2.114,2.112-5.575,2.112-7.689,0L53.659,66.188c-2.114-2.112-5.573-2.112-7.687,0L24.251,87.907   c-2.113,2.114-5.571,2.114-7.686,0l-4.693-4.691c-2.114-2.114-2.114-5.573,0-7.688l21.719-21.721c2.113-2.114,2.113-5.573,0-7.686   L11.872,24.4c-2.114-2.113-2.114-5.571,0-7.686l4.842-4.842c2.113-2.114,5.571-2.114,7.686,0L46.12,33.591   c2.114,2.114,5.572,2.114,7.688,0l21.721-21.719c2.114-2.114,5.573-2.114,7.687,0l4.695,4.695c2.111,2.113,2.111,5.571-0.003,7.686   L66.188,45.973c-2.112,2.114-2.112,5.573,0,7.686L88.13,75.602c2.112,2.111,2.112,5.572,0,7.687L83.288,88.13z"/><
 /g></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><path fill="#000000" d="M14.301,49.982l22.606,17.047L84.361,4.903c2.614-3.733,7.76-4.64,11.493-2.026l0.627,0.462  c3.732,2.614,4.64,7.758,2.025,11.492l-51.783,79.77c-1.955,2.791-3.896,3.762-7.301,3.988c-3.405,0.225-5.464-1.039-7.508-3.084  L2.447,61.814c-3.263-3.262-3.263-8.553,0-11.814l0.041-0.019C5.75,46.718,11.039,46.718,14.301,49.982z"/></svg>',unsorted:'<svg   xmlns:dc="http://purl.org/dc/elements/1.1/"   xmlns:cc="http://creativecommons.org/ns#"   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   xmlns:svg="http://www.w3.org/2000/svg"   xmlns="http://www.w3.org/2000/svg"   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"   version="1.1"   id="Layer_1"   x=
 "0px"   y="0px"   width="100%"   height="100%"   viewBox="0 0 54.552711 113.78478"   enable-background="new 0 0 100 100"   xml:space="preserve"><g     id="g5"     transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path       style="fill:#000000"       inkscape:connector-curvature="0"       id="path7"       d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.2
 5,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path     style="fill:#000000"     inkscape:connector-curvature="0"     id="path7-9"     d="m 8.8748339,52.571766 16.9382111,-0.222584 4.050851,-0.06665 15.719154,-0.222166 0.27778,-0.04246 0.43276,0.0017 0.41632,-0.06121 0.37532,-0.0611 0.47132,-0.119342 0.27767,-0.08206 0.55244,-0.198047 0.19707,-0.08043 0.61095,-0.259721 0.0988,-0.05825 0.019,-0.01914 0.59303,-0.356548 0.11787,-0.0788 0.49125,-0.337892 0.17994,-0.139779 0.37317,-0.336871 0.21862,-0.219786 0.31311,-0.31479 0.21993,-0.259387 c 0.92402,-1.126057 1.55249,-2.512251 1.78961,-4.016904 l 0.0573,-0.25754 0.0195,-0.374113 0.0179,-0.454719 0.0175,-0.05874 -0.0169,-0.258049 -0.0225,-0.493503 -0.0398,-0.355569 -0.0619,-0.4142
 01 -0.098,-0.414812 -0.083,-0.353334 L 53.23955,41.1484 53.14185,40.850967 52.93977,40.377742 52.84157,40.161628 34.38021,4.2507375 C 33.211567,1.9401875 31.035446,0.48226552 28.639484,0.11316952 l -0.01843,-0.01834 -0.671963,-0.07882 -0.236871,0.0042 L 27.335984,-4.7826577e-7 27.220736,0.00379952 l -0.398804,0.0025 -0.313848,0.04043 -0.594474,0.07724 -0.09611,0.02147 C 23.424549,0.60716252 21.216017,2.1142355 20.013025,4.4296865 L 0.93967491,40.894479 c -2.08310801,3.997178 -0.588125,8.835482 3.35080799,10.819749 1.165535,0.613495 2.43199,0.88731 3.675026,0.864202 l 0.49845,-0.02325 0.410875,0.01658 z M 9.1502369,43.934401 9.0136999,43.910011 27.164145,9.2564625 44.70942,43.42818 l -14.765289,0.214677 -4.031106,0.0468 -16.7627881,0.244744 z" /></svg>',sortDesc:'<svg   xmlns:dc="http://purl.org/dc/elements/1.1/"   xmlns:cc="http://creativecommons.org/ns#"   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   xmlns:svg="http://www.w3.org/2000/svg"   xmlns="http://www.w3.org/200
 0/svg"   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"   version="1.1"   id="Layer_1"   x="0px"   y="0px"   width="100%"   height="100%"   viewBox="0 0 54.552711 113.78478"   enable-background="new 0 0 100 100"   xml:space="preserve"><g     id="g5"     transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path       style="fill:#000000"       inkscape:connector-curvature="0"       id="path7"       d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.1
 97,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path     style="fill:#000000"     inkscape:connector-curvature="0"     id="path9"     d="m 27.813273,0.12823506 0.09753,0.02006 c 2.39093,0.458209 4.599455,1.96811104 5.80244,4.28639004 L 52.785897,40.894525 c 2.088044,4.002139 0.590949,8.836902 -3.348692,10.821875 -1.329078,0.688721 -2.766603,0.943695 -4.133174,0.841768 l -0.454018,0.02 L 27.910392,52.354171 23.855313,52.281851 8.14393,52.061827 7.862608,52.021477 7.429856,52.021738 7.014241,51.959818 6.638216,51.900838 6.164776,51.779369 5.889216,51.699439 5
 .338907,51.500691 5.139719,51.419551 4.545064,51.145023 4.430618,51.105123 4.410168,51.084563 3.817138,50.730843 3.693615,50.647783 3.207314,50.310611 3.028071,50.174369 2.652795,49.833957 2.433471,49.613462 2.140099,49.318523 1.901127,49.041407 C 0.97781,47.916059 0.347935,46.528448 0.11153,45.021676 L 0.05352,44.766255 0.05172,44.371683 0.01894,43.936017 0,43.877277 0.01836,43.62206 0.03666,43.122889 0.0765,42.765905 0.13912,42.352413 0.23568,41.940425 0.32288,41.588517 0.481021,41.151945 0.579391,40.853806 0.77369,40.381268 0.876097,40.162336 19.338869,4.2542801 c 1.172169,-2.308419 3.34759,-3.76846504 5.740829,-4.17716604 l 0.01975,0.01985 0.69605,-0.09573 0.218437,0.0225 0.490791,-0.02132 0.39809,0.0046 0.315972,0.03973 0.594462,0.08149 z" /></svg>',sortAsc:'<svg   xmlns:dc="http://purl.org/dc/elements/1.1/"   xmlns:cc="http://creativecommons.org/ns#"   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   xmlns:svg="http://www.w3.org/2000/svg"   xmlns="http://www.w3.org/20
 00/svg"   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"   version="1.1"   id="Layer_1"   x="0px"   y="0px"   width="100%"   height="100%"   viewBox="0 0 54.552711 113.78478"   enable-background="new 0 0 100 100"   xml:space="preserve"><g     id="g5"     transform="matrix(-0.70522156,0.70898699,-0.70898699,-0.70522156,97.988199,58.704807)"><path       style="fill:#000000"       inkscape:connector-curvature="0"       id="path7"       d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.
 197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path     style="fill:#000000"     inkscape:connector-curvature="0"     id="path9"     d="m 27.813273,113.65778 0.09753,-0.0201 c 2.39093,-0.45821 4.599455,-1.96811 5.80244,-4.28639 L 52.785897,72.891487 c 2.088044,-4.002139 0.590949,-8.836902 -3.348692,-10.821875 -1.329078,-0.688721 -2.766603,-0.943695 -4.133174,-0.841768 l -0.454018,-0.02 -16.939621,0.223997 -4.055079,0.07232 -15.711383,0.220024 -0.281322,0.04035 -0.432752,-2.61e-4 -0.415615,0.06192 -0.376025,0.05898 -0.47344,0.121469 -0.27556,0.07993 -0.550
 309,0.198748 -0.199188,0.08114 -0.594655,0.274528 -0.114446,0.0399 -0.02045,0.02056 -0.59303,0.35372 -0.123523,0.08306 -0.486301,0.337172 -0.179243,0.136242 -0.375276,0.340412 -0.219324,0.220495 -0.293372,0.294939 -0.238972,0.277116 C 0.97781,65.869953 0.347935,67.257564 0.11153,68.764336 L 0.05352,69.019757 0.05172,69.414329 0.01894,69.849995 0,69.908735 l 0.01836,0.255217 0.0183,0.499171 0.03984,0.356984 0.06262,0.413492 0.09656,0.411988 0.0872,0.351908 0.158141,0.436572 0.09837,0.298139 0.194299,0.472538 0.102407,0.218932 18.462772,35.908054 c 1.172169,2.30842 3.34759,3.76847 5.740829,4.17717 l 0.01975,-0.0199 0.69605,0.0957 0.218437,-0.0225 0.490791,0.0213 0.39809,-0.005 0.315972,-0.0397 0.594462,-0.0815 z" /></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" xml:space="preserve"><g id="Captions"></g><g id="Your_Icon">	<path fill-rul
 e="evenodd" fill="#000000" d="M88,84v-2c0-2.961-0.859-4-4-4H16c-2.961,0-4,0.98-4,4v2c0,3.102,1.039,4,4,4h68   C87.02,88,88,87.039,88,84z M58,12H42c-5,0-6,0.941-6,6v22H16l34,34l34-34H64V18C64,12.941,62.939,12,58,12z"/></g></svg>',move:'<svg   xmlns:dc="http://purl.org/dc/elements/1.1/"   xmlns:cc="http://creativecommons.org/ns#"   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   xmlns:svg="http://www.w3.org/2000/svg"   xmlns="http://www.w3.org/2000/svg"   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"   version="1.1"   id="Layer_1"   x="0px"   y="0px"   width="100%"   height="100%"   viewBox="5 -10 74.074074 100"   enable-background="new 0 0 100 100"   xml:space="preserve"   inkscape:version="0.48.4 r9939"   sodipodi:docname="noun_11656_cc.svg"><metadata     ><rdf:RDF><cc:Work         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type           rdf:resource="http://purl.org/dc/dcmitype
 /StillImage" /></cc:Work></rdf:RDF></metadata><defs      /><sodipodi:namedview     pagecolor="#ffffff"     bordercolor="#666666"     borderopacity="1"     objecttolerance="10"     gridtolerance="10"     guidetolerance="10"     inkscape:pageopacity="0"     inkscape:pageshadow="2"     inkscape:window-width="753"     inkscape:window-height="480"          showgrid="false"     fit-margin-top="0"     fit-margin-left="0"     fit-margin-right="0"     fit-margin-bottom="0"     inkscape:zoom="2.36"     inkscape:cx="44.101509"     inkscape:cy="31.481481"     inkscape:window-x="287"     inkscape:window-y="249"     inkscape:window-maximized="0"     inkscape:current-layer="Layer_1" /><polygon     points="33,83 50,100 67,83 54,83 54,17 67,17 50,0 33,17 46,17 46,83 "          transform="translate(-7.962963,-10)" /><polygon     points="83,67 100,50 83,33 83,46 17,46 17,33 0,50 17,67 17,54 83,54 "          transform="translate(-7.962963,-10)" /></svg>',fullscreen:'<svg   xmlns:dc="http://purl.org/dc/
 elements/1.1/"   xmlns:cc="http://creativecommons.org/ns#"   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   xmlns:svg="http://www.w3.org/2000/svg"   xmlns="http://www.w3.org/2000/svg"   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"   version="1.1"      x="0px"   y="0px"   width="100%"   height="100%"   viewBox="5 -10 74.074074 100"   enable-background="new 0 0 100 100"   xml:space="preserve"   inkscape:version="0.48.4 r9939"   sodipodi:docname="noun_2186_cc.svg"><metadata     ><rdf:RDF><cc:Work         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs      /><sodipodi:namedview     pagecolor="#ffffff"     bordercolor="#666666"     borderopacity="1"     objecttolerance="10"     gridtolerance="10"     guidetolerance="10"     inkscape:pageopacity="0"     inkscape:pageshadow="2"     
 inkscape:window-width="640"     inkscape:window-height="480"          showgrid="false"     fit-margin-top="0"     fit-margin-left="0"     fit-margin-right="0"     fit-margin-bottom="0"     inkscape:zoom="2.36"     inkscape:cx="44.101509"     inkscape:cy="31.481481"     inkscape:window-x="65"     inkscape:window-y="24"     inkscape:window-maximized="0"     inkscape:current-layer="Layer_1" /><path     d="m -7.962963,-10 v 38.889 l 16.667,-16.667 16.667,16.667 5.555,-5.555 -16.667,-16.667 16.667,-16.667 h -38.889 z"          inkscape:connector-curvature="0"     style="fill:#010101" /><path     d="m 92.037037,-10 v 38.889 l -16.667,-16.667 -16.666,16.667 -5.556,-5.555 16.666,-16.667 -16.666,-16.667 h 38.889 z"          inkscape:connector-curvature="0"     style="fill:#010101" /><path     d="M -7.962963,90 V 51.111 l 16.667,16.666 16.667,-16.666 5.555,5.556 -16.667,16.666 16.667,16.667 h -38.889 z"          inkscape:connector-curvature="0"     style="fill:#010101" /><path     d="M 92.037
 037,90 V 51.111 l -16.667,16.666 -16.666,-16.666 -5.556,5.556 16.666,16.666 -16.666,16.667 h 38.889 z"          inkscape:connector-curvature="0"     style="fill:#010101" /></svg>',smallscreen:'<svg   xmlns:dc="http://purl.org/dc/elements/1.1/"   xmlns:cc="http://creativecommons.org/ns#"   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   xmlns:svg="http://www.w3.org/2000/svg"   xmlns="http://www.w3.org/2000/svg"   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"   version="1.1"      x="0px"   y="0px"   width="100%"   height="100%"   viewBox="5 -10 74.074074 100"   enable-background="new 0 0 100 100"   xml:space="preserve"   inkscape:version="0.48.4 r9939"   sodipodi:docname="noun_2186_cc.svg"><metadata     ><rdf:RDF><cc:Work         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs    
   /><sodipodi:namedview     pagecolor="#ffffff"     bordercolor="#666666"     borderopacity="1"     objecttolerance="10"     gridtolerance="10"     guidetolerance="10"     inkscape:pageopacity="0"     inkscape:pageshadow="2"     inkscape:window-width="1855"     inkscape:window-height="1056"          showgrid="false"     fit-margin-top="0"     fit-margin-left="0"     fit-margin-right="0"     fit-margin-bottom="0"     inkscape:zoom="2.36"     inkscape:cx="44.101509"     inkscape:cy="31.481481"     inkscape:window-x="65"     inkscape:window-y="24"     inkscape:window-maximized="1"     inkscape:current-layer="Layer_1" /><path     d="m 30.926037,28.889 0,-38.889 -16.667,16.667 -16.667,-16.667 -5.555,5.555 16.667,16.667 -16.667,16.667 38.889,0 z"          inkscape:connector-curvature="0"     style="fill:#010101" /><path     d="m 53.148037,28.889 0,-38.889 16.667,16.667 16.666,-16.667 5.556,5.555 -16.666,16.667 16.666,16.667 -38.889,0 z"          inkscape:connector-curvature="0"     style=
 "fill:#010101" /><path     d="m 30.926037,51.111 0,38.889 -16.667,-16.666 -16.667,16.666 -5.555,-5.556 16.667,-16.666 -16.667,-16.667 38.889,0 z"          inkscape:connector-curvature="0"     style="fill:#010101" /><path     d="m 53.148037,51.111 0,38.889 16.667,-16.666 16.666,16.666 5.556,-5.556 -16.666,-16.666 16.666,-16.667 -38.889,0 z"          inkscape:connector-curvature="0"     style="fill:#010101" /></svg>'}},{}],27:[function(e,t){"use strict";var r=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),n=e("yasgui-utils");console=console||{log:function(){}};var o=t.exports=function(t,a,s){var l={};l.options=r.extend(!0,{},o.defaults,a);l.container=r("<div class='yasr'></div>").appendTo(t);l.header=r("<div class='yasr_header'></div>").appendTo(l.container);l.resultsContainer=r("<div class='yasr_results'></div>").appendTo(l.container);l.storage=n.storage;var u=null;l.getPersistencyId=function(e){null===u&&(u=l.options.persistency&&l.options.persistency.prefix?"st
 ring"==typeof l.options.persistency.prefix?l.options.persistency.prefix:l.options.persistency.prefix(l):!1);return u&&e?u+("string"==typeof e?e:e(l)):null};l.options.useGoogleCharts&&e("./gChartLoader.js").once("initError",function(){l.options.useGoogleCharts=!1}).init();l.plugins={};for(var c in o.plugins)(l.options.useGoogleCharts||"gchart"!=c)&&(l.plugins[c]=new o.plugins[c](l));l.updateHeader=function(){var e=l.header.find(".yasr_downloadIcon").removeAttr("title"),t=l.plugins[l.options.output];if(t){var r=t.getDownloadInfo?t.getDownloadInfo():null;if(r){r.buttonTitle&&e.attr("title",r.buttonTitle);e.prop("disabled",!1);e.find("path").each(function(){this.style.fill="black"})}else{e.prop("disabled",!0).prop("title","Download not supported for this result representation");e.find("path").each(function(){this.style.fill="gray"})}}};l.draw=function(e){if(!l.results)return!1;e||(e=l.options.output);var t=null,n=-1,o=[];for(var i in l.plugins)if(l.plugins[i].canHandleResults(l)){var a=
 l.plugins[i].getPriority;"function"==typeof a&&(a=a(l));if(null!=a&&void 0!=a&&a>n){n=a;t=i}}else o.push(i);f(o);if(e in l.plugins&&l.plugins[e].canHandleResults(l)){r(l.resultsContainer).empty();l.plugins[e].draw();return!0}if(t){r(l.resultsContainer).empty();l.plugins[t].draw();return!0}return!1};var f=function(e){l.header.find(".yasr_btnGroup .yasr_btn").removeClass("disabled");e.forEach(function(e){l.header.find(".yasr_btnGroup .select_"+e).addClass("disabled")})};l.somethingDrawn=function(){return!l.resultsContainer.is(":empty")};l.setResponse=function(t,r,o){try{l.results=e("./parsers/wrapper.js")(t,r,o)}catch(i){l.results={getException:function(){return i}}}l.draw();var a=l.getPersistencyId(l.options.persistency.results.key);a&&(l.results.getOriginalResponseAsString&&l.results.getOriginalResponseAsString().length<l.options.persistency.results.maxSize?n.storage.set(a,l.results.getAsStoreObject(),"month"):n.storage.remove(a))};var d=l.getPersistencyId(l.options.persistency.outp
 utSelector);if(d){var p=n.storage.get(d);p&&(l.options.output=p)}i(l);if(!s&&l.options.persistency&&l.options.persistency.results){var g,h=l.getPersistencyId(l.options.persistency.results.key);h&&(g=n.storage.get(h));if(!g&&l.options.persistency.results.id){var v="string"==typeof l.options.persistency.results.id?l.options.persistency.results.id:l.options.persistency.results.id(l);if(v){g=n.storage.get(v);g&&n.storage.remove(v)}}g&&(r.isArray(g)?l.setResponse.apply(this,g):l.setResponse(g))}s&&l.setResponse(s);l.updateHeader();return l},i=function(t){var o=function(){var e=r('<div class="yasr_btnGroup"></div>');r.each(t.plugins,function(o,i){if(!i.hideFromSelection){var a=i.name||o,s=r("<button class='yasr_btn'></button>").text(a).addClass("select_"+o).click(function(){e.find("button.selected").removeClass("selected");r(this).addClass("selected");t.options.output=o;var i=t.getPersistencyId(t.options.persistency.outputSelector);i&&n.storage.set(i,t.options.output,"month");t.draw();t.u
 pdateHeader()}).appendTo(e);t.options.output==o&&s.addClass("selected")}});e.children().length>1&&t.header.append(e)},i=function(){var n=function(e,t){var r=null,n=window.URL||window.webkitURL||window.mozURL||window.msURL;if(n&&Blob){var o=new Blob([e],{type:t});r=n.createObjectURL(o)}return r},o=r("<button class='yasr_btn yasr_downloadIcon btn_icon'></button>").append(e("yasgui-utils").svg.getElement(e("./imgs.js").download)).click(function(){var e=t.plugins[t.options.output];if(e&&e.getDownloadInfo){var o=e.getDownloadInfo(),i=n(o.getContent(),o.contentType?o.contentType:"text/plain"),a=r("<a></a>");a.attr("href",i);a.attr("download",o.filename);a.get(0).click()}});t.header.append(o)},a=function(){var n=r("<button class='yasr_btn btn_fullscreen btn_icon'></button>").append(e("yasgui-utils").svg.getElement(e("./imgs.js").fullscreen)).click(function(){t.container.addClass("yasr_fullscreen")});t.header.append(n)},s=function(){var n=r("<button class='yasr_btn btn_smallscreen btn_icon'
 ></button>").append(e("yasgui-utils").svg.getElement(e("./imgs.js").smallscreen)).click(function(){t.container.removeClass("yasr_fullscreen")});t.header.append(n)};a();s();t.options.drawOutputSelector&&o();t.options.drawDownloadIcon&&i()};o.plugins={};o.registerOutput=function(e,t){o.plugins[e]=t};o.defaults=e("./defaults.js");o.version={YASR:e("../package.json").version,jquery:r.fn.jquery,"yasgui-utils":e("yasgui-utils").version};o.$=r;try{o.registerOutput("boolean",e("./boolean.js"))}catch(a){}try{o.registerOutput("rawResponse",e("./rawResponse.js"))}catch(a){}try{o.registerOutput("table",e("./table.js"))}catch(a){}try{o.registerOutput("error",e("./error.js"))}catch(a){}try{o.registerOutput("pivot",e("./pivot.js"))}catch(a){}try{o.registerOutput("gchart",e("./gchart.js"))}catch(a){}},{"../package.json":19,"./boolean.js":21,"./defaults.js":22,"./error.js":23,"./gChartLoader.js":24,"./gchart.js":25,"./imgs.js":26,"./parsers/wrapper.js":32,"./pivot.js":34,"./rawResponse.js":35,"./tab
 le.js":36,jquery:void 0,"yasgui-utils":16}],28:[function(e,t){"use strict";(function(){try{return e("jquery")}catch(t){return window.jQuery}})(),t.exports=function(t){return e("./dlv.js")(t,",")}},{"./dlv.js":29,jquery:void 0}],29:[function(e,t){"use strict";var r=jQuery=function(){try{return e("jquery")}catch(t){return window.jQuery}}();e("../../lib/jquery.csv-0.71.js");t.exports=function(e,t){var n={},o=r.csv.toArrays(e,{separator:t}),i=function(e){return 0==e.indexOf("http")?"uri":null},a=function(){if(2==o.length&&1==o[0].length&&1==o[1].length&&"boolean"==o[0][0]&&("1"==o[1][0]||"0"==o[1][0])){n.boolean="1"==o[1][0]?!0:!1;return!0}return!1},s=function(){if(o.length>0&&o[0].length>0){n.head={vars:o[0]};return!0}return!1},l=function(){if(o.length>1){n.results={bindings:[]};for(var e=1;e<o.length;e++){for(var t={},r=0;r<o[e].length;r++){var a=n.head.vars[r];if(a){var s=o[e][r],l=i(s);t[a]={value:s};l&&(t[a].type=l)}}n.results.bindings.push(t)}n.head={vars:o[0]};return!0}return!1},
 u=a();if(!u){var c=s();c&&l()}return

<TRUNCATED>

[05/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/async/AsyncPool.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/async/AsyncPool.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/async/AsyncPool.java
deleted file mode 100644
index 1d98ff2..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/async/AsyncPool.java
+++ /dev/null
@@ -1,97 +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.jena.fuseki.async;
-
-import static java.lang.String.format ;
-
-import java.util.* ;
-import java.util.concurrent.* ;
-
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.server.DataService ;
-
-/** The set of currently active async tasks */
-public class AsyncPool
-{
-    private static int nMaxThreads = 4 ;
-    private static int MAX_FINISHED = 20 ;
-    
-    // See Executors.newCachedThreadPool and Executors.newFixedThreadPool 
-    private ExecutorService executor = new ThreadPoolExecutor(0, nMaxThreads,
-                                                              120L, TimeUnit.SECONDS,
-                                                              new LinkedBlockingQueue<Runnable>()) ;
-    private final Object mutex = new Object() ; 
-    private long counter = 0 ;
-    private Map<String, AsyncTask> runningTasks = new LinkedHashMap<>() ; 
-    private Map<String, AsyncTask> finishedTasks = new LinkedHashMap<>() ;
-    
-    private static AsyncPool instance = new AsyncPool() ;
-    public static AsyncPool get() 
-    { return instance ; }
-
-    private AsyncPool() { }
-    
-    public AsyncTask submit(Runnable task, String displayName, DataService dataService) { 
-        synchronized(mutex) {
-            String taskId = Long.toString(++counter) ;
-            Fuseki.serverLog.info(format("Task : %s : %s",taskId, displayName)) ;
-            Callable<Object> c = Executors.callable(task) ;
-            AsyncTask asyncTask = new AsyncTask(c, this, taskId, displayName, dataService) ;
-            Future<Object> x = executor.submit(asyncTask) ;
-            runningTasks.put(taskId, asyncTask) ;
-            return asyncTask ;
-        }
-    }
-    
-    public Collection<AsyncTask> tasks() {
-        synchronized(mutex) {
-            List<AsyncTask> x = new ArrayList<>(runningTasks.size()+finishedTasks.size()) ;
-            x.addAll(runningTasks.values()) ;
-            x.addAll(finishedTasks.values()) ;
-            return x ;
-        }
-    }
-    
-    public void finished(AsyncTask task) { 
-        synchronized(mutex) {
-            String id = task.getTaskId() ;
-            runningTasks.remove(id) ;
-            while ( finishedTasks.size() >= MAX_FINISHED )
-                finishedTasks.remove(task.getTaskId()) ;
-            finishedTasks.put(id, task) ;
-        }
-    }
-
-    public AsyncTask getRunningTask(String taskId) {
-        synchronized(mutex) {
-            return runningTasks.get(taskId) ;
-        }
-    }
-
-    /** Get for any state */
-    public AsyncTask getTask(String taskId) {
-        synchronized(mutex) {
-            AsyncTask task = runningTasks.get(taskId) ;
-            if ( task != null )
-                return task ;
-            return finishedTasks.get(taskId) ;
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/async/AsyncTask.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/async/AsyncTask.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/async/AsyncTask.java
deleted file mode 100644
index 0b73f7e..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/async/AsyncTask.java
+++ /dev/null
@@ -1,114 +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.jena.fuseki.async;
-
-import static java.lang.String.format ;
-
-import java.util.concurrent.Callable ;
-
-import com.hp.hpl.jena.sparql.util.Utils ;
-
-import org.apache.jena.atlas.lib.InternalErrorException ;
-import org.apache.jena.atlas.logging.Log ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.server.DataService ;
-import org.slf4j.Logger ;
-
-/** An asynchronous task */ 
-public class AsyncTask implements Callable<Object>  
-{
-    private static Logger log = Fuseki.serverLog ; 
-    
-    private final Callable<Object> callable ;
-    private final AsyncPool pool ;
-
-    private final String displayName ;
-    private final DataService dataService ;
-
-    private String startPoint = null ;
-    private String finishPoint = null ;
-
-    private final String taskId ;
-
-    /*package*/ AsyncTask(Callable<Object> callable, 
-                          AsyncPool pool,
-                          String taskId,
-                          String displayName,
-                          DataService dataService ) {
-        this.callable = callable ;
-        this.pool = pool ;
-        this.taskId = taskId ; 
-        this.displayName = displayName ;
-        this.dataService = dataService ;
-    }
-
-    /** Unique task id */
-    public String getTaskId() { return taskId ; }
-    
-    /** Display name - no newlines */
-    public String displayName() { return displayName ; }
-    
-    public DataService getDataService() { return dataService ; }
-
-    private void start() {
-        if ( startPoint != null ) {
-            String msg = format("[Task %s] Async task has already been started", taskId) ;
-            Log.warn(Fuseki.serverLog, msg) ;
-            throw new InternalErrorException("Finish has already been called ["+getTaskId()+"]") ; 
-        }
-            
-        Fuseki.serverLog.info(format("[Task %s] starts : %s",taskId, displayName)) ;
-        startPoint = Utils.nowAsXSDDateTimeString() ;
-    }
-    
-    public void finish() {
-        if ( finishPoint != null ) {
-            String msg = format("[Task %s] Async task has already been finished", taskId) ;
-            Log.warn(Fuseki.serverLog, msg) ;
-            throw new InternalErrorException("Finish has already been called ["+getTaskId()+"]") ; 
-        }
-        finishPoint = Utils.nowAsXSDDateTimeString() ;
-        Fuseki.serverLog.info(format("[Task %s] finishes : %s",taskId, displayName)) ;
-    }
-    
-    @Override
-    public Object call() {
-        try {
-            start() ;
-            return callable.call() ;
-        }
-        catch (Exception ex) {
-            log.error("Async task threw an expection", ex) ;
-            return null ;
-        }
-        finally {
-            finish() ;
-            pool.finished(this) ;
-        }
-    }
-
-    public String getStartPoint() {
-        return startPoint ;
-    }
-
-    public String getFinishPoint() {
-        return finishPoint ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java
deleted file mode 100644
index ca4cd2e..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java
+++ /dev/null
@@ -1,59 +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.jena.fuseki.authz;
-
-import java.io.IOException ;
-
-import javax.servlet.ServletRequest ;
-import javax.servlet.ServletResponse ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.web.HttpSC ;
-import org.apache.shiro.web.filter.authz.AuthorizationFilter ;
-import org.apache.shiro.web.util.WebUtils ;
-
-/** Specialise AuthorizationFilter to yield HTTP 403 on access denied */ 
-public abstract class AuthorizationFilter403 extends AuthorizationFilter
-{    
-    private String message ;
-
-    protected AuthorizationFilter403(String text)   { setMessage(text) ; }
-    protected AuthorizationFilter403()              { this(null) ; }
-    
-    /** Set the message used in HTTP 403 responses */
-    public void setMessage(String msg) { message = msg ; }
-    
-    public String getMessage() { return message ; }
-
-    @Override
-    protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
-        HttpServletResponse httpResponse ;
-        try { httpResponse = WebUtils.toHttp(response); }
-        catch (ClassCastException ex) { 
-            // Not a HTTP Servlet operation
-            return super.onAccessDenied(request, response) ;
-        }
-        if ( message == null )
-            httpResponse.sendError(HttpSC.FORBIDDEN_403) ;
-        else
-            httpResponse.sendError(HttpSC.FORBIDDEN_403, message) ;
-        return false ;  // No further processing.
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java
deleted file mode 100644
index aac7ecd..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java
+++ /dev/null
@@ -1,33 +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.jena.fuseki.authz;
-
-import javax.servlet.ServletRequest ;
-import javax.servlet.ServletResponse ;
-
-/** An authorization filter that always denies access and sends back HTTP 403 */
-public class DenyFilter extends AuthorizationFilter403 {
-
-    public DenyFilter() { super("Access denied") ; }
-
-    @Override
-    protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
-        return false ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
deleted file mode 100644
index 71de761..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
+++ /dev/null
@@ -1,62 +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.jena.fuseki.authz;
-
-import javax.servlet.ServletRequest ;
-import javax.servlet.ServletResponse ;
-
-import org.apache.shiro.web.filter.authz.PortFilter ;
-
-/**
- * A Filter that can allow or deny access based on whether the
- * the host that sent the request is the loopback address (AKA localhost).
- * Use of the external IP address of the local machine does not permit access,
- * only the loopback interface is authorized.
- * Responds with HTTP 403 on any denied request.
- * 
- * Example:
- * <pre>
- * [main]
- * localhost=org.apache.jena.fuseki.authz.LocalhostFilter
- * ...
- * [urls]
- * /LocalFilesForLocalPeople/** = localhost
- * </pre>
- * @see PortFilter
- */
-
-public class LocalhostFilter extends AuthorizationFilter403 {
-    
-    private static final String message = "Access denied : only localhost access allowed" ;   
-    
-    public LocalhostFilter() { super(message); } 
-
-    private static String LOCALHOST_IpV6 =  "0:0:0:0:0:0:0:1" ;
-    private static String LOCALHOST_IpV4 =  "127.0.0.1" ;   // Strictly, 127.*.*.*
-    
-    @Override
-    protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception {
-        String remoteAddr = request.getRemoteAddr() ;
-        if ( LOCALHOST_IpV6.equals(remoteAddr) || LOCALHOST_IpV4.equals(remoteAddr) )
-            return true ;
-        return false ;
-    }
-}
-
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/Builder.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/Builder.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/Builder.java
deleted file mode 100644
index f8ec3cc..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/Builder.java
+++ /dev/null
@@ -1,149 +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.jena.fuseki.build;
-
-import static java.lang.String.format ;
-import static org.apache.jena.fuseki.FusekiLib.nodeLabel ;
-import static org.apache.jena.fuseki.FusekiLib.query ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.FusekiConfigException ;
-import org.apache.jena.fuseki.FusekiLib ;
-import org.apache.jena.fuseki.server.DataAccessPoint ;
-import org.apache.jena.fuseki.server.DataService ;
-import org.apache.jena.fuseki.server.Endpoint ;
-import org.apache.jena.fuseki.server.OperationName ;
-import org.slf4j.Logger ;
-
-import com.hp.hpl.jena.assembler.Assembler ;
-import com.hp.hpl.jena.datatypes.xsd.XSDDatatype ;
-import com.hp.hpl.jena.query.Dataset ;
-import com.hp.hpl.jena.query.QuerySolution ;
-import com.hp.hpl.jena.query.ResultSet ;
-import com.hp.hpl.jena.rdf.model.Literal ;
-import com.hp.hpl.jena.rdf.model.RDFNode ;
-import com.hp.hpl.jena.rdf.model.Resource ;
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-import com.hp.hpl.jena.sparql.util.FmtUtils ;
-import com.hp.hpl.jena.tdb.TDB ;
-import com.hp.hpl.jena.vocabulary.RDF ;
-public class Builder
-{
-    private static Logger log = Fuseki.builderLog ;
-    
-    /** Build a DataAccessPoint, including DataServiceat Resource svc */
-    public static DataAccessPoint buildDataAccessPoint(Resource svc) {
-        RDFNode n = FusekiLib.getOne(svc, "fu:name") ;
-        if ( ! n.isLiteral() )
-            throw new FusekiConfigException("Not a literal for access point name: "+FmtUtils.stringForRDFNode(n));
-        Literal object = n.asLiteral() ;
-
-        if ( object.getDatatype() != null && ! object.getDatatype().equals(XSDDatatype.XSDstring) )
-            Fuseki.configLog.error(format("Service name '%s' is not a string", FmtUtils.stringForRDFNode(object)));
-        String name = object.getLexicalForm() ;
-        name = DataAccessPoint.canonical(name) ;
-
-        DataService dataService = Builder.buildDataService(svc) ;
-        DataAccessPoint dataAccess = new DataAccessPoint(name) ;
-        dataAccess.setDataService(dataService) ;
-        return dataAccess ;
-    }
-
-    /** Build a DatasetRef starting at Resource svc */
-    public static DataService buildDataService(Resource svc) {
-        log.info("Service: " + nodeLabel(svc)) ;
-        // DO REAL WORK
-        Resource datasetDesc = ((Resource)getOne(svc, "fu:dataset")) ;
-        
-        // Check if it is in the model.
-        if ( !datasetDesc.hasProperty(RDF.type) )
-            throw new FusekiConfigException("No rdf:type for dataset " + nodeLabel(datasetDesc)) ;
-        Dataset ds = (Dataset)Assembler.general.open(datasetDesc) ;
-        // In case the assembler included ja:contents
-        TDB.sync(ds) ;
-        DataService dataService = new DataService(null, ds.asDatasetGraph()) ;
-        addServiceEP(dataService, OperationName.Query,  svc,    "fu:serviceQuery") ;
-        addServiceEP(dataService, OperationName.Update, svc,    "fu:serviceUpdate") ;
-        addServiceEP(dataService, OperationName.Upload, svc,    "fu:serviceUpload") ;
-        addServiceEP(dataService, OperationName.GSP_R,  svc,    "fu:serviceReadGraphStore") ;
-        addServiceEP(dataService, OperationName.GSP,    svc,    "fu:serviceReadWriteGraphStore") ;
-        
-        if ( ! dataService.getOperation(OperationName.GSP).isEmpty() )
-            dataService.addEndpoint(OperationName.Quads, "") ;
-        else if ( ! dataService.getOperation(OperationName.GSP_R).isEmpty() )
-            dataService.addEndpoint(OperationName.Quads, "") ;
-        
-        // XXX 
-//        // Extract timeout overriding configuration if present.
-//        if ( svc.hasProperty(FusekiVocab.pAllowTimeoutOverride) ) {
-//            sDesc.allowTimeoutOverride = svc.getProperty(FusekiVocab.pAllowTimeoutOverride).getObject().asLiteral().getBoolean() ;
-//            if ( svc.hasProperty(FusekiVocab.pMaximumTimeoutOverride) ) {
-//                sDesc.maximumTimeoutOverride = (int)(svc.getProperty(FusekiVocab.pMaximumTimeoutOverride).getObject().asLiteral().getFloat() * 1000) ;
-//            }
-//        }
-
-        return dataService ;
-    }
-    
-    /** Build a DataService starting at Resource svc */
-    public static DataService buildDataService(DatasetGraph dsg, boolean allowUpdate) {
-        DataService dataService = new DataService(null, dsg) ;
-        addServiceEP(dataService, OperationName.Query, "query") ;
-        addServiceEP(dataService, OperationName.Query, "sparql") ;
-        if ( ! allowUpdate ) {
-            addServiceEP(dataService, OperationName.Quads, "quads") ;
-            addServiceEP(dataService, OperationName.GSP_R, "data") ;
-            return dataService ;
-        }
-        addServiceEP(dataService, OperationName.GSP,    "data") ;
-        addServiceEP(dataService, OperationName.Update, "update") ;
-        addServiceEP(dataService, OperationName.Upload, "upload") ;
-        addServiceEP(dataService, OperationName.Quads,  "") ;
-        return dataService ;
-    }
-
-    private static void addServiceEP(DataService dataService, OperationName opName, String epName) {
-        dataService.addEndpoint(opName, epName) ; 
-    }
-
-    public static RDFNode getOne(Resource svc, String property) {
-        String ln = property.substring(property.indexOf(':') + 1) ;
-        ResultSet rs = FusekiLib.query("SELECT * { ?svc " + property + " ?x}", svc.getModel(), "svc", svc) ;
-        if ( !rs.hasNext() )
-            throw new FusekiConfigException("No " + ln + " for service " + FusekiLib.nodeLabel(svc)) ;
-        RDFNode x = rs.next().get("x") ;
-        if ( rs.hasNext() )
-            throw new FusekiConfigException("Multiple " + ln + " for service " + FusekiLib.nodeLabel(svc)) ;
-        return x ;
-    }
-    
-
-    private static void addServiceEP(DataService dataService, OperationName opName, Resource svc, String property) {
-        ResultSet rs = query("SELECT * { ?svc " + property + " ?ep}", svc.getModel(), "svc", svc) ;
-        for ( ; rs.hasNext() ; ) {
-            QuerySolution soln = rs.next() ;
-            String epName = soln.getLiteral("ep").getLexicalForm() ;
-            Endpoint operation = new Endpoint(opName, epName) ;
-            addServiceEP(dataService, opName, epName); 
-            //log.info("  " + opName.name + " = " + dataAccessPoint.getName() + "/" + epName) ;
-        }
-    }
-
-
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
deleted file mode 100644
index 2b85c99..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
+++ /dev/null
@@ -1,107 +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.jena.fuseki.build;
-
-import java.io.StringReader ;
-import java.util.HashMap ;
-import java.util.Map ;
-
-import org.apache.jena.fuseki.FusekiConfigException ;
-import org.apache.jena.fuseki.server.DataService ;
-import org.apache.jena.fuseki.server.FusekiServer ;
-import org.apache.jena.fuseki.server.FusekiVocab ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.riot.RDFLanguages ;
-
-import com.hp.hpl.jena.rdf.model.Model ;
-import com.hp.hpl.jena.rdf.model.ModelFactory ;
-import com.hp.hpl.jena.rdf.model.Resource ;
-import com.hp.hpl.jena.sparql.util.FmtUtils ;
-import com.hp.hpl.jena.sparql.util.TypeNotUniqueException ;
-import com.hp.hpl.jena.sparql.util.graph.GraphUtils ;
-
-// Check whether this is used or needed
-public abstract class DataServiceDesc
-{
-    public static DataServiceDesc createFromTemplate(String templateFile, String dbName) {
-        Map<String, String> params = new HashMap<>() ;
-        params.put(Template.NAME, dbName) ;
-        FusekiServer.addGlobals(params); 
-        String template = TemplateFunctions.templateFile(templateFile, params) ;
-        Lang lang = RDFLanguages.filenameToLang(templateFile, Lang.TTL) ;
-        StringReader sr = new StringReader(template) ;
-        return create(sr, lang) ;
-    }
-    
-    public static DataServiceDesc create(StringReader strReader, Lang lang ) {
-        Model model = ModelFactory.createDefaultModel() ;
-        RDFDataMgr.read(model, strReader, "http://base/", lang) ;
-        Resource root ;
-        try {
-            root = GraphUtils.findRootByType(model, FusekiVocab.fusekiService) ;
-            if ( root == null )
-                throw new FusekiConfigException("No root of type "
-                    + FmtUtils.stringForResource(FusekiVocab.fusekiService) + "found") ;
-        } catch (TypeNotUniqueException ex) {
-            throw new FusekiConfigException("Multiple items of type: " + FusekiVocab.fusekiService) ;
-        }
-        return new DataServiceDescResource(root) ;
-    }
-
-    public static DataServiceDesc create(DataService dataService) {
-        return new DataServiceDescPrebuilt(dataService) ;
-    }
-    
-    //public abstract Resource getResource() ;
-
-    public abstract DataService build() ;
-//    public abstract void unbuild() ;
-
-
-    private static class DataServiceDescResource extends DataServiceDesc {
-        protected Resource resource ; 
-
-        protected DataServiceDescResource(Resource resource) {
-            this.resource = resource ;
-        }
-
-        public Resource getResource() { return resource ; }
-
-        @Override
-        public DataService build() {
-            return Builder.buildDataService(resource) ;
-        }
-    }
-    
-    private static class DataServiceDescPrebuilt extends DataServiceDesc {
-
-        private DataService dataService ;
-
-        protected DataServiceDescPrebuilt(DataService dataService) {
-            this.dataService = dataService ;
-        }
-
-        @Override
-        public DataService build() {
-            return dataService ;
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
deleted file mode 100644
index 10319a4..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
+++ /dev/null
@@ -1,261 +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.jena.fuseki.build ;
-
-import java.io.File ;
-import java.io.FilenameFilter ;
-import java.lang.reflect.Method ;
-import java.util.ArrayList ;
-import java.util.Collections ;
-import java.util.List ;
-
-import org.apache.jena.atlas.iterator.Iter ;
-import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.FusekiConfigException ;
-import org.apache.jena.fuseki.FusekiLib ;
-import org.apache.jena.fuseki.server.DataAccessPoint ;
-import org.apache.jena.fuseki.server.DatasetStatus ;
-import org.apache.jena.fuseki.server.FusekiVocab ;
-import org.apache.jena.fuseki.server.SystemState ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.slf4j.Logger ;
-
-import com.hp.hpl.jena.assembler.JA ;
-import com.hp.hpl.jena.query.Dataset ;
-import com.hp.hpl.jena.query.QuerySolution ;
-import com.hp.hpl.jena.query.ResultSet ;
-import com.hp.hpl.jena.rdf.model.* ;
-import com.hp.hpl.jena.sparql.core.assembler.AssemblerUtils ;
-import com.hp.hpl.jena.update.UpdateAction ;
-import com.hp.hpl.jena.update.UpdateFactory ;
-import com.hp.hpl.jena.update.UpdateRequest ;
-import com.hp.hpl.jena.vocabulary.RDF ;
-
-public class FusekiConfig {
-    static { Fuseki.init() ; }
-    
-    private static Logger log = Fuseki.configLog ;
-    
-    private static FilenameFilter visibleFiles = 
-        new FilenameFilter() {
-        @Override
-        public boolean accept(File dir, String name) {
-            if ( name.startsWith(".") )
-                return false ;
-            File f = new File(dir, name) ;
-            return f.isFile() ;
-        }
-    } ;
-    
-    /** Has side effects in server setup */
-    public static List<DataAccessPoint> readConfigFile(String filename) {
-        // Old-style config file.
-        Model model = RDFDataMgr.loadModel(filename) ;
-        if ( model.size() == 0 )
-            return Collections.emptyList() ;
-        additionalRDF(model) ;
-        server(model) ;
-        return servicesAndDatasets(model) ;
-    }
-
-    private static void server(Model model) {
-        // Find one server.
-        List<Resource> servers = getByType(FusekiVocab.tServer, model) ;
-        if ( servers.size() == 0 )
-            return ; 
-        if ( servers.size() > 1 )
-            throw new FusekiConfigException(servers.size()
-                                            + " servers found (must be exactly one in a configuration file)") ;
-        // ---- Server
-        Resource server = servers.get(0) ;
-        processServer(server) ;
-    }
-
-    private static void processServer(Resource server) {
-        // Global, currently.
-        AssemblerUtils.setContext(server, Fuseki.getContext()) ;
-
-        StmtIterator sIter = server.listProperties(JA.loadClass) ;
-        for ( ; sIter.hasNext() ; ) {
-            Statement s = sIter.nextStatement() ;
-            RDFNode rn = s.getObject() ;
-            String className = null ;
-            if ( rn instanceof Resource ) {
-                String uri = ((Resource)rn).getURI() ;
-                if ( uri == null ) {
-                    log.warn("Blank node for class to load") ;
-                    continue ;
-                }
-                String javaScheme = "java:" ;
-                if ( !uri.startsWith(javaScheme) ) {
-                    log.warn("Class to load is not 'java:': " + uri) ;
-                    continue ;
-                }
-                className = uri.substring(javaScheme.length()) ;
-            }
-            if ( rn instanceof Literal )
-                className = ((Literal)rn).getLexicalForm() ;
-            /* Loader. */loadAndInit(className) ;
-        }
-    }
-    
-    private static List<DataAccessPoint> servicesAndDatasets(Model model) {
-        // Old style configuration file : server to services.
-        // ---- Services
-        ResultSet rs = FusekiLib.query("SELECT * { ?s fu:services [ list:member ?member ] }", model) ;
-        // If the old config.ttl file becomes just the server configuration file,
-        // then don't warn here.
-//        if ( !rs.hasNext() )
-//            log.warn("No services found") ;
-
-        List<DataAccessPoint> accessPoints = new ArrayList<>() ;
-
-        for ( ; rs.hasNext() ; ) {
-            QuerySolution soln = rs.next() ;
-            Resource svc = soln.getResource("member") ;
-            DataAccessPoint acc = Builder.buildDataAccessPoint(svc) ;
-            accessPoints.add(acc) ;
-        }
-        return accessPoints ;
-    }
-    
-    private static void loadAndInit(String className) {
-        try {
-            Class<? > classObj = Class.forName(className) ;
-            log.info("Loaded " + className) ;
-            Method initMethod = classObj.getMethod("init") ;
-            initMethod.invoke(null) ;
-        }
-        catch (ClassNotFoundException ex) {
-            log.warn("Class not found: " + className) ;
-        }
-        catch (Exception e) {
-            throw new FusekiConfigException(e) ;
-        }
-    }
-    
-    // XXX Move to utils
-    private static Model additionalRDF(Model m) {
-        SystemState.init$();        // Why? mvn jetty:run-war
-        String x1 = StrUtils.strjoinNL
-            ( SystemState.PREFIXES, 
-              "INSERT                    { [] ja:loadClass 'com.hp.hpl.jena.tdb.TDB' }",
-              "WHERE { FILTER NOT EXISTS { [] ja:loadClass 'com.hp.hpl.jena.tdb.TDB' } }"
-             ) ;
-        String x2 = StrUtils.strjoinNL
-            (SystemState.PREFIXES,
-             "INSERT DATA {",
-             "   tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .",
-             "   tdb:GraphTDB    rdfs:subClassOf  ja:Model .",
-             "}" 
-             ) ;
-        execute(m, x1) ;
-        execute(m, x2) ;
-        return m ;
-    }
-
-    private static void execute(Model m, String x) {
-        UpdateRequest req = UpdateFactory.create(x) ;
-        UpdateAction.execute(req, m);
-    }
-
-    // XXX Move to a library
-    private static List<Resource> getByType(Resource type, Model m) {
-        ResIterator rIter = m.listSubjectsWithProperty(RDF.type, type) ;
-        return Iter.toList(rIter) ;
-    }
-    
-    // ---- Directory of assemblers
-    
-    /** Read service descriptions in the given directory */ 
-    public static List<DataAccessPoint> readConfigurationDirectory(String dir) {
-        List<DataAccessPoint> dataServiceRef = new ArrayList<>() ;
-        File d = new File(dir) ;
-        String[] aFiles = d.list(visibleFiles) ;
-        if ( aFiles == null ) {
-            log.warn("Not found: directory for assembler files for services: '"+dir+"'") ;
-            return Collections.emptyList() ;
-        }
-        for ( String assemFile : aFiles ) {
-            Model m = RDFDataMgr.loadModel(assemFile) ;
-            DataAccessPoint acc = readConfiguration(m) ; 
-            dataServiceRef.add(acc) ;
-        }
-
-        return dataServiceRef ;
-    }
-
-    private static DataAccessPoint readConfiguration(Model m) {
-        additionalRDF(m) ;
-        List<Resource> services = getByType(FusekiVocab.fusekiService, m) ; 
-
-        if ( services.size() == 0 ) {
-            log.error("No services found") ;
-            throw new FusekiConfigException() ;
-        }
-
-        // Remove?
-        if ( services.size() > 1 ) {
-            log.error("Multiple services found") ;
-            throw new FusekiConfigException() ;
-        }
-
-        Resource service = services.get(0) ;
-        DataAccessPoint acc = Builder.buildDataAccessPoint(service) ; 
-        return acc ;
-    }
-
-    // ---- System database
-    /** Read the system database */
-    public static List<DataAccessPoint> readSystemDatabase(Dataset ds) {
-        String qs = StrUtils.strjoinNL
-            (SystemState.PREFIXES ,
-             "SELECT * {" ,
-             "  GRAPH ?g {",
-             "     ?s fu:name ?name ;" ,
-             "        fu:status ?status ." ,
-             "  }",
-             "}"
-             ) ;
-        
-        List<DataAccessPoint> refs = new ArrayList<>() ;
-        
-        ResultSet rs = FusekiLib.query(qs, ds) ;
-        
-//        ResultSetFormatter.out(rs); 
-//        ((ResultSetRewindable)rs).reset();
-        
-        for ( ; rs.hasNext() ; ) {
-            QuerySolution row = rs.next() ;
-            Resource s = row.getResource("s") ;
-            Resource g = row.getResource("g") ;
-            Resource rStatus = row.getResource("status") ;
-            //String name = row.getLiteral("name").getLexicalForm() ;
-            DatasetStatus status = DatasetStatus.status(rStatus) ;
-            
-            Model m = ds.getNamedModel(g.getURI()) ;
-            // Rebase the resoure of the service description to the containing graph.
-            Resource svc = m.wrapAsResource(s.asNode()) ;
-            DataAccessPoint ref = Builder.buildDataAccessPoint(svc) ;
-            refs.add(ref) ;
-        }
-        return refs ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/Template.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/Template.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/Template.java
deleted file mode 100644
index 55a449e..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/Template.java
+++ /dev/null
@@ -1,52 +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.jena.fuseki.build;
-
-import java.nio.file.Path ;
-
-import org.apache.jena.fuseki.server.FusekiEnv ;
-
-public class Template
-{
-    public static Path getPath(String templateName) {
-        return FusekiEnv.FUSEKI_BASE.resolve(templateName) ;
-    }
-    
-    public static final String templateDir          = "templates" ;
-    public static final String templateMemFN        = templateDir+"/config-mem" ;
-    public static final String templateTDBFN        = templateDir+"/config-tdb" ;
-    public static final String templateTDBMemFN     = templateDir+"/config-tdb-mem" ; 
-    public static final String templateTDBDirFN     = templateDir+"/config-tdb-dir" ;
-    public static final String templateServiceFN    = templateDir+"/config-service" ;       // Dummy used by dataset-less service.
-    
-    // Template may be in a resources area of a jar file so you can't do a directory listing.
-    public static final String[] templateNames = {
-        templateMemFN ,
-        templateTDBFN ,
-        templateTDBMemFN ,
-        templateTDBDirFN ,
-        templateServiceFN
-    } ;
-    
-    public static final String NAME = "NAME" ;
-    public static final String DATA = "DATA" ;
-    public static final String DIR =  "DIR" ;
-    
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
deleted file mode 100644
index 41c21c5..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
+++ /dev/null
@@ -1,68 +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.jena.fuseki.build;
-
-import java.io.IOException ;
-import java.io.InputStream ;
-import java.util.Map ;
-import java.util.Map.Entry ;
-
-import org.apache.jena.atlas.io.IO ;
-import org.apache.jena.fuseki.Fuseki ;
-
-import com.hp.hpl.jena.util.FileUtils ;
-
-public class TemplateFunctions
-{
-    /** Read in a template from a file, substitute for {NAME} and return the string. */
-    public static String templateFile(String templateName, Map<String, String> params) {
-        String templateFilename = Template.getPath(templateName).toString() ;
-        String template ;
-        try { template = FileUtils.readWholeFileAsUTF8(templateFilename) ; }
-        catch (IOException ex) { 
-            Fuseki.serverLog.error("File not found: "+templateFilename);
-            IO.exception(ex); return null ;
-        }
-        return templateString(template, params) ;
-    }
-    
-    /** Read a template file, substitute for {NAME} and return the model. */
-    public static String templateResource(String resourceName, Map<String, String> params) {
-        String template ;
-        try {
-            InputStream in = TemplateFunctions.class.getClassLoader().getResourceAsStream(resourceName) ;
-            if ( in == null )
-                Fuseki.serverLog.error("Resource not found: "+resourceName);
-            template = FileUtils.readWholeFileAsUTF8(in) ;
-        }
-        catch (IOException ex) { 
-            Fuseki.serverLog.error("Error reading resource: "+resourceName);
-            IO.exception(ex); return null ;
-        }
-        return templateString(template, params) ;
-    }
-
-    /** Create a template from a String */ 
-    public static String templateString(String template, Map<String, String> params) {
-        for ( Entry<String, String> e : params.entrySet() ) {
-            template = template.replaceAll("\\{"+e.getKey()+"\\}", e.getValue()) ;
-        }
-        return template ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
deleted file mode 100644
index a7cb0d4..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
+++ /dev/null
@@ -1,339 +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.jena.fuseki.cmd ;
-
-import java.util.List ;
-
-import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.FusekiLogging ;
-import org.apache.jena.fuseki.build.Template ;
-import org.apache.jena.fuseki.jetty.JettyServerConfig ;
-import org.apache.jena.fuseki.jetty.JettyFuseki ;
-import org.apache.jena.fuseki.server.FusekiServerListener ;
-import org.apache.jena.fuseki.server.ServerInitialConfig ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.riot.RDFLanguages ;
-import org.slf4j.Logger ;
-import arq.cmd.CmdException ;
-import arq.cmdline.ArgDecl ;
-import arq.cmdline.CmdARQ ;
-import arq.cmdline.ModDatasetAssembler ;
-
-import com.hp.hpl.jena.query.ARQ ;
-import com.hp.hpl.jena.query.Dataset ;
-import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
-import com.hp.hpl.jena.tdb.TDB ;
-import com.hp.hpl.jena.tdb.sys.Names ;
-import com.hp.hpl.jena.tdb.transaction.TransactionManager ;
-
-public class FusekiCmd {
-    // This allows us to set logging before calling FusekiCmdInner
-    // FusekiCmdInner inherits from CmdMain which statically sets logging.
-    // By java classloading, super class statics run before the 
-    // statics of a class are run.
-
-    static {
-        FusekiLogging.setLogging() ;
-    }
-
-    static public void main(String... argv) {
-        FusekiCmdInner.innerMain(argv);
-    }
-    
-    static class FusekiCmdInner extends CmdARQ {
-        // --mgt. --mgtPort  :: Legacy.
-        private static ArgDecl  argMgt          = new ArgDecl(ArgDecl.NoValue, "mgt") ;
-        private static ArgDecl  argMgtPort      = new ArgDecl(ArgDecl.HasValue, "mgtPort", "mgtport") ;
-        
-        // --home :: Legacy - do not use.
-        private static ArgDecl  argHome         = new ArgDecl(ArgDecl.HasValue, "home") ;
-        private static ArgDecl  argPages        = new ArgDecl(ArgDecl.HasValue, "pages") ;
-
-        private static ArgDecl  argMem          = new ArgDecl(ArgDecl.NoValue, "mem") ;
-        private static ArgDecl  argAllowUpdate  = new ArgDecl(ArgDecl.NoValue, "update", "allowUpdate") ;
-        private static ArgDecl  argFile         = new ArgDecl(ArgDecl.HasValue, "file") ;
-        private static ArgDecl  argMemTDB       = new ArgDecl(ArgDecl.NoValue, "memtdb", "memTDB") ;
-        private static ArgDecl  argTDB          = new ArgDecl(ArgDecl.HasValue, "loc", "location") ;
-        private static ArgDecl  argPort         = new ArgDecl(ArgDecl.HasValue, "port") ;
-        private static ArgDecl  argLocalhost    = new ArgDecl(ArgDecl.NoValue, "localhost", "local") ;
-        private static ArgDecl  argTimeout      = new ArgDecl(ArgDecl.HasValue, "timeout") ;
-        private static ArgDecl  argFusekiConfig = new ArgDecl(ArgDecl.HasValue, "config", "conf") ;
-        private static ArgDecl  argJettyConfig  = new ArgDecl(ArgDecl.HasValue, "jetty-config") ;
-        private static ArgDecl  argGZip         = new ArgDecl(ArgDecl.HasValue, "gzip") ;
-
-        // Deprecated.  Use shiro.
-        private static ArgDecl  argBasicAuth    = new ArgDecl(ArgDecl.HasValue, "basic-auth") ;
-
-        // private static ModLocation modLocation = new ModLocation() ;
-        private static ModDatasetAssembler modDataset      = new ModDatasetAssembler() ;
-
-        // fuseki [--mem|--desc assembler.ttl] [--port PORT] **** /datasetURI
-
-        static public void innerMain(String... argv) {
-            // Just to make sure ...
-            ARQ.init() ;
-            TDB.init() ;
-            Fuseki.init() ;
-            new FusekiCmdInner(argv).mainRun() ;
-        }
-
-        private JettyServerConfig   jettyServerConfig = new JettyServerConfig() ;
-        {
-            jettyServerConfig.port = 3030 ;
-            jettyServerConfig.contextPath = "/" ;
-            jettyServerConfig.jettyConfigFile = null ;
-            jettyServerConfig.pages = Fuseki.PagesStatic ;
-            jettyServerConfig.enableCompression = true ;
-            jettyServerConfig.verboseLogging = false ;
-        }
-
-        private ServerInitialConfig cmdLineDataset  = new ServerInitialConfig() ;
-
-        public FusekiCmdInner(String... argv) {
-            super(argv) ;
-
-            if ( false )
-                // Consider ...
-                TransactionManager.QueueBatchSize = TransactionManager.QueueBatchSize / 2 ;
-
-            getUsage().startCategory("Fuseki") ;
-            addModule(modDataset) ;
-            add(argMem, "--mem", "Create an in-memory, non-persistent dataset for the server") ;
-            add(argFile, "--file=FILE",
-                "Create an in-memory, non-persistent dataset for the server, initialised with the contents of the file") ;
-            add(argTDB, "--loc=DIR", "Use an existing TDB database (or create if does not exist)") ;
-            add(argMemTDB, "--memTDB", "Create an in-memory, non-persistent dataset using TDB (testing only)") ;
-            add(argPort, "--port", "Listen on this port number") ;
-            add(argPages, "--pages=DIR", "Set of pages to serve as static content") ;
-            // Set via jetty config file.
-            add(argLocalhost, "--localhost", "Listen only on the localhost interface") ;
-            add(argTimeout, "--timeout=", "Global timeout applied to queries (value in ms) -- format is X[,Y] ") ;
-            add(argAllowUpdate, "--update", "Allow updates (via SPARQL Update and SPARQL HTTP Update)") ;
-            add(argFusekiConfig, "--config=", "Use a configuration file to determine the services") ;
-            add(argJettyConfig, "--jetty-config=FILE", "Set up the server (not services) with a Jetty XML file") ;
-            add(argBasicAuth) ;
-            //add(argMgt,     "--mgt",          "Enable the management commands") ;
-            add(argMgt) ; // Legacy
-            add(argMgtPort) ; // Legacy
-            //add(argMgtPort, "--mgtPort=port", "Port for management optations") ;
-            //add(argHome, "--home=DIR", "Root of Fuseki installation (overrides environment variable FUSEKI_HOME)") ;
-            add(argGZip, "--gzip=on|off", "Enable GZip compression (HTTP Accept-Encoding) if request header set") ;
-
-            //add(argUber) ;
-            // add(argGSP) ;
-
-            super.modVersion.addClass(TDB.class) ;
-            super.modVersion.addClass(Fuseki.class) ;
-        }
-
-        static String argUsage = "[--config=FILE] [--mem|--desc=AssemblerFile|--file=FILE] [--port PORT] /DatasetPathName" ;
-
-        @Override
-        protected String getSummary() {
-            return getCommandName() + " " + argUsage ;
-        }
-
-        @Override
-        protected void processModulesAndArgs() {
-            int x = 0 ;
-
-            Logger log = Fuseki.serverLog ;
-
-            if ( contains(argFusekiConfig) )
-                cmdLineDataset.fusekiConfigFile = getValue(argFusekiConfig) ;
-
-            ArgDecl assemblerDescDecl = new ArgDecl(ArgDecl.HasValue, "desc", "dataset") ;
-
-            // ---- Datasets
-
-            if ( contains(argMem) )             
-                x++ ;
-            if ( contains(argFile) )
-                x++ ;
-            if ( contains(assemblerDescDecl) )
-                x++ ;
-            if ( contains(argTDB) )
-                x++ ;
-            if ( contains(argMemTDB) )
-                x++ ;
-
-            if ( cmdLineDataset.fusekiConfigFile != null ) {
-                if ( x >= 1 )
-                    throw new CmdException("Dataset specified on the command line but a configuration file also given.") ;
-            } else {
-                // No configuration file.  0 or 1 legal.
-                if ( x > 1 )
-                    throw new CmdException("Multiple ways providing a dataset. Only one of --mem, --file, --loc or --desc") ;
-            }
-
-            if ( contains(argMem) ) {
-                log.info("Dataset: in-memory") ;
-                cmdLineDataset = new ServerInitialConfig() ;
-                cmdLineDataset.templateFile = Template.templateMemFN ; 
-            }
-
-            if ( contains(argFile) ) {
-                String filename = getValue(argFile) ;
-                log.info("Dataset: in-memory: load file: " + filename) ;
-                if ( !FileOps.exists(filename) )
-                    throw new CmdException("File not found: " + filename) ;
-
-                // Directly populate the dataset.
-                cmdLineDataset = new ServerInitialConfig() ;
-                cmdLineDataset.dsg = DatasetGraphFactory.createMem() ;
-
-                // INITIAL DATA.
-                Lang language = RDFLanguages.filenameToLang(filename) ;
-                if ( language == null )
-                    throw new CmdException("Can't guess language for file: " + filename) ;
-                RDFDataMgr.read(cmdLineDataset.dsg, filename) ;
-            }
-
-            if ( contains(argMemTDB) ) {
-                //log.info("TDB dataset: in-memory") ;
-                cmdLineDataset = new ServerInitialConfig() ;
-                cmdLineDataset.templateFile = Template.templateTDBMemFN ;
-                cmdLineDataset.params.put(Template.DIR, Names.memName) ;
-            }
-
-            if ( contains(argTDB) ) {
-                cmdLineDataset = new ServerInitialConfig() ;
-                cmdLineDataset.templateFile = Template.templateTDBDirFN ;
-
-                String dir = getValue(argTDB) ;
-                cmdLineDataset.params.put(Template.DIR, dir) ;
-            }
-
-            // Otherwise
-            if ( contains(assemblerDescDecl) ) {
-                log.info("Dataset from assembler") ;
-                // Need to add service details.
-                Dataset ds = modDataset.createDataset() ;
-                //cmdLineDataset.dsg = ds.asDatasetGraph() ;
-            }
-
-            if ( cmdLineDataset != null ) {
-                if ( getPositional().size() > 1 )
-                    throw new CmdException("Multiple dataset path names given") ;
-                if ( getPositional().size() != 0 ) {
-                    cmdLineDataset.datasetPath = getPositionalArg(0) ;
-                    if ( cmdLineDataset.datasetPath.length() > 0 && !cmdLineDataset.datasetPath.startsWith("/") )
-                        throw new CmdException("Dataset path name must begin with a /: " + cmdLineDataset.datasetPath) ;
-                    cmdLineDataset.allowUpdate = contains(argAllowUpdate) ;
-                    if ( ! cmdLineDataset.allowUpdate )
-                        Fuseki.serverLog.info("Running in read-only mode for "+cmdLineDataset.datasetPath) ;
-                    // Include the dataset name as NAME for any templates.
-                    cmdLineDataset.params.put(Template.NAME,  cmdLineDataset.datasetPath) ;
-                }
-            }
-
-            // ---- Jetty server
-            if ( contains(argBasicAuth) )
-                Fuseki.configLog.warn("--basic-auth ignored: Use Apache Shiro security - see shiro.ini") ;
-
-            if ( contains(argPort) ) {
-                String portStr = getValue(argPort) ;
-                try {
-                    jettyServerConfig.port = Integer.parseInt(portStr) ;
-                } catch (NumberFormatException ex) {
-                    throw new CmdException(argPort.getKeyName() + " : bad port number: " + portStr) ;
-                }
-            }
-
-            if ( contains(argMgt) )
-                Fuseki.configLog.warn("Fuseki v2: Management functions are always enabled.  --mgt not needed.") ; 
-            
-            if ( contains(argMgtPort) )
-                Fuseki.configLog.warn("Fuseki v2: Management functions are always on the same port as the server.  --mgtPort ignored.") ; 
-
-//            if ( contains(argMgt) ) {
-//                jettyServerConfig.mgtPort = 0 ;
-//                if (  contains(argMgtPort) ) {
-//                    String mgtPortStr = getValue(argMgtPort) ;
-//                    try {
-//                        jettyServerConfig.mgtPort = Integer.parseInt(mgtPortStr) ;
-//                    } catch (NumberFormatException ex) {
-//                        throw new CmdException("--"+argMgtPort.getKeyName() + " : bad port number: " + mgtPortStr) ;
-//                    }
-//                }
-//            }
-
-            if ( contains(argLocalhost) )
-                jettyServerConfig.loopback = true ;
-
-            if ( contains(argTimeout) ) {
-                String str = getValue(argTimeout) ;
-                ARQ.getContext().set(ARQ.queryTimeout, str) ;
-            }
-
-            if ( contains(argJettyConfig) ) {
-                jettyServerConfig.jettyConfigFile = getValue(argJettyConfig) ;
-                if ( !FileOps.exists(jettyServerConfig.jettyConfigFile) )
-                    throw new CmdException("No such file: " + jettyServerConfig.jettyConfigFile) ;
-            }
-
-            if ( contains(argBasicAuth) ) {
-                jettyServerConfig.authConfigFile = getValue(argBasicAuth) ;
-                if ( !FileOps.exists(jettyServerConfig.authConfigFile) )
-                    throw new CmdException("No such file: " + jettyServerConfig.authConfigFile) ;
-            }
-
-            if ( contains(argHome) ) {
-                Fuseki.configLog.warn("--home ignored (use enviroment variables $FUSEKI_HOME and $FUSEKI_BASE)") ;
-//                List<String> args = super.getValues(argHome) ;
-//                homeDir = args.get(args.size() - 1) ;
-            }
-
-            if ( contains(argPages) ) {
-                List<String> args = super.getValues(argPages) ;
-                jettyServerConfig.pages = args.get(args.size() - 1) ;
-            }
-
-            if ( contains(argGZip) ) {
-                if ( !hasValueOfTrue(argGZip) && !hasValueOfFalse(argGZip) )
-                    throw new CmdException(argGZip.getNames().get(0) + ": Not understood: " + getValue(argGZip)) ;
-                jettyServerConfig.enableCompression = super.hasValueOfTrue(argGZip) ;
-            }
-        }
-
-        private static String sort_out_dir(String path) {
-            path.replace('\\', '/') ;
-            if ( !path.endsWith("/") )
-                path = path + "/" ;
-            return path ;
-        }
-
-        @Override
-        protected void exec() {
-            FusekiServerListener.initialSetup = cmdLineDataset ;
-            // For standalone, command line use ...
-            JettyFuseki.initializeServer(jettyServerConfig) ;
-            JettyFuseki.instance.start() ;
-            JettyFuseki.instance.join() ;
-            System.exit(0) ;
-        }
-
-        @Override
-        protected String getCommandName() {
-            return "fuseki" ;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/conneg/ConNeg.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/conneg/ConNeg.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/conneg/ConNeg.java
deleted file mode 100644
index 672d2b9..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/conneg/ConNeg.java
+++ /dev/null
@@ -1,206 +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.jena.fuseki.conneg;
-
-import static org.apache.jena.riot.web.HttpNames.hAcceptCharset ;
-
-import javax.servlet.http.HttpServletRequest ;
-
-import org.apache.jena.atlas.web.AcceptList ;
-import org.apache.jena.atlas.web.MediaRange ;
-import org.apache.jena.atlas.web.MediaType ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
-
-/**
- * <p>Content negotiation is a mechanism defined in the HTTP specification
- * that makes it possible to serve different versions of a document
- * (or more generally, a resource representation) at the same URI, so that
- * user agents can specify which version fit their capabilities the best.</p>
- *
- * <p>ConNeg is used in Fuseki to help matching the content media type requested
- * by the user, against the list of offered media types.</p>
- *
- * @see <a href="http://en.wikipedia.org/wiki/Content_negotiation">http://en.wikipedia.org/wiki/Content_negotiation</a>
- * @see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1</a>
- */
-public class ConNeg
-{
-    // Logger
-    private static Logger log = LoggerFactory.getLogger(ConNeg.class) ;
-    // See riot.ContentNeg (client side).
-    // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
-
-    /**
-     * Parses the content type. It splits the string by semi-colon and finds the
-     * other features such as the "q" quality factor.  For a complete documentation
-     * on how the parsing happens, see
-     * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1</a>.
-     *
-     * @param contentType content type string
-     * @return parsed media type
-     */
-    static public MediaType parse(String contentType)
-    {
-        try {
-            return MediaType.create(contentType) ;
-        } catch (RuntimeException ex) { return null ; }
-    }
-
-    /**
-     * <p>Creates a {@link AcceptList} with the given HTTP header string and
-     * uses the {@link AcceptList#match(MediaType)} method to decide which
-     * media type matches the HTTP header string.</p>
-     *
-     * <p>The <em>q</em> quality factor is used to decide which choice is the best
-     * match.</p>
-     *
-     * @param headerString HTTP header string
-     * @param offerList accept list
-     * @return matched media type
-     */
-    static public MediaType match(String headerString, AcceptList offerList)
-    {
-        AcceptList l = new AcceptList(headerString) ;
-        return AcceptList.match(l, offerList) ;
-    }
-
-    /**
-     * Match a single media type against a header string.
-     *
-     * @param headerString HTTP header string
-     * @param mediaRangeStr Semi-colon separated list of media types
-     * @return the matched media type or <code>null</code> if there was no match
-     */
-    public static String match(String headerString, String mediaRangeStr)
-    {
-        AcceptList l = new AcceptList(headerString) ;
-        MediaRange aItem = new MediaRange(mediaRangeStr) ;  // MediaType
-        MediaType m = l.match(aItem) ;
-        if ( m == null )
-            return null ;
-        return m.toHeaderString() ;
-    }
-
-    /**
-     * Split and trims a string using a given regex.
-     *
-     * @param s string
-     * @param splitStr given regex
-     * @return an array with the trimmed strings found
-     */
-    /*package*/ static String[] split(String s, String splitStr)
-    {
-        String[] x = s.split(splitStr,2) ;
-        for ( int i = 0 ; i < x.length ; i++ )
-        {
-            x[i] = x[i].trim() ;
-        }
-        return x ;
-    }
-
-    /**
-     * <p>Chooses the charset by using the Accept-Charset HTTP header.</p>
-     *
-     * <p>See {@link ConNeg#choose(String, AcceptList, MediaType)}.</p>
-     *
-     * @param httpRequest HTTP request
-     * @param myPrefs accept list
-     * @param defaultMediaType default media type
-     * @return media type chosen
-     */
-    public static MediaType chooseCharset(HttpServletRequest httpRequest,
-                                          AcceptList myPrefs,
-                                          MediaType defaultMediaType)
-    {
-        String a = httpRequest.getHeader(hAcceptCharset) ;
-        if ( log.isDebugEnabled() )
-            log.debug("Accept-Charset request: "+a) ;
-        
-        MediaType item = choose(a, myPrefs, defaultMediaType) ;
-        
-        if ( log.isDebugEnabled() )
-            log.debug("Charset chosen: "+item) ;
-    
-        return item ;
-    }
-
-    /**
-     * <p>Choose the content media type by extracting the Accept HTTP header from
-     * the HTTP request and choosing
-     * (see {@link ConNeg#choose(String, AcceptList, MediaType)}) a content media
-     * type that matches the header.</p>
-     *
-     * @param httpRequest HTTP request
-     * @param myPrefs accept list
-     * @param defaultMediaType default media type
-     * @return media type chosen
-     */
-    public static MediaType chooseContentType(HttpServletRequest httpRequest,
-                                              AcceptList myPrefs,
-                                              MediaType defaultMediaType)
-    {
-        String a = WebLib.getAccept(httpRequest) ;
-        if ( log.isDebugEnabled() )
-            log.debug("Accept request: "+a) ;
-        
-        MediaType item = choose(a, myPrefs, defaultMediaType) ;
-    
-        if ( log.isDebugEnabled() )
-            log.debug("Content type chosen: "+item) ;
-    
-        return item ;
-    }
-
-    /**
-     * <p>This method receives a HTTP header string, an {@link AcceptList} and a
-     * default {@link MediaType}.</p>
-     *
-     * <p>If the header string is null, it returns the given default MediaType.</p>
-     *
-     * <p>Otherwise it builds an {@link AcceptList} object with the header string
-     * and uses it to match against the given MediaType.</p>
-     *
-     * @param headerString HTTP header string
-     * @param myPrefs accept list
-     * @param defaultMediaType default media type
-     * @return a media type or <code>null</code> if none matched or if the
-     *          HTTP header string and the default media type are <code>null</code>.
-     */
-    private static MediaType choose(String headerString, AcceptList myPrefs,
-                                    MediaType defaultMediaType)
-    {
-        if ( headerString == null )
-            return defaultMediaType ;
-        
-        AcceptList headerList = new AcceptList(headerString) ;
-        
-        if ( myPrefs == null )
-        {
-            MediaType i = headerList.first() ;
-            if ( i == null ) return defaultMediaType ;
-            return i ;
-        }
-    
-        MediaType i = AcceptList.match(headerList, myPrefs) ;
-        if ( i == null )
-            return defaultMediaType ;
-        return i ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/conneg/WebLib.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/conneg/WebLib.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/conneg/WebLib.java
deleted file mode 100644
index 38dc265..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/conneg/WebLib.java
+++ /dev/null
@@ -1,60 +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.jena.fuseki.conneg;
-
-import java.util.Enumeration ;
-
-import javax.servlet.http.HttpServletRequest ;
-
-import org.apache.jena.riot.web.HttpNames ;
-
-public class WebLib
-{
-    /** Split a string, removing whitespace around the split string.
-     * e.g. Use in splitting HTTP accept/content-type headers.  
-     */
-    public static String[] split(String s, String splitStr)
-    {
-        String[] x = s.split(splitStr,2) ;
-        for ( int i = 0 ; i < x.length ; i++ )
-        {
-            x[i] = x[i].trim() ;
-        }
-        return x ;
-    }
-
-    /** Migrate to WebLib */
-    public static String getAccept(HttpServletRequest httpRequest)
-    {
-        // There can be multiple accept headers -- note many tools don't allow these to be this way (e.g. wget, curl)
-        Enumeration<String> en = httpRequest.getHeaders(HttpNames.hAccept) ;
-        if ( ! en.hasMoreElements() )
-            return null ;
-        StringBuilder sb = new StringBuilder() ;
-        String sep = "" ;
-        for ( ; en.hasMoreElements() ; )
-        {
-            String x = en.nextElement() ;
-            sb.append(sep) ;
-            sep = ", " ;
-            sb.append(x) ;
-        }
-        return sb.toString() ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/FusekiErrorHandler.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/FusekiErrorHandler.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/FusekiErrorHandler.java
deleted file mode 100644
index 40361de..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/FusekiErrorHandler.java
+++ /dev/null
@@ -1,95 +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.jena.fuseki.jetty;
-
-import static java.lang.String.format ;
-
-import java.io.* ;
-
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.atlas.io.IO ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-import org.apache.jena.web.HttpSC ;
-import org.eclipse.jetty.http.HttpMethod ;
-import org.eclipse.jetty.http.MimeTypes ;
-import org.eclipse.jetty.server.Request ;
-import org.eclipse.jetty.server.Response ;
-import org.eclipse.jetty.server.handler.ErrorHandler ;
-
-public class FusekiErrorHandler extends ErrorHandler
-{
-    public FusekiErrorHandler() {}
-    
-    @Override
-    public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
-    {
-        String method = request.getMethod();
-     
-        if ( !method.equals(HttpMethod.GET.asString())
-             && !method.equals(HttpMethod.POST.asString())
-             && !method.equals(HttpMethod.HEAD.asString()) )
-            return ;
-        
-        response.setContentType(MimeTypes.Type.TEXT_PLAIN_UTF_8.asString()) ;
-        ServletOps.setNoCache(response) ;
-        
-        ByteArrayOutputStream bytes = new ByteArrayOutputStream(1024) ;
-        try ( Writer writer = IO.asUTF8(bytes) ) {
-            String reason=(response instanceof Response)?((Response)response).getReason():null;
-            handleErrorPage(request, writer, response.getStatus(), reason) ;
-
-            if ( ! Fuseki.VERSION.equalsIgnoreCase("development") &&
-                ! Fuseki.VERSION.equals("${project.version}") )
-            {
-                writer.write("\n") ;
-                writer.write("\n") ;
-                writer.write(format("Fuseki - version %s (Build date: %s)\n", Fuseki.VERSION, Fuseki.BUILD_DATE)) ;
-            }
-            writer.flush();
-            response.setContentLength(bytes.size()) ;
-            // Copy :-(
-            response.getOutputStream().write(bytes.toByteArray()) ;
-        }
-    }
-    
-    @Override
-    protected void handleErrorPage(HttpServletRequest request, Writer writer, int code, String message)
-        throws IOException
-    {
-        if ( message == null )
-            message = HttpSC.getMessage(code) ;
-        writer.write(format("Error %d: %s\n", code, message)) ;
-        
-        Throwable th = (Throwable)request.getAttribute("javax.servlet.error.exception");
-        while(th!=null)
-        {
-            writer.write("\n");
-            StringWriter sw = new StringWriter();
-            PrintWriter pw = new PrintWriter(sw);
-            th.printStackTrace(pw);
-            pw.flush();
-            writer.write(sw.getBuffer().toString());
-            writer.write("\n");
-            th = th.getCause();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
deleted file mode 100644
index 8d9046c..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
+++ /dev/null
@@ -1,305 +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.jena.fuseki.jetty ;
-
-import static java.lang.String.format ;
-import static org.apache.jena.fuseki.Fuseki.serverLog ;
-
-import java.io.FileInputStream ;
-
-import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.FusekiException ;
-import org.apache.jena.fuseki.mgt.MgtJMX ;
-import org.apache.jena.fuseki.server.FusekiEnv ;
-import org.eclipse.jetty.security.* ;
-import org.eclipse.jetty.security.authentication.BasicAuthenticator ;
-import org.eclipse.jetty.server.* ;
-import org.eclipse.jetty.servlet.ServletContextHandler ;
-import org.eclipse.jetty.util.security.Constraint ;
-import org.eclipse.jetty.webapp.WebAppContext ;
-import org.eclipse.jetty.xml.XmlConfiguration ;
-
-import com.hp.hpl.jena.sparql.util.Utils ;
-
-/** Standalone server, not run as a WAR file.
- * Used in testing and development.
- * 
- * SPARQLServer is the Jena server instance which wraps/utilizes 
- * {@link org.eclipse.jetty.server.Server}. This class provides
- * immediate access to the {@link org.eclipse.jetty.server.Server#start()} and 
- * {@link org.eclipse.jetty.server.Server#stop()} commands as well as obtaining
- * instances of the server and server configuration. Finally we can obtain 
- * instances of {@link org.apache.jena.fuseki.jetty.JettyServerConfig}.
- */
-public class JettyFuseki {
-    // Jetty specific.
-    // This class is becoming less important - it now sets up a Jetty server for in-process use
-    // either for the command line in development  
-    // and in testing but not direct webapp deployments. 
-    static { Fuseki.init() ; }
-
-    public static JettyFuseki  instance    = null ;
-
-    private ServerConnector serverConnector = null ;
-    // If a separate ...
-    private ServerConnector mgtConnector    = null ;
-    
-    private JettyServerConfig serverConfig ;
-
-    // The jetty server.
-    private Server              server         = null ;
-    
-    // webapp setup - standard maven layout
-    public static       String contextpath     = "/" ;
-    // Standalone jar
-    public static final String resourceBase1   = "webapp" ;
-    // Development
-    public static final String resourceBase2   = "src/main/webapp" ;
-    
-
-    /**
-     * Default setup which requires a {@link org.apache.jena.fuseki.jetty.JettyServerConfig}
-     * object as input.  We use this config to pass in the command line arguments for dataset, 
-     * name etc. 
-     * @param config
-     */
-    
-    public static void initializeServer(JettyServerConfig config) {
-        // Currently server-wide.
-        Fuseki.verboseLogging = config.verboseLogging ;
-        instance = new JettyFuseki(config) ;
-    }
-    
-    /** Build a Jetty server using the development files for the webapp
-     *  No command line configuration. 
-     */
-    public static Server create(int port) {
-        return create("/", port) ;
-    }
-
-    public static Server create(String contextPath, int port) {
-        Server server = new Server(port) ;
-        WebAppContext webapp = createWebApp(contextPath) ;
-        server.setHandler(webapp) ;
-        return server ;
-    }
-
-    private JettyFuseki(JettyServerConfig config) {
-        this.serverConfig = config ;
-        
-        buildServerWebapp(serverConfig.contextPath, serverConfig.jettyConfigFile, config.enableCompression) ;
-        
-        if ( mgtConnector == null )
-            mgtConnector = serverConnector ;
-    }
-
-    /**
-     * Initialize the {@link JettyFuseki} instance.
-     */
-    public void start() {
-        
-        String version = Fuseki.VERSION ;
-        String buildDate = Fuseki.BUILD_DATE ;
-        
-        if ( version != null && version.equals("${project.version}") )
-            version = null ;
-        if ( buildDate != null && buildDate.equals("${build.time.xsd}") )
-            buildDate = Utils.nowAsXSDDateTimeString() ;
-        
-        if ( version != null && buildDate != null )
-            serverLog.info(format("%s %s %s", Fuseki.NAME, version, buildDate)) ;
-        // This does not get set usefully for Jetty as we use it.
-        // String jettyVersion = org.eclipse.jetty.server.Server.getVersion() ;
-        // serverLog.info(format("Jetty %s",jettyVersion)) ;
-        
-        String host = serverConnector.getHost() ;
-        if ( host != null )
-            serverLog.info("Incoming connections limited to " + host) ;
-
-        try {
-            server.start() ;
-        } catch (java.net.BindException ex) {
-            serverLog.error("SPARQLServer (port="+serverConnector.getPort()+"): Failed to start server: " + ex.getMessage()) ;
-            System.exit(1) ;
-        } catch (Exception ex) {
-            serverLog.error("SPARQLServer: Failed to start server: " + ex.getMessage(), ex) ;
-            System.exit(1) ;
-        }
-        String now = Utils.nowAsString() ;
-        serverLog.info(format("Started %s on port %d", now, serverConnector.getPort())) ;
-    }
-
-    /**
-     * Sync with the {@link JettyFuseki} instance.
-     * Returns only if the server exits cleanly 
-     */
-    public void join() {
-        try {
-            server.join() ;
-        } catch (InterruptedException ex) { }
-    }
-
-        /**
-     * Stop the {@link JettyFuseki} instance.
-     */
-    public void stop() {
-        String now = Utils.nowAsString() ;
-        serverLog.info(format("Stopped %s on port %d", now, serverConnector.getPort())) ;
-        try {
-            server.stop() ;
-        } catch (Exception ex) {
-            Fuseki.serverLog.warn("SPARQLServer: Exception while stopping server: " + ex.getMessage(), ex) ;
-        }
-        MgtJMX.removeJMX() ;
-    }
-
-    public static WebAppContext createWebApp(String contextPath) {
-        FusekiEnv.setEnvironment();
-        WebAppContext webapp = new WebAppContext();
-        webapp.getServletContext().getContextHandler().setMaxFormContentSize(10 * 1000 * 1000) ;
-
-        // Hunt for the webapp for the standalone jar (or development system). 
-        // Note that Path FUSEKI_HOME is not initialized until the webapp starts
-        // so it is not available here.
-
-        String resourceBase3 = null ;
-        String resourceBase4 = null ;
-        if ( FusekiEnv.FUSEKI_HOME != null ) {
-            String HOME = FusekiEnv.FUSEKI_HOME.toString() ;
-            resourceBase3 = HOME+"/"+resourceBase1 ;
-            resourceBase4 = HOME+"/"+resourceBase2 ;
-        }
-
-        String resourceBase = tryResourceBase(resourceBase1, null) ;
-        resourceBase = tryResourceBase(resourceBase2, resourceBase) ;
-        resourceBase = tryResourceBase(resourceBase3, resourceBase) ;
-        resourceBase = tryResourceBase(resourceBase4, resourceBase) ;
-
-        if ( resourceBase == null ) {
-            if ( resourceBase3 == null )
-                Fuseki.serverLog.error("Can't find resourceBase (tried "+resourceBase1+" and "+resourceBase2+")") ;
-            else
-                Fuseki.serverLog.error("Can't find resourceBase (tried "+resourceBase1+", "+resourceBase2+", "+resourceBase3+" and "+resourceBase4+")") ;
-            Fuseki.serverLog.error("Failed to start") ;
-            throw new FusekiException("Failed to start") ;
-        }
-
-        webapp.setDescriptor(resourceBase+"/WEB-INF/web.xml");
-        webapp.setResourceBase(resourceBase);
-        webapp.setContextPath(contextPath);
-
-        //-- Jetty setup for the ServletContext logger.
-        // The name of the Jetty-allocated slf4j/log4j logger is
-        // the display name or, if null, the context path name.   
-        // It is set, without checking for a previous call of setLogger in "doStart"
-        // which happens during server startup. 
-        // This the name of the ServletContext logger as well
-        webapp.setDisplayName(Fuseki.servletRequestLogName);  
-        webapp.setParentLoaderPriority(true);  // Normal Java classloader behaviour.
-        webapp.setErrorHandler(new FusekiErrorHandler()) ;
-        return webapp ;
-    }
-    
-
-    public static String getenv(String name) {
-        String x = System.getenv(name) ;
-        if ( x == null )
-            x = System.getProperty(name) ;
-        return x ;
-    }
-
-    private static String tryResourceBase(String maybeResourceBase, String currentResourceBase) {
-        if ( currentResourceBase != null )
-            return currentResourceBase ;
-        if ( maybeResourceBase != null && FileOps.exists(maybeResourceBase) )
-            return maybeResourceBase ;
-        return currentResourceBase ;
-    }
-    
-    private void buildServerWebapp(String contextPath, String jettyConfig, boolean enableCompression) {
-        if ( jettyConfig != null )
-            // --jetty-config=jetty-fuseki.xml
-            // for detailed configuration of the server using Jetty features.
-            configServer(jettyConfig) ;
-        else
-            defaultServerConfig(serverConfig.port, serverConfig.loopback) ;
-
-        WebAppContext webapp = createWebApp(contextPath) ;
-        server.setHandler(webapp) ;
-        // Replaced by Shiro.
-        if ( jettyConfig == null && serverConfig.authConfigFile != null )
-            security(webapp, serverConfig.authConfigFile) ;
-    }
-    
-    private static void security(ServletContextHandler context, String authfile) {
-        Constraint constraint = new Constraint() ;
-        constraint.setName(Constraint.__BASIC_AUTH) ;
-        constraint.setRoles(new String[]{"fuseki"}) ;
-        constraint.setAuthenticate(true) ;
-
-        ConstraintMapping mapping = new ConstraintMapping() ;
-        mapping.setConstraint(constraint) ;
-        mapping.setPathSpec("/*") ;
-
-        IdentityService identService = new DefaultIdentityService() ;
-
-        ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler() ;
-        securityHandler.addConstraintMapping(mapping) ;
-        securityHandler.setIdentityService(identService) ;
-
-        HashLoginService loginService = new HashLoginService("Fuseki Authentication", authfile) ;
-        loginService.setIdentityService(identService) ;
-
-        securityHandler.setLoginService(loginService) ;
-        securityHandler.setAuthenticator(new BasicAuthenticator()) ;
-
-        context.setSecurityHandler(securityHandler) ;
-
-        serverLog.debug("Basic Auth Configuration = " + authfile) ;
-    }
-
-    private void configServer(String jettyConfig) {
-        try {
-            serverLog.info("Jetty server config file = " + jettyConfig) ;
-            server = new Server() ;
-            XmlConfiguration configuration = new XmlConfiguration(new FileInputStream(jettyConfig)) ;
-            configuration.configure(server) ;
-            serverConnector = (ServerConnector)server.getConnectors()[0] ;
-        } catch (Exception ex) {
-            serverLog.error("SPARQLServer: Failed to configure server: " + ex.getMessage(), ex) ;
-            throw new FusekiException("Failed to configure a server using configuration file '" + jettyConfig + "'") ;
-        }
-    }
-
-    private void defaultServerConfig(int port, boolean loopback) {
-        server = new Server() ;
-        ConnectionFactory f1 = new HttpConnectionFactory() ;
-        ConnectionFactory f2 = new SslConnectionFactory() ;
-        
-        ServerConnector connector = new ServerConnector(server, f1) ; //, f2) ;
-        connector.setPort(port);
-        server.addConnector(connector);
-        
-        if ( loopback )
-            connector.setHost("localhost");
-        connector.setPort(port) ;
-        serverConnector = connector ;
-    }
-}


[02/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/RequestLog.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/RequestLog.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/RequestLog.java
deleted file mode 100644
index db79d6a..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/RequestLog.java
+++ /dev/null
@@ -1,148 +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.jena.fuseki.server;
-
-import java.text.DateFormat ;
-import java.text.SimpleDateFormat ;
-import java.util.Collection ;
-import java.util.Date ;
-import java.util.Enumeration ;
-import java.util.TimeZone ;
-
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.atlas.logging.Log ;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-
-/** Create standard request logs (NCSA etc) */ 
-public class RequestLog {
-    /*
-      http://httpd.apache.org/docs/current/mod/mod_log_config.html
-Common Log Format (CLF)
-    "%h %l %u %t \"%r\" %>s %b"
-Common Log Format with Virtual Host
-    "%v %h %l %u %t \"%r\" %>s %b"
-NCSA extended/combined log format
-    "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
-     */
-    /*
-        %l -- Identity or -
-        %u -- Remote user or -
-        %t -- Timestamp
-        "%r" -- Request line
-        %>s -- Final request status
-        %b -- Size in bytes
-        Headers.
-        %{}i for request header.
-        %{}o for response header.
-      */  
-    
-    private static DateFormat dateFormatter ; 
-    static {
-        dateFormatter = new SimpleDateFormat("dd/MMM/yyyy:HH:mm:ss Z") ;
-        dateFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
-    }
-
-    /** NCSA combined log format *
-     * LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b  \"%{Referer}i\" \"%{User-Agent}i\"" combinedfwd
-     * XXX.XXX.XXX.XXX - - [01/Feb/2014:03:19:09 +0000] "GET / HTTP/1.1" 200 6190  "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
-     */
-    public static String combinedNCSA(HttpAction action) {
-        StringBuilder builder = new StringBuilder() ;
-        HttpServletRequest request = action.request ;
-        HttpServletResponse response = action.response ;
-        
-        // Remote
-        String remote = get(request, "X-Forwarded-For", request.getRemoteAddr()) ;
-        builder.append(remote) ;
-        builder.append(" ") ;
-        
-        // %l %u : User identity (unrelaible)
-        builder.append("- - ") ;
-        
-        // %t
-        // Expensive? 
-        builder.append("[");
-        // Better?
-        builder.append(dateFormatter.format(new Date())) ;
-        builder.append("] ");
-        
-        // "%r"
-        builder.append("\"")  ;
-        builder.append(request.getMethod()) ;
-        builder.append(" ") ;
-        // No query string - they are long and logged readably elsewhere
-        builder.append(request.getRequestURI()) ; 
-        builder.append("\"")  ;
-        //%>s -- Final request status
-        builder.append(" ")  ;
-        builder.append(response.getStatus())  ;
-        
-        //%b -- Size in bytes
-        builder.append(" ")  ;
-        //String size = getField()
-        String size = get(response, "Content-Length", "-") ;
-        builder.append(size)  ;
-        
-        // "%{Referer}i" 
-        builder.append(" \"")  ;
-        builder.append(get(request, "Referer", "")) ;
-        builder.append("\"")  ;
-        // "%{User-Agent}i"
-        builder.append(" \"")  ;
-        builder.append(get(request, "User-Agent", "")) ;
-        builder.append("\"")  ;
-        
-        return builder.toString() ;
-    }
-    
-    private static String get(HttpServletRequest request, String name, String dft) {
-        String x = get(request, name) ;
-        if ( x == null )
-            x = dft ;
-        return x ;
-    }
-    
-    private static String get(HttpServletRequest request, String name) {
-        Enumeration<String> en = request.getHeaders(name) ;
-        if ( ! en.hasMoreElements() ) return null ;
-        String x = en.nextElement() ;
-        if ( en.hasMoreElements() ) {
-            Log.warn(RequestLog.class, "Multiple request header values") ;
-        }
-        return x ;
-    }
-
-    private static String get(HttpServletResponse response, String name, String dft) {
-        String x = get(response, name) ;
-        if ( x == null )
-            x = dft ;
-        return x ;
-    }
-
-    
-    private static String get(HttpServletResponse response, String name) {
-        Collection<String> en = response.getHeaders(name) ;
-        if ( en.isEmpty() )return null ;
-        if ( en.size() != 1 ) Log.warn(RequestLog.class, "Multiple response header values") ;
-        return response.getHeader(name) ;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
deleted file mode 100644
index 67f5d26..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
+++ /dev/null
@@ -1,40 +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.jena.fuseki.server;
-
-import java.util.HashMap ;
-import java.util.Map ;
-
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-
-/** Dataset setup (command line, config file) for a dataset (or several if config file) */
-public class ServerInitialConfig {
-    // Either this ...
-    public String    templateFile     = null ;
-    public Map<String,String> params  = new HashMap<>() ;
-    public String    datasetPath      = null ;
-    public boolean   allowUpdate      = false ;
-    // Or this ...
-    public String    fusekiConfigFile = null ;
-    
-    // Special case - directly pass in the dataset graphs - datasetPath must be given.
-    // This is not persistet across server restarts. 
-    public DatasetGraph dsg           = null ;
-    
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ServiceMXBean.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ServiceMXBean.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ServiceMXBean.java
deleted file mode 100644
index 11c7330..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ServiceMXBean.java
+++ /dev/null
@@ -1,32 +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.jena.fuseki.server;
-
-public interface ServiceMXBean
-{
-    String getName() ;
-    
-    long getRequests() ;
-    long getRequestsGood() ;
-    long getRequestsBad() ;
-    
-//    void enable() ;
-//    void disable() ;
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ShiroEnvironmentLoader.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ShiroEnvironmentLoader.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ShiroEnvironmentLoader.java
deleted file mode 100644
index f33fe92..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/ShiroEnvironmentLoader.java
+++ /dev/null
@@ -1,164 +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.jena.fuseki.server;
-
-import java.io.IOException ;
-import java.io.InputStream ;
-import java.nio.file.Path ;
-import java.nio.file.Paths ;
-
-import javax.servlet.ServletContext ;
-import javax.servlet.ServletContextEvent ;
-import javax.servlet.ServletContextListener ;
-
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.shiro.config.ConfigurationException ;
-import org.apache.shiro.io.ResourceUtils ;
-import org.apache.shiro.web.env.EnvironmentLoader ;
-import org.apache.shiro.web.env.ResourceBasedWebEnvironment ;
-import org.apache.shiro.web.env.WebEnvironment ;
-
-import com.hp.hpl.jena.util.FileUtils ;
-
-/** A place to perform Fuseki-specific initialization of Apache Shiro.
- *  Runs after listener FusekiServerEnvironmentInit and before FusekiServerListener
- *  This means finding shiro.ini in multiple possible places, based on
- *  different deployment setups.
- */
-public class ShiroEnvironmentLoader extends EnvironmentLoader implements ServletContextListener {
-    private ServletContext servletContext ; 
-    
-    public ShiroEnvironmentLoader() {}
-    
-    @Override
-    public void contextInitialized(ServletContextEvent sce) {
-        FusekiServer.init() ; 
-        this.servletContext = sce.getServletContext() ;
-        try { 
-            // Shiro.
-            initEnvironment(servletContext);
-        } catch (ConfigurationException  ex) {
-            Fuseki.configLog.error("Shiro initialization failed: "+ex.getMessage());
-            // Exit?
-            throw ex ;
-        }
-    }
-
-    @Override
-    public void contextDestroyed(ServletContextEvent sce) {
-        destroyEnvironment(sce.getServletContext());
-    }
-
-    /** 
-     * Normal Shiro initialization only supports one location for an INI file.
-     *  
-     * When given multiple multiple locations for the shiro.ini file, and 
-     * if a {@link ResourceBasedWebEnvironment}, check the list of configuration
-     * locations, testing whether the name identified an existing resource.  
-     * For the first resource name found to exist, reset the {@link ResourceBasedWebEnvironment}
-     * to name that resource alone so the normal Shiro initialization  
-     */
-    @Override
-    protected void customizeEnvironment(WebEnvironment environment) {
-        if ( environment instanceof ResourceBasedWebEnvironment ) {
-            ResourceBasedWebEnvironment env = (ResourceBasedWebEnvironment)environment ;
-            String[] locations = env.getConfigLocations() ;
-            String loc = huntForShiroIni(locations) ;
-            Fuseki.configLog.info("Shiro file: "+loc);
-            if (loc != null )
-                locations = new String[] {loc} ;
-            env.setConfigLocations(locations);
-        }
-    }
-    
-    private static final String FILE = "file" ;
-    
-    /** Look for a Shiro ini file, or return null */
-    private static String huntForShiroIni(String[] locations) {
-        FusekiEnv.setEnvironment() ;
-        Fuseki.init();
-        for ( String loc : locations ) {
-            // If file:, look for that file.
-            // If a relative name without scheme, look in FUSEKI_BASE, FUSEKI_HOME, webapp. 
-            String scheme = FileUtils.getScheme(loc) ;
-            
-            // Covers C:\\ as a "scheme name"
-            if ( scheme != null ) {
-                if ( scheme.equalsIgnoreCase(FILE)) {
-                    // Test file: for exists
-                    Path p = Paths.get(loc.substring(FILE.length()+1)) ;
-                    if ( ! p.toFile().exists() )
-                        continue ;
-                    // Fall through.
-                }
-                // Can't test - try 
-                return loc ;
-            }
-            // No scheme .
-            Path p = Paths.get(loc) ;
-            
-            String fn = resolve(FusekiEnv.FUSEKI_BASE, p) ;
-            if ( fn != null )
-                return "file://"+fn ;
-            fn = resolve(FusekiEnv.FUSEKI_HOME, p) ;
-            if ( fn != null )
-                return "file://"+fn ;
-            
-            // Try in webapp.
-            
-            try ( InputStream is = ResourceUtils.getInputStreamForPath(loc); ) {
-                boolean exists = (is != null ) ;
-                return loc ;
-            } catch (IOException e) { }
-        }
-        return null ;
-    }
-    
-    /** Directory + name -> filename if it exists */ 
-    private static String resolve(Path dir, Path file) {
-        Path p = dir.resolve(file) ;
-        if ( p.toFile().exists() )
-            return p.normalize().toString() ;
-        return null ;
-    }
-
-//    /** 
-//     * Test whether a name identified an existing resource
-//     * @param resource    A String in Shiro-resource name format (e.g. URL scheme names) 
-//     * @return True/false as to whether the resource can be found or not. 
-//     */
-//    
-//    private boolean resourceExists(String resource) {
-//        try {
-//            // See IniWebEnvironment.convertPathToIni
-//            if (!ResourceUtils.hasResourcePrefix(resource)) {
-//                //Sort out "path" and open as a webapp resource.
-//                resource = WebUtils.normalize(resource);
-//                URL url = servletContext.getResource(resource) ;
-//                return ( url == null ) ;
-//            } else {
-//                // Treat as a plain name. 
-//                InputStream is = ResourceUtils.getInputStreamForPath(resource);
-//                boolean exists = (is != null ) ;
-//                is.close() ;
-//                return exists ;
-//            }
-//        } catch (IOException e) { return false ; }
-//    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/SystemState.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/SystemState.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/SystemState.java
deleted file mode 100644
index 74117c9..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/server/SystemState.java
+++ /dev/null
@@ -1,108 +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.jena.fuseki.server;
-
-import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.fuseki.Fuseki ;
-
-import com.hp.hpl.jena.query.Dataset ;
-import com.hp.hpl.jena.tdb.StoreConnection ;
-import com.hp.hpl.jena.tdb.TDB ;
-import com.hp.hpl.jena.tdb.TDBFactory ;
-import com.hp.hpl.jena.tdb.base.block.FileMode ;
-import com.hp.hpl.jena.tdb.base.file.Location ;
-import com.hp.hpl.jena.tdb.setup.StoreParams ;
-import com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction ;
-
-public class SystemState {
-    private static String SystemDatabaseLocation ;
-    // Testing may reset this.
-    public static Location location ; 
-    
-    private  static Dataset                 dataset   = null ;
-    private  static DatasetGraphTransaction dsg       = null ;
-    
-    public static Dataset getDataset() {
-        init() ;
-        return dataset ;
-    }
-    
-    public static DatasetGraphTransaction getDatasetGraph() {
-        init() ;
-        return dsg ;
-    }
-    
-    private static boolean initialized = false ; 
-    private static void init() {
-        init$() ;
-    }
-    
-    /** Small footprint database.  The system database records the server state.
-     * It should not be performance critical, mainly being used for system admin
-     * functions.
-     * <p>Direct mode so that it is not competing for OS file cache space.
-     * <p>Small caches - 
-     */
-    private static final StoreParams systemDatabaseParams = StoreParams.builder()
-        .fileMode(FileMode.direct)
-        .blockReadCacheSize(20)
-        .blockWriteCacheSize(20)
-        .node2NodeIdCacheSize(5000)
-        .nodeId2NodeCacheSize(5000)
-        .nodeMissCacheSize(100)
-        .build() ;
-    
-    public /* for testing */ static void init$() {
-        if ( initialized )
-            return ;
-        initialized = true ;
-        
-        if ( location == null )
-            location = Location.create(FusekiServer.dirSystemDatabase.toString()) ;
-        
-        if ( ! location.isMem() )
-            FileOps.ensureDir(location.getDirectoryPath()) ;
-        
-        // Force it into the store connection as a low footprint
-        if ( StoreConnection.getExisting(location) != null )
-            Fuseki.serverLog.warn("System database already in the StoreConnection cache") ;
-        StoreConnection.make(location, systemDatabaseParams) ;
-        
-        dataset = TDBFactory.createDataset(location) ;
-        dsg     = (DatasetGraphTransaction)(dataset.asDatasetGraph()) ;
-        dsg.getContext().set(TDB.symUnionDefaultGraph, false) ;
-    }
-    
-    public static String PREFIXES = StrUtils.strjoinNL
-        ("BASE <http://example/base#>",
-         "PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>",
-         "PREFIX fu:      <http://jena.apache.org/fuseki#>",
-         "PREFIX fuseki:  <http://jena.apache.org/fuseki#>",
-         "PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>",
-         "PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>",
-         "PREFIX tdb:     <http://jena.hpl.hp.com/2008/tdb#>",
-         "PREFIX sdb:     <http://jena.hpl.hp.com/20087/sdb#>",
-         "PREFIX list:    <http://jena.hpl.hp.com/ARQ/list#>",
-         "PREFIX xsd:     <http://www.w3.org/2001/XMLSchema#>",
-         "PREFIX apf:     <http://jena.hpl.hp.com/ARQ/property#>",
-         "PREFIX afn:     <http://jena.hpl.hp.com/ARQ/function#>",
-         "") ;
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java
deleted file mode 100644
index 3e45c78..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java
+++ /dev/null
@@ -1,265 +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.jena.fuseki.servlets;
-
-import static java.lang.String.format ;
-
-import java.io.IOException ;
-import java.util.Enumeration ;
-import java.util.Map ;
-
-import javax.servlet.ServletException ;
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.atlas.RuntimeIOException ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.riot.web.HttpNames ;
-import org.apache.jena.web.HttpSC ;
-import org.slf4j.Logger ;
-
-import com.hp.hpl.jena.query.ARQ ;
-import com.hp.hpl.jena.query.QueryCancelledException ;
-import com.hp.hpl.jena.sparql.util.Context ;
-
-/** General request lifecycle */
-public abstract class ActionBase extends ServletBase
-{
-    protected final Logger log ;
-
-    protected ActionBase(Logger log) {
-        super() ;
-        this.log = log ;
-    }
-    
-    @Override 
-    public void init() {
-//        log.info("["+Utils.className(this)+"] ServletContextName = "+getServletContext().getServletContextName()) ;
-//        log.info("["+Utils.className(this)+"] ContextPath        = "+getServletContext().getContextPath()) ;
-
-        //super.init() ;
-    }
-    
-    /**
-     * Common framework for handling HTTP requests.
-     * @param request
-     * @param response
-     */
-    protected void doCommon(HttpServletRequest request, HttpServletResponse response)
-    {
-        try {
-            long id = allocRequestId(request, response);
-            
-            // Lifecycle
-            HttpAction action = allocHttpAction(id, request, response) ;
-
-            printRequest(action) ;
-            action.setStartTime() ;
-            
-            // The response may be changed to a HttpServletResponseTracker
-            response = action.response ;
-            initResponse(request, response) ;
-            Context cxt = ARQ.getContext() ;
-            
-            try {
-                execCommonWorker(action) ;
-            } catch (QueryCancelledException ex) {
-                // Also need the per query info ...
-                String message = String.format("The query timed out (restricted to %s ms)", cxt.get(ARQ.queryTimeout));
-                // Possibility :: response.setHeader("Retry-after", "600") ;    // 5 minutes
-                ServletOps.responseSendError(response, HttpSC.SERVICE_UNAVAILABLE_503, message);
-            } catch (ActionErrorException ex) {
-                if ( ex.exception != null )
-                    ex.exception.printStackTrace(System.err) ;
-                // Log message done by printResponse in a moment.
-                if ( ex.message != null )
-                    ServletOps.responseSendError(response, ex.rc, ex.message) ;
-                else
-                    ServletOps.responseSendError(response, ex.rc) ;
-            } catch (RuntimeIOException ex) {
-                log.warn(format("[%d] Runtime IO Exception (client left?) RC = %d : %s", id, HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()), ex) ;
-                ServletOps.responseSendError(response, HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()) ;
-            } catch (Throwable ex) {
-                // This should not happen.
-                //ex.printStackTrace(System.err) ;
-                log.warn(format("[%d] RC = %d : %s", id, HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()), ex) ;
-                ServletOps.responseSendError(response, HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()) ;
-            }
-    
-            action.setFinishTime() ;
-            printResponse(action) ;
-            archiveHttpAction(action) ;
-        } catch (Throwable th) {
-            log.error("Internal error", th) ;
-        }
-    }
-
-    // ---- Operation lifecycle
-
-    /**
-     * Returns a fresh HTTP Action for this request.
-     * @param id the Request ID
-     * @param request HTTP request
-     * @param response HTTP response
-     * @return a new HTTP Action
-     */
-    protected HttpAction allocHttpAction(long id, HttpServletRequest request, HttpServletResponse response) {
-        // Need a way to set verbose logging on a per servlet and per request basis. 
-        return new HttpAction(id, log, request, response, Fuseki.verboseLogging) ;
-    }
-
-    /**
-     * Begin handling an {@link HttpAction}  
-     * @param action
-     */
-    protected final void startRequest(HttpAction action) {
-        action.startRequest() ;
-    }
-    
-    /**
-     * Stop handling an {@link HttpAction}  
-     */
-    protected final void finishRequest(HttpAction action) {
-        action.finishRequest() ;
-    }
-    
-    /**
-     * Archives the HTTP Action.
-     * @param action HTTP Action
-     * @see HttpAction#minimize()
-     */
-    private void archiveHttpAction(HttpAction action) {
-        action.minimize() ;
-    }
-
-    /**
-     * Execute this request, which maybe a admin operation or a client request. 
-     * @param action HTTP Action
-     */
-    protected abstract void execCommonWorker(HttpAction action) ;
-    
-    /** Extract the name after the container name (serverlet name).
-     * Returns "/name" or null 
-     */  
-    protected static String extractItemName(HttpAction action) {
-//      action.log.info("context path  = "+action.request.getContextPath()) ;
-//      action.log.info("pathinfo      = "+action.request.getPathInfo()) ;
-//      action.log.info("servlet path  = "+action.request.getServletPath()) ;
-      // if /name
-      //    request.getServletPath() otherwise it's null
-      // if /*
-      //    request.getPathInfo() ; otherwise it's null.
-      
-      // PathInfo is after the servlet name. 
-      String x1 = action.request.getServletPath() ;
-      String x2 = action.request.getPathInfo() ;
-      
-      String pathInfo = action.request.getPathInfo() ;
-      if ( pathInfo == null || pathInfo.isEmpty() || pathInfo.equals("/") )
-          // Includes calling as a container. 
-          return null ;
-      String name = pathInfo ;
-      // pathInfo starts with a "/"
-      int idx = pathInfo.lastIndexOf('/') ;
-      if ( idx > 0 )
-          name = name.substring(idx) ;
-      // Returns "/name"
-      return name ; 
-  }
-
-    @SuppressWarnings("unused") // ServletException
-    protected void doPatch(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "HTTP PATCH not supported");
-    }
-    
-    private void printRequest(HttpAction action) {
-        String url = ActionLib.wholeRequestURL(action.request) ;
-        String method = action.request.getMethod() ;
-
-        log.info(format("[%d] %s %s", action.id, method, url)) ;
-        if ( action.verbose ) {
-            Enumeration<String> en = action.request.getHeaderNames() ;
-            for (; en.hasMoreElements();) {
-                String h = en.nextElement() ;
-                Enumeration<String> vals = action.request.getHeaders(h) ;
-                if ( !vals.hasMoreElements() )
-                    log.info(format("[%d]   ", action.id, h)) ;
-                else {
-                    for (; vals.hasMoreElements();)
-                        log.info(format("[%d]   %-20s %s", action.id, h, vals.nextElement())) ;
-                }
-            }
-        }
-    }
-
-    private void initResponse(HttpServletRequest request, HttpServletResponse response) {
-        setCommonHeaders(response) ;
-        String method = request.getMethod() ;
-        // All GET and HEAD operations are sensitive to conneg so ...
-        if ( HttpNames.METHOD_GET.equalsIgnoreCase(method) || HttpNames.METHOD_HEAD.equalsIgnoreCase(method) )
-            setVaryHeader(response) ;
-    }
-
-    private void printResponse(HttpAction action) {
-        long time = action.getTime() ;
-
-        HttpServletResponseTracker response = action.response ;
-        if ( action.verbose ) {
-            if ( action.contentType != null )
-                log.info(format("[%d]   %-20s %s", action.id, HttpNames.hContentType, action.contentType)) ;
-            if ( action.contentLength != -1 )
-                log.info(format("[%d]   %-20s %d", action.id, HttpNames.hContentLengh, action.contentLength)) ;
-            for (Map.Entry<String, String> e : action.headers.entrySet())
-                log.info(format("[%d]   %-20s %s", action.id, e.getKey(), e.getValue())) ;
-        }
-
-        String timeStr = fmtMillis(time) ;
-
-        if ( action.message == null )
-            log.info(String.format("[%d] %d %s (%s) ", action.id, action.statusCode,
-                                   HttpSC.getMessage(action.statusCode), timeStr)) ;
-        else
-            log.info(String.format("[%d] %d %s (%s) ", action.id, action.statusCode, action.message, timeStr)) ;
-        
-        // See also HttpAction.finishRequest - request logging happens there.
-    }
-
-    /**
-     * <p>Given a time point, return the time as a milli second string if it is less than 1000,
-     * otherwise return a seconds string.</p>
-     * <p>It appends a 'ms' suffix when using milli seconds,
-     *  and <i>s</i> for seconds.</p>
-     * <p>For instance: </p>
-     * <ul>
-     * <li>10 emits 10 ms</li>
-     * <li>999 emits 999 ms</li>
-     * <li>1000 emits 1.000 s</li>
-     * <li>10000 emits 10.000 s</li>
-     * </ul>
-     * @param time the time in milliseconds
-     * @return the time as a display string
-     */
-
-    private static String fmtMillis(long time) {
-        // Millis only? seconds only?
-        if ( time < 1000 )
-            return String.format("%,d ms", time) ;
-        return String.format("%,.3f s", time / 1000.0) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionErrorException.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionErrorException.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionErrorException.java
deleted file mode 100644
index c87cfe8..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionErrorException.java
+++ /dev/null
@@ -1,32 +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.jena.fuseki.servlets;
-
-public class ActionErrorException extends RuntimeException
-{
-    public final Throwable exception ;
-    public final String message ;
-    public final int rc ;
-    public ActionErrorException(Throwable ex, String message, int rc)
-    {
-        this.exception = ex ;
-        this.message = message ;
-        this.rc = rc ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java
deleted file mode 100644
index 182b46e..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java
+++ /dev/null
@@ -1,180 +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.jena.fuseki.servlets;
-
-import javax.servlet.http.HttpServletRequest ;
-
-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.conneg.ConNeg ;
-import org.apache.jena.fuseki.server.DataAccessPoint ;
-import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
-
-/** Operations related to servlets */
-
-public class ActionLib {
-    /**
-     * A possible implementation for {@link ActionSPARQL#mapRequestToDataset}
-     * that assumes the form /dataset/service.
-     * @param action the request
-     * @return the dataset
-     */    public static String mapRequestToDataset(HttpAction action) {
-         String uri = action.getActionURI() ;
-         return mapActionRequestToDataset(uri) ;
-     }
-    
-    /** Map request to uri in the registry.
-     *  A possible implementation for mapRequestToDataset(String)
-     *  that assumes the form /dataset/service 
-     *  Returning null means no mapping found.
-     *  The URI must be the action URI (no contact path) 
-     */
-    
-    public static String mapActionRequestToDataset(String uri) {
-        // Chop off trailing part - the service selector
-        // e.g. /dataset/sparql => /dataset 
-        int i = uri.lastIndexOf('/') ;
-        if ( i == -1 )
-            return null ;
-        if ( i == 0 )
-        {
-            // started with '/' - leave.
-            return uri ;
-        }
-        
-        return uri.substring(0, i) ;
-    }
-
-    /** Calculate the operation , given action and data access point */ 
-    public static String mapRequestToOperation(HttpAction action, DataAccessPoint dsRef) {
-        if ( dsRef == null )
-            return "" ;
-        String uri = action.getActionURI() ;
-        String name = dsRef.getName();
-        if ( name.length() >= uri.length() )
-            return "" ;
-        return uri.substring(name.length()+1) ;   // Skip the separating "/"
-        
-    }
-    
-    /** Implementation of mapRequestToDataset(String) that looks for
-     * the longest match in the registry.
-     * This includes use in direct naming GSP. 
-     */
-    public static String mapRequestToDatasetLongest$(String uri) 
-    {
-        if ( uri == null )
-            return null ;
-        
-        // This covers local, using the URI as a direct name for
-        // a graph, not just using the indirect ?graph= or ?default 
-        // forms.
-
-        String ds = null ;
-        for ( String ds2 : DataAccessPointRegistry.get().keys() ) {
-            if ( ! uri.startsWith(ds2) )
-                continue ;
-
-            if ( ds == null )
-            {
-                ds = ds2 ;
-                continue ; 
-            }
-            if ( ds.length() < ds2.length() )
-            {
-                ds = ds2 ;
-                continue ;
-            }
-        }
-        return ds ;
-    }
-
-    /** Calculate the fill URL including query string
-     * for the HTTP request. This may be quite long.
-     * @param request HttpServletRequest
-     * @return String The full URL, including query string.
-     */
-    public static String wholeRequestURL(HttpServletRequest request) {
-        StringBuffer sb = request.getRequestURL() ;
-        String queryString = request.getQueryString() ;
-        if ( queryString != null ) {
-            sb.append("?") ;
-            sb.append(queryString) ;
-        }
-        return sb.toString() ;
-    }
-
-    /* 
-     * The context path can be:
-     * "" for the root context
-     * "/APP" for named contexts
-     * so:
-     * "/dataset/server" becomes "/dataset/server"
-     * "/APP/dataset/server" becomes "/dataset/server"
-     */
-    public static String removeContextPath(HttpAction action) {
-
-        return actionURI(action.request) ;
-    }
-    
-    public static String actionURI(HttpServletRequest request) {
-//      Log.info(this, "URI                     = '"+request.getRequestURI()) ;
-//      Log.info(this, "Context path            = '"+request.getContextPath()+"'") ;
-//      Log.info(this, "Servlet path            = '"+request.getServletPath()+"'") ;
-//      ServletContext cxt = this.getServletContext() ;
-//      Log.info(this, "ServletContext path     = '"+cxt.getContextPath()+"'") ;
-        
-        String contextPath = request.getServletContext().getContextPath() ;
-        String uri = request.getRequestURI() ;
-        if ( contextPath == null )
-            return uri ;
-        if ( contextPath.isEmpty())
-            return uri ;
-        String x = uri ;
-        if ( uri.startsWith(contextPath) )
-            x = uri.substring(contextPath.length()) ;
-        //log.info("uriWithoutContextPath: uri = "+uri+" contextPath="+contextPath+ "--> x="+x) ;
-        return x ;
-    }
-
-    /** Negotiate the content-type and set the response headers */ 
-    public static MediaType contentNegotation(HttpAction action, AcceptList myPrefs,
-                                              MediaType defaultMediaType) {
-        MediaType mt = ConNeg.chooseContentType(action.request, myPrefs, defaultMediaType) ;
-        if ( mt == null )
-            return null ;
-        if ( mt.getContentType() != null )
-            action.response.setContentType(mt.getContentType()) ;
-        if ( mt.getCharset() != null )
-            action.response.setCharacterEncoding(mt.getCharset()) ;
-        return mt ;
-    }
-    
-    /** Negotiate the content-type for an RDF triples syntax and set the response headers */ 
-    public static MediaType contentNegotationRDF(HttpAction action) {
-        return contentNegotation(action, DEF.rdfOffer, DEF.acceptRDFXML) ;
-    }
-
-    /** Negotiate the content-type for an RDF quads syntax and set the response headers */ 
-    public static MediaType contentNegotationQuads(HttpAction action) {
-        return contentNegotation(action, DEF.quadsOffer, DEF.acceptNQuads) ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java
deleted file mode 100644
index e2c7e4a..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java
+++ /dev/null
@@ -1,161 +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.jena.fuseki.servlets;
-
-import java.io.IOException ;
-import java.util.Locale ;
-
-import javax.servlet.ServletException ;
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.fuseki.server.CounterName ;
-
-/** Common point for operations that are "REST"ish (use GET/PUT etc as operations). */ 
-public abstract class ActionREST extends ActionSPARQL
-{
-    public ActionREST()
-    { super() ; }
-
-    @Override
-    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        // Direct all verbs to our common framework.
-        doCommon(request, response) ;
-    }
-    
-    @Override
-    protected void perform(HttpAction action) {
-        dispatch(action) ;
-    }
-
-    private void dispatch(HttpAction action) {
-        HttpServletRequest req = action.request ;
-        HttpServletResponse resp = action.response ;
-        String method = req.getMethod().toUpperCase(Locale.ROOT) ;
-
-        if (method.equals(METHOD_GET))
-            doGet$(action);
-        else if (method.equals(METHOD_HEAD))
-            doHead$(action);
-        else if (method.equals(METHOD_POST))
-            doPost$(action);
-        else if (method.equals(METHOD_PATCH))
-            doPatch$(action) ;
-        else if (method.equals(METHOD_OPTIONS))
-            doOptions$(action) ;
-        else if (method.equals(METHOD_TRACE))
-            //doTrace(action) ;
-            ServletOps.errorMethodNotAllowed("TRACE") ;
-        else if (method.equals(METHOD_PUT))
-            doPut$(action) ;   
-        else if (method.equals(METHOD_DELETE))
-            doDelete$(action) ;
-        else
-            ServletOps.errorNotImplemented("Unknown method: "+method) ;
-    }
-
-    // Counter wrappers
-    
-    // XXX Out of date - we now add HTTP counters to all endpoints. 
-    
-    private final void doGet$(HttpAction action) {
-        incCounter(action.getEndpoint(), CounterName.HTTPget) ;
-        try {
-            doGet(action) ;
-            incCounter(action.getEndpoint(), CounterName.HTTPgetGood) ;
-        } catch ( ActionErrorException ex) {
-            incCounter(action.getEndpoint(), CounterName.HTTPGetBad) ;
-            throw ex ;
-        }
-    }
-
-    private final void doHead$(HttpAction action) {
-        incCounter(action.getEndpoint(), CounterName.HTTPhead) ;
-        try {
-            doHead(action) ;
-            incCounter(action.getEndpoint(), CounterName.HTTPheadGood) ;
-        } catch ( ActionErrorException ex) {
-            incCounter(action.getEndpoint(), CounterName.HTTPheadBad) ;
-            throw ex ;
-        }
-    }
-
-    private final void doPost$(HttpAction action) {
-        incCounter(action.getEndpoint(), CounterName.HTTPpost) ;
-        try {
-            doPost(action) ;
-            incCounter(action.getEndpoint(), CounterName.HTTPpostGood) ;
-        } catch ( ActionErrorException ex) {
-            incCounter(action.getEndpoint(), CounterName.HTTPpostBad) ;
-            throw ex ;
-        }
-    }
-
-    private final void doPatch$(HttpAction action) {
-        incCounter(action.getEndpoint(), CounterName.HTTPpatch) ;
-        try {
-            doPatch(action) ;
-            incCounter(action.getEndpoint(), CounterName.HTTPpatchGood) ;
-        } catch ( ActionErrorException ex) {
-            incCounter(action.getEndpoint(), CounterName.HTTPpatchBad) ;
-            throw ex ;
-        }
-    }
-
-    private final void doDelete$(HttpAction action) {
-        incCounter(action.getEndpoint(), CounterName.HTTPdelete) ;
-        try {
-            doDelete(action) ;
-            incCounter(action.getEndpoint(), CounterName.HTTPdeleteGood) ;
-        } catch ( ActionErrorException ex) {
-            incCounter(action.getEndpoint(), CounterName.HTTPdeleteBad) ;
-            throw ex ;
-        }
-    }
-
-    private final void doPut$(HttpAction action) {
-        incCounter(action.getEndpoint(), CounterName.HTTPput) ;
-        try {
-            doPut(action) ;
-            incCounter(action.getEndpoint(), CounterName.HTTPputGood) ;
-        } catch ( ActionErrorException ex) {
-            incCounter(action.getEndpoint(), CounterName.HTTPputBad) ;
-            throw ex ;
-        }
-    }
-
-    private final void doOptions$(HttpAction action) {
-        incCounter(action.getEndpoint(), CounterName.HTTPoptions) ;
-        try {
-            doOptions(action) ;
-            incCounter(action.getEndpoint(), CounterName.HTTPoptionsGood) ;
-        } catch ( ActionErrorException ex) {
-            incCounter(action.getEndpoint(), CounterName.HTTPoptionsBad) ;
-            throw ex ;
-        }
-    }
-    
-    protected abstract void doGet(HttpAction action) ;
-    protected abstract void doHead(HttpAction action) ;
-    protected abstract void doPost(HttpAction action) ;
-    protected abstract void doPatch(HttpAction action) ;
-    protected abstract void doDelete(HttpAction action) ;
-    protected abstract void doPut(HttpAction action) ;
-    protected abstract void doOptions(HttpAction action) ;
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java
deleted file mode 100644
index d26bc55..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java
+++ /dev/null
@@ -1,207 +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.jena.fuseki.servlets;
-
-import static org.apache.jena.fuseki.server.CounterName.Requests ;
-import static org.apache.jena.fuseki.server.CounterName.RequestsBad ;
-import static org.apache.jena.fuseki.server.CounterName.RequestsGood ;
-
-import java.io.InputStream ;
-
-import org.apache.jena.atlas.RuntimeIOException ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.server.* ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.riot.ReaderRIOT ;
-import org.apache.jena.riot.RiotException ;
-import org.apache.jena.riot.system.ErrorHandler ;
-import org.apache.jena.riot.system.ErrorHandlerFactory ;
-import org.apache.jena.riot.system.StreamRDF ;
-
-import com.hp.hpl.jena.query.QueryCancelledException ;
-
-/** SPARQL request lifecycle */
-public abstract class ActionSPARQL extends ActionBase
-{
-    protected ActionSPARQL() { super(Fuseki.actionLog) ; }
-    
-    protected abstract void validate(HttpAction action) ;
-    protected abstract void perform(HttpAction action) ;
-
-    /**
-     * Executes common tasks, including mapping the request to the right dataset, setting the dataset into the HTTP
-     * action, and retrieving the service for the dataset requested. Finally, it calls the
-     * {@link #executeAction(HttpAction)} method, which executes the HTTP Action life cycle.
-     * @param action HTTP Action
-     */
-    @Override
-    protected void execCommonWorker(HttpAction action) {
-        DataAccessPoint dataAccessPoint ;
-        DataService dSrv ;
-        
-        String datasetUri = mapRequestToDataset(action) ;
-        if ( datasetUri != null ) {
-            dataAccessPoint = DataAccessPointRegistry.get().get(datasetUri) ;
-            if ( dataAccessPoint == null ) {
-                ServletOps.errorNotFound("No dataset for URI: "+datasetUri) ;
-                return ;
-            }
-            //dataAccessPoint.
-            dSrv = dataAccessPoint.getDataService() ;
-            if ( ! dSrv.isAcceptingRequests() ) {
-                ServletOps.errorNotFound("Dataset not active: "+datasetUri) ;
-                return ;
-            }
-        } else {
-            dataAccessPoint = null ;
-            dSrv = DataService.serviceOnlyDataService() ;
-        }
-
-        String operationName = mapRequestToOperation(action, dataAccessPoint) ;
-        action.setRequest(dataAccessPoint, dSrv) ;
-        
-        //operationName = ""
-        
-        Endpoint op = dSrv.getOperation(operationName) ;
-        action.setEndpoint(op, operationName);
-        executeAction(action) ;
-    }
-
-    /** Execute a SPARQL request. Statistics have not been adjusted at this point.
-     * 
-     * @param action
-     */
-    protected void executeAction(HttpAction action) {
-        executeLifecycle(action) ;
-    }
-    
-    /** 
-     * Standard execution lifecycle for a SPARQL Request.
-     * <ul>
-     * <li>{@link #startRequest(HttpAction)}</li>
-     * <li>initial statistics,</li>
-     * <li>{@link #validate(HttpAction)} request,</li>
-     * <li>{@link #perform(HttpAction)} request,</li>
-     * <li>completion/error statistics,</li>
-     * <li>{@link #finishRequest(HttpAction)}
-     * </ul>
-     * 
-     * @param action
-     */
-    // This is the service request lifecycle.
-    final
-    protected void executeLifecycle(HttpAction action) {
-        startRequest(action) ;
-        // And also HTTP counter
-        CounterSet csService = action.getDataService().getCounters() ;
-        CounterSet csOperation = action.getEndpoint().getCounters() ;
-        
-        incCounter(csService, Requests) ;
-        incCounter(csOperation, Requests) ;
-        try {
-            // Either exit this via "bad request" on validation
-            // or in execution in perform. 
-            try {
-                validate(action) ;
-            } catch (ActionErrorException ex) {
-                incCounter(csOperation, RequestsBad) ;
-                incCounter(csService, RequestsBad) ;
-                throw ex ;
-            }
-
-            try {
-                perform(action) ;
-                // Success
-                incCounter(csOperation, RequestsGood) ;
-                incCounter(csService, RequestsGood) ;
-            } catch (ActionErrorException | QueryCancelledException | RuntimeIOException ex) {
-                incCounter(csOperation, RequestsBad) ;
-                incCounter(csService, RequestsBad) ;
-                throw ex ;
-            }
-        } finally {
-            finishRequest(action) ;
-        }
-    }
-    
-    /**
-     * Map request {@link HttpAction} to uri in the registry.
-     * A return of ull means no mapping done (passthrough).
-     * @param uri the URI
-     * @return the dataset
-     */
-    protected String mapRequestToDataset(HttpAction action) {
-        return ActionLib.mapRequestToDataset(action) ;
-    }
-
-    /**
-     * Map request to uri in the registry. null means no mapping done
-     * (passthrough).
-     */
-    protected String mapRequestToOperation(HttpAction action, DataAccessPoint dataAccessPoint) {
-        return ActionLib.mapRequestToOperation(action, dataAccessPoint) ;
-    }
-
-    /** Increment counter */
-    protected static void incCounter(Counters counters, CounterName name) {
-        if ( counters == null ) return ;
-        incCounter(counters.getCounters(), name) ; 
-    }
-    
-    /** Decrement counter */
-    protected static void decCounter(Counters counters, CounterName name) {
-        if ( counters == null ) return ;
-        decCounter(counters.getCounters(), name) ; 
-    }
-
-    protected static void incCounter(CounterSet counters, CounterName name) {
-        if ( counters == null )
-            return ;
-        try {
-            if ( counters.contains(name) )
-                counters.inc(name) ;
-        } catch (Exception ex) {
-            Fuseki.serverLog.warn("Exception on counter inc", ex) ;
-        }
-    }
-    
-    protected static void decCounter(CounterSet counters, CounterName name) {
-        if ( counters == null )
-            return ;
-        try {
-            if ( counters.contains(name) )
-                counters.dec(name) ;
-        } catch (Exception ex) {
-            Fuseki.serverLog.warn("Exception on counter dec", ex) ;
-        }
-    }
-
-    public static void parse(HttpAction action, StreamRDF dest, InputStream input, Lang lang, String base) {
-        try {
-            ReaderRIOT r = RDFDataMgr.createReader(lang) ;
-            if ( r == null )
-                ServletOps.errorBadRequest("No parser for language '"+lang.getName()+"'") ;
-            ErrorHandler errorHandler = ErrorHandlerFactory.errorHandlerStd(action.log);
-            r.setErrorHandler(errorHandler); 
-            r.read(input, base, null, dest, null) ; 
-        } 
-        catch (RiotException ex) { ServletOps.errorBadRequest("Parse error: "+ex.getMessage()) ; }
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ConcurrencyPolicyMRSW.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ConcurrencyPolicyMRSW.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ConcurrencyPolicyMRSW.java
deleted file mode 100644
index 1f86539..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/ConcurrencyPolicyMRSW.java
+++ /dev/null
@@ -1,113 +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.jena.fuseki.servlets;
-
-import java.util.ConcurrentModificationException ;
-import java.util.concurrent.atomic.AtomicLong ;
-
-import org.apache.jena.fuseki.Fuseki ;
-import org.slf4j.Logger ;
-
-public final class ConcurrencyPolicyMRSW
-{
-    static private Logger log = Fuseki.actionLog ; //org.slf4j.LoggerFactory.getLogger(ConcurrencyPolicyMRSW.class) ;
-    static private final boolean logging = false ; //log.isDebugEnabled() ;
-    
-    // This is a simplified version of ConcurrencyPolicyMRSW from TDB. 
-    private final AtomicLong readCounter = new AtomicLong(0) ;
-    private final AtomicLong writeCounter = new AtomicLong(0) ;
-    static private final AtomicLong policyCounter = new AtomicLong(0) ;
-
-    public ConcurrencyPolicyMRSW()
-    { policyCounter.incrementAndGet() ; }
-
-    // Loggin -inside the operation.
-    
-    //@Override
-    public void startRead()
-    {
-        readCounter.getAndIncrement() ;
-        log() ;
-        checkConcurrency() ;
-    }
-
-    //@Override
-    public void finishRead()
-    {
-        log() ;
-        readCounter.decrementAndGet() ;
-        checkConcurrency() ;
-    }
-
-    //@Override
-    public void startUpdate()
-    {
-        writeCounter.getAndIncrement() ;
-        log() ;
-        checkConcurrency() ;
-    }
-
-    //@Override
-    public void finishUpdate()
-    {
-        log() ;
-        writeCounter.decrementAndGet() ;
-        checkConcurrency() ;
-    }
-
-    private synchronized void checkConcurrency()
-    {
-        long R = readCounter.get() ;
-        long W = writeCounter.get() ;
-        long id = policyCounter.get();
-        if ( R > 0 && W > 0 )
-            policyError(id, R, W) ;
-        if ( W > 1 )
-            policyError(id, R, W) ;
-    }
-
-    private void log()
-    {
-        if ( ! logging ) 
-            return ;
-        long R , W , id ;
-        synchronized(this)
-        {
-            R = readCounter.get() ;
-            W = writeCounter.get() ;
-            id = policyCounter.get();
-        }
-        log.info(format(id, R, W)) ;
-    }
-    
-    private static void policyError(long id, long R, long W)
-    {
-        policyError(format(id, R, W)) ;
-    }
-
-    private static void policyError(String message)
-    {
-        throw new ConcurrentModificationException(message) ;
-    }
-    
-    private static String format(long id, long R, long W)
-    {
-        return String.format("(lock=%d) Reader = %d, Writer = %d", id, R, W) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/FusekiFilter.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/FusekiFilter.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/FusekiFilter.java
deleted file mode 100644
index 7a79cd3..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/FusekiFilter.java
+++ /dev/null
@@ -1,87 +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.jena.fuseki.servlets;
-
-import java.io.IOException ;
-
-import javax.servlet.* ;
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
-import org.slf4j.Logger ;
-
-/** Look at all requests and see if they match a registered dataset name; 
- * if they do, pass down to the uber servlet, which can dispatch any request
- * for any service. 
- */
-public class FusekiFilter implements Filter {
-    private static Logger log = Fuseki.serverLog ;
-    private static SPARQL_UberServlet überServlet = new SPARQL_UberServlet.AccessByConfig() ;
-    
-    @Override
-    public void init(FilterConfig filterConfig) throws ServletException {
-//        log.info("Filter: ["+Utils.className(this)+"] ServletContextName = "+filterConfig.getServletContext().getServletContextName()) ;
-//        log.info("Filter: ["+Utils.className(this)+"] ContextPath        = "+filterConfig.getServletContext().getContextPath()) ;
-    }
-
-    private static final boolean LogFilter = false ;     // Development debugging (can be excessive!)
-    
-    @Override
-    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
-        throws IOException, ServletException {
-        try {
-            HttpServletRequest req = (HttpServletRequest)request ;
-            HttpServletResponse resp = (HttpServletResponse)response ;
-
-            // Handle context path
-            String uri = ActionLib.actionURI(req) ;
-            String datasetUri = ActionLib.mapActionRequestToDataset(uri) ;
-
-            // is it a long running operation?
-            // (this could be a separate filter)
-            
-            if ( LogFilter ) {
-                log.info("Filter: Request URI = "+req.getRequestURI()) ;
-                log.info("Filter: Action URI  = "+uri) ;
-                log.info("Filter: Dataset URI = "+datasetUri) ;
-            }
-            
-            if ( datasetUri != null ) {        
-                if ( DataAccessPointRegistry.get().isRegistered(datasetUri) ) {
-                    if ( LogFilter )
-                        log.info("Filter: dispatch") ;
-                    überServlet.doCommon(req, resp) ;
-                    return ;
-                }
-            }
-        } catch (Exception ex) {}
-        
-        if ( LogFilter )
-            log.info("Filter: pass to chain") ;
-        // Not found - continue. 
-        chain.doFilter(request, response);
-    }
-
-    @Override
-    public void destroy() {}
-
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
deleted file mode 100644
index 245ed0f..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
+++ /dev/null
@@ -1,387 +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.jena.fuseki.servlets;
-
-import static com.hp.hpl.jena.query.ReadWrite.READ ;
-import static com.hp.hpl.jena.query.ReadWrite.WRITE ;
-
-import java.util.HashMap ;
-import java.util.Map ;
-
-import javax.servlet.http.HttpServletRequest ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.atlas.logging.Log ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.FusekiException ;
-import org.apache.jena.fuseki.server.* ;
-import org.slf4j.Logger ;
-
-import com.hp.hpl.jena.query.ReadWrite ;
-import com.hp.hpl.jena.sparql.SystemARQ ;
-import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-import com.hp.hpl.jena.sparql.core.DatasetGraphWithLock ;
-import com.hp.hpl.jena.sparql.core.DatasetGraphWrapper ;
-import com.hp.hpl.jena.sparql.core.Transactional ;
-
-/**
- * HTTP action that represents the user request lifecycle. Its state is handled in the
- * {@link ActionSPARQL#executeAction(HttpAction)} method.
- */
-public class HttpAction
-{
-    public final long id ;
-    public final boolean verbose ;
-    public final Logger log ;
-    
-    // ----
-    // Worth subclassing? Given this is allocated in the general lifecycle
-    // it would mean there are downcasts to the specific type.
-    
-    // -- Valid only for operational actions (e.g. SPARQL).
-    
-    public  String          endpointName    = null ;        // Endpoint name srv was found under 
-    public  Endpoint        endpoint        = null ;
-    private Transactional   transactional   = null ;
-    private boolean         isTransactional = false ;
-    private DatasetGraph    activeDSG       = null ;        // Set when inside begin/end.
-    private ReadWrite       activeMode      = null ;        // Set when inside begin/end.
-    
-    // -- Valid only for administration actions.
-    
-    // -- Shared items (but exact meaning may differ)
-    /** Handle to dataset+services being acted on (maybe null) */
-    private DataAccessPoint dataAccessPoint = null ;
-    private DataService dataService         = null ;
-    private String datasetName              = null ;        // Dataset URI used (e.g. registry)
-    private DatasetGraph dsg                = null ;
-
-    // ----
-    
-    private boolean startTimeIsSet = false ;
-    private boolean finishTimeIsSet = false ;
-
-    private long startTime = -2 ;
-    private long finishTime = -2 ;
-    
-    // Outcome.
-    public int statusCode = -1 ;
-    public String message = null ;
-    public int contentLength = -1 ;
-    public String contentType = null ;
-    
-    // Cleared to archive:
-    public Map <String, String> headers = new HashMap<>() ;
-    public HttpServletRequest request;
-    public HttpServletResponseTracker response ;
-    private final String actionURI ;
-    private final String contextPath ;
-    
-    /**
-     * Creates a new HTTP Action, using the HTTP request and response, and a given ID.
-     *
-     * @param id given ID
-     * @param log Logger for this action 
-     * @param request HTTP request
-     * @param response HTTP response
-     * @param verbose verbose flag
-     */
-    public HttpAction(long id, Logger log, HttpServletRequest request, HttpServletResponse response, boolean verbose) {
-        this.id = id ;
-        this.log = log ;
-        this.request = request ;
-        this.response = new HttpServletResponseTracker(this, response) ;
-        // Should this be set when setDataset is called from the dataset context?
-        // Currently server-wide, e.g. from the command line.
-        this.verbose = verbose ;
-        this.contextPath = request.getServletContext().getContextPath() ;
-        this.actionURI = ActionLib.actionURI(request) ;
-    }
-
-    /** Initialization after action creation during lifecycle setup.
-     * <p>Sets the action dataset. Setting will replace any existing {@link DataAccessPoint} and {@link DataService},
-     * as the {@link DatasetGraph} of the current HTTP Action.</p>
-     *
-     * <p>Once it has updated its members, the HTTP Action will change its transactional state and
-     * {@link Transactional} instance according to its base dataset graph.</p>
-     *
-     * @param dataAccessPoint {@link DataAccessPoint}
-     * @param dService {@link DataService}
-     * @see Transactional
-     */
-    
-    public void setRequest(DataAccessPoint dataAccessPoint, DataService dService) {
-        this.dataAccessPoint = dataAccessPoint ;
-        if ( dataAccessPoint != null )
-            this.datasetName = dataAccessPoint.getName() ; 
-
-        if ( this.dataService != null )
-            throw new FusekiException("Redefinition of DatasetRef in the request action") ;
-        
-        this.dataService = dService ;
-        if ( dService == null || dService.getDataset() == null )
-            // Null does not happens for service requests, (it does for admin requests - call setControlRequest) 
-            throw new FusekiException("Null DataService in the request action") ;
-        
-        this.dsg = dService.getDataset() ;
-        DatasetGraph basedsg = unwrap(dsg) ;
-
-        if ( isTransactional(basedsg) && isTransactional(dsg) ) {
-            // Use transactional if it looks safe - abort is necessary.
-            transactional = (Transactional)dsg ;
-            isTransactional = true ;
-        } else {
-            // Unsure if safesetControlRef
-            transactional = new DatasetGraphWithLock(dsg) ;
-            // No real abort.
-            isTransactional = false ;
-        }
-    }
-    
-    public void setControlRequest(DataAccessPoint dataAccessPoint, String datasetUri) {
-        this.dataAccessPoint = dataAccessPoint ;
-        this.dataService = null ;
-        this.datasetName = datasetUri ;
-    }
-    
-    /**
-     * Returns <code>true</code> iff the given {@link DatasetGraph} is an instance of {@link Transactional},
-     * <code>false otherwise</code>.
-     *
-     * @param dsg a {@link DatasetGraph}
-     * @return <code>true</code> iff the given {@link DatasetGraph} is an instance of {@link Transactional},
-     * <code>false otherwise</code>
-     */
-    private static boolean isTransactional(DatasetGraph dsg) {
-        return (dsg instanceof Transactional) ;
-    }
-
-    /**
-     * A {@link DatasetGraph} may contain other <strong>wrapped DatasetGraph's</strong>. This method will return
-     * the first instance (including the argument to this method) that <strong>is not</strong> an instance of
-     * {@link DatasetGraphWrapper}.
-     *
-     * @param dsg a {@link DatasetGraph}
-     * @return the first found {@link DatasetGraph} that is not an instance of {@link DatasetGraphWrapper}
-     */
-   private static DatasetGraph unwrap(DatasetGraph dsg) {
-        while (dsg instanceof DatasetGraphWrapper) {
-            dsg = ((DatasetGraphWrapper)dsg).getWrapped() ;
-        }
-        return dsg ;
-    }
-        
-    /** This is the requestURI with the context path removed.
-     *  It should be used internally for dispatch.
-     */
-    public String getActionURI() {
-        return actionURI ;
-    }
-    
-    /** Get the context path.
-     */
-    public String getContextPath() {
-        return contextPath ;
-    }
-    
-    
-    /** Set the endpoint and endpoint name that this is an action for. 
-     * @param srvRef {@link Endpoint}
-     * @param endpointName
-     */
-    public void setEndpoint(Endpoint srvRef, String endpointName) {
-        this.endpoint = srvRef ; 
-        this.endpointName = endpointName ;
-    }
-    
-    /** Get the endpoint for the action (may be null) . */
-    public Endpoint getEndpoint() {
-        return endpoint ; 
-    }
-
-    /**
-     * Returns whether or not the underlying DatasetGraph is fully transactional (supports rollback)
-     */
-    public boolean isTransactional() {
-        return isTransactional ;
-    }
-
-    public void beginRead() {
-        activeMode = READ ;
-        transactional.begin(READ) ;
-        activeDSG = dsg ;
-        dataService.startTxn(READ) ;
-    }
-
-    public void endRead() {
-        dataService.finishTxn(READ) ;
-        activeMode = null ;
-        transactional.end() ;
-        activeDSG = null ;
-    }
-
-    public void beginWrite() {
-        transactional.begin(WRITE) ;
-        activeMode = WRITE ;
-        activeDSG = dsg ;
-        dataService.startTxn(WRITE) ;
-    }
-
-    public void commit() {
-        transactional.commit() ;
-        activeDSG = null ;
-    }
-
-    public void abort() {
-        try { transactional.abort() ; } 
-        catch (Exception ex) {
-            // Some datasets claim to be transactional but
-            // don't provide a real abort. We tried to avoid
-            // them earlier but even if they sneek through,
-            // we try to continue server operation.
-            Log.warn(this, "Exception during abort (operation attempts to continue): "+ex.getMessage()) ; 
-        }
-        activeDSG = null ;
-    }
-
-    public void endWrite() {
-        dataService.finishTxn(WRITE) ;
-        activeMode = null ;
-
-        if ( transactional.isInTransaction() ) {
-            Log.warn(this, "Transaction still active in endWriter - no commit or abort seen (forced abort)") ;
-            try {
-                transactional.abort() ;
-            } catch (RuntimeException ex) {
-                Log.warn(this, "Exception in forced abort (trying to continue)", ex) ;
-            }
-        }
-        transactional.end() ;
-        activeDSG = null ;
-    }
-
-    public final void startRequest()
-    { 
-        if ( dataAccessPoint != null ) 
-            dataAccessPoint.startRequest(this) ;
-    }
-
-    public final void finishRequest() { 
-        if ( dataAccessPoint != null ) 
-            dataAccessPoint.finishRequest(this) ;
-        // Standard logging goes here.
-        if ( Fuseki.requestLog != null && Fuseki.requestLog.isInfoEnabled() ) { 
-            String s = RequestLog.combinedNCSA(this) ;
-            Fuseki.requestLog.info(s);
-        }
-    }
-    
-    /** If inside the transaction for the action, return the active {@link DatasetGraph},
-     *  otherwise return null.
-     * @return Current active {@link DatasetGraph}
-     */
-    public final DatasetGraph getActiveDSG() {
-        return activeDSG ;
-    }
-
-    public final DataAccessPoint getDataAccessPoint() {
-        return dataAccessPoint;
-    }
-
-//    public void setDataAccessPoint(DataAccessPoint dataAccessPoint) {
-//        this.dataAccessPoint = dataAccessPoint;
-//    }
-
-    public final DataService getDataService() {
-        return dataService;
-    }
-
-//    public final void setDataService(DataService dataService) {
-//        this.dataService = dataService;
-//    }
-
-    public final String getDatasetName() {
-        return datasetName;
-    }
-
-//    public void setDatasetName(String datasetName) {
-//        this.datasetName = datasetName;
-//    }
-
-    /** Reduce to a size that can be kept around for sometime. 
-     * Release resources like datasets that may be closed, reset etc.
-     */
-    public void minimize() {
-        this.request = null ;
-        this.response = null ;
-        this.dsg = null ;
-        this.dataService = null ;
-        this.activeDSG = null ;
-        this.endpoint = null ;
-    }
-
-    public void setStartTime() {
-        if ( startTimeIsSet ) 
-            Log.warn(this,  "Start time reset") ;
-        startTimeIsSet = true ;
-        this.startTime = System.nanoTime() ;
-    }
-
-    /** Start time, in system nanos */
-    public long getStartTime() { 
-        if ( ! startTimeIsSet ) 
-            Log.warn(this,  "Start time is not set") ;
-        return startTime ;
-    }
-
-    /** Start time, in system nanos */
-    public long getFinishTime() { 
-        if ( ! finishTimeIsSet ) 
-            Log.warn(this,  "Finish time is not set") ;
-        return finishTime ;
-    }
-    
-    public void setFinishTime() {
-        if ( finishTimeIsSet ) 
-            Log.warn(this,  "Finish time reset") ;
-        finishTimeIsSet = true ;
-        this.finishTime = System.nanoTime() ;
-    }
-
-    public HttpServletRequest getRequest()              { return request ; }
-
-    public HttpServletResponseTracker getResponse()     { return response ; }
-    
-    /** Return the recorded time taken in milliseconds. 
-     *  {@link #setStartTime} and {@link #setFinishTime}
-     *  must have been called.
-     */
-    public long getTime()
-    {
-        if ( ! startTimeIsSet ) 
-            Log.warn(this,  "Start time not set") ;
-        if ( ! finishTimeIsSet ) 
-            Log.warn(this,  "Finish time not set") ;
-        return (finishTime-startTime)/(1000*1000) ;
-    }
-
-    public void sync() {
-        SystemARQ.sync(dsg) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/HttpServletResponseTracker.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/HttpServletResponseTracker.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/HttpServletResponseTracker.java
deleted file mode 100644
index c39e728..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/HttpServletResponseTracker.java
+++ /dev/null
@@ -1,140 +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.jena.fuseki.servlets;
-
-import java.io.IOException ;
-
-import javax.servlet.http.HttpServletResponse ;
-import javax.servlet.http.HttpServletResponseWrapper ;
-
-import org.apache.jena.atlas.logging.Log ;
-
-/** Intercepting wrapper so we can track the response settings for logging purposes */
-
-public class HttpServletResponseTracker extends HttpServletResponseWrapper
-{
-    private final HttpAction action ;
-
-    public HttpServletResponseTracker(HttpAction action, HttpServletResponse response)
-    {
-        super(response) ;
-        this.action = action ;
-    }
-
-    @Override
-    public void sendError(int sc, String msg) throws IOException
-    {
-        action.statusCode = sc ;
-        action.message = msg ;
-        super.sendError(sc, msg) ;
-    }
-
-    @Override
-    public void sendError(int sc) throws IOException
-    {
-        action.statusCode = sc ;
-        action.message = null ;
-        super.sendError(sc) ;
-    }
-
-    @Override
-    public void setHeader(String name, String value)
-    {
-        super.setHeader(name, value) ;
-        action.headers.put(name, value) ;
-    }
-
-    @Override
-    public void addHeader(String name, String value)
-    {
-        Log.warn(this, "Unexpected addHeader - not recorded in log") ;
-        super.addHeader(name, value) ;
-    }
-    @Override
-    public void setStatus(int sc) 
-    {
-        action.statusCode = sc ;
-        action.message = null ;
-        super.setStatus(sc) ;
-    }
-
-    @Override
-    @Deprecated
-    public void setStatus(int sc, String sm)
-    {
-        action.statusCode = sc ;
-        action.message = sm ;
-        super.setStatus(sc, sm) ;
-    }
-
-    @Override
-    public void setContentLength(int len)
-    {
-        action.contentLength = len ;
-        super.setContentLength(len) ;
-    }
-
-    @Override
-    public void setContentType(String type)
-    {
-        action.contentType = type ;
-        super.setContentType(type) ;
-    }
-      
-      // From HttpServletResponse
-//      public void addCookie(Cookie cookie) {}
-//      public boolean containsHeader(String name) {}
-//      public String encodeURL(String url) { }
-//      public String encodeRedirectURL(String url) {}
-//      public String encodeUrl(String url) {}
-//      public String encodeRedirectUrl(String url) {}
-//      public void sendError(int sc, String msg) throws IOException
-//      public void sendError(int sc) throws IOException
-//      public void sendRedirect(String location) throws IOException {}
-//      public void setDateHeader(String name, long date) {}
-//      public void addDateHeader(String name, long date) {}
-//      public void setHeader(String name, String value)
-//      public void addHeader(String name, String value)
-//      public void setIntHeader(String name, int value) {}
-//      public void addIntHeader(String name, int value) {}
-//      public void setStatus(int sc) 
-//      public void setStatus(int sc, String sm)
-//      public void sendRedirect(String location) throws IOException {}
-//      public void setDateHeader(String name, long date) {}
-//      public void addDateHeader(String name, long date) {}
-        
-        // From ServletResponse.
-//         public ServletResponse getResponse() {}
-//         public void setResponse(ServletResponse response) {}
-//         public void setCharacterEncoding(String charset) {}
-//         public String getCharacterEncoding() {}
-//         public ServletOutputStream getOutputStream() throws IOException {}
-//         public PrintWriter getWriter() throws IOException {}
-//         public void setContentLength(int len) {}
-//         public void setContentType(String type) {}
-//         public String getContentType() {
-//         public void setBufferSize(int size) {}
-//         public int getBufferSize() {}
-//         public void flushBuffer() throws IOException {}
-//         public boolean isCommitted() {}
-//         public void reset() {}
-//         public void resetBuffer() {}
-//         public void setLocale(Locale loc) {}
-//         public Locale getLocale() {}
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/NullOutputStream.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/NullOutputStream.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/NullOutputStream.java
deleted file mode 100644
index 63e6562..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/NullOutputStream.java
+++ /dev/null
@@ -1,53 +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.jena.fuseki.servlets;
-
-import java.io.* ;
-
-/** 
-* Code needed to implement an OutputStream that does nothing.
-*/
-
-
-public class NullOutputStream extends /*Filter*/OutputStream
-{
-	public NullOutputStream()
-	{
-	}
-
-	// The OutputStream operations
-	@Override
-    public void close() { /* .close() ;*/ }
-	@Override
-    public void flush() { /* .flush() ;*/ }
-
-	// Need to implement this one.
-	@Override
-    public void write(int b) { /* .write(b) ;*/ }
-	@Override
-    public void write(byte b[]) { /* this.write(b, 0, b.length) ; */}
-
-	// Good to implement this one.
-	@Override
-    public void write(byte[] b, int off, int len)
-	{
-		// Work function
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads.java b/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads.java
deleted file mode 100644
index 578447e..0000000
--- a/jena-fuseki2/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads.java
+++ /dev/null
@@ -1,68 +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.jena.fuseki.servlets ;
-
-
-/**
- * Servlet for operations directly on a dataset - REST(ish) behaviour on the
- * dataset URI.
- */
-
-public abstract class REST_Quads extends SPARQL_GSP {
-    // Not supported: GSP direct naming.
-
-    public REST_Quads() {
-        super() ;
-    }
-
-    @Override
-    protected void validate(HttpAction action) {
-        // Check in the operations itself.
-    }
-
-    @Override
-    protected void doOptions(HttpAction action) {
-        ServletOps.errorMethodNotAllowed("OPTIONS") ;
-    }
-
-    @Override
-    protected void doHead(HttpAction action) {
-        ServletOps.errorMethodNotAllowed("HEAD") ;
-    }
-
-    @Override
-    protected void doPost(HttpAction action) {
-        ServletOps.errorMethodNotAllowed("POST") ;
-    }
-
-    @Override
-    protected void doPut(HttpAction action) {
-        ServletOps.errorMethodNotAllowed("PUT") ;
-    }
-
-    @Override
-    protected void doDelete(HttpAction action) {
-        ServletOps.errorMethodNotAllowed("DELETE") ;
-    }
-
-    @Override
-    protected void doPatch(HttpAction action) {
-        ServletOps.errorMethodNotAllowed("PATCH") ;
-    }
-}


[16/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/require.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/require.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/require.js
new file mode 100644
index 0000000..77a5bb1
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/require.js
@@ -0,0 +1,2076 @@
+/** vim: et:ts=4:sw=4:sts=4
+ * @license RequireJS 2.1.15 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/jrburke/requirejs for details
+ */
+//Not using strict: uneven strict support in browsers, #392, and causes
+//problems with requirejs.exec()/transpiler plugins that may not be strict.
+/*jslint regexp: true, nomen: true, sloppy: true */
+/*global window, navigator, document, importScripts, setTimeout, opera */
+
+var requirejs, require, define;
+(function (global) {
+    var req, s, head, baseElement, dataMain, src,
+        interactiveScript, currentlyAddingScript, mainScript, subPath,
+        version = '2.1.15',
+        commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
+        cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
+        jsSuffixRegExp = /\.js$/,
+        currDirRegExp = /^\.\//,
+        op = Object.prototype,
+        ostring = op.toString,
+        hasOwn = op.hasOwnProperty,
+        ap = Array.prototype,
+        apsp = ap.splice,
+        isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),
+        isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
+        //PS3 indicates loaded and complete, but need to wait for complete
+        //specifically. Sequence is 'loading', 'loaded', execution,
+        // then 'complete'. The UA check is unfortunate, but not sure how
+        //to feature test w/o causing perf issues.
+        readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?
+                      /^complete$/ : /^(complete|loaded)$/,
+        defContextName = '_',
+        //Oh the tragedy, detecting opera. See the usage of isOpera for reason.
+        isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',
+        contexts = {},
+        cfg = {},
+        globalDefQueue = [],
+        useInteractive = false;
+
+    function isFunction(it) {
+        return ostring.call(it) === '[object Function]';
+    }
+
+    function isArray(it) {
+        return ostring.call(it) === '[object Array]';
+    }
+
+    /**
+     * Helper function for iterating over an array. If the func returns
+     * a true value, it will break out of the loop.
+     */
+    function each(ary, func) {
+        if (ary) {
+            var i;
+            for (i = 0; i < ary.length; i += 1) {
+                if (ary[i] && func(ary[i], i, ary)) {
+                    break;
+                }
+            }
+        }
+    }
+
+    /**
+     * Helper function for iterating over an array backwards. If the func
+     * returns a true value, it will break out of the loop.
+     */
+    function eachReverse(ary, func) {
+        if (ary) {
+            var i;
+            for (i = ary.length - 1; i > -1; i -= 1) {
+                if (ary[i] && func(ary[i], i, ary)) {
+                    break;
+                }
+            }
+        }
+    }
+
+    function hasProp(obj, prop) {
+        return hasOwn.call(obj, prop);
+    }
+
+    function getOwn(obj, prop) {
+        return hasProp(obj, prop) && obj[prop];
+    }
+
+    /**
+     * Cycles over properties in an object and calls a function for each
+     * property value. If the function returns a truthy value, then the
+     * iteration is stopped.
+     */
+    function eachProp(obj, func) {
+        var prop;
+        for (prop in obj) {
+            if (hasProp(obj, prop)) {
+                if (func(obj[prop], prop)) {
+                    break;
+                }
+            }
+        }
+    }
+
+    /**
+     * Simple function to mix in properties from source into target,
+     * but only if target does not already have a property of the same name.
+     */
+    function mixin(target, source, force, deepStringMixin) {
+        if (source) {
+            eachProp(source, function (value, prop) {
+                if (force || !hasProp(target, prop)) {
+                    if (deepStringMixin && typeof value === 'object' && value &&
+                        !isArray(value) && !isFunction(value) &&
+                        !(value instanceof RegExp)) {
+
+                        if (!target[prop]) {
+                            target[prop] = {};
+                        }
+                        mixin(target[prop], value, force, deepStringMixin);
+                    } else {
+                        target[prop] = value;
+                    }
+                }
+            });
+        }
+        return target;
+    }
+
+    //Similar to Function.prototype.bind, but the 'this' object is specified
+    //first, since it is easier to read/figure out what 'this' will be.
+    function bind(obj, fn) {
+        return function () {
+            return fn.apply(obj, arguments);
+        };
+    }
+
+    function scripts() {
+        return document.getElementsByTagName('script');
+    }
+
+    function defaultOnError(err) {
+        throw err;
+    }
+
+    //Allow getting a global that is expressed in
+    //dot notation, like 'a.b.c'.
+    function getGlobal(value) {
+        if (!value) {
+            return value;
+        }
+        var g = global;
+        each(value.split('.'), function (part) {
+            g = g[part];
+        });
+        return g;
+    }
+
+    /**
+     * Constructs an error with a pointer to an URL with more information.
+     * @param {String} id the error ID that maps to an ID on a web page.
+     * @param {String} message human readable error.
+     * @param {Error} [err] the original error, if there is one.
+     *
+     * @returns {Error}
+     */
+    function makeError(id, msg, err, requireModules) {
+        var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
+        e.requireType = id;
+        e.requireModules = requireModules;
+        if (err) {
+            e.originalError = err;
+        }
+        return e;
+    }
+
+    if (typeof define !== 'undefined') {
+        //If a define is already in play via another AMD loader,
+        //do not overwrite.
+        return;
+    }
+
+    if (typeof requirejs !== 'undefined') {
+        if (isFunction(requirejs)) {
+            //Do not overwrite an existing requirejs instance.
+            return;
+        }
+        cfg = requirejs;
+        requirejs = undefined;
+    }
+
+    //Allow for a require config object
+    if (typeof require !== 'undefined' && !isFunction(require)) {
+        //assume it is a config object.
+        cfg = require;
+        require = undefined;
+    }
+
+    function newContext(contextName) {
+        var inCheckLoaded, Module, context, handlers,
+            checkLoadedTimeoutId,
+            config = {
+                //Defaults. Do not set a default for map
+                //config to speed up normalize(), which
+                //will run faster if there is no default.
+                waitSeconds: 7,
+                baseUrl: './',
+                paths: {},
+                bundles: {},
+                pkgs: {},
+                shim: {},
+                config: {}
+            },
+            registry = {},
+            //registry of just enabled modules, to speed
+            //cycle breaking code when lots of modules
+            //are registered, but not activated.
+            enabledRegistry = {},
+            undefEvents = {},
+            defQueue = [],
+            defined = {},
+            urlFetched = {},
+            bundlesMap = {},
+            requireCounter = 1,
+            unnormalizedCounter = 1;
+
+        /**
+         * Trims the . and .. from an array of path segments.
+         * It will keep a leading path segment if a .. will become
+         * the first path segment, to help with module name lookups,
+         * which act like paths, but can be remapped. But the end result,
+         * all paths that use this function should look normalized.
+         * NOTE: this method MODIFIES the input array.
+         * @param {Array} ary the array of path segments.
+         */
+        function trimDots(ary) {
+            var i, part;
+            for (i = 0; i < ary.length; i++) {
+                part = ary[i];
+                if (part === '.') {
+                    ary.splice(i, 1);
+                    i -= 1;
+                } else if (part === '..') {
+                    // If at the start, or previous value is still ..,
+                    // keep them so that when converted to a path it may
+                    // still work when converted to a path, even though
+                    // as an ID it is less than ideal. In larger point
+                    // releases, may be better to just kick out an error.
+                    if (i === 0 || (i == 1 && ary[2] === '..') || ary[i - 1] === '..') {
+                        continue;
+                    } else if (i > 0) {
+                        ary.splice(i - 1, 2);
+                        i -= 2;
+                    }
+                }
+            }
+        }
+
+        /**
+         * Given a relative module name, like ./something, normalize it to
+         * a real name that can be mapped to a path.
+         * @param {String} name the relative name
+         * @param {String} baseName a real name that the name arg is relative
+         * to.
+         * @param {Boolean} applyMap apply the map config to the value. Should
+         * only be done if this normalization is for a dependency ID.
+         * @returns {String} normalized name
+         */
+        function normalize(name, baseName, applyMap) {
+            var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
+                foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
+                baseParts = (baseName && baseName.split('/')),
+                map = config.map,
+                starMap = map && map['*'];
+
+            //Adjust any relative paths.
+            if (name) {
+                name = name.split('/');
+                lastIndex = name.length - 1;
+
+                // If wanting node ID compatibility, strip .js from end
+                // of IDs. Have to do this here, and not in nameToUrl
+                // because node allows either .js or non .js to map
+                // to same file.
+                if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
+                    name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
+                }
+
+                // Starts with a '.' so need the baseName
+                if (name[0].charAt(0) === '.' && baseParts) {
+                    //Convert baseName to array, and lop off the last part,
+                    //so that . matches that 'directory' and not name of the baseName's
+                    //module. For instance, baseName of 'one/two/three', maps to
+                    //'one/two/three.js', but we want the directory, 'one/two' for
+                    //this normalization.
+                    normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
+                    name = normalizedBaseParts.concat(name);
+                }
+
+                trimDots(name);
+                name = name.join('/');
+            }
+
+            //Apply map config if available.
+            if (applyMap && map && (baseParts || starMap)) {
+                nameParts = name.split('/');
+
+                outerLoop: for (i = nameParts.length; i > 0; i -= 1) {
+                    nameSegment = nameParts.slice(0, i).join('/');
+
+                    if (baseParts) {
+                        //Find the longest baseName segment match in the config.
+                        //So, do joins on the biggest to smallest lengths of baseParts.
+                        for (j = baseParts.length; j > 0; j -= 1) {
+                            mapValue = getOwn(map, baseParts.slice(0, j).join('/'));
+
+                            //baseName segment has config, find if it has one for
+                            //this name.
+                            if (mapValue) {
+                                mapValue = getOwn(mapValue, nameSegment);
+                                if (mapValue) {
+                                    //Match, update name to the new value.
+                                    foundMap = mapValue;
+                                    foundI = i;
+                                    break outerLoop;
+                                }
+                            }
+                        }
+                    }
+
+                    //Check for a star map match, but just hold on to it,
+                    //if there is a shorter segment match later in a matching
+                    //config, then favor over this star map.
+                    if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {
+                        foundStarMap = getOwn(starMap, nameSegment);
+                        starI = i;
+                    }
+                }
+
+                if (!foundMap && foundStarMap) {
+                    foundMap = foundStarMap;
+                    foundI = starI;
+                }
+
+                if (foundMap) {
+                    nameParts.splice(0, foundI, foundMap);
+                    name = nameParts.join('/');
+                }
+            }
+
+            // If the name points to a package's name, use
+            // the package main instead.
+            pkgMain = getOwn(config.pkgs, name);
+
+            return pkgMain ? pkgMain : name;
+        }
+
+        function removeScript(name) {
+            if (isBrowser) {
+                each(scripts(), function (scriptNode) {
+                    if (scriptNode.getAttribute('data-requiremodule') === name &&
+                            scriptNode.getAttribute('data-requirecontext') === context.contextName) {
+                        scriptNode.parentNode.removeChild(scriptNode);
+                        return true;
+                    }
+                });
+            }
+        }
+
+        function hasPathFallback(id) {
+            var pathConfig = getOwn(config.paths, id);
+            if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
+                //Pop off the first array value, since it failed, and
+                //retry
+                pathConfig.shift();
+                context.require.undef(id);
+
+                //Custom require that does not do map translation, since
+                //ID is "absolute", already mapped/resolved.
+                context.makeRequire(null, {
+                    skipMap: true
+                })([id]);
+
+                return true;
+            }
+        }
+
+        //Turns a plugin!resource to [plugin, resource]
+        //with the plugin being undefined if the name
+        //did not have a plugin prefix.
+        function splitPrefix(name) {
+            var prefix,
+                index = name ? name.indexOf('!') : -1;
+            if (index > -1) {
+                prefix = name.substring(0, index);
+                name = name.substring(index + 1, name.length);
+            }
+            return [prefix, name];
+        }
+
+        /**
+         * Creates a module mapping that includes plugin prefix, module
+         * name, and path. If parentModuleMap is provided it will
+         * also normalize the name via require.normalize()
+         *
+         * @param {String} name the module name
+         * @param {String} [parentModuleMap] parent module map
+         * for the module name, used to resolve relative names.
+         * @param {Boolean} isNormalized: is the ID already normalized.
+         * This is true if this call is done for a define() module ID.
+         * @param {Boolean} applyMap: apply the map config to the ID.
+         * Should only be true if this map is for a dependency.
+         *
+         * @returns {Object}
+         */
+        function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
+            var url, pluginModule, suffix, nameParts,
+                prefix = null,
+                parentName = parentModuleMap ? parentModuleMap.name : null,
+                originalName = name,
+                isDefine = true,
+                normalizedName = '';
+
+            //If no name, then it means it is a require call, generate an
+            //internal name.
+            if (!name) {
+                isDefine = false;
+                name = '_@r' + (requireCounter += 1);
+            }
+
+            nameParts = splitPrefix(name);
+            prefix = nameParts[0];
+            name = nameParts[1];
+
+            if (prefix) {
+                prefix = normalize(prefix, parentName, applyMap);
+                pluginModule = getOwn(defined, prefix);
+            }
+
+            //Account for relative paths if there is a base name.
+            if (name) {
+                if (prefix) {
+                    if (pluginModule && pluginModule.normalize) {
+                        //Plugin is loaded, use its normalize method.
+                        normalizedName = pluginModule.normalize(name, function (name) {
+                            return normalize(name, parentName, applyMap);
+                        });
+                    } else {
+                        // If nested plugin references, then do not try to
+                        // normalize, as it will not normalize correctly. This
+                        // places a restriction on resourceIds, and the longer
+                        // term solution is not to normalize until plugins are
+                        // loaded and all normalizations to allow for async
+                        // loading of a loader plugin. But for now, fixes the
+                        // common uses. Details in #1131
+                        normalizedName = name.indexOf('!') === -1 ?
+                                         normalize(name, parentName, applyMap) :
+                                         name;
+                    }
+                } else {
+                    //A regular module.
+                    normalizedName = normalize(name, parentName, applyMap);
+
+                    //Normalized name may be a plugin ID due to map config
+                    //application in normalize. The map config values must
+                    //already be normalized, so do not need to redo that part.
+                    nameParts = splitPrefix(normalizedName);
+                    prefix = nameParts[0];
+                    normalizedName = nameParts[1];
+                    isNormalized = true;
+
+                    url = context.nameToUrl(normalizedName);
+                }
+            }
+
+            //If the id is a plugin id that cannot be determined if it needs
+            //normalization, stamp it with a unique ID so two matching relative
+            //ids that may conflict can be separate.
+            suffix = prefix && !pluginModule && !isNormalized ?
+                     '_unnormalized' + (unnormalizedCounter += 1) :
+                     '';
+
+            return {
+                prefix: prefix,
+                name: normalizedName,
+                parentMap: parentModuleMap,
+                unnormalized: !!suffix,
+                url: url,
+                originalName: originalName,
+                isDefine: isDefine,
+                id: (prefix ?
+                        prefix + '!' + normalizedName :
+                        normalizedName) + suffix
+            };
+        }
+
+        function getModule(depMap) {
+            var id = depMap.id,
+                mod = getOwn(registry, id);
+
+            if (!mod) {
+                mod = registry[id] = new context.Module(depMap);
+            }
+
+            return mod;
+        }
+
+        function on(depMap, name, fn) {
+            var id = depMap.id,
+                mod = getOwn(registry, id);
+
+            if (hasProp(defined, id) &&
+                    (!mod || mod.defineEmitComplete)) {
+                if (name === 'defined') {
+                    fn(defined[id]);
+                }
+            } else {
+                mod = getModule(depMap);
+                if (mod.error && name === 'error') {
+                    fn(mod.error);
+                } else {
+                    mod.on(name, fn);
+                }
+            }
+        }
+
+        function onError(err, errback) {
+            var ids = err.requireModules,
+                notified = false;
+
+            if (errback) {
+                errback(err);
+            } else {
+                each(ids, function (id) {
+                    var mod = getOwn(registry, id);
+                    if (mod) {
+                        //Set error on module, so it skips timeout checks.
+                        mod.error = err;
+                        if (mod.events.error) {
+                            notified = true;
+                            mod.emit('error', err);
+                        }
+                    }
+                });
+
+                if (!notified) {
+                    req.onError(err);
+                }
+            }
+        }
+
+        /**
+         * Internal method to transfer globalQueue items to this context's
+         * defQueue.
+         */
+        function takeGlobalQueue() {
+            //Push all the globalDefQueue items into the context's defQueue
+            if (globalDefQueue.length) {
+                //Array splice in the values since the context code has a
+                //local var ref to defQueue, so cannot just reassign the one
+                //on context.
+                apsp.apply(defQueue,
+                           [defQueue.length, 0].concat(globalDefQueue));
+                globalDefQueue = [];
+            }
+        }
+
+        handlers = {
+            'require': function (mod) {
+                if (mod.require) {
+                    return mod.require;
+                } else {
+                    return (mod.require = context.makeRequire(mod.map));
+                }
+            },
+            'exports': function (mod) {
+                mod.usingExports = true;
+                if (mod.map.isDefine) {
+                    if (mod.exports) {
+                        return (defined[mod.map.id] = mod.exports);
+                    } else {
+                        return (mod.exports = defined[mod.map.id] = {});
+                    }
+                }
+            },
+            'module': function (mod) {
+                if (mod.module) {
+                    return mod.module;
+                } else {
+                    return (mod.module = {
+                        id: mod.map.id,
+                        uri: mod.map.url,
+                        config: function () {
+                            return  getOwn(config.config, mod.map.id) || {};
+                        },
+                        exports: mod.exports || (mod.exports = {})
+                    });
+                }
+            }
+        };
+
+        function cleanRegistry(id) {
+            //Clean up machinery used for waiting modules.
+            delete registry[id];
+            delete enabledRegistry[id];
+        }
+
+        function breakCycle(mod, traced, processed) {
+            var id = mod.map.id;
+
+            if (mod.error) {
+                mod.emit('error', mod.error);
+            } else {
+                traced[id] = true;
+                each(mod.depMaps, function (depMap, i) {
+                    var depId = depMap.id,
+                        dep = getOwn(registry, depId);
+
+                    //Only force things that have not completed
+                    //being defined, so still in the registry,
+                    //and only if it has not been matched up
+                    //in the module already.
+                    if (dep && !mod.depMatched[i] && !processed[depId]) {
+                        if (getOwn(traced, depId)) {
+                            mod.defineDep(i, defined[depId]);
+                            mod.check(); //pass false?
+                        } else {
+                            breakCycle(dep, traced, processed);
+                        }
+                    }
+                });
+                processed[id] = true;
+            }
+        }
+
+        function checkLoaded() {
+            var err, usingPathFallback,
+                waitInterval = config.waitSeconds * 1000,
+                //It is possible to disable the wait interval by using waitSeconds of 0.
+                expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
+                noLoads = [],
+                reqCalls = [],
+                stillLoading = false,
+                needCycleCheck = true;
+
+            //Do not bother if this call was a result of a cycle break.
+            if (inCheckLoaded) {
+                return;
+            }
+
+            inCheckLoaded = true;
+
+            //Figure out the state of all the modules.
+            eachProp(enabledRegistry, function (mod) {
+                var map = mod.map,
+                    modId = map.id;
+
+                //Skip things that are not enabled or in error state.
+                if (!mod.enabled) {
+                    return;
+                }
+
+                if (!map.isDefine) {
+                    reqCalls.push(mod);
+                }
+
+                if (!mod.error) {
+                    //If the module should be executed, and it has not
+                    //been inited and time is up, remember it.
+                    if (!mod.inited && expired) {
+                        if (hasPathFallback(modId)) {
+                            usingPathFallback = true;
+                            stillLoading = true;
+                        } else {
+                            noLoads.push(modId);
+                            removeScript(modId);
+                        }
+                    } else if (!mod.inited && mod.fetched && map.isDefine) {
+                        stillLoading = true;
+                        if (!map.prefix) {
+                            //No reason to keep looking for unfinished
+                            //loading. If the only stillLoading is a
+                            //plugin resource though, keep going,
+                            //because it may be that a plugin resource
+                            //is waiting on a non-plugin cycle.
+                            return (needCycleCheck = false);
+                        }
+                    }
+                }
+            });
+
+            if (expired && noLoads.length) {
+                //If wait time expired, throw error of unloaded modules.
+                err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);
+                err.contextName = context.contextName;
+                return onError(err);
+            }
+
+            //Not expired, check for a cycle.
+            if (needCycleCheck) {
+                each(reqCalls, function (mod) {
+                    breakCycle(mod, {}, {});
+                });
+            }
+
+            //If still waiting on loads, and the waiting load is something
+            //other than a plugin resource, or there are still outstanding
+            //scripts, then just try back later.
+            if ((!expired || usingPathFallback) && stillLoading) {
+                //Something is still waiting to load. Wait for it, but only
+                //if a timeout is not already in effect.
+                if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {
+                    checkLoadedTimeoutId = setTimeout(function () {
+                        checkLoadedTimeoutId = 0;
+                        checkLoaded();
+                    }, 50);
+                }
+            }
+
+            inCheckLoaded = false;
+        }
+
+        Module = function (map) {
+            this.events = getOwn(undefEvents, map.id) || {};
+            this.map = map;
+            this.shim = getOwn(config.shim, map.id);
+            this.depExports = [];
+            this.depMaps = [];
+            this.depMatched = [];
+            this.pluginMaps = {};
+            this.depCount = 0;
+
+            /* this.exports this.factory
+               this.depMaps = [],
+               this.enabled, this.fetched
+            */
+        };
+
+        Module.prototype = {
+            init: function (depMaps, factory, errback, options) {
+                options = options || {};
+
+                //Do not do more inits if already done. Can happen if there
+                //are multiple define calls for the same module. That is not
+                //a normal, common case, but it is also not unexpected.
+                if (this.inited) {
+                    return;
+                }
+
+                this.factory = factory;
+
+                if (errback) {
+                    //Register for errors on this module.
+                    this.on('error', errback);
+                } else if (this.events.error) {
+                    //If no errback already, but there are error listeners
+                    //on this module, set up an errback to pass to the deps.
+                    errback = bind(this, function (err) {
+                        this.emit('error', err);
+                    });
+                }
+
+                //Do a copy of the dependency array, so that
+                //source inputs are not modified. For example
+                //"shim" deps are passed in here directly, and
+                //doing a direct modification of the depMaps array
+                //would affect that config.
+                this.depMaps = depMaps && depMaps.slice(0);
+
+                this.errback = errback;
+
+                //Indicate this module has be initialized
+                this.inited = true;
+
+                this.ignore = options.ignore;
+
+                //Could have option to init this module in enabled mode,
+                //or could have been previously marked as enabled. However,
+                //the dependencies are not known until init is called. So
+                //if enabled previously, now trigger dependencies as enabled.
+                if (options.enabled || this.enabled) {
+                    //Enable this module and dependencies.
+                    //Will call this.check()
+                    this.enable();
+                } else {
+                    this.check();
+                }
+            },
+
+            defineDep: function (i, depExports) {
+                //Because of cycles, defined callback for a given
+                //export can be called more than once.
+                if (!this.depMatched[i]) {
+                    this.depMatched[i] = true;
+                    this.depCount -= 1;
+                    this.depExports[i] = depExports;
+                }
+            },
+
+            fetch: function () {
+                if (this.fetched) {
+                    return;
+                }
+                this.fetched = true;
+
+                context.startTime = (new Date()).getTime();
+
+                var map = this.map;
+
+                //If the manager is for a plugin managed resource,
+                //ask the plugin to load it now.
+                if (this.shim) {
+                    context.makeRequire(this.map, {
+                        enableBuildCallback: true
+                    })(this.shim.deps || [], bind(this, function () {
+                        return map.prefix ? this.callPlugin() : this.load();
+                    }));
+                } else {
+                    //Regular dependency.
+                    return map.prefix ? this.callPlugin() : this.load();
+                }
+            },
+
+            load: function () {
+                var url = this.map.url;
+
+                //Regular dependency.
+                if (!urlFetched[url]) {
+                    urlFetched[url] = true;
+                    context.load(this.map.id, url);
+                }
+            },
+
+            /**
+             * Checks if the module is ready to define itself, and if so,
+             * define it.
+             */
+            check: function () {
+                if (!this.enabled || this.enabling) {
+                    return;
+                }
+
+                var err, cjsModule,
+                    id = this.map.id,
+                    depExports = this.depExports,
+                    exports = this.exports,
+                    factory = this.factory;
+
+                if (!this.inited) {
+                    this.fetch();
+                } else if (this.error) {
+                    this.emit('error', this.error);
+                } else if (!this.defining) {
+                    //The factory could trigger another require call
+                    //that would result in checking this module to
+                    //define itself again. If already in the process
+                    //of doing that, skip this work.
+                    this.defining = true;
+
+                    if (this.depCount < 1 && !this.defined) {
+                        if (isFunction(factory)) {
+                            //If there is an error listener, favor passing
+                            //to that instead of throwing an error. However,
+                            //only do it for define()'d  modules. require
+                            //errbacks should not be called for failures in
+                            //their callbacks (#699). However if a global
+                            //onError is set, use that.
+                            if ((this.events.error && this.map.isDefine) ||
+                                req.onError !== defaultOnError) {
+                                try {
+                                    exports = context.execCb(id, factory, depExports, exports);
+                                } catch (e) {
+                                    err = e;
+                                }
+                            } else {
+                                exports = context.execCb(id, factory, depExports, exports);
+                            }
+
+                            // Favor return value over exports. If node/cjs in play,
+                            // then will not have a return value anyway. Favor
+                            // module.exports assignment over exports object.
+                            if (this.map.isDefine && exports === undefined) {
+                                cjsModule = this.module;
+                                if (cjsModule) {
+                                    exports = cjsModule.exports;
+                                } else if (this.usingExports) {
+                                    //exports already set the defined value.
+                                    exports = this.exports;
+                                }
+                            }
+
+                            if (err) {
+                                err.requireMap = this.map;
+                                err.requireModules = this.map.isDefine ? [this.map.id] : null;
+                                err.requireType = this.map.isDefine ? 'define' : 'require';
+                                return onError((this.error = err));
+                            }
+
+                        } else {
+                            //Just a literal value
+                            exports = factory;
+                        }
+
+                        this.exports = exports;
+
+                        if (this.map.isDefine && !this.ignore) {
+                            defined[id] = exports;
+
+                            if (req.onResourceLoad) {
+                                req.onResourceLoad(context, this.map, this.depMaps);
+                            }
+                        }
+
+                        //Clean up
+                        cleanRegistry(id);
+
+                        this.defined = true;
+                    }
+
+                    //Finished the define stage. Allow calling check again
+                    //to allow define notifications below in the case of a
+                    //cycle.
+                    this.defining = false;
+
+                    if (this.defined && !this.defineEmitted) {
+                        this.defineEmitted = true;
+                        this.emit('defined', this.exports);
+                        this.defineEmitComplete = true;
+                    }
+
+                }
+            },
+
+            callPlugin: function () {
+                var map = this.map,
+                    id = map.id,
+                    //Map already normalized the prefix.
+                    pluginMap = makeModuleMap(map.prefix);
+
+                //Mark this as a dependency for this plugin, so it
+                //can be traced for cycles.
+                this.depMaps.push(pluginMap);
+
+                on(pluginMap, 'defined', bind(this, function (plugin) {
+                    var load, normalizedMap, normalizedMod,
+                        bundleId = getOwn(bundlesMap, this.map.id),
+                        name = this.map.name,
+                        parentName = this.map.parentMap ? this.map.parentMap.name : null,
+                        localRequire = context.makeRequire(map.parentMap, {
+                            enableBuildCallback: true
+                        });
+
+                    //If current map is not normalized, wait for that
+                    //normalized name to load instead of continuing.
+                    if (this.map.unnormalized) {
+                        //Normalize the ID if the plugin allows it.
+                        if (plugin.normalize) {
+                            name = plugin.normalize(name, function (name) {
+                                return normalize(name, parentName, true);
+                            }) || '';
+                        }
+
+                        //prefix and name should already be normalized, no need
+                        //for applying map config again either.
+                        normalizedMap = makeModuleMap(map.prefix + '!' + name,
+                                                      this.map.parentMap);
+                        on(normalizedMap,
+                            'defined', bind(this, function (value) {
+                                this.init([], function () { return value; }, null, {
+                                    enabled: true,
+                                    ignore: true
+                                });
+                            }));
+
+                        normalizedMod = getOwn(registry, normalizedMap.id);
+                        if (normalizedMod) {
+                            //Mark this as a dependency for this plugin, so it
+                            //can be traced for cycles.
+                            this.depMaps.push(normalizedMap);
+
+                            if (this.events.error) {
+                                normalizedMod.on('error', bind(this, function (err) {
+                                    this.emit('error', err);
+                                }));
+                            }
+                            normalizedMod.enable();
+                        }
+
+                        return;
+                    }
+
+                    //If a paths config, then just load that file instead to
+                    //resolve the plugin, as it is built into that paths layer.
+                    if (bundleId) {
+                        this.map.url = context.nameToUrl(bundleId);
+                        this.load();
+                        return;
+                    }
+
+                    load = bind(this, function (value) {
+                        this.init([], function () { return value; }, null, {
+                            enabled: true
+                        });
+                    });
+
+                    load.error = bind(this, function (err) {
+                        this.inited = true;
+                        this.error = err;
+                        err.requireModules = [id];
+
+                        //Remove temp unnormalized modules for this module,
+                        //since they will never be resolved otherwise now.
+                        eachProp(registry, function (mod) {
+                            if (mod.map.id.indexOf(id + '_unnormalized') === 0) {
+                                cleanRegistry(mod.map.id);
+                            }
+                        });
+
+                        onError(err);
+                    });
+
+                    //Allow plugins to load other code without having to know the
+                    //context or how to 'complete' the load.
+                    load.fromText = bind(this, function (text, textAlt) {
+                        /*jslint evil: true */
+                        var moduleName = map.name,
+                            moduleMap = makeModuleMap(moduleName),
+                            hasInteractive = useInteractive;
+
+                        //As of 2.1.0, support just passing the text, to reinforce
+                        //fromText only being called once per resource. Still
+                        //support old style of passing moduleName but discard
+                        //that moduleName in favor of the internal ref.
+                        if (textAlt) {
+                            text = textAlt;
+                        }
+
+                        //Turn off interactive script matching for IE for any define
+                        //calls in the text, then turn it back on at the end.
+                        if (hasInteractive) {
+                            useInteractive = false;
+                        }
+
+                        //Prime the system by creating a module instance for
+                        //it.
+                        getModule(moduleMap);
+
+                        //Transfer any config to this other module.
+                        if (hasProp(config.config, id)) {
+                            config.config[moduleName] = config.config[id];
+                        }
+
+                        try {
+                            req.exec(text);
+                        } catch (e) {
+                            return onError(makeError('fromtexteval',
+                                             'fromText eval for ' + id +
+                                            ' failed: ' + e,
+                                             e,
+                                             [id]));
+                        }
+
+                        if (hasInteractive) {
+                            useInteractive = true;
+                        }
+
+                        //Mark this as a dependency for the plugin
+                        //resource
+                        this.depMaps.push(moduleMap);
+
+                        //Support anonymous modules.
+                        context.completeLoad(moduleName);
+
+                        //Bind the value of that module to the value for this
+                        //resource ID.
+                        localRequire([moduleName], load);
+                    });
+
+                    //Use parentName here since the plugin's name is not reliable,
+                    //could be some weird string with no path that actually wants to
+                    //reference the parentName's path.
+                    plugin.load(map.name, localRequire, load, config);
+                }));
+
+                context.enable(pluginMap, this);
+                this.pluginMaps[pluginMap.id] = pluginMap;
+            },
+
+            enable: function () {
+                enabledRegistry[this.map.id] = this;
+                this.enabled = true;
+
+                //Set flag mentioning that the module is enabling,
+                //so that immediate calls to the defined callbacks
+                //for dependencies do not trigger inadvertent load
+                //with the depCount still being zero.
+                this.enabling = true;
+
+                //Enable each dependency
+                each(this.depMaps, bind(this, function (depMap, i) {
+                    var id, mod, handler;
+
+                    if (typeof depMap === 'string') {
+                        //Dependency needs to be converted to a depMap
+                        //and wired up to this module.
+                        depMap = makeModuleMap(depMap,
+                                               (this.map.isDefine ? this.map : this.map.parentMap),
+                                               false,
+                                               !this.skipMap);
+                        this.depMaps[i] = depMap;
+
+                        handler = getOwn(handlers, depMap.id);
+
+                        if (handler) {
+                            this.depExports[i] = handler(this);
+                            return;
+                        }
+
+                        this.depCount += 1;
+
+                        on(depMap, 'defined', bind(this, function (depExports) {
+                            this.defineDep(i, depExports);
+                            this.check();
+                        }));
+
+                        if (this.errback) {
+                            on(depMap, 'error', bind(this, this.errback));
+                        }
+                    }
+
+                    id = depMap.id;
+                    mod = registry[id];
+
+                    //Skip special modules like 'require', 'exports', 'module'
+                    //Also, don't call enable if it is already enabled,
+                    //important in circular dependency cases.
+                    if (!hasProp(handlers, id) && mod && !mod.enabled) {
+                        context.enable(depMap, this);
+                    }
+                }));
+
+                //Enable each plugin that is used in
+                //a dependency
+                eachProp(this.pluginMaps, bind(this, function (pluginMap) {
+                    var mod = getOwn(registry, pluginMap.id);
+                    if (mod && !mod.enabled) {
+                        context.enable(pluginMap, this);
+                    }
+                }));
+
+                this.enabling = false;
+
+                this.check();
+            },
+
+            on: function (name, cb) {
+                var cbs = this.events[name];
+                if (!cbs) {
+                    cbs = this.events[name] = [];
+                }
+                cbs.push(cb);
+            },
+
+            emit: function (name, evt) {
+                each(this.events[name], function (cb) {
+                    cb(evt);
+                });
+                if (name === 'error') {
+                    //Now that the error handler was triggered, remove
+                    //the listeners, since this broken Module instance
+                    //can stay around for a while in the registry.
+                    delete this.events[name];
+                }
+            }
+        };
+
+        function callGetModule(args) {
+            //Skip modules already defined.
+            if (!hasProp(defined, args[0])) {
+                getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
+            }
+        }
+
+        function removeListener(node, func, name, ieName) {
+            //Favor detachEvent because of IE9
+            //issue, see attachEvent/addEventListener comment elsewhere
+            //in this file.
+            if (node.detachEvent && !isOpera) {
+                //Probably IE. If not it will throw an error, which will be
+                //useful to know.
+                if (ieName) {
+                    node.detachEvent(ieName, func);
+                }
+            } else {
+                node.removeEventListener(name, func, false);
+            }
+        }
+
+        /**
+         * Given an event from a script node, get the requirejs info from it,
+         * and then removes the event listeners on the node.
+         * @param {Event} evt
+         * @returns {Object}
+         */
+        function getScriptData(evt) {
+            //Using currentTarget instead of target for Firefox 2.0's sake. Not
+            //all old browsers will be supported, but this one was easy enough
+            //to support and still makes sense.
+            var node = evt.currentTarget || evt.srcElement;
+
+            //Remove the listeners once here.
+            removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');
+            removeListener(node, context.onScriptError, 'error');
+
+            return {
+                node: node,
+                id: node && node.getAttribute('data-requiremodule')
+            };
+        }
+
+        function intakeDefines() {
+            var args;
+
+            //Any defined modules in the global queue, intake them now.
+            takeGlobalQueue();
+
+            //Make sure any remaining defQueue items get properly processed.
+            while (defQueue.length) {
+                args = defQueue.shift();
+                if (args[0] === null) {
+                    return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));
+                } else {
+                    //args are id, deps, factory. Should be normalized by the
+                    //define() function.
+                    callGetModule(args);
+                }
+            }
+        }
+
+        context = {
+            config: config,
+            contextName: contextName,
+            registry: registry,
+            defined: defined,
+            urlFetched: urlFetched,
+            defQueue: defQueue,
+            Module: Module,
+            makeModuleMap: makeModuleMap,
+            nextTick: req.nextTick,
+            onError: onError,
+
+            /**
+             * Set a configuration for the context.
+             * @param {Object} cfg config object to integrate.
+             */
+            configure: function (cfg) {
+                //Make sure the baseUrl ends in a slash.
+                if (cfg.baseUrl) {
+                    if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
+                        cfg.baseUrl += '/';
+                    }
+                }
+
+                //Save off the paths since they require special processing,
+                //they are additive.
+                var shim = config.shim,
+                    objs = {
+                        paths: true,
+                        bundles: true,
+                        config: true,
+                        map: true
+                    };
+
+                eachProp(cfg, function (value, prop) {
+                    if (objs[prop]) {
+                        if (!config[prop]) {
+                            config[prop] = {};
+                        }
+                        mixin(config[prop], value, true, true);
+                    } else {
+                        config[prop] = value;
+                    }
+                });
+
+                //Reverse map the bundles
+                if (cfg.bundles) {
+                    eachProp(cfg.bundles, function (value, prop) {
+                        each(value, function (v) {
+                            if (v !== prop) {
+                                bundlesMap[v] = prop;
+                            }
+                        });
+                    });
+                }
+
+                //Merge shim
+                if (cfg.shim) {
+                    eachProp(cfg.shim, function (value, id) {
+                        //Normalize the structure
+                        if (isArray(value)) {
+                            value = {
+                                deps: value
+                            };
+                        }
+                        if ((value.exports || value.init) && !value.exportsFn) {
+                            value.exportsFn = context.makeShimExports(value);
+                        }
+                        shim[id] = value;
+                    });
+                    config.shim = shim;
+                }
+
+                //Adjust packages if necessary.
+                if (cfg.packages) {
+                    each(cfg.packages, function (pkgObj) {
+                        var location, name;
+
+                        pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;
+
+                        name = pkgObj.name;
+                        location = pkgObj.location;
+                        if (location) {
+                            config.paths[name] = pkgObj.location;
+                        }
+
+                        //Save pointer to main module ID for pkg name.
+                        //Remove leading dot in main, so main paths are normalized,
+                        //and remove any trailing .js, since different package
+                        //envs have different conventions: some use a module name,
+                        //some use a file name.
+                        config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')
+                                     .replace(currDirRegExp, '')
+                                     .replace(jsSuffixRegExp, '');
+                    });
+                }
+
+                //If there are any "waiting to execute" modules in the registry,
+                //update the maps for them, since their info, like URLs to load,
+                //may have changed.
+                eachProp(registry, function (mod, id) {
+                    //If module already has init called, since it is too
+                    //late to modify them, and ignore unnormalized ones
+                    //since they are transient.
+                    if (!mod.inited && !mod.map.unnormalized) {
+                        mod.map = makeModuleMap(id);
+                    }
+                });
+
+                //If a deps array or a config callback is specified, then call
+                //require with those args. This is useful when require is defined as a
+                //config object before require.js is loaded.
+                if (cfg.deps || cfg.callback) {
+                    context.require(cfg.deps || [], cfg.callback);
+                }
+            },
+
+            makeShimExports: function (value) {
+                function fn() {
+                    var ret;
+                    if (value.init) {
+                        ret = value.init.apply(global, arguments);
+                    }
+                    return ret || (value.exports && getGlobal(value.exports));
+                }
+                return fn;
+            },
+
+            makeRequire: function (relMap, options) {
+                options = options || {};
+
+                function localRequire(deps, callback, errback) {
+                    var id, map, requireMod;
+
+                    if (options.enableBuildCallback && callback && isFunction(callback)) {
+                        callback.__requireJsBuild = true;
+                    }
+
+                    if (typeof deps === 'string') {
+                        if (isFunction(callback)) {
+                            //Invalid call
+                            return onError(makeError('requireargs', 'Invalid require call'), errback);
+                        }
+
+                        //If require|exports|module are requested, get the
+                        //value for them from the special handlers. Caveat:
+                        //this only works while module is being defined.
+                        if (relMap && hasProp(handlers, deps)) {
+                            return handlers[deps](registry[relMap.id]);
+                        }
+
+                        //Synchronous access to one module. If require.get is
+                        //available (as in the Node adapter), prefer that.
+                        if (req.get) {
+                            return req.get(context, deps, relMap, localRequire);
+                        }
+
+                        //Normalize module name, if it contains . or ..
+                        map = makeModuleMap(deps, relMap, false, true);
+                        id = map.id;
+
+                        if (!hasProp(defined, id)) {
+                            return onError(makeError('notloaded', 'Module name "' +
+                                        id +
+                                        '" has not been loaded yet for context: ' +
+                                        contextName +
+                                        (relMap ? '' : '. Use require([])')));
+                        }
+                        return defined[id];
+                    }
+
+                    //Grab defines waiting in the global queue.
+                    intakeDefines();
+
+                    //Mark all the dependencies as needing to be loaded.
+                    context.nextTick(function () {
+                        //Some defines could have been added since the
+                        //require call, collect them.
+                        intakeDefines();
+
+                        requireMod = getModule(makeModuleMap(null, relMap));
+
+                        //Store if map config should be applied to this require
+                        //call for dependencies.
+                        requireMod.skipMap = options.skipMap;
+
+                        requireMod.init(deps, callback, errback, {
+                            enabled: true
+                        });
+
+                        checkLoaded();
+                    });
+
+                    return localRequire;
+                }
+
+                mixin(localRequire, {
+                    isBrowser: isBrowser,
+
+                    /**
+                     * Converts a module name + .extension into an URL path.
+                     * *Requires* the use of a module name. It does not support using
+                     * plain URLs like nameToUrl.
+                     */
+                    toUrl: function (moduleNamePlusExt) {
+                        var ext,
+                            index = moduleNamePlusExt.lastIndexOf('.'),
+                            segment = moduleNamePlusExt.split('/')[0],
+                            isRelative = segment === '.' || segment === '..';
+
+                        //Have a file extension alias, and it is not the
+                        //dots from a relative path.
+                        if (index !== -1 && (!isRelative || index > 1)) {
+                            ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
+                            moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
+                        }
+
+                        return context.nameToUrl(normalize(moduleNamePlusExt,
+                                                relMap && relMap.id, true), ext,  true);
+                    },
+
+                    defined: function (id) {
+                        return hasProp(defined, makeModuleMap(id, relMap, false, true).id);
+                    },
+
+                    specified: function (id) {
+                        id = makeModuleMap(id, relMap, false, true).id;
+                        return hasProp(defined, id) || hasProp(registry, id);
+                    }
+                });
+
+                //Only allow undef on top level require calls
+                if (!relMap) {
+                    localRequire.undef = function (id) {
+                        //Bind any waiting define() calls to this context,
+                        //fix for #408
+                        takeGlobalQueue();
+
+                        var map = makeModuleMap(id, relMap, true),
+                            mod = getOwn(registry, id);
+
+                        removeScript(id);
+
+                        delete defined[id];
+                        delete urlFetched[map.url];
+                        delete undefEvents[id];
+
+                        //Clean queued defines too. Go backwards
+                        //in array so that the splices do not
+                        //mess up the iteration.
+                        eachReverse(defQueue, function(args, i) {
+                            if(args[0] === id) {
+                                defQueue.splice(i, 1);
+                            }
+                        });
+
+                        if (mod) {
+                            //Hold on to listeners in case the
+                            //module will be attempted to be reloaded
+                            //using a different config.
+                            if (mod.events.defined) {
+                                undefEvents[id] = mod.events;
+                            }
+
+                            cleanRegistry(id);
+                        }
+                    };
+                }
+
+                return localRequire;
+            },
+
+            /**
+             * Called to enable a module if it is still in the registry
+             * awaiting enablement. A second arg, parent, the parent module,
+             * is passed in for context, when this method is overridden by
+             * the optimizer. Not shown here to keep code compact.
+             */
+            enable: function (depMap) {
+                var mod = getOwn(registry, depMap.id);
+                if (mod) {
+                    getModule(depMap).enable();
+                }
+            },
+
+            /**
+             * Internal method used by environment adapters to complete a load event.
+             * A load event could be a script load or just a load pass from a synchronous
+             * load call.
+             * @param {String} moduleName the name of the module to potentially complete.
+             */
+            completeLoad: function (moduleName) {
+                var found, args, mod,
+                    shim = getOwn(config.shim, moduleName) || {},
+                    shExports = shim.exports;
+
+                takeGlobalQueue();
+
+                while (defQueue.length) {
+                    args = defQueue.shift();
+                    if (args[0] === null) {
+                        args[0] = moduleName;
+                        //If already found an anonymous module and bound it
+                        //to this name, then this is some other anon module
+                        //waiting for its completeLoad to fire.
+                        if (found) {
+                            break;
+                        }
+                        found = true;
+                    } else if (args[0] === moduleName) {
+                        //Found matching define call for this script!
+                        found = true;
+                    }
+
+                    callGetModule(args);
+                }
+
+                //Do this after the cycle of callGetModule in case the result
+                //of those calls/init calls changes the registry.
+                mod = getOwn(registry, moduleName);
+
+                if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {
+                    if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {
+                        if (hasPathFallback(moduleName)) {
+                            return;
+                        } else {
+                            return onError(makeError('nodefine',
+                                             'No define call for ' + moduleName,
+                                             null,
+                                             [moduleName]));
+                        }
+                    } else {
+                        //A script that does not call define(), so just simulate
+                        //the call for it.
+                        callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);
+                    }
+                }
+
+                checkLoaded();
+            },
+
+            /**
+             * Converts a module name to a file path. Supports cases where
+             * moduleName may actually be just an URL.
+             * Note that it **does not** call normalize on the moduleName,
+             * it is assumed to have already been normalized. This is an
+             * internal API, not a public one. Use toUrl for the public API.
+             */
+            nameToUrl: function (moduleName, ext, skipExt) {
+                var paths, syms, i, parentModule, url,
+                    parentPath, bundleId,
+                    pkgMain = getOwn(config.pkgs, moduleName);
+
+                if (pkgMain) {
+                    moduleName = pkgMain;
+                }
+
+                bundleId = getOwn(bundlesMap, moduleName);
+
+                if (bundleId) {
+                    return context.nameToUrl(bundleId, ext, skipExt);
+                }
+
+                //If a colon is in the URL, it indicates a protocol is used and it is just
+                //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
+                //or ends with .js, then assume the user meant to use an url and not a module id.
+                //The slash is important for protocol-less URLs as well as full paths.
+                if (req.jsExtRegExp.test(moduleName)) {
+                    //Just a plain path, not module name lookup, so just return it.
+                    //Add extension if it is included. This is a bit wonky, only non-.js things pass
+                    //an extension, this method probably needs to be reworked.
+                    url = moduleName + (ext || '');
+                } else {
+                    //A module that needs to be converted to a path.
+                    paths = config.paths;
+
+                    syms = moduleName.split('/');
+                    //For each module name segment, see if there is a path
+                    //registered for it. Start with most specific name
+                    //and work up from it.
+                    for (i = syms.length; i > 0; i -= 1) {
+                        parentModule = syms.slice(0, i).join('/');
+
+                        parentPath = getOwn(paths, parentModule);
+                        if (parentPath) {
+                            //If an array, it means there are a few choices,
+                            //Choose the one that is desired
+                            if (isArray(parentPath)) {
+                                parentPath = parentPath[0];
+                            }
+                            syms.splice(0, i, parentPath);
+                            break;
+                        }
+                    }
+
+                    //Join the path parts together, then figure out if baseUrl is needed.
+                    url = syms.join('/');
+                    url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js'));
+                    url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
+                }
+
+                return config.urlArgs ? url +
+                                        ((url.indexOf('?') === -1 ? '?' : '&') +
+                                         config.urlArgs) : url;
+            },
+
+            //Delegates to req.load. Broken out as a separate function to
+            //allow overriding in the optimizer.
+            load: function (id, url) {
+                req.load(context, id, url);
+            },
+
+            /**
+             * Executes a module callback function. Broken out as a separate function
+             * solely to allow the build system to sequence the files in the built
+             * layer in the right sequence.
+             *
+             * @private
+             */
+            execCb: function (name, callback, args, exports) {
+                return callback.apply(exports, args);
+            },
+
+            /**
+             * callback for script loads, used to check status of loading.
+             *
+             * @param {Event} evt the event from the browser for the script
+             * that was loaded.
+             */
+            onScriptLoad: function (evt) {
+                //Using currentTarget instead of target for Firefox 2.0's sake. Not
+                //all old browsers will be supported, but this one was easy enough
+                //to support and still makes sense.
+                if (evt.type === 'load' ||
+                        (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {
+                    //Reset interactive script so a script node is not held onto for
+                    //to long.
+                    interactiveScript = null;
+
+                    //Pull out the name of the module and the context.
+                    var data = getScriptData(evt);
+                    context.completeLoad(data.id);
+                }
+            },
+
+            /**
+             * Callback for script errors.
+             */
+            onScriptError: function (evt) {
+                var data = getScriptData(evt);
+                if (!hasPathFallback(data.id)) {
+                    return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));
+                }
+            }
+        };
+
+        context.require = context.makeRequire();
+        return context;
+    }
+
+    /**
+     * Main entry point.
+     *
+     * If the only argument to require is a string, then the module that
+     * is represented by that string is fetched for the appropriate context.
+     *
+     * If the first argument is an array, then it will be treated as an array
+     * of dependency string names to fetch. An optional function callback can
+     * be specified to execute when all of those dependencies are available.
+     *
+     * Make a local req variable to help Caja compliance (it assumes things
+     * on a require that are not standardized), and to give a short
+     * name for minification/local scope use.
+     */
+    req = requirejs = function (deps, callback, errback, optional) {
+
+        //Find the right context, use default
+        var context, config,
+            contextName = defContextName;
+
+        // Determine if have config object in the call.
+        if (!isArray(deps) && typeof deps !== 'string') {
+            // deps is a config object
+            config = deps;
+            if (isArray(callback)) {
+                // Adjust args if there are dependencies
+                deps = callback;
+                callback = errback;
+                errback = optional;
+            } else {
+                deps = [];
+            }
+        }
+
+        if (config && config.context) {
+            contextName = config.context;
+        }
+
+        context = getOwn(contexts, contextName);
+        if (!context) {
+            context = contexts[contextName] = req.s.newContext(contextName);
+        }
+
+        if (config) {
+            context.configure(config);
+        }
+
+        return context.require(deps, callback, errback);
+    };
+
+    /**
+     * Support require.config() to make it easier to cooperate with other
+     * AMD loaders on globally agreed names.
+     */
+    req.config = function (config) {
+        return req(config);
+    };
+
+    /**
+     * Execute something after the current tick
+     * of the event loop. Override for other envs
+     * that have a better solution than setTimeout.
+     * @param  {Function} fn function to execute later.
+     */
+    req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {
+        setTimeout(fn, 4);
+    } : function (fn) { fn(); };
+
+    /**
+     * Export require as a global, but only if it does not already exist.
+     */
+    if (!require) {
+        require = req;
+    }
+
+    req.version = version;
+
+    //Used to filter out dependencies that are already paths.
+    req.jsExtRegExp = /^\/|:|\?|\.js$/;
+    req.isBrowser = isBrowser;
+    s = req.s = {
+        contexts: contexts,
+        newContext: newContext
+    };
+
+    //Create default context.
+    req({});
+
+    //Exports some context-sensitive methods on global require.
+    each([
+        'toUrl',
+        'undef',
+        'defined',
+        'specified'
+    ], function (prop) {
+        //Reference from contexts instead of early binding to default context,
+        //so that during builds, the latest instance of the default context
+        //with its config gets used.
+        req[prop] = function () {
+            var ctx = contexts[defContextName];
+            return ctx.require[prop].apply(ctx, arguments);
+        };
+    });
+
+    if (isBrowser) {
+        head = s.head = document.getElementsByTagName('head')[0];
+        //If BASE tag is in play, using appendChild is a problem for IE6.
+        //When that browser dies, this can be removed. Details in this jQuery bug:
+        //http://dev.jquery.com/ticket/2709
+        baseElement = document.getElementsByTagName('base')[0];
+        if (baseElement) {
+            head = s.head = baseElement.parentNode;
+        }
+    }
+
+    /**
+     * Any errors that require explicitly generates will be passed to this
+     * function. Intercept/override it if you want custom error handling.
+     * @param {Error} err the error object.
+     */
+    req.onError = defaultOnError;
+
+    /**
+     * Creates the node for the load command. Only used in browser envs.
+     */
+    req.createNode = function (config, moduleName, url) {
+        var node = config.xhtml ?
+                document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
+                document.createElement('script');
+        node.type = config.scriptType || 'text/javascript';
+        node.charset = 'utf-8';
+        node.async = true;
+        return node;
+    };
+
+    /**
+     * Does the request to load a module for the browser case.
+     * Make this a separate function to allow other environments
+     * to override it.
+     *
+     * @param {Object} context the require context to find state.
+     * @param {String} moduleName the name of the module.
+     * @param {Object} url the URL to the module.
+     */
+    req.load = function (context, moduleName, url) {
+        var config = (context && context.config) || {},
+            node;
+        if (isBrowser) {
+            //In the browser so use a script tag
+            node = req.createNode(config, moduleName, url);
+
+            node.setAttribute('data-requirecontext', context.contextName);
+            node.setAttribute('data-requiremodule', moduleName);
+
+            //Set up load listener. Test attachEvent first because IE9 has
+            //a subtle issue in its addEventListener and script onload firings
+            //that do not match the behavior of all other browsers with
+            //addEventListener support, which fire the onload event for a
+            //script right after the script execution. See:
+            //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution
+            //UNFORTUNATELY Opera implements attachEvent but does not follow the script
+            //script execution mode.
+            if (node.attachEvent &&
+                    //Check if node.attachEvent is artificially added by custom script or
+                    //natively supported by browser
+                    //read https://github.com/jrburke/requirejs/issues/187
+                    //if we can NOT find [native code] then it must NOT natively supported.
+                    //in IE8, node.attachEvent does not have toString()
+                    //Note the test for "[native code" with no closing brace, see:
+                    //https://github.com/jrburke/requirejs/issues/273
+                    !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&
+                    !isOpera) {
+                //Probably IE. IE (at least 6-8) do not fire
+                //script onload right after executing the script, so
+                //we cannot tie the anonymous define call to a name.
+                //However, IE reports the script as being in 'interactive'
+                //readyState at the time of the define call.
+                useInteractive = true;
+
+                node.attachEvent('onreadystatechange', context.onScriptLoad);
+                //It would be great to add an error handler here to catch
+                //404s in IE9+. However, onreadystatechange will fire before
+                //the error handler, so that does not help. If addEventListener
+                //is used, then IE will fire error before load, but we cannot
+                //use that pathway given the connect.microsoft.com issue
+                //mentioned above about not doing the 'script execute,
+                //then fire the script load event listener before execute
+                //next script' that other browsers do.
+                //Best hope: IE10 fixes the issues,
+                //and then destroys all installs of IE 6-9.
+                //node.attachEvent('onerror', context.onScriptError);
+            } else {
+                node.addEventListener('load', context.onScriptLoad, false);
+                node.addEventListener('error', context.onScriptError, false);
+            }
+            node.src = url;
+
+            //For some cache cases in IE 6-8, the script executes before the end
+            //of the appendChild execution, so to tie an anonymous define
+            //call to the module name (which is stored on the node), hold on
+            //to a reference to this node, but clear after the DOM insertion.
+            currentlyAddingScript = node;
+            if (baseElement) {
+                head.insertBefore(node, baseElement);
+            } else {
+                head.appendChild(node);
+            }
+            currentlyAddingScript = null;
+
+            return node;
+        } else if (isWebWorker) {
+            try {
+                //In a web worker, use importScripts. This is not a very
+                //efficient use of importScripts, importScripts will block until
+                //its script is downloaded and evaluated. However, if web workers
+                //are in play, the expectation that a build has been done so that
+                //only one script needs to be loaded anyway. This may need to be
+                //reevaluated if other use cases become common.
+                importScripts(url);
+
+                //Account for anonymous modules
+                context.completeLoad(moduleName);
+            } catch (e) {
+                context.onError(makeError('importscripts',
+                                'importScripts failed for ' +
+                                    moduleName + ' at ' + url,
+                                e,
+                                [moduleName]));
+            }
+        }
+    };
+
+    function getInteractiveScript() {
+        if (interactiveScript && interactiveScript.readyState === 'interactive') {
+            return interactiveScript;
+        }
+
+        eachReverse(scripts(), function (script) {
+            if (script.readyState === 'interactive') {
+                return (interactiveScript = script);
+            }
+        });
+        return interactiveScript;
+    }
+
+    //Look for a data-main script attribute, which could also adjust the baseUrl.
+    if (isBrowser && !cfg.skipDataMain) {
+        //Figure out baseUrl. Get it from the script tag with require.js in it.
+        eachReverse(scripts(), function (script) {
+            //Set the 'head' where we can append children by
+            //using the script's parent.
+            if (!head) {
+                head = script.parentNode;
+            }
+
+            //Look for a data-main attribute to set main script for the page
+            //to load. If it is there, the path to data main becomes the
+            //baseUrl, if it is not already set.
+            dataMain = script.getAttribute('data-main');
+            if (dataMain) {
+                //Preserve dataMain in case it is a path (i.e. contains '?')
+                mainScript = dataMain;
+
+                //Set final baseUrl if there is not already an explicit one.
+                if (!cfg.baseUrl) {
+                    //Pull off the directory of data-main for use as the
+                    //baseUrl.
+                    src = mainScript.split('/');
+                    mainScript = src.pop();
+                    subPath = src.length ? src.join('/')  + '/' : './';
+
+                    cfg.baseUrl = subPath;
+                }
+
+                //Strip off any trailing .js since mainScript is now
+                //like a module name.
+                mainScript = mainScript.replace(jsSuffixRegExp, '');
+
+                 //If mainScript is still a path, fall back to dataMain
+                if (req.jsExtRegExp.test(mainScript)) {
+                    mainScript = dataMain;
+                }
+
+                //Put the data-main script in the files to load.
+                cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];
+
+                return true;
+            }
+        });
+    }
+
+    /**
+     * The function that handles definitions of modules. Differs from
+     * require() in that a string for the module should be the first argument,
+     * and the function to execute after dependencies are loaded should
+     * return a value to define the module corresponding to the first argument's
+     * name.
+     */
+    define = function (name, deps, callback) {
+        var node, context;
+
+        //Allow for anonymous modules
+        if (typeof name !== 'string') {
+            //Adjust args appropriately
+            callback = deps;
+            deps = name;
+            name = null;
+        }
+
+        //This module may not have dependencies
+        if (!isArray(deps)) {
+            callback = deps;
+            deps = null;
+        }
+
+        //If no name, and callback is a function, then figure out if it a
+        //CommonJS thing with dependencies.
+        if (!deps && isFunction(callback)) {
+            deps = [];
+            //Remove comments from the callback string,
+            //look for require calls, and pull them into the dependencies,
+            //but only if there are function args.
+            if (callback.length) {
+                callback
+                    .toString()
+                    .replace(commentRegExp, '')
+                    .replace(cjsRequireRegExp, function (match, dep) {
+                        deps.push(dep);
+                    });
+
+                //May be a CommonJS thing even without require calls, but still
+                //could use exports, and module. Avoid doing exports and module
+                //work though if it just needs require.
+                //REQUIRES the function to expect the CommonJS variables in the
+                //order listed below.
+                deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);
+            }
+        }
+
+        //If in IE 6-8 and hit an anonymous define() call, do the interactive
+        //work.
+        if (useInteractive) {
+            node = currentlyAddingScript || getInteractiveScript();
+            if (node) {
+                if (!name) {
+                    name = node.getAttribute('data-requiremodule');
+                }
+                context = contexts[node.getAttribute('data-requirecontext')];
+            }
+        }
+
+        //Always save off evaluating the def call until the script onload handler.
+        //This allows multiple modules to be in a file without prematurely
+        //tracing dependencies, and allows for anonymous module support,
+        //where the module name is not known until the script onload event
+        //occurs. If no context, use the global queue, and get it processed
+        //in the onscript load callback.
+        (context ? context.defQueue : globalDefQueue).push([name, deps, callback]);
+    };
+
+    define.amd = {
+        jQuery: true
+    };
+
+
+    /**
+     * Executes the text. Normally just uses eval, but can be modified
+     * to use a better, environment-specific call. Only used for transpiling
+     * loader plugins, not for plain JS modules.
+     * @param {String} text the text to execute/evaluate.
+     */
+    req.exec = function (text) {
+        /*jslint evil: true */
+        return eval(text);
+    };
+
+    //Set up with config info.
+    req(cfg);
+}(this));


[25/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.dataTables.min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.dataTables.min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.dataTables.min.js
new file mode 100644
index 0000000..8885017
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.dataTables.min.js
@@ -0,0 +1,157 @@
+/*! DataTables 1.10.4
+ * ©2008-2014 SpryMedia Ltd - datatables.net/license
+ */
+(function(Da,P,l){var O=function(g){function V(a){var b,c,e={};g.each(a,function(d){if((b=d.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=d.replace(b[0],b[2].toLowerCase()),e[c]=d,"o"===b[1]&&V(a[d])});a._hungarianMap=e}function G(a,b,c){a._hungarianMap||V(a);var e;g.each(b,function(d){e=a._hungarianMap[d];if(e!==l&&(c||b[e]===l))"o"===e.charAt(0)?(b[e]||(b[e]={}),g.extend(!0,b[e],b[d]),G(a[e],b[e],c)):b[e]=b[d]})}function O(a){var b=p.defaults.oLanguage,c=a.sZeroRecords;
+!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&D(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&D(a,a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&cb(a)}function db(a){z(a,"ordering","bSort");z(a,"orderMulti","bSortMulti");z(a,"orderClasses","bSortClasses");z(a,"orderCellsTop","bSortCellsTop");z(a,"order","aaSorting");z(a,"orderFixed","aaSortingFixed");z(a,"paging","bPaginate");
+z(a,"pagingType","sPaginationType");z(a,"pageLength","iDisplayLength");z(a,"searching","bFilter");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&G(p.models.oSearch,a[b])}function eb(a){z(a,"orderable","bSortable");z(a,"orderData","aDataSort");z(a,"orderSequence","asSorting");z(a,"orderDataType","sortDataType")}function fb(a){var a=a.oBrowser,b=g("<div/>").css({position:"absolute",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(g("<div/>").css({position:"absolute",top:1,left:1,width:100,
+overflow:"scroll"}).append(g('<div class="test"/>').css({width:"100%",height:10}))).appendTo("body"),c=b.find(".test");a.bScrollOversize=100===c[0].offsetWidth;a.bScrollbarLeft=1!==c.offset().left;b.remove()}function gb(a,b,c,e,d,f){var h,i=!1;c!==l&&(h=c,i=!0);for(;e!==d;)a.hasOwnProperty(e)&&(h=i?b(h,a[e],e,a):a[e],i=!0,e+=f);return h}function Ea(a,b){var c=p.defaults.column,e=a.aoColumns.length,c=g.extend({},p.models.oColumn,c,{nTh:b?b:P.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:
+"",aDataSort:c.aDataSort?c.aDataSort:[e],mData:c.mData?c.mData:e,idx:e});a.aoColumns.push(c);c=a.aoPreSearchCols;c[e]=g.extend({},p.models.oSearch,c[e]);ja(a,e,null)}function ja(a,b,c){var b=a.aoColumns[b],e=a.oClasses,d=g(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=d.attr("width")||null;var f=(d.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==l&&null!==c&&(eb(c),G(p.defaults.column,c),c.mDataProp!==l&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&
+!c.sClass&&(c.sClass=c.className),g.extend(b,c),D(b,c,"sWidth","sWidthOrig"),"number"===typeof c.iDataSort&&(b.aDataSort=[c.iDataSort]),D(b,c,"aDataSort"));var h=b.mData,i=W(h),j=b.mRender?W(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=g.isPlainObject(h)&&(c(h.sort)||c(h.type)||c(h.filter));b.fnGetData=function(a,b,c){var e=i(a,b,l,c);return j&&b?j(e,b,a,c):e};b.fnSetData=function(a,b,c){return Q(h)(a,b,c)};"number"!==typeof h&&(a._rowReadObject=!0);a.oFeatures.bSort||
+(b.bSortable=!1,d.addClass(e.sSortableNone));a=-1!==g.inArray("asc",b.asSorting);c=-1!==g.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=e.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=e.sSortableAsc,b.sSortingClassJUI=e.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=e.sSortableDesc,b.sSortingClassJUI=e.sSortJUIDescAllowed):(b.sSortingClass=e.sSortable,b.sSortingClassJUI=e.sSortJUI)}function X(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Fa(a);for(var c=0,e=b.length;c<
+e;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&Y(a);u(a,null,"column-sizing",[a])}function ka(a,b){var c=Z(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function $(a,b){var c=Z(a,"bVisible"),c=g.inArray(b,c);return-1!==c?c:null}function aa(a){return Z(a,"bVisible").length}function Z(a,b){var c=[];g.map(a.aoColumns,function(a,d){a[b]&&c.push(d)});return c}function Ga(a){var b=a.aoColumns,c=a.aoData,e=p.ext.type.detect,d,f,h,i,j,g,m,o,k;d=0;for(f=b.length;d<f;d++)if(m=
+b[d],k=[],!m.sType&&m._sManualType)m.sType=m._sManualType;else if(!m.sType){h=0;for(i=e.length;h<i;h++){j=0;for(g=c.length;j<g;j++){k[j]===l&&(k[j]=v(a,j,d,"type"));o=e[h](k[j],a);if(!o&&h!==e.length-1)break;if("html"===o)break}if(o){m.sType=o;break}}m.sType||(m.sType="string")}}function hb(a,b,c,e){var d,f,h,i,j,n,m=a.aoColumns;if(b)for(d=b.length-1;0<=d;d--){n=b[d];var o=n.targets!==l?n.targets:n.aTargets;g.isArray(o)||(o=[o]);f=0;for(h=o.length;f<h;f++)if("number"===typeof o[f]&&0<=o[f]){for(;m.length<=
+o[f];)Ea(a);e(o[f],n)}else if("number"===typeof o[f]&&0>o[f])e(m.length+o[f],n);else if("string"===typeof o[f]){i=0;for(j=m.length;i<j;i++)("_all"==o[f]||g(m[i].nTh).hasClass(o[f]))&&e(i,n)}}if(c){d=0;for(a=c.length;d<a;d++)e(d,c[d])}}function I(a,b,c,e){var d=a.aoData.length,f=g.extend(!0,{},p.models.oRow,{src:c?"dom":"data"});f._aData=b;a.aoData.push(f);for(var b=a.aoColumns,f=0,h=b.length;f<h;f++)c&&Ha(a,d,f,v(a,d,f)),b[f].sType=null;a.aiDisplayMaster.push(d);(c||!a.oFeatures.bDeferRender)&&Ia(a,
+d,c,e);return d}function la(a,b){var c;b instanceof g||(b=g(b));return b.map(function(b,d){c=ma(a,d);return I(a,c.data,d,c.cells)})}function v(a,b,c,e){var d=a.iDraw,f=a.aoColumns[c],h=a.aoData[b]._aData,i=f.sDefaultContent,c=f.fnGetData(h,e,{settings:a,row:b,col:c});if(c===l)return a.iDrawError!=d&&null===i&&(R(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b,4),a.iDrawError=d),i;if((c===h||null===c)&&null!==i)c=i;else if("function"===typeof c)return c.call(h);
+return null===c&&"display"==e?"":c}function Ha(a,b,c,e){a.aoColumns[c].fnSetData(a.aoData[b]._aData,e,{settings:a,row:b,col:c})}function Ja(a){return g.map(a.match(/(\\.|[^\.])+/g),function(a){return a.replace(/\\./g,".")})}function W(a){if(g.isPlainObject(a)){var b={};g.each(a,function(a,c){c&&(b[a]=W(c))});return function(a,c,f,h){var i=b[c]||b._;return i!==l?i(a,c,f,h):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,h){return a(b,c,f,h)};if("string"===
+typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,b,f){var h,i;if(""!==f){i=Ja(f);for(var j=0,g=i.length;j<g;j++){f=i[j].match(ba);h=i[j].match(S);if(f){i[j]=i[j].replace(ba,"");""!==i[j]&&(a=a[i[j]]);h=[];i.splice(0,j+1);i=i.join(".");j=0;for(g=a.length;j<g;j++)h.push(c(a[j],b,i));a=f[0].substring(1,f[0].length-1);a=""===a?h:h.join(a);break}else if(h){i[j]=i[j].replace(S,"");a=a[i[j]]();continue}if(null===a||a[i[j]]===l)return l;a=a[i[j]]}}return a};return function(b,
+d){return c(b,d,a)}}return function(b){return b[a]}}function Q(a){if(g.isPlainObject(a))return Q(a._);if(null===a)return function(){};if("function"===typeof a)return function(b,e,d){a(b,"set",e,d)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,e,d){var d=Ja(d),f;f=d[d.length-1];for(var h,i,j=0,g=d.length-1;j<g;j++){h=d[j].match(ba);i=d[j].match(S);if(h){d[j]=d[j].replace(ba,"");a[d[j]]=[];f=d.slice();f.splice(0,j+1);h=f.join(".");i=0;for(g=
+e.length;i<g;i++)f={},b(f,e[i],h),a[d[j]].push(f);return}i&&(d[j]=d[j].replace(S,""),a=a[d[j]](e));if(null===a[d[j]]||a[d[j]]===l)a[d[j]]={};a=a[d[j]]}if(f.match(S))a[f.replace(S,"")](e);else a[f.replace(ba,"")]=e};return function(c,e){return b(c,e,a)}}return function(b,e){b[a]=e}}function Ka(a){return C(a.aoData,"_aData")}function na(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0}function oa(a,b,c){for(var e=-1,d=0,f=a.length;d<f;d++)a[d]==b?e=d:a[d]>b&&a[d]--; -1!=e&&c===l&&
+a.splice(e,1)}function ca(a,b,c,e){var d=a.aoData[b],f,h=function(c,f){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=v(a,b,f,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===d.src)d._aData=ma(a,d,e,e===l?l:d._aData).data;else{var i=d.anCells;if(i)if(e!==l)h(i[e],e);else{c=0;for(f=i.length;c<f;c++)h(i[c],c)}}d._aSortData=null;d._aFilterData=null;h=a.aoColumns;if(e!==l)h[e].sType=null;else{c=0;for(f=h.length;c<f;c++)h[c].sType=null;La(d)}}function ma(a,b,c,e){var d=[],f=b.firstChild,
+h,i=0,j,n=a.aoColumns,m=a._rowReadObject,e=e||m?{}:[],o=function(a,b){if("string"===typeof a){var c=a.indexOf("@");-1!==c&&(c=a.substring(c+1),Q(a)(e,b.getAttribute(c)))}},a=function(a){if(c===l||c===i)h=n[i],j=g.trim(a.innerHTML),h&&h._bAttrSrc?(Q(h.mData._)(e,j),o(h.mData.sort,a),o(h.mData.type,a),o(h.mData.filter,a)):m?(h._setter||(h._setter=Q(h.mData)),h._setter(e,j)):e[i]=j;i++};if(f)for(;f;){b=f.nodeName.toUpperCase();if("TD"==b||"TH"==b)a(f),d.push(f);f=f.nextSibling}else{d=b.anCells;f=0;for(b=
+d.length;f<b;f++)a(d[f])}return{data:e,cells:d}}function Ia(a,b,c,e){var d=a.aoData[b],f=d._aData,h=[],i,j,g,m,o;if(null===d.nTr){i=c||P.createElement("tr");d.nTr=i;d.anCells=h;i._DT_RowIndex=b;La(d);m=0;for(o=a.aoColumns.length;m<o;m++){g=a.aoColumns[m];j=c?e[m]:P.createElement(g.sCellType);h.push(j);if(!c||g.mRender||g.mData!==m)j.innerHTML=v(a,b,m,"display");g.sClass&&(j.className+=" "+g.sClass);g.bVisible&&!c?i.appendChild(j):!g.bVisible&&c&&j.parentNode.removeChild(j);g.fnCreatedCell&&g.fnCreatedCell.call(a.oInstance,
+j,v(a,b,m),f,b,m)}u(a,"aoRowCreatedCallback",null,[i,f,b])}d.nTr.setAttribute("role","row")}function La(a){var b=a.nTr,c=a._aData;if(b){c.DT_RowId&&(b.id=c.DT_RowId);if(c.DT_RowClass){var e=c.DT_RowClass.split(" ");a.__rowc=a.__rowc?Ma(a.__rowc.concat(e)):e;g(b).removeClass(a.__rowc.join(" ")).addClass(c.DT_RowClass)}c.DT_RowData&&g(b).data(c.DT_RowData)}}function ib(a){var b,c,e,d,f,h=a.nTHead,i=a.nTFoot,j=0===g("th, td",h).length,n=a.oClasses,m=a.aoColumns;j&&(d=g("<tr/>").appendTo(h));b=0;for(c=
+m.length;b<c;b++)f=m[b],e=g(f.nTh).addClass(f.sClass),j&&e.appendTo(d),a.oFeatures.bSort&&(e.addClass(f.sSortingClass),!1!==f.bSortable&&(e.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Na(a,f.nTh,b))),f.sTitle!=e.html()&&e.html(f.sTitle),Oa(a,"header")(a,e,f,n);j&&da(a.aoHeader,h);g(h).find(">tr").attr("role","row");g(h).find(">tr>th, >tr>td").addClass(n.sHeaderTH);g(i).find(">tr>th, >tr>td").addClass(n.sFooterTH);if(null!==i){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=m[b],f.nTf=
+a[b].cell,f.sClass&&g(f.nTf).addClass(f.sClass)}}function ea(a,b,c){var e,d,f,h=[],i=[],j=a.aoColumns.length,n;if(b){c===l&&(c=!1);e=0;for(d=b.length;e<d;e++){h[e]=b[e].slice();h[e].nTr=b[e].nTr;for(f=j-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&h[e].splice(f,1);i.push([])}e=0;for(d=h.length;e<d;e++){if(a=h[e].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=h[e].length;f<b;f++)if(n=j=1,i[e][f]===l){a.appendChild(h[e][f].cell);for(i[e][f]=1;h[e+j]!==l&&h[e][f].cell==h[e+j][f].cell;)i[e+j][f]=1,j++;
+for(;h[e][f+n]!==l&&h[e][f].cell==h[e][f+n].cell;){for(c=0;c<j;c++)i[e+c][f+n]=1;n++}g(h[e][f].cell).attr("rowspan",j).attr("colspan",n)}}}}function L(a){var b=u(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==g.inArray(!1,b))B(a,!1);else{var b=[],c=0,e=a.asStripeClasses,d=e.length,f=a.oLanguage,h=a.iInitDisplayStart,i="ssp"==A(a),j=a.aiDisplay;a.bDrawing=!0;h!==l&&-1!==h&&(a._iDisplayStart=i?h:h>=a.fnRecordsDisplay()?0:h,a.iInitDisplayStart=-1);var h=a._iDisplayStart,n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=
+!1,a.iDraw++,B(a,!1);else if(i){if(!a.bDestroying&&!jb(a))return}else a.iDraw++;if(0!==j.length){f=i?a.aoData.length:n;for(i=i?0:h;i<f;i++){var m=j[i],o=a.aoData[m];null===o.nTr&&Ia(a,m);m=o.nTr;if(0!==d){var k=e[c%d];o._sRowStripe!=k&&(g(m).removeClass(o._sRowStripe).addClass(k),o._sRowStripe=k)}u(a,"aoRowCallback",null,[m,o._aData,c,i]);b.push(m);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==A(a)?c=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=g("<tr/>",{"class":d?
+e[0]:""}).append(g("<td />",{valign:"top",colSpan:aa(a),"class":a.oClasses.sRowEmpty}).html(c))[0];u(a,"aoHeaderCallback","header",[g(a.nTHead).children("tr")[0],Ka(a),h,n,j]);u(a,"aoFooterCallback","footer",[g(a.nTFoot).children("tr")[0],Ka(a),h,n,j]);e=g(a.nTBody);e.children().detach();e.append(g(b));u(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function M(a,b){var c=a.oFeatures,e=c.bFilter;c.bSort&&kb(a);e?fa(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();
+!0!==b&&(a._iDisplayStart=0);a._drawHold=b;L(a);a._drawHold=!1}function lb(a){var b=a.oClasses,c=g(a.nTable),c=g("<div/>").insertBefore(c),e=a.oFeatures,d=g("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=d[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),h,i,j,n,m,o,k=0;k<f.length;k++){h=null;i=f[k];if("<"==i){j=g("<div/>")[0];n=f[k+1];if("'"==n||'"'==n){m="";for(o=2;f[k+o]!=n;)m+=f[k+o],o++;"H"==m?m=b.sJUIHeader:
+"F"==m&&(m=b.sJUIFooter);-1!=m.indexOf(".")?(n=m.split("."),j.id=n[0].substr(1,n[0].length-1),j.className=n[1]):"#"==m.charAt(0)?j.id=m.substr(1,m.length-1):j.className=m;k+=o}d.append(j);d=g(j)}else if(">"==i)d=d.parent();else if("l"==i&&e.bPaginate&&e.bLengthChange)h=mb(a);else if("f"==i&&e.bFilter)h=nb(a);else if("r"==i&&e.bProcessing)h=ob(a);else if("t"==i)h=pb(a);else if("i"==i&&e.bInfo)h=qb(a);else if("p"==i&&e.bPaginate)h=rb(a);else if(0!==p.ext.feature.length){j=p.ext.feature;o=0;for(n=j.length;o<
+n;o++)if(i==j[o].cFeature){h=j[o].fnInit(a);break}}h&&(j=a.aanFeatures,j[i]||(j[i]=[]),j[i].push(h),d.append(h))}c.replaceWith(d)}function da(a,b){var c=g(b).children("tr"),e,d,f,h,i,j,n,m,o,k;a.splice(0,a.length);f=0;for(j=c.length;f<j;f++)a.push([]);f=0;for(j=c.length;f<j;f++){e=c[f];for(d=e.firstChild;d;){if("TD"==d.nodeName.toUpperCase()||"TH"==d.nodeName.toUpperCase()){m=1*d.getAttribute("colspan");o=1*d.getAttribute("rowspan");m=!m||0===m||1===m?1:m;o=!o||0===o||1===o?1:o;h=0;for(i=a[f];i[h];)h++;
+n=h;k=1===m?!0:!1;for(i=0;i<m;i++)for(h=0;h<o;h++)a[f+h][n+i]={cell:d,unique:k},a[f+h].nTr=e}d=d.nextSibling}}}function pa(a,b,c){var e=[];c||(c=a.aoHeader,b&&(c=[],da(c,b)));for(var b=0,d=c.length;b<d;b++)for(var f=0,h=c[b].length;f<h;f++)if(c[b][f].unique&&(!e[f]||!a.bSortCellsTop))e[f]=c[b][f].cell;return e}function qa(a,b,c){u(a,"aoServerParams","serverParams",[b]);if(b&&g.isArray(b)){var e={},d=/(.*?)\[\]$/;g.each(b,function(a,b){var c=b.name.match(d);c?(c=c[0],e[c]||(e[c]=[]),e[c].push(b.value)):
+e[b.name]=b.value});b=e}var f,h=a.ajax,i=a.oInstance;if(g.isPlainObject(h)&&h.data){f=h.data;var j=g.isFunction(f)?f(b):f,b=g.isFunction(f)&&j?j:g.extend(!0,b,j);delete h.data}j={data:b,success:function(b){var f=b.error||b.sError;f&&a.oApi._fnLog(a,0,f);a.json=b;u(a,null,"xhr",[a,b]);c(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var f=a.oApi._fnLog;"parsererror"==c?f(a,0,"Invalid JSON response",1):4===b.readyState&&f(a,0,"Ajax error",7);B(a,!1)}};a.oAjaxData=b;u(a,null,"preXhr",
+[a,b]);a.fnServerData?a.fnServerData.call(i,a.sAjaxSource,g.map(b,function(a,b){return{name:b,value:a}}),c,a):a.sAjaxSource||"string"===typeof h?a.jqXHR=g.ajax(g.extend(j,{url:h||a.sAjaxSource})):g.isFunction(h)?a.jqXHR=h.call(i,b,c,a):(a.jqXHR=g.ajax(g.extend(j,h)),h.data=f)}function jb(a){return a.bAjaxDataGet?(a.iDraw++,B(a,!0),qa(a,sb(a),function(b){tb(a,b)}),!1):!0}function sb(a){var b=a.aoColumns,c=b.length,e=a.oFeatures,d=a.oPreviousSearch,f=a.aoPreSearchCols,h,i=[],j,n,m,o=T(a);h=a._iDisplayStart;
+j=!1!==e.bPaginate?a._iDisplayLength:-1;var k=function(a,b){i.push({name:a,value:b})};k("sEcho",a.iDraw);k("iColumns",c);k("sColumns",C(b,"sName").join(","));k("iDisplayStart",h);k("iDisplayLength",j);var l={draw:a.iDraw,columns:[],order:[],start:h,length:j,search:{value:d.sSearch,regex:d.bRegex}};for(h=0;h<c;h++)n=b[h],m=f[h],j="function"==typeof n.mData?"function":n.mData,l.columns.push({data:j,name:n.sName,searchable:n.bSearchable,orderable:n.bSortable,search:{value:m.sSearch,regex:m.bRegex}}),
+k("mDataProp_"+h,j),e.bFilter&&(k("sSearch_"+h,m.sSearch),k("bRegex_"+h,m.bRegex),k("bSearchable_"+h,n.bSearchable)),e.bSort&&k("bSortable_"+h,n.bSortable);e.bFilter&&(k("sSearch",d.sSearch),k("bRegex",d.bRegex));e.bSort&&(g.each(o,function(a,b){l.order.push({column:b.col,dir:b.dir});k("iSortCol_"+a,b.col);k("sSortDir_"+a,b.dir)}),k("iSortingCols",o.length));b=p.ext.legacy.ajax;return null===b?a.sAjaxSource?i:l:b?i:l}function tb(a,b){var c=b.sEcho!==l?b.sEcho:b.draw,e=b.iTotalRecords!==l?b.iTotalRecords:
+b.recordsTotal,d=b.iTotalDisplayRecords!==l?b.iTotalDisplayRecords:b.recordsFiltered;if(c){if(1*c<a.iDraw)return;a.iDraw=1*c}na(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(d,10);c=ra(a,b);e=0;for(d=c.length;e<d;e++)I(a,c[e]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;L(a);a._bInitComplete||sa(a,b);a.bAjaxDataGet=!0;B(a,!1)}function ra(a,b){var c=g.isPlainObject(a.ajax)&&a.ajax.dataSrc!==l?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?W(c)(b):
+b}function nb(a){var b=a.oClasses,c=a.sTableId,e=a.oLanguage,d=a.oPreviousSearch,f=a.aanFeatures,h='<input type="search" class="'+b.sFilterInput+'"/>',i=e.sSearch,i=i.match(/_INPUT_/)?i.replace("_INPUT_",h):i+h,b=g("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(g("<label/>").append(i)),f=function(){var b=!this.value?"":this.value;b!=d.sSearch&&(fa(a,{sSearch:b,bRegex:d.bRegex,bSmart:d.bSmart,bCaseInsensitive:d.bCaseInsensitive}),a._iDisplayStart=0,L(a))},h=null!==a.searchDelay?a.searchDelay:
+"ssp"===A(a)?400:0,j=g("input",b).val(d.sSearch).attr("placeholder",e.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT",h?ta(f,h):f).bind("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);g(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{j[0]!==P.activeElement&&j.val(d.sSearch)}catch(f){}});return b[0]}function fa(a,b,c){var e=a.oPreviousSearch,d=a.aoPreSearchCols,f=function(a){e.sSearch=a.sSearch;e.bRegex=a.bRegex;e.bSmart=a.bSmart;e.bCaseInsensitive=
+a.bCaseInsensitive};Ga(a);if("ssp"!=A(a)){ub(a,b.sSearch,c,b.bEscapeRegex!==l?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<d.length;b++)vb(a,d[b].sSearch,b,d[b].bEscapeRegex!==l?!d[b].bEscapeRegex:d[b].bRegex,d[b].bSmart,d[b].bCaseInsensitive);wb(a)}else f(b);a.bFiltered=!0;u(a,null,"search",[a])}function wb(a){for(var b=p.ext.search,c=a.aiDisplay,e,d,f=0,h=b.length;f<h;f++){for(var i=[],j=0,g=c.length;j<g;j++)d=c[j],e=a.aoData[d],b[f](a,e._aFilterData,d,e._aData,j)&&i.push(d);
+c.length=0;c.push.apply(c,i)}}function vb(a,b,c,e,d,f){if(""!==b)for(var h=a.aiDisplay,e=Pa(b,e,d,f),d=h.length-1;0<=d;d--)b=a.aoData[h[d]]._aFilterData[c],e.test(b)||h.splice(d,1)}function ub(a,b,c,e,d,f){var e=Pa(b,e,d,f),d=a.oPreviousSearch.sSearch,f=a.aiDisplayMaster,h;0!==p.ext.search.length&&(c=!0);h=xb(a);if(0>=b.length)a.aiDisplay=f.slice();else{if(h||c||d.length>b.length||0!==b.indexOf(d)||a.bSorted)a.aiDisplay=f.slice();b=a.aiDisplay;for(c=b.length-1;0<=c;c--)e.test(a.aoData[b[c]]._sFilterRow)||
+b.splice(c,1)}}function Pa(a,b,c,e){a=b?a:ua(a);c&&(a="^(?=.*?"+g.map(a.match(/"[^"]+"|[^ ]+/g)||"",function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',"")}).join(")(?=.*?")+").*$");return RegExp(a,e?"i":"")}function ua(a){return a.replace(Xb,"\\$1")}function xb(a){var b=a.aoColumns,c,e,d,f,h,i,g,n,m=p.ext.type.search;c=!1;e=0;for(f=a.aoData.length;e<f;e++)if(n=a.aoData[e],!n._aFilterData){i=[];d=0;for(h=b.length;d<h;d++)c=b[d],c.bSearchable?(g=v(a,e,d,"filter"),
+m[c.sType]&&(g=m[c.sType](g)),null===g&&(g=""),"string"!==typeof g&&g.toString&&(g=g.toString())):g="",g.indexOf&&-1!==g.indexOf("&")&&(va.innerHTML=g,g=Yb?va.textContent:va.innerText),g.replace&&(g=g.replace(/[\r\n]/g,"")),i.push(g);n._aFilterData=i;n._sFilterRow=i.join("  ");c=!0}return c}function yb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function zb(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}
+function qb(a){var b=a.sTableId,c=a.aanFeatures.i,e=g("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Ab,sName:"information"}),e.attr("role","status").attr("aria-live","polite"),g(a.nTable).attr("aria-describedby",b+"_info"));return e[0]}function Ab(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,e=a._iDisplayStart+1,d=a.fnDisplayEnd(),f=a.fnRecordsTotal(),h=a.fnRecordsDisplay(),i=h?c.sInfo:c.sInfoEmpty;h!==f&&(i+=" "+c.sInfoFiltered);i+=c.sInfoPostFix;
+i=Bb(a,i);c=c.fnInfoCallback;null!==c&&(i=c.call(a.oInstance,a,e,d,f,h,i));g(b).html(i)}}function Bb(a,b){var c=a.fnFormatNumber,e=a._iDisplayStart+1,d=a._iDisplayLength,f=a.fnRecordsDisplay(),h=-1===d;return b.replace(/_START_/g,c.call(a,e)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,f)).replace(/_PAGE_/g,c.call(a,h?1:Math.ceil(e/d))).replace(/_PAGES_/g,c.call(a,h?1:Math.ceil(f/d)))}function ga(a){var b,c,e=a.iInitDisplayStart,
+d=a.aoColumns,f;c=a.oFeatures;if(a.bInitialised){lb(a);ib(a);ea(a,a.aoHeader);ea(a,a.aoFooter);B(a,!0);c.bAutoWidth&&Fa(a);b=0;for(c=d.length;b<c;b++)f=d[b],f.sWidth&&(f.nTh.style.width=s(f.sWidth));M(a);d=A(a);"ssp"!=d&&("ajax"==d?qa(a,[],function(c){var f=ra(a,c);for(b=0;b<f.length;b++)I(a,f[b]);a.iInitDisplayStart=e;M(a);B(a,!1);sa(a,c)},a):(B(a,!1),sa(a)))}else setTimeout(function(){ga(a)},200)}function sa(a,b){a._bInitComplete=!0;b&&X(a);u(a,"aoInitComplete","init",[a,b])}function Qa(a,b){var c=
+parseInt(b,10);a._iDisplayLength=c;Ra(a);u(a,null,"length",[a,c])}function mb(a){for(var b=a.oClasses,c=a.sTableId,e=a.aLengthMenu,d=g.isArray(e[0]),f=d?e[0]:e,e=d?e[1]:e,d=g("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),h=0,i=f.length;h<i;h++)d[0][h]=new Option(e[h],f[h]);var j=g("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(j[0].id=c+"_length");j.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",d[0].outerHTML));g("select",j).val(a._iDisplayLength).bind("change.DT",
+function(){Qa(a,g(this).val());L(a)});g(a.nTable).bind("length.dt.DT",function(b,c,f){a===c&&g("select",j).val(f)});return j[0]}function rb(a){var b=a.sPaginationType,c=p.ext.pager[b],e="function"===typeof c,d=function(a){L(a)},b=g("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;e||c.fnInit(a,b,d);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(e){var b=a._iDisplayStart,g=a._iDisplayLength,n=a.fnRecordsDisplay(),m=-1===g,b=m?0:Math.ceil(b/g),g=m?1:Math.ceil(n/
+g),n=c(b,g),o,m=0;for(o=f.p.length;m<o;m++)Oa(a,"pageButton")(a,f.p[m],m,n,b,g)}else c.fnUpdate(a,d)},sName:"pagination"}));return b}function Sa(a,b,c){var e=a._iDisplayStart,d=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===d?e=0:"number"===typeof b?(e=b*d,e>f&&(e=0)):"first"==b?e=0:"previous"==b?(e=0<=d?e-d:0,0>e&&(e=0)):"next"==b?e+d<f&&(e+=d):"last"==b?e=Math.floor((f-1)/d)*d:R(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==e;a._iDisplayStart=e;b&&(u(a,null,"page",[a]),c&&L(a));
+return b}function ob(a){return g("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function B(a,b){a.oFeatures.bProcessing&&g(a.aanFeatures.r).css("display",b?"block":"none");u(a,null,"processing",[a,b])}function pb(a){var b=g(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var e=c.sX,d=c.sY,f=a.oClasses,h=b.children("caption"),i=h.length?h[0]._captionSide:null,
+j=g(b[0].cloneNode(!1)),n=g(b[0].cloneNode(!1)),m=b.children("tfoot");c.sX&&"100%"===b.attr("width")&&b.removeAttr("width");m.length||(m=null);c=g("<div/>",{"class":f.sScrollWrapper}).append(g("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:e?!e?null:s(e):"100%"}).append(g("<div/>",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(j.removeAttr("id").css("margin-left",0).append("top"===i?h:null).append(b.children("thead"))))).append(g("<div/>",
+{"class":f.sScrollBody}).css({overflow:"auto",height:!d?null:s(d),width:!e?null:s(e)}).append(b));m&&c.append(g("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:e?!e?null:s(e):"100%"}).append(g("<div/>",{"class":f.sScrollFootInner}).append(n.removeAttr("id").css("margin-left",0).append("bottom"===i?h:null).append(b.children("tfoot")))));var b=c.children(),o=b[0],f=b[1],k=m?b[2]:null;e&&g(f).scroll(function(){var a=this.scrollLeft;o.scrollLeft=a;m&&(k.scrollLeft=a)});a.nScrollHead=
+o;a.nScrollBody=f;a.nScrollFoot=k;a.aoDrawCallback.push({fn:Y,sName:"scrolling"});return c[0]}function Y(a){var b=a.oScroll,c=b.sX,e=b.sXInner,d=b.sY,f=b.iBarWidth,h=g(a.nScrollHead),i=h[0].style,j=h.children("div"),n=j[0].style,m=j.children("table"),j=a.nScrollBody,o=g(j),k=j.style,l=g(a.nScrollFoot).children("div"),p=l.children("table"),r=g(a.nTHead),q=g(a.nTable),t=q[0],N=t.style,J=a.nTFoot?g(a.nTFoot):null,u=a.oBrowser,w=u.bScrollOversize,y,v,x,K,z,A=[],B=[],C=[],D,E=function(a){a=a.style;a.paddingTop=
+"0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};q.children("thead, tfoot").remove();z=r.clone().prependTo(q);y=r.find("tr");x=z.find("tr");z.find("th, td").removeAttr("tabindex");J&&(K=J.clone().prependTo(q),v=J.find("tr"),K=K.find("tr"));c||(k.width="100%",h[0].style.width="100%");g.each(pa(a,z),function(b,c){D=ka(a,b);c.style.width=a.aoColumns[D].sWidth});J&&F(function(a){a.style.width=""},K);b.bCollapse&&""!==d&&(k.height=o[0].offsetHeight+r[0].offsetHeight+"px");
+h=q.outerWidth();if(""===c){if(N.width="100%",w&&(q.find("tbody").height()>j.offsetHeight||"scroll"==o.css("overflow-y")))N.width=s(q.outerWidth()-f)}else""!==e?N.width=s(e):h==o.width()&&o.height()<q.height()?(N.width=s(h-f),q.outerWidth()>h-f&&(N.width=s(h))):N.width=s(h);h=q.outerWidth();F(E,x);F(function(a){C.push(a.innerHTML);A.push(s(g(a).css("width")))},x);F(function(a,b){a.style.width=A[b]},y);g(x).height(0);J&&(F(E,K),F(function(a){B.push(s(g(a).css("width")))},K),F(function(a,b){a.style.width=
+B[b]},v),g(K).height(0));F(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+C[b]+"</div>";a.style.width=A[b]},x);J&&F(function(a,b){a.innerHTML="";a.style.width=B[b]},K);if(q.outerWidth()<h){v=j.scrollHeight>j.offsetHeight||"scroll"==o.css("overflow-y")?h+f:h;if(w&&(j.scrollHeight>j.offsetHeight||"scroll"==o.css("overflow-y")))N.width=s(v-f);(""===c||""!==e)&&R(a,1,"Possible column misalignment",6)}else v="100%";k.width=s(v);i.width=s(v);J&&(a.nScrollFoot.style.width=
+s(v));!d&&w&&(k.height=s(t.offsetHeight+f));d&&b.bCollapse&&(k.height=s(d),b=c&&t.offsetWidth>j.offsetWidth?f:0,t.offsetHeight<j.offsetHeight&&(k.height=s(t.offsetHeight+b)));b=q.outerWidth();m[0].style.width=s(b);n.width=s(b);m=q.height()>j.clientHeight||"scroll"==o.css("overflow-y");u="padding"+(u.bScrollbarLeft?"Left":"Right");n[u]=m?f+"px":"0px";J&&(p[0].style.width=s(b),l[0].style.width=s(b),l[0].style[u]=m?f+"px":"0px");o.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}function F(a,
+b,c){for(var e=0,d=0,f=b.length,h,g;d<f;){h=b[d].firstChild;for(g=c?c[d].firstChild:null;h;)1===h.nodeType&&(c?a(h,g,e):a(h,e),e++),h=h.nextSibling,g=c?g.nextSibling:null;d++}}function Fa(a){var b=a.nTable,c=a.aoColumns,e=a.oScroll,d=e.sY,f=e.sX,h=e.sXInner,i=c.length,e=Z(a,"bVisible"),j=g("th",a.nTHead),n=b.getAttribute("width"),m=b.parentNode,o=!1,k,l;for(k=0;k<e.length;k++)l=c[e[k]],null!==l.sWidth&&(l.sWidth=Cb(l.sWidthOrig,m),o=!0);if(!o&&!f&&!d&&i==aa(a)&&i==j.length)for(k=0;k<i;k++)c[k].sWidth=
+s(j.eq(k).width());else{i=g(b).clone().empty().css("visibility","hidden").removeAttr("id").append(g(a.nTHead).clone(!1)).append(g(a.nTFoot).clone(!1)).append(g("<tbody><tr/></tbody>"));i.find("tfoot th, tfoot td").css("width","");var p=i.find("tbody tr"),j=pa(a,i.find("thead")[0]);for(k=0;k<e.length;k++)l=c[e[k]],j[k].style.width=null!==l.sWidthOrig&&""!==l.sWidthOrig?s(l.sWidthOrig):"";if(a.aoData.length)for(k=0;k<e.length;k++)o=e[k],l=c[o],g(Db(a,o)).clone(!1).append(l.sContentPadding).appendTo(p);
+i.appendTo(m);f&&h?i.width(h):f?(i.css("width","auto"),i.width()<m.offsetWidth&&i.width(m.offsetWidth)):d?i.width(m.offsetWidth):n&&i.width(n);Eb(a,i[0]);if(f){for(k=h=0;k<e.length;k++)l=c[e[k]],d=g(j[k]).outerWidth(),h+=null===l.sWidthOrig?d:parseInt(l.sWidth,10)+d-g(j[k]).width();i.width(s(h));b.style.width=s(h)}for(k=0;k<e.length;k++)if(l=c[e[k]],d=g(j[k]).width())l.sWidth=s(d);b.style.width=s(i.css("width"));i.remove()}n&&(b.style.width=s(n));if((n||f)&&!a._reszEvt)g(Da).bind("resize.DT-"+a.sInstance,
+ta(function(){X(a)})),a._reszEvt=!0}function ta(a,b){var c=b!==l?b:200,e,d;return function(){var b=this,h=+new Date,g=arguments;e&&h<e+c?(clearTimeout(d),d=setTimeout(function(){e=l;a.apply(b,g)},c)):e?(e=h,a.apply(b,g)):e=h}}function Cb(a,b){if(!a)return 0;var c=g("<div/>").css("width",s(a)).appendTo(b||P.body),e=c[0].offsetWidth;c.remove();return e}function Eb(a,b){var c=a.oScroll;if(c.sX||c.sY)c=!c.sX?c.iBarWidth:0,b.style.width=s(g(b).outerWidth()-c)}function Db(a,b){var c=Fb(a,b);if(0>c)return null;
+var e=a.aoData[c];return!e.nTr?g("<td/>").html(v(a,c,b,"display"))[0]:e.anCells[b]}function Fb(a,b){for(var c,e=-1,d=-1,f=0,h=a.aoData.length;f<h;f++)c=v(a,f,b,"display")+"",c=c.replace(Zb,""),c.length>e&&(e=c.length,d=f);return d}function s(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function Gb(){if(!p.__scrollbarWidth){var a=g("<p/>").css({width:"100%",height:200,padding:0})[0],b=g("<div/>").css({position:"absolute",top:0,left:0,width:200,height:150,padding:0,
+overflow:"hidden",visibility:"hidden"}).append(a).appendTo("body"),c=a.offsetWidth;b.css("overflow","scroll");a=a.offsetWidth;c===a&&(a=b[0].clientWidth);b.remove();p.__scrollbarWidth=c-a}return p.__scrollbarWidth}function T(a){var b,c,e=[],d=a.aoColumns,f,h,i,j;b=a.aaSortingFixed;c=g.isPlainObject(b);var n=[];f=function(a){a.length&&!g.isArray(a[0])?n.push(a):n.push.apply(n,a)};g.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<n.length;a++){j=n[a][0];f=d[j].aDataSort;
+b=0;for(c=f.length;b<c;b++)h=f[b],i=d[h].sType||"string",n[a]._idx===l&&(n[a]._idx=g.inArray(n[a][1],d[h].asSorting)),e.push({src:j,col:h,dir:n[a][1],index:n[a]._idx,type:i,formatter:p.ext.type.order[i+"-pre"]})}return e}function kb(a){var b,c,e=[],d=p.ext.type.order,f=a.aoData,h=0,g,j=a.aiDisplayMaster,n;Ga(a);n=T(a);b=0;for(c=n.length;b<c;b++)g=n[b],g.formatter&&h++,Hb(a,g.col);if("ssp"!=A(a)&&0!==n.length){b=0;for(c=j.length;b<c;b++)e[j[b]]=b;h===n.length?j.sort(function(a,b){var c,d,h,g,i=n.length,
+j=f[a]._aSortData,l=f[b]._aSortData;for(h=0;h<i;h++)if(g=n[h],c=j[g.col],d=l[g.col],c=c<d?-1:c>d?1:0,0!==c)return"asc"===g.dir?c:-c;c=e[a];d=e[b];return c<d?-1:c>d?1:0}):j.sort(function(a,b){var c,h,g,i,j=n.length,l=f[a]._aSortData,p=f[b]._aSortData;for(g=0;g<j;g++)if(i=n[g],c=l[i.col],h=p[i.col],i=d[i.type+"-"+i.dir]||d["string-"+i.dir],c=i(c,h),0!==c)return c;c=e[a];h=e[b];return c<h?-1:c>h?1:0})}a.bSorted=!0}function Ib(a){for(var b,c,e=a.aoColumns,d=T(a),a=a.oLanguage.oAria,f=0,h=e.length;f<h;f++){c=
+e[f];var g=c.asSorting;b=c.sTitle.replace(/<.*?>/g,"");var j=c.nTh;j.removeAttribute("aria-sort");c.bSortable&&(0<d.length&&d[0].col==f?(j.setAttribute("aria-sort","asc"==d[0].dir?"ascending":"descending"),c=g[d[0].index+1]||g[0]):c=g[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);j.setAttribute("aria-label",b)}}function Ta(a,b,c,e){var d=a.aaSorting,f=a.aoColumns[b].asSorting,h=function(a,b){var c=a._idx;c===l&&(c=g.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof d[0]&&
+(d=a.aaSorting=[d]);c&&a.oFeatures.bSortMulti?(c=g.inArray(b,C(d,"0")),-1!==c?(b=h(d[c],!0),null===b?d.splice(c,1):(d[c][1]=f[b],d[c]._idx=b)):(d.push([b,f[0],0]),d[d.length-1]._idx=0)):d.length&&d[0][0]==b?(b=h(d[0]),d.length=1,d[0][1]=f[b],d[0]._idx=b):(d.length=0,d.push([b,f[0]]),d[0]._idx=0);M(a);"function"==typeof e&&e(a)}function Na(a,b,c,e){var d=a.aoColumns[c];Ua(b,{},function(b){!1!==d.bSortable&&(a.oFeatures.bProcessing?(B(a,!0),setTimeout(function(){Ta(a,c,b.shiftKey,e);"ssp"!==A(a)&&B(a,
+!1)},0)):Ta(a,c,b.shiftKey,e))})}function wa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,e=T(a),d=a.oFeatures,f,h;if(d.bSort&&d.bSortClasses){d=0;for(f=b.length;d<f;d++)h=b[d].src,g(C(a.aoData,"anCells",h)).removeClass(c+(2>d?d+1:3));d=0;for(f=e.length;d<f;d++)h=e[d].src,g(C(a.aoData,"anCells",h)).addClass(c+(2>d?d+1:3))}a.aLastSort=e}function Hb(a,b){var c=a.aoColumns[b],e=p.ext.order[c.sSortDataType],d;e&&(d=e.call(a.oInstance,a,b,$(a,b)));for(var f,h=p.ext.type.order[c.sType+"-pre"],g=0,j=a.aoData.length;g<
+j;g++)if(c=a.aoData[g],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||e)f=e?d[g]:v(a,g,b,"sort"),c._aSortData[b]=h?h(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:g.extend(!0,[],a.aaSorting),search:yb(a.oPreviousSearch),columns:g.map(a.aoColumns,function(b,e){return{visible:b.bVisible,search:yb(a.aoPreSearchCols[e])}})};u(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,
+a,b)}}function Jb(a){var b,c,e=a.aoColumns;if(a.oFeatures.bStateSave){var d=a.fnStateLoadCallback.call(a.oInstance,a);if(d&&d.time&&(b=u(a,"aoStateLoadParams","stateLoadParams",[a,d]),-1===g.inArray(!1,b)&&(b=a.iStateDuration,!(0<b&&d.time<+new Date-1E3*b)&&e.length===d.columns.length))){a.oLoadedState=g.extend(!0,{},d);a._iDisplayStart=d.start;a.iInitDisplayStart=d.start;a._iDisplayLength=d.length;a.aaSorting=[];g.each(d.order,function(b,c){a.aaSorting.push(c[0]>=e.length?[0,c[1]]:c)});g.extend(a.oPreviousSearch,
+zb(d.search));b=0;for(c=d.columns.length;b<c;b++){var f=d.columns[b];e[b].bVisible=f.visible;g.extend(a.aoPreSearchCols[b],zb(f.search))}u(a,"aoStateLoaded","stateLoaded",[a,d])}}}function ya(a){var b=p.settings,a=g.inArray(a,C(b,"nTable"));return-1!==a?b[a]:null}function R(a,b,c,e){c="DataTables warning: "+(null!==a?"table id="+a.sTableId+" - ":"")+c;e&&(c+=". For more information about this error, please see http://datatables.net/tn/"+e);if(b)Da.console&&console.log&&console.log(c);else if(a=p.ext,
+"alert"==(a.sErrMode||a.errMode))alert(c);else throw Error(c);}function D(a,b,c,e){g.isArray(c)?g.each(c,function(c,f){g.isArray(f)?D(a,b,f[0],f[1]):D(a,b,f)}):(e===l&&(e=c),b[c]!==l&&(a[e]=b[c]))}function Kb(a,b,c){var e,d;for(d in b)b.hasOwnProperty(d)&&(e=b[d],g.isPlainObject(e)?(g.isPlainObject(a[d])||(a[d]={}),g.extend(!0,a[d],e)):a[d]=c&&"data"!==d&&"aaData"!==d&&g.isArray(e)?e.slice():e);return a}function Ua(a,b,c){g(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===
+a.which&&(a.preventDefault(),c(a))}).bind("selectstart.DT",function(){return!1})}function x(a,b,c,e){c&&a[b].push({fn:c,sName:e})}function u(a,b,c,e){var d=[];b&&(d=g.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,e)}));null!==c&&g(a.nTable).trigger(c+".dt",e);return d}function Ra(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),e=a._iDisplayLength;b>=c&&(b=c-e);b-=b%e;if(-1===e||0>b)b=0;a._iDisplayStart=b}function Oa(a,b){var c=a.renderer,e=p.ext.renderer[b];return g.isPlainObject(c)&&
+c[b]?e[c[b]]||e._:"string"===typeof c?e[c]||e._:e._}function A(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Va(a,b){var c=[],c=Lb.numbers_length,e=Math.floor(c/2);b<=c?c=U(0,b):a<=e?(c=U(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-e?c=U(b-(c-2),b):(c=U(a-1,a+2),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function cb(a){g.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Wa)},"html-num":function(b){return za(b,
+a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Wa)}},function(b,c){w.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(w.type.search[b+a]=w.type.search.html)})}function Mb(a){return function(){var b=[ya(this[p.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return p.ext.internal[a].apply(this,b)}}var p,w,q,r,t,Xa={},Nb=/[\r\n]/g,Aa=/<.*?>/g,$b=/^[\w\+\-]/,ac=/[\w\+\-]$/,Xb=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Wa=/[',$\u00a3\u20ac\u00a5%\u2009\u202F]/g,
+H=function(a){return!a||!0===a||"-"===a?!0:!1},Ob=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Pb=function(a,b){Xa[b]||(Xa[b]=RegExp(ua(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Xa[b],"."):a},Ya=function(a,b,c){var e="string"===typeof a;b&&e&&(a=Pb(a,b));c&&e&&(a=a.replace(Wa,""));return H(a)||!isNaN(parseFloat(a))&&isFinite(a)},Qb=function(a,b,c){return H(a)?!0:!(H(a)||"string"===typeof a)?null:Ya(a.replace(Aa,""),b,c)?!0:null},C=function(a,
+b,c){var e=[],d=0,f=a.length;if(c!==l)for(;d<f;d++)a[d]&&a[d][b]&&e.push(a[d][b][c]);else for(;d<f;d++)a[d]&&e.push(a[d][b]);return e},ha=function(a,b,c,e){var d=[],f=0,h=b.length;if(e!==l)for(;f<h;f++)a[b[f]][c]&&d.push(a[b[f]][c][e]);else for(;f<h;f++)d.push(a[b[f]][c]);return d},U=function(a,b){var c=[],e;b===l?(b=0,e=a):(e=b,b=a);for(var d=b;d<e;d++)c.push(d);return c},Rb=function(a){for(var b=[],c=0,e=a.length;c<e;c++)a[c]&&b.push(a[c]);return b},Ma=function(a){var b=[],c,e,d=a.length,f,h=0;
+e=0;a:for(;e<d;e++){c=a[e];for(f=0;f<h;f++)if(b[f]===c)continue a;b.push(c);h++}return b},z=function(a,b,c){a[b]!==l&&(a[c]=a[b])},ba=/\[.*?\]$/,S=/\(\)$/,va=g("<div>")[0],Yb=va.textContent!==l,Zb=/<.*?>/g;p=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new q(ya(this[w.iApiIndex])):new q(this)};this.fnAddData=function(a,b){var c=this.api(!0),e=g.isArray(a)&&(g.isArray(a[0])||g.isPlainObject(a[0]))?
+c.rows.add(a):c.row.add(a);(b===l||b)&&c.draw();return e.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],e=c.oScroll;a===l||a?b.draw(!1):(""!==e.sX||""!==e.sY)&&Y(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===l||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var e=this.api(!0),a=e.rows(a),d=a.settings()[0],g=d.aoData[a[0][0]];a.remove();b&&b.call(this,d,g);
+(c===l||c)&&e.draw();return g};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(!a)};this.fnFilter=function(a,b,c,e,d,g){d=this.api(!0);null===b||b===l?d.search(a,c,e,g):d.column(b).search(a,c,e,g);d.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==l){var e=a.nodeName?a.nodeName.toLowerCase():"";return b!==l||"td"==e||"th"==e?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);
+return a!==l?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===l||b)&&c.draw(!1)};this.fnSetColumnVis=
+function(a,b,c){a=this.api(!0).column(a).visible(b);(c===l||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return ya(this[w.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,e,d){var g=this.api(!0);c===l||null===c?g.row(b).data(a):g.cell(b,c).data(a);(d===l||d)&&g.columns.adjust();(e===l||e)&&g.draw();return 0};this.fnVersionCheck=w.fnVersionCheck;var b=this,c=a===l,e=this.length;
+c&&(a={});this.oApi=this.internal=w.internal;for(var d in p.ext.internal)d&&(this[d]=Mb(d));this.each(function(){var d={},d=1<e?Kb(d,a,!0):a,h=0,i,j=this.getAttribute("id"),n=!1,m=p.defaults;if("table"!=this.nodeName.toLowerCase())R(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{db(m);eb(m.column);G(m,m,!0);G(m.column,m.column,!0);G(m,d);var o=p.settings,h=0;for(i=o.length;h<i;h++){if(o[h].nTable==this){i=d.bRetrieve!==l?d.bRetrieve:m.bRetrieve;if(c||i)return o[h].oInstance;if(d.bDestroy!==
+l?d.bDestroy:m.bDestroy){o[h].oInstance.fnDestroy();break}else{R(o[h],0,"Cannot reinitialise DataTable",3);return}}if(o[h].sTableId==this.id){o.splice(h,1);break}}if(null===j||""===j)this.id=j="DataTables_Table_"+p.ext._unique++;var k=g.extend(!0,{},p.models.oSettings,{nTable:this,oApi:b.internal,oInit:d,sDestroyWidth:g(this)[0].style.width,sInstance:j,sTableId:j});o.push(k);k.oInstance=1===b.length?b:g(this).dataTable();db(d);d.oLanguage&&O(d.oLanguage);d.aLengthMenu&&!d.iDisplayLength&&(d.iDisplayLength=
+g.isArray(d.aLengthMenu[0])?d.aLengthMenu[0][0]:d.aLengthMenu[0]);d=Kb(g.extend(!0,{},m),d);D(k.oFeatures,d,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));D(k,d,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback",
+"renderer","searchDelay",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]);D(k.oScroll,d,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);D(k.oLanguage,d,"fnInfoCallback");x(k,"aoDrawCallback",d.fnDrawCallback,"user");x(k,"aoServerParams",d.fnServerParams,"user");x(k,"aoStateSaveParams",d.fnStateSaveParams,"user");x(k,"aoStateLoadParams",
+d.fnStateLoadParams,"user");x(k,"aoStateLoaded",d.fnStateLoaded,"user");x(k,"aoRowCallback",d.fnRowCallback,"user");x(k,"aoRowCreatedCallback",d.fnCreatedRow,"user");x(k,"aoHeaderCallback",d.fnHeaderCallback,"user");x(k,"aoFooterCallback",d.fnFooterCallback,"user");x(k,"aoInitComplete",d.fnInitComplete,"user");x(k,"aoPreDrawCallback",d.fnPreDrawCallback,"user");j=k.oClasses;d.bJQueryUI?(g.extend(j,p.ext.oJUIClasses,d.oClasses),d.sDom===m.sDom&&"lfrtip"===m.sDom&&(k.sDom='<"H"lfr>t<"F"ip>'),k.renderer)?
+g.isPlainObject(k.renderer)&&!k.renderer.header&&(k.renderer.header="jqueryui"):k.renderer="jqueryui":g.extend(j,p.ext.classes,d.oClasses);g(this).addClass(j.sTable);if(""!==k.oScroll.sX||""!==k.oScroll.sY)k.oScroll.iBarWidth=Gb();!0===k.oScroll.sX&&(k.oScroll.sX="100%");k.iInitDisplayStart===l&&(k.iInitDisplayStart=d.iDisplayStart,k._iDisplayStart=d.iDisplayStart);null!==d.iDeferLoading&&(k.bDeferLoading=!0,h=g.isArray(d.iDeferLoading),k._iRecordsDisplay=h?d.iDeferLoading[0]:d.iDeferLoading,k._iRecordsTotal=
+h?d.iDeferLoading[1]:d.iDeferLoading);var r=k.oLanguage;g.extend(!0,r,d.oLanguage);""!==r.sUrl&&(g.ajax({dataType:"json",url:r.sUrl,success:function(a){O(a);G(m.oLanguage,a);g.extend(true,r,a);ga(k)},error:function(){ga(k)}}),n=!0);null===d.asStripeClasses&&(k.asStripeClasses=[j.sStripeOdd,j.sStripeEven]);var h=k.asStripeClasses,q=g("tbody tr:eq(0)",this);-1!==g.inArray(!0,g.map(h,function(a){return q.hasClass(a)}))&&(g("tbody tr",this).removeClass(h.join(" ")),k.asDestroyStripes=h.slice());var o=
+[],s,h=this.getElementsByTagName("thead");0!==h.length&&(da(k.aoHeader,h[0]),o=pa(k));if(null===d.aoColumns){s=[];h=0;for(i=o.length;h<i;h++)s.push(null)}else s=d.aoColumns;h=0;for(i=s.length;h<i;h++)Ea(k,o?o[h]:null);hb(k,d.aoColumnDefs,s,function(a,b){ja(k,a,b)});if(q.length){var t=function(a,b){return a.getAttribute("data-"+b)?b:null};g.each(ma(k,q[0]).cells,function(a,b){var c=k.aoColumns[a];if(c.mData===a){var e=t(b,"sort")||t(b,"order"),d=t(b,"filter")||t(b,"search");if(e!==null||d!==null){c.mData=
+{_:a+".display",sort:e!==null?a+".@data-"+e:l,type:e!==null?a+".@data-"+e:l,filter:d!==null?a+".@data-"+d:l};ja(k,a)}}})}var v=k.oFeatures;d.bStateSave&&(v.bStateSave=!0,Jb(k,d),x(k,"aoDrawCallback",xa,"state_save"));if(d.aaSorting===l){o=k.aaSorting;h=0;for(i=o.length;h<i;h++)o[h][1]=k.aoColumns[h].asSorting[0]}wa(k);v.bSort&&x(k,"aoDrawCallback",function(){if(k.bSorted){var a=T(k),b={};g.each(a,function(a,c){b[c.src]=c.dir});u(k,null,"order",[k,a,b]);Ib(k)}});x(k,"aoDrawCallback",function(){(k.bSorted||
+A(k)==="ssp"||v.bDeferRender)&&wa(k)},"sc");fb(k);h=g(this).children("caption").each(function(){this._captionSide=g(this).css("caption-side")});i=g(this).children("thead");0===i.length&&(i=g("<thead/>").appendTo(this));k.nTHead=i[0];i=g(this).children("tbody");0===i.length&&(i=g("<tbody/>").appendTo(this));k.nTBody=i[0];i=g(this).children("tfoot");if(0===i.length&&0<h.length&&(""!==k.oScroll.sX||""!==k.oScroll.sY))i=g("<tfoot/>").appendTo(this);0===i.length||0===i.children().length?g(this).addClass(j.sNoFooter):
+0<i.length&&(k.nTFoot=i[0],da(k.aoFooter,k.nTFoot));if(d.aaData)for(h=0;h<d.aaData.length;h++)I(k,d.aaData[h]);else(k.bDeferLoading||"dom"==A(k))&&la(k,g(k.nTBody).children("tr"));k.aiDisplay=k.aiDisplayMaster.slice();k.bInitialised=!0;!1===n&&ga(k)}});b=null;return this};var Sb=[],y=Array.prototype,bc=function(a){var b,c,e=p.settings,d=g.map(e,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=g.inArray(a,d),-1!==b?[e[b]]:
+null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=g(a):a instanceof g&&(c=a)}else return[];if(c)return c.map(function(){b=g.inArray(this,d);return-1!==b?e[b]:null}).toArray()};q=function(a,b){if(!this instanceof q)throw"DT API must be constructed as a new object";var c=[],e=function(a){(a=bc(a))&&c.push.apply(c,a)};if(g.isArray(a))for(var d=0,f=a.length;d<f;d++)e(a[d]);else e(a);this.context=Ma(c);b&&this.push.apply(this,b.toArray?b.toArray():b);this.selector=
+{rows:null,cols:null,opts:null};q.extend(this,this,Sb)};p.Api=q;q.prototype={concat:y.concat,context:[],each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new q(b[a],this[a]):null},filter:function(a){var b=[];if(y.filter)b=y.filter.call(this,a,this);else for(var c=0,e=this.length;c<e;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new q(this.context,b)},flatten:function(){var a=[];return new q(this.context,
+a.concat.apply(a,this.toArray()))},join:y.join,indexOf:y.indexOf||function(a,b){for(var c=b||0,e=this.length;c<e;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,e){var d=[],f,h,g,j,n,m=this.context,o,k,p=this.selector;"string"===typeof a&&(e=c,c=b,b=a,a=!1);h=0;for(g=m.length;h<g;h++){var r=new q(m[h]);if("table"===b)f=c.call(r,m[h],h),f!==l&&d.push(f);else if("columns"===b||"rows"===b)f=c.call(r,m[h],this[h],h),f!==l&&d.push(f);else if("column"===b||"column-rows"===b||"row"===b||"cell"===
+b){k=this[h];"column-rows"===b&&(o=Ba(m[h],p.opts));j=0;for(n=k.length;j<n;j++)f=k[j],f="cell"===b?c.call(r,m[h],f.row,f.column,h,j):c.call(r,m[h],f,h,j,o),f!==l&&d.push(f)}}return d.length||e?(a=new q(m,a?d.concat.apply([],d):d),b=a.selector,b.rows=p.rows,b.cols=p.cols,b.opts=p.opts,a):this},lastIndexOf:y.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(y.map)b=y.map.call(this,a,this);else for(var c=0,e=this.length;c<e;c++)b.push(a.call(this,
+this[c],c));return new q(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:y.pop,push:y.push,reduce:y.reduce||function(a,b){return gb(this,a,b,0,this.length,1)},reduceRight:y.reduceRight||function(a,b){return gb(this,a,b,this.length-1,-1,-1)},reverse:y.reverse,selector:null,shift:y.shift,sort:y.sort,splice:y.splice,toArray:function(){return y.slice.call(this)},to$:function(){return g(this)},toJQuery:function(){return g(this)},unique:function(){return new q(this.context,
+Ma(this))},unshift:y.unshift};q.extend=function(a,b,c){if(b&&(b instanceof q||b.__dt_wrapper)){var e,d,f,h=function(a,b,c){return function(){var e=b.apply(a,arguments);q.extend(e,e,c.methodExt);return e}};e=0;for(d=c.length;e<d;e++)f=c[e],b[f.name]="function"===typeof f.val?h(a,f.val,f):g.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,q.extend(a,b[f.name],f.propExt)}};q.register=r=function(a,b){if(g.isArray(a))for(var c=0,e=a.length;c<e;c++)q.register(a[c],b);else for(var d=a.split("."),
+f=Sb,h,i,c=0,e=d.length;c<e;c++){h=(i=-1!==d[c].indexOf("()"))?d[c].replace("()",""):d[c];var j;a:{j=0;for(var n=f.length;j<n;j++)if(f[j].name===h){j=f[j];break a}j=null}j||(j={name:h,val:{},methodExt:[],propExt:[]},f.push(j));c===e-1?j.val=b:f=i?j.methodExt:j.propExt}};q.registerPlural=t=function(a,b,c){q.register(a,c);q.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof q?a.length?g.isArray(a[0])?new q(a.context,a[0]):a[0]:l:a})};r("tables()",function(a){var b;
+if(a){b=q;var c=this.context;if("number"===typeof a)a=[c[a]];else var e=g.map(c,function(a){return a.nTable}),a=g(e).filter(a).map(function(){var a=g.inArray(this,e);return c[a]}).toArray();b=new b(a)}else b=this;return b});r("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new q(b[0]):a});t("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});t("tables().body()","table().body()",function(){return this.iterator("table",
+function(a){return a.nTBody},1)});t("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});t("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});t("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});r("draw()",function(a){return this.iterator("table",function(b){M(b,!1===a)})});r("page()",function(a){return a===
+l?this.page.info().page:this.iterator("table",function(b){Sa(b,a)})});r("page.info()",function(){if(0===this.context.length)return l;var a=this.context[0],b=a._iDisplayStart,c=a._iDisplayLength,e=a.fnRecordsDisplay(),d=-1===c;return{page:d?0:Math.floor(b/c),pages:d?1:Math.ceil(e/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:e}});r("page.len()",function(a){return a===l?0!==this.context.length?this.context[0]._iDisplayLength:l:this.iterator("table",function(b){Qa(b,
+a)})});var Tb=function(a,b,c){"ssp"==A(a)?M(a,b):(B(a,!0),qa(a,[],function(c){na(a);for(var c=ra(a,c),e=0,h=c.length;e<h;e++)I(a,c[e]);M(a,b);B(a,!1)}));if(c){var e=new q(a);e.one("draw",function(){c(e.ajax.json())})}};r("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});r("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});r("ajax.reload()",function(a,b){return this.iterator("table",function(c){Tb(c,!1===b,a)})});r("ajax.url()",function(a){var b=
+this.context;if(a===l){if(0===b.length)return l;b=b[0];return b.ajax?g.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){g.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});r("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Tb(c,!1===b,a)})});var Za=function(a,b){var c=[],e,d,f,h,i,j;e=typeof a;if(!a||"string"===e||"function"===e||a.length===l)a=[a];f=0;for(h=a.length;f<h;f++){d=a[f]&&a[f].split?a[f].split(","):[a[f]];i=0;for(j=
+d.length;i<j;i++)(e=b("string"===typeof d[i]?g.trim(d[i]):d[i]))&&e.length&&c.push.apply(c,e)}return c},$a=function(a){a||(a={});a.filter&&!a.search&&(a.search=a.filter);return{search:a.search||"none",order:a.order||"current",page:a.page||"all"}},ab=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Ba=function(a,b){var c,e,d,f=[],h=a.aiDisplay;c=a.aiDisplayMaster;var i=b.search;e=b.order;d=b.page;if("ssp"==A(a))return"removed"===
+i?[]:U(0,c.length);if("current"==d){c=a._iDisplayStart;for(e=a.fnDisplayEnd();c<e;c++)f.push(h[c])}else if("current"==e||"applied"==e)f="none"==i?c.slice():"applied"==i?h.slice():g.map(c,function(a){return-1===g.inArray(a,h)?a:null});else if("index"==e||"original"==e){c=0;for(e=a.aoData.length;c<e;c++)"none"==i?f.push(c):(d=g.inArray(c,h),(-1===d&&"removed"==i||0<=d&&"applied"==i)&&f.push(c))}return f};r("rows()",function(a,b){a===l?a="":g.isPlainObject(a)&&(b=a,a="");var b=$a(b),c=this.iterator("table",
+function(c){var d=b;return Za(a,function(a){var b=Ob(a);if(b!==null&&!d)return[b];var i=Ba(c,d);if(b!==null&&g.inArray(b,i)!==-1)return[b];if(!a)return i;if(typeof a==="function")return g.map(i,function(b){var d=c.aoData[b];return a(b,d._aData,d.nTr)?b:null});b=Rb(ha(c.aoData,i,"nTr"));return a.nodeName&&g.inArray(a,b)!==-1?[a._DT_RowIndex]:g(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()})},1);c.selector.rows=a;c.selector.opts=b;return c});r("rows().nodes()",function(){return this.iterator("row",
+function(a,b){return a.aoData[b].nTr||l},1)});r("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return ha(a.aoData,b,"_aData")},1)});t("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var e=b.aoData[c];return"search"===a?e._aFilterData:e._aSortData},1)});t("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){ca(b,c,a)})});t("rows().indexes()","row().index()",function(){return this.iterator("row",
+function(a,b){return b},1)});t("rows().remove()","row().remove()",function(){var a=this;return this.iterator("row",function(b,c,e){var d=b.aoData;d.splice(c,1);for(var f=0,h=d.length;f<h;f++)null!==d[f].nTr&&(d[f].nTr._DT_RowIndex=f);g.inArray(c,b.aiDisplay);oa(b.aiDisplayMaster,c);oa(b.aiDisplay,c);oa(a[e],c,!1);Ra(b)})});r("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,h,g=[];f=0;for(h=a.length;f<h;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?g.push(la(b,c)[0]):
+g.push(I(b,c));return g},1),c=this.rows(-1);c.pop();c.push.apply(c,b.toArray());return c});r("row()",function(a,b){return ab(this.rows(a,b))});r("row().data()",function(a){var b=this.context;if(a===l)return b.length&&this.length?b[0].aoData[this[0]]._aData:l;b[0].aoData[this[0]]._aData=a;ca(b[0],this[0],"data");return this});r("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});r("row.add()",function(a){a instanceof g&&a.length&&(a=a[0]);
+var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?la(b,a)[0]:I(b,a)});return this.row(b[0])});var bb=function(a,b){var c=a.context;c.length&&(c=c[0].aoData[b!==l?b:a[0]],c._details&&(c._details.remove(),c._detailsShow=l,c._details=l))},Ub=function(a,b){var c=a.context;if(c.length&&a.length){var e=c[0].aoData[a[0]];if(e._details){(e._detailsShow=b)?e._details.insertAfter(e.nTr):e._details.detach();var d=c[0],f=new q(d),h=d.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");
+0<C(h,"_details").length&&(f.on("draw.dt.DT_details",function(a,b){d===b&&f.rows({page:"current"}).eq(0).each(function(a){a=h[a];a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(d===b)for(var c,e=aa(b),f=0,g=h.length;f<g;f++)c=h[f],c._details&&c._details.children("td[colspan]").attr("colspan",e)}),f.on("destroy.dt.DT_details",function(a,b){if(d===b)for(var c=0,e=h.length;c<e;c++)h[c]._details&&bb(f,c)}))}}};r("row().child()",function(a,b){var c=
+this.context;if(a===l)return c.length&&this.length?c[0].aoData[this[0]]._details:l;if(!0===a)this.child.show();else if(!1===a)bb(this);else if(c.length&&this.length){var e=c[0],c=c[0].aoData[this[0]],d=[],f=function(a,b){if(a.nodeName&&"tr"===a.nodeName.toLowerCase())d.push(a);else{var c=g("<tr><td/></tr>").addClass(b);g("td",c).addClass(b).html(a)[0].colSpan=aa(e);d.push(c[0])}};if(g.isArray(a)||a instanceof g)for(var h=0,i=a.length;h<i;h++)f(a[h],b);else f(a,b);c._details&&c._details.remove();c._details=
+g(d);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});r(["row().child.show()","row().child().show()"],function(){Ub(this,!0);return this});r(["row().child.hide()","row().child().hide()"],function(){Ub(this,!1);return this});r(["row().child.remove()","row().child().remove()"],function(){bb(this);return this});r("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var cc=/^(.+):(name|visIdx|visible)$/,Vb=function(a,
+b,c,e,d){for(var c=[],e=0,f=d.length;e<f;e++)c.push(v(a,d[e],b));return c};r("columns()",function(a,b){a===l?a="":g.isPlainObject(a)&&(b=a,a="");var b=$a(b),c=this.iterator("table",function(c){var d=a,f=b,h=c.aoColumns,i=C(h,"sName"),j=C(h,"nTh");return Za(d,function(a){var b=Ob(a);if(a==="")return U(h.length);if(b!==null)return[b>=0?b:h.length+b];if(typeof a==="function"){var d=Ba(c,f);return g.map(h,function(b,f){return a(f,Vb(c,f,0,0,d),j[f])?f:null})}var k=typeof a==="string"?a.match(cc):"";if(k)switch(k[2]){case "visIdx":case "visible":b=
+parseInt(k[1],10);if(b<0){var l=g.map(h,function(a,b){return a.bVisible?b:null});return[l[l.length+b]]}return[ka(c,b)];case "name":return g.map(i,function(a,b){return a===k[1]?b:null})}else return g(j).filter(a).map(function(){return g.inArray(this,j)}).toArray()})},1);c.selector.cols=a;c.selector.opts=b;return c});t("columns().header()","column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});t("columns().footer()","column().footer()",function(){return this.iterator("column",
+function(a,b){return a.aoColumns[b].nTf},1)});t("columns().data()","column().data()",function(){return this.iterator("column-rows",Vb,1)});t("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});t("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,e,d,f){return ha(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});t("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",
+function(a,b,c,e,d){return ha(a.aoData,d,"anCells",b)},1)});t("columns().visible()","column().visible()",function(a,b){return this.iterator("column",function(c,e){if(a===l)return c.aoColumns[e].bVisible;var d=c.aoColumns,f=d[e],h=c.aoData,i,j,n;if(a!==l&&f.bVisible!==a){if(a){var m=g.inArray(!0,C(d,"bVisible"),e+1);i=0;for(j=h.length;i<j;i++)n=h[i].nTr,d=h[i].anCells,n&&n.insertBefore(d[e],d[m]||null)}else g(C(c.aoData,"anCells",e)).detach();f.bVisible=a;ea(c,c.aoHeader);ea(c,c.aoFooter);if(b===l||
+b)X(c),(c.oScroll.sX||c.oScroll.sY)&&Y(c);u(c,null,"column-visibility",[c,e,a]);xa(c)}})});t("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?$(b,c):c},1)});r("columns.adjust()",function(){return this.iterator("table",function(a){X(a)},1)});r("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return ka(c,b);if("fromData"===a||"toVisible"===a)return $(c,b)}});r("column()",
+function(a,b){return ab(this.columns(a,b))});r("cells()",function(a,b,c){g.isPlainObject(a)&&(typeof a.row!==l?(c=b,b=null):(c=a,a=null));g.isPlainObject(b)&&(c=b,b=null);if(null===b||b===l)return this.iterator("table",function(b){var e=a,d=$a(c),f=b.aoData,h=Ba(b,d),d=Rb(ha(f,h,"anCells")),i=g([].concat.apply([],d)),j,m=b.aoColumns.length,n,p,r,q,s,t;return Za(e,function(a){var c=typeof a==="function";if(a===null||a===l||c){n=[];p=0;for(r=h.length;p<r;p++){j=h[p];for(q=0;q<m;q++){s={row:j,column:q};
+if(c){t=b.aoData[j];a(s,v(b,j,q),t.anCells[q])&&n.push(s)}else n.push(s)}}return n}return g.isPlainObject(a)?[a]:i.filter(a).map(function(a,b){j=b.parentNode._DT_RowIndex;return{row:j,column:g.inArray(b,f[j].anCells)}}).toArray()})});var e=this.columns(b,c),d=this.rows(a,c),f,h,i,j,n,m=this.iterator("table",function(a,b){f=[];h=0;for(i=d[b].length;h<i;h++){j=0;for(n=e[b].length;j<n;j++)f.push({row:d[b][h],column:e[b][j]})}return f},1);g.extend(m.selector,{cols:b,rows:a,opts:c});return m});t("cells().nodes()",
+"cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b].anCells)?a[c]:l},1)});r("cells().data()",function(){return this.iterator("cell",function(a,b,c){return v(a,b,c)},1)});t("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,e){return b.aoData[c][a][e]},1)});t("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,e){return v(b,c,e,a)},1)});t("cells().indexes()",
+"cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:$(a,c)}},1)});t("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,e){ca(b,c,a,e)})});r("cell()",function(a,b,c){return ab(this.cells(a,b,c))});r("cell().data()",function(a){var b=this.context,c=this[0];if(a===l)return b.length&&c.length?v(b[0],c[0].row,c[0].column):l;Ha(b[0],c[0].row,c[0].column,a);ca(b[0],c[0].row,"data",c[0].column);return this});
+r("order()",function(a,b){var c=this.context;if(a===l)return 0!==c.length?c[0].aaSorting:l;"number"===typeof a?a=[[a,b]]:g.isArray(a[0])||(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});r("order.listener()",function(a,b,c){return this.iterator("table",function(e){Na(e,a,b,c)})});r(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,e){var d=[];g.each(b[e],function(b,c){d.push([c,a])});
+c.aaSorting=d})});r("search()",function(a,b,c,e){var d=this.context;return a===l?0!==d.length?d[0].oPreviousSearch.sSearch:l:this.iterator("table",function(d){d.oFeatures.bFilter&&fa(d,g.extend({},d.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===e?!0:e}),1)})});t("columns().search()","column().search()",function(a,b,c,e){return this.iterator("column",function(d,f){var h=d.aoPreSearchCols;if(a===l)return h[f].sSearch;d.oFeatures.bFilter&&(g.extend(h[f],
+{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===e?!0:e}),fa(d,d.oPreviousSearch,1))})});r("state()",function(){return this.context.length?this.context[0].oSavedState:null});r("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});r("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});r("state.save()",function(){return this.iterator("table",function(a){xa(a)})});p.versionCheck=
+p.fnVersionCheck=function(a){for(var b=p.version.split("."),a=a.split("."),c,e,d=0,f=a.length;d<f;d++)if(c=parseInt(b[d],10)||0,e=parseInt(a[d],10)||0,c!==e)return c>e;return!0};p.isDataTable=p.fnIsDataTable=function(a){var b=g(a).get(0),c=!1;g.each(p.settings,function(a,d){if(d.nTable===b||d.nScrollHead===b||d.nScrollFoot===b)c=!0});return c};p.tables=p.fnTables=function(a){return g.map(p.settings,function(b){if(!a||a&&g(b.nTable).is(":visible"))return b.nTable})};p.util={throttle:ta,escapeRegex:ua};
+p.camelToHungarian=G;r("$()",function(a,b){var c=this.rows(b).nodes(),c=g(c);return g([].concat(c.filter(a).toArray(),c.find(a).toArray()))});g.each(["on","one","off"],function(a,b){r(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0].match(/\.dt\b/)||(a[0]+=".dt");var e=g(this.tables().nodes());e[b].apply(e,a);return this})});r("clear()",function(){return this.iterator("table",function(a){na(a)})});r("settings()",function(){return new q(this.context,this.context)});r("data()",function(){return this.iterator("table",
+function(a){return C(a.aoData,"_aData")}).flatten()});r("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,e=b.oClasses,d=b.nTable,f=b.nTBody,h=b.nTHead,i=b.nTFoot,j=g(d),f=g(f),l=g(b.nTableWrapper),m=g.map(b.aoData,function(a){return a.nTr}),o;b.bDestroying=!0;u(b,"aoDestroyCallback","destroy",[b]);a||(new q(b)).columns().visible(!0);l.unbind(".DT").find(":not(tbody *)").unbind(".DT");g(Da).unbind(".DT-"+b.sInstance);d!=h.parentNode&&(j.children("thead").detach(),
+j.append(h));i&&d!=i.parentNode&&(j.children("tfoot").detach(),j.append(i));j.detach();l.detach();b.aaSorting=[];b.aaSortingFixed=[];wa(b);g(m).removeClass(b.asStripeClasses.join(" "));g("th, td",h).removeClass(e.sSortable+" "+e.sSortableAsc+" "+e.sSortableDesc+" "+e.sSortableNone);b.bJUI&&(g("th span."+e.sSortIcon+", td span."+e.sSortIcon,h).detach(),g("th, td",h).each(function(){var a=g("div."+e.sSortJUIWrapper,this);g(this).append(a.contents());a.detach()}));!a&&c&&c.insertBefore(d,b.nTableReinsertBefore);
+f.children().detach();f.append(m);j.css("width",b.sDestroyWidth).removeClass(e.sTable);(o=b.asDestroyStripes.length)&&f.children().each(function(a){g(this).addClass(b.asDestroyStripes[a%o])});c=g.inArray(b,p.settings);-1!==c&&p.settings.splice(c,1)})});p.version="1.10.4";p.settings=[];p.models={};p.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};p.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null};p.models.oColumn=
+{idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};p.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,
+aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,
+fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,
+iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",
+sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:g.extend({},p.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null};V(p.defaults);p.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,
+bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};V(p.defaults.column);p.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},
+oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],
+sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:l,oAjaxData:l,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,
+_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==A(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==A(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,e=this.aiDisplay.length,d=this.oFeatures,f=d.bPaginate;return d.bServerSide?!1===f||-1===a?b+e:
+Math.min(b+a,this._iRecordsDisplay):!f||c>e||-1===a?e:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{}};p.ext=w={classes:{},errMode:"alert",feature:[],search:[],internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:p.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:p.version};g.extend(w,{afnFiltering:w.search,aTypes:w.type.detect,ofnSearch:w.type.search,
+oSort:w.type.order,afnSortData:w.order,aoFeatures:w.feature,oApi:w.internal,oStdClasses:w.classes,oPagination:w.pager});g.extend(p.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",
+sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",
+sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Ca="",Ca="",E=Ca+"ui-state-default",ia=Ca+"css_right ui-icon ui-icon-",Wb=Ca+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";g.extend(p.ext.oJUIClasses,p.ext.classes,{sPageButton:"fg-button ui-button "+E,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",
+sSortAsc:E+" sorting_asc",sSortDesc:E+" sorting_desc",sSortable:E+" sorting",sSortableAsc:E+" sorting_asc_disabled",sSortableDesc:E+" sorting_desc_disabled",sSortableNone:E+" sorting_disabled",sSortJUIAsc:ia+"triangle-1-n",sSortJUIDesc:ia+"triangle-1-s",sSortJUI:ia+"carat-2-n-s",sSortJUIAscAllowed:ia+"carat-1-n",sSortJUIDescAllowed:ia+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+E,sScrollFoot:"dataTables_scrollFoot "+E,
+sHeaderTH:E,sFooterTH:E,sJUIHeader:Wb+" ui-corner-tl ui-corner-tr",sJUIFooter:Wb+" ui-corner-bl ui-corner-br"});var Lb=p.ext.pager;g.extend(Lb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},simple_numbers:function(a,b){return["previous",Va(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Va(a,b),"next","last"]},_numbers:Va,numbers_length:7});g.extend(!0,p.ext.renderer,{pageButton:{_:function(a,b,c,e,d,f){var h=a.oClasses,i=
+a.oLanguage.oPaginate,j,l,m=0,o=function(b,e){var k,p,r,q,s=function(b){Sa(a,b.data.action,true)};k=0;for(p=e.length;k<p;k++){q=e[k];if(g.isArray(q)){r=g("<"+(q.DT_el||"div")+"/>").appendTo(b);o(r,q)}else{l=j="";switch(q){case "ellipsis":b.append("<span>&hellip;</span>");break;case "first":j=i.sFirst;l=q+(d>0?"":" "+h.sPageButtonDisabled);break;case "previous":j=i.sPrevious;l=q+(d>0?"":" "+h.sPageButtonDisabled);break;case "next":j=i.sNext;l=q+(d<f-1?"":" "+h.sPageButtonDisabled);break;case "last":j=
+i.sLast;l=q+(d<f-1?"":" "+h.sPageButtonDisabled);break;default:j=q+1;l=d===q?h.sPageButtonActive:""}if(j){r=g("<a>",{"class":h.sPageButton+" "+l,"aria-controls":a.sTableId,"data-dt-idx":m,tabindex:a.iTabIndex,id:c===0&&typeof q==="string"?a.sTableId+"_"+q:null}).html(j).appendTo(b);Ua(r,{action:q},s);m++}}}};try{var k=g(P.activeElement).data("dt-idx");o(g(b).empty(),e);k!==null&&g(b).find("[data-dt-idx="+k+"]").focus()}catch(p){}}}});g.extend(p.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;
+return Ya(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!$b.test(a)||!ac.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||H(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return Ya(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c,!0)?"html-num-fmt"+c:null},function(a){return H(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);g.extend(p.ext.type.search,
+{html:function(a){return H(a)?a:"string"===typeof a?a.replace(Nb," ").replace(Aa,""):""},string:function(a){return H(a)?a:"string"===typeof a?a.replace(Nb," "):a}});var za=function(a,b,c,e){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Pb(a,b));a.replace&&(c&&(a=a.replace(c,"")),e&&(a=a.replace(e,"")));return 1*a};g.extend(w.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return H(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return H(a)?
+"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0}});cb("");g.extend(!0,p.ext.renderer,{header:{_:function(a,b,c,e){g(a.nTable).on("order.dt.DT",function(d,f,h,g){if(a===f){d=c.idx;b.removeClass(c.sSortingClass+" "+e.sSortAsc+" "+e.sSortDesc).addClass(g[d]=="asc"?e.sSortAsc:g[d]=="desc"?e.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,e){g("<div/>").addClass(e.sSortJUIWrapper).append(b.contents()).append(g("<span/>").addClass(e.sSortIcon+
+" "+c.sSortingClassJUI)).appendTo(b);g(a.nTable).on("order.dt.DT",function(d,f,g,i){if(a===f){d=c.idx;b.removeClass(e.sSortAsc+" "+e.sSortDesc).addClass(i[d]=="asc"?e.sSortAsc:i[d]=="desc"?e.sSortDesc:c.sSortingClass);b.find("span."+e.sSortIcon).removeClass(e.sSortJUIAsc+" "+e.sSortJUIDesc+" "+e.sSortJUI+" "+e.sSortJUIAscAllowed+" "+e.sSortJUIDescAllowed).addClass(i[d]=="asc"?e.sSortJUIAsc:i[d]=="desc"?e.sSortJUIDesc:c.sSortingClassJUI)}})}}});p.render={number:function(a,b,c,e){return{display:function(d){var f=
+0>d?"-":"",d=Math.abs(parseFloat(d)),g=parseInt(d,10),d=c?b+(d-g).toFixed(c).substring(2):"";return f+(e||"")+g.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+d}}}};g.extend(p.ext.internal,{_fnExternApiFunc:Mb,_fnBuildAjax:qa,_fnAjaxUpdate:jb,_fnAjaxParameters:sb,_fnAjaxUpdateDraw:tb,_fnAjaxDataSrc:ra,_fnAddColumn:Ea,_fnColumnOptions:ja,_fnAdjustColumnSizing:X,_fnVisibleToColumnIndex:ka,_fnColumnIndexToVisible:$,_fnVisbleColumns:aa,_fnGetColumns:Z,_fnColumnTypes:Ga,_fnApplyColumnDefs:hb,_fnHungarianMap:V,
+_fnCamelToHungarian:G,_fnLanguageCompat:O,_fnBrowserDetect:fb,_fnAddData:I,_fnAddTr:la,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==l?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return g.inArray(c,a.aoData[b].anCells)},_fnGetCellData:v,_fnSetCellData:Ha,_fnSplitObjNotation:Ja,_fnGetObjectDataFn:W,_fnSetObjectDataFn:Q,_fnGetDataMaster:Ka,_fnClearTable:na,_fnDeleteIndex:oa,_fnInvalidate:ca,_fnGetRowElements:ma,_fnCreateTr:Ia,_fnBuildHead:ib,_fnDrawHead:ea,_fnDraw:L,_fnReDraw:M,
+_fnAddOptionsHtml:lb,_fnDetectHeader:da,_fnGetUniqueThs:pa,_fnFeatureHtmlFilter:nb,_fnFilterComplete:fa,_fnFilterCustom:wb,_fnFilterColumn:vb,_fnFilter:ub,_fnFilterCreateSearch:Pa,_fnEscapeRegex:ua,_fnFilterData:xb,_fnFeatureHtmlInfo:qb,_fnUpdateInfo:Ab,_fnInfoMacros:Bb,_fnInitialise:ga,_fnInitComplete:sa,_fnLengthChange:Qa,_fnFeatureHtmlLength:mb,_fnFeatureHtmlPaginate:rb,_fnPageChange:Sa,_fnFeatureHtmlProcessing:ob,_fnProcessingDisplay:B,_fnFeatureHtmlTable:pb,_fnScrollDraw:Y,_fnApplyToChildren:F,
+_fnCalculateColumnWidths:Fa,_fnThrottle:ta,_fnConvertToWidth:Cb,_fnScrollingWidthAdjust:Eb,_fnGetWidestNode:Db,_fnGetMaxLenString:Fb,_fnStringToCss:s,_fnScrollBarWidth:Gb,_fnSortFlatten:T,_fnSort:kb,_fnSortAria:Ib,_fnSortListener:Ta,_fnSortAttachListener:Na,_fnSortingClasses:wa,_fnSortData:Hb,_fnSaveState:xa,_fnLoadState:Jb,_fnSettingsFromNode:ya,_fnLog:R,_fnMap:D,_fnBindAction:Ua,_fnCallbackReg:x,_fnCallbackFire:u,_fnLengthOverflow:Ra,_fnRenderer:Oa,_fnDataSource:A,_fnRowAttributes:La,_fnCalculateEnd:function(){}});
+g.fn.dataTable=p;g.fn.dataTableSettings=p.settings;g.fn.dataTableExt=p.ext;g.fn.DataTable=function(a){return g(this).dataTable(a).api()};g.each(p,function(a,b){g.fn.DataTable[a]=b});return g.fn.dataTable};"function"===typeof define&&define.amd?define("datatables",["jquery"],O):"object"===typeof exports?O(require("jquery")):jQuery&&!jQuery.fn.dataTable&&O(jQuery)})(window,document);


[23/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.fileupload.local.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.fileupload.local.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.fileupload.local.js
new file mode 100644
index 0000000..cb20853
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery.fileupload.local.js
@@ -0,0 +1,1428 @@
+/*
+ * jQuery File Upload Plugin 5.40.1
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2010, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ */
+
+/* jshint nomen:false */
+/* global define, window, document, location, Blob, FormData */
+
+(function (factory) {
+    'use strict';
+    if (typeof define === 'function' && define.amd) {
+        // Register as an anonymous AMD module:
+        define([
+            'jquery',
+            'jquery.ui.widget'
+        ], factory);
+    } else {
+        // Browser globals:
+        factory(window.jQuery);
+    }
+}(function ($) {
+    'use strict';
+
+    // Detect file input support, based on
+    // http://viljamis.com/blog/2012/file-upload-support-on-mobile/
+    $.support.fileInput = !(new RegExp(
+        // Handle devices which give false positives for the feature detection:
+        '(Android (1\\.[0156]|2\\.[01]))' +
+            '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' +
+            '|(w(eb)?OSBrowser)|(webOS)' +
+            '|(Kindle/(1\\.0|2\\.[05]|3\\.0))'
+    ).test(window.navigator.userAgent) ||
+        // Feature detection for all other devices:
+        $('<input type="file">').prop('disabled'));
+
+    // The FileReader API is not actually used, but works as feature detection,
+    // as some Safari versions (5?) support XHR file uploads via the FormData API,
+    // but not non-multipart XHR file uploads.
+    // window.XMLHttpRequestUpload is not available on IE10, so we check for
+    // window.ProgressEvent instead to detect XHR2 file upload capability:
+    $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader);
+    $.support.xhrFormDataFileUpload = !!window.FormData;
+
+    // Detect support for Blob slicing (required for chunked uploads):
+    $.support.blobSlice = window.Blob && (Blob.prototype.slice ||
+        Blob.prototype.webkitSlice || Blob.prototype.mozSlice);
+
+    // The fileupload widget listens for change events on file input fields defined
+    // via fileInput setting and paste or drop events of the given dropZone.
+    // In addition to the default jQuery Widget methods, the fileupload widget
+    // exposes the "add" and "send" methods, to add or directly send files using
+    // the fileupload API.
+    // By default, files added via file input selection, paste, drag & drop or
+    // "add" method are uploaded immediately, but it is possible to override
+    // the "add" callback option to queue file uploads.
+    $.widget('blueimp.fileupload', {
+
+        options: {
+            // The drop target element(s), by the default the complete document.
+            // Set to null to disable drag & drop support:
+            dropZone: $(document),
+            // The paste target element(s), by the default the complete document.
+            // Set to null to disable paste support:
+            pasteZone: $(document),
+            // The file input field(s), that are listened to for change events.
+            // If undefined, it is set to the file input fields inside
+            // of the widget element on plugin initialization.
+            // Set to null to disable the change listener.
+            fileInput: undefined,
+            // By default, the file input field is replaced with a clone after
+            // each input field change event. This is required for iframe transport
+            // queues and allows change events to be fired for the same file
+            // selection, but can be disabled by setting the following option to false:
+            replaceFileInput: true,
+            // The parameter name for the file form data (the request argument name).
+            // If undefined or empty, the name property of the file input field is
+            // used, or "files[]" if the file input name property is also empty,
+            // can be a string or an array of strings:
+            paramName: undefined,
+            // By default, each file of a selection is uploaded using an individual
+            // request for XHR type uploads. Set to false to upload file
+            // selections in one request each:
+            singleFileUploads: true,
+            // To limit the number of files uploaded with one XHR request,
+            // set the following option to an integer greater than 0:
+            limitMultiFileUploads: undefined,
+            // The following option limits the number of files uploaded with one
+            // XHR request to keep the request size under or equal to the defined
+            // limit in bytes:
+            limitMultiFileUploadSize: undefined,
+            // Multipart file uploads add a number of bytes to each uploaded file,
+            // therefore the following option adds an overhead for each file used
+            // in the limitMultiFileUploadSize configuration:
+            limitMultiFileUploadSizeOverhead: 512,
+            // Set the following option to true to issue all file upload requests
+            // in a sequential order:
+            sequentialUploads: false,
+            // To limit the number of concurrent uploads,
+            // set the following option to an integer greater than 0:
+            limitConcurrentUploads: undefined,
+            // Set the following option to true to force iframe transport uploads:
+            forceIframeTransport: false,
+            // Set the following option to the location of a redirect url on the
+            // origin server, for cross-domain iframe transport uploads:
+            redirect: undefined,
+            // The parameter name for the redirect url, sent as part of the form
+            // data and set to 'redirect' if this option is empty:
+            redirectParamName: undefined,
+            // Set the following option to the location of a postMessage window,
+            // to enable postMessage transport uploads:
+            postMessage: undefined,
+            // By default, XHR file uploads are sent as multipart/form-data.
+            // The iframe transport is always using multipart/form-data.
+            // Set to false to enable non-multipart XHR uploads:
+            multipart: true,
+            // To upload large files in smaller chunks, set the following option
+            // to a preferred maximum chunk size. If set to 0, null or undefined,
+            // or the browser does not support the required Blob API, files will
+            // be uploaded as a whole.
+            maxChunkSize: undefined,
+            // When a non-multipart upload or a chunked multipart upload has been
+            // aborted, this option can be used to resume the upload by setting
+            // it to the size of the already uploaded bytes. This option is most
+            // useful when modifying the options object inside of the "add" or
+            // "send" callbacks, as the options are cloned for each file upload.
+            uploadedBytes: undefined,
+            // By default, failed (abort or error) file uploads are removed from the
+            // global progress calculation. Set the following option to false to
+            // prevent recalculating the global progress data:
+            recalculateProgress: true,
+            // Interval in milliseconds to calculate and trigger progress events:
+            progressInterval: 100,
+            // Interval in milliseconds to calculate progress bitrate:
+            bitrateInterval: 500,
+            // By default, uploads are started automatically when adding files:
+            autoUpload: true,
+
+            // Error and info messages:
+            messages: {
+                uploadedBytes: 'Uploaded bytes exceed file size'
+            },
+
+            // Translation function, gets the message key to be translated
+            // and an object with context specific data as arguments:
+            i18n: function (message, context) {
+                message = this.messages[message] || message.toString();
+                if (context) {
+                    $.each(context, function (key, value) {
+                        message = message.replace('{' + key + '}', value);
+                    });
+                }
+                return message;
+            },
+
+            // Additional form data to be sent along with the file uploads can be set
+            // using this option, which accepts an array of objects with name and
+            // value properties, a function returning such an array, a FormData
+            // object (for XHR file uploads), or a simple object.
+            // The form of the first fileInput is given as parameter to the function:
+            formData: function (form) {
+                return form.serializeArray();
+            },
+
+            // The add callback is invoked as soon as files are added to the fileupload
+            // widget (via file input selection, drag & drop, paste or add API call).
+            // If the singleFileUploads option is enabled, this callback will be
+            // called once for each file in the selection for XHR file uploads, else
+            // once for each file selection.
+            //
+            // The upload starts when the submit method is invoked on the data parameter.
+            // The data object contains a files property holding the added files
+            // and allows you to override plugin options as well as define ajax settings.
+            //
+            // Listeners for this callback can also be bound the following way:
+            // .bind('fileuploadadd', func);
+            //
+            // data.submit() returns a Promise object and allows to attach additional
+            // handlers using jQuery's Deferred callbacks:
+            // data.submit().done(func).fail(func).always(func);
+            add: function (e, data) {
+                if (e.isDefaultPrevented()) {
+                    return false;
+                }
+                if (data.autoUpload || (data.autoUpload !== false &&
+                        $(this).fileupload('option', 'autoUpload'))) {
+                    data.process().done(function () {
+                        data.submit();
+                    });
+                }
+            },
+
+            // Other callbacks:
+
+            // Callback for the submit event of each file upload:
+            // submit: function (e, data) {}, // .bind('fileuploadsubmit', func);
+
+            // Callback for the start of each file upload request:
+            // send: function (e, data) {}, // .bind('fileuploadsend', func);
+
+            // Callback for successful uploads:
+            // done: function (e, data) {}, // .bind('fileuploaddone', func);
+
+            // Callback for failed (abort or error) uploads:
+            // fail: function (e, data) {}, // .bind('fileuploadfail', func);
+
+            // Callback for completed (success, abort or error) requests:
+            // always: function (e, data) {}, // .bind('fileuploadalways', func);
+
+            // Callback for upload progress events:
+            // progress: function (e, data) {}, // .bind('fileuploadprogress', func);
+
+            // Callback for global upload progress events:
+            // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func);
+
+            // Callback for uploads start, equivalent to the global ajaxStart event:
+            // start: function (e) {}, // .bind('fileuploadstart', func);
+
+            // Callback for uploads stop, equivalent to the global ajaxStop event:
+            // stop: function (e) {}, // .bind('fileuploadstop', func);
+
+            // Callback for change events of the fileInput(s):
+            // change: function (e, data) {}, // .bind('fileuploadchange', func);
+
+            // Callback for paste events to the pasteZone(s):
+            // paste: function (e, data) {}, // .bind('fileuploadpaste', func);
+
+            // Callback for drop events of the dropZone(s):
+            // drop: function (e, data) {}, // .bind('fileuploaddrop', func);
+
+            // Callback for dragover events of the dropZone(s):
+            // dragover: function (e) {}, // .bind('fileuploaddragover', func);
+
+            // Callback for the start of each chunk upload request:
+            // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func);
+
+            // Callback for successful chunk uploads:
+            // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func);
+
+            // Callback for failed (abort or error) chunk uploads:
+            // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func);
+
+            // Callback for completed (success, abort or error) chunk upload requests:
+            // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func);
+
+            // The plugin options are used as settings object for the ajax calls.
+            // The following are jQuery ajax settings required for the file uploads:
+            processData: false,
+            contentType: false,
+            cache: false
+        },
+
+        // A list of options that require reinitializing event listeners and/or
+        // special initialization code:
+        _specialOptions: [
+            'fileInput',
+            'dropZone',
+            'pasteZone',
+            'multipart',
+            'forceIframeTransport'
+        ],
+
+        _blobSlice: $.support.blobSlice && function () {
+            var slice = this.slice || this.webkitSlice || this.mozSlice;
+            return slice.apply(this, arguments);
+        },
+
+        _BitrateTimer: function () {
+            this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime());
+            this.loaded = 0;
+            this.bitrate = 0;
+            this.getBitrate = function (now, loaded, interval) {
+                var timeDiff = now - this.timestamp;
+                if (!this.bitrate || !interval || timeDiff > interval) {
+                    this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;
+                    this.loaded = loaded;
+                    this.timestamp = now;
+                }
+                return this.bitrate;
+            };
+        },
+
+        _isXHRUpload: function (options) {
+            return !options.forceIframeTransport &&
+                ((!options.multipart && $.support.xhrFileUpload) ||
+                $.support.xhrFormDataFileUpload);
+        },
+
+        _getFormData: function (options) {
+            var formData;
+            if ($.type(options.formData) === 'function') {
+                return options.formData(options.form);
+            }
+            if ($.isArray(options.formData)) {
+                return options.formData;
+            }
+            if ($.type(options.formData) === 'object') {
+                formData = [];
+                $.each(options.formData, function (name, value) {
+                    formData.push({name: name, value: value});
+                });
+                return formData;
+            }
+            return [];
+        },
+
+        _getTotal: function (files) {
+            var total = 0;
+            $.each(files, function (index, file) {
+                total += file.size || 1;
+            });
+            return total;
+        },
+
+        _initProgressObject: function (obj) {
+            var progress = {
+                loaded: 0,
+                total: 0,
+                bitrate: 0
+            };
+            if (obj._progress) {
+                $.extend(obj._progress, progress);
+            } else {
+                obj._progress = progress;
+            }
+        },
+
+        _initResponseObject: function (obj) {
+            var prop;
+            if (obj._response) {
+                for (prop in obj._response) {
+                    if (obj._response.hasOwnProperty(prop)) {
+                        delete obj._response[prop];
+                    }
+                }
+            } else {
+                obj._response = {};
+            }
+        },
+
+        _onProgress: function (e, data) {
+            if (e.lengthComputable) {
+                var now = ((Date.now) ? Date.now() : (new Date()).getTime()),
+                    loaded;
+                if (data._time && data.progressInterval &&
+                        (now - data._time < data.progressInterval) &&
+                        e.loaded !== e.total) {
+                    return;
+                }
+                data._time = now;
+                loaded = Math.floor(
+                    e.loaded / e.total * (data.chunkSize || data._progress.total)
+                ) + (data.uploadedBytes || 0);
+                // Add the difference from the previously loaded state
+                // to the global loaded counter:
+                this._progress.loaded += (loaded - data._progress.loaded);
+                this._progress.bitrate = this._bitrateTimer.getBitrate(
+                    now,
+                    this._progress.loaded,
+                    data.bitrateInterval
+                );
+                data._progress.loaded = data.loaded = loaded;
+                data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate(
+                    now,
+                    loaded,
+                    data.bitrateInterval
+                );
+                // Trigger a custom progress event with a total data property set
+                // to the file size(s) of the current upload and a loaded data
+                // property calculated accordingly:
+                this._trigger(
+                    'progress',
+                    $.Event('progress', {delegatedEvent: e}),
+                    data
+                );
+                // Trigger a global progress event for all current file uploads,
+                // including ajax calls queued for sequential file uploads:
+                this._trigger(
+                    'progressall',
+                    $.Event('progressall', {delegatedEvent: e}),
+                    this._progress
+                );
+            }
+        },
+
+        _initProgressListener: function (options) {
+            var that = this,
+                xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
+            // Accesss to the native XHR object is required to add event listeners
+            // for the upload progress event:
+            if (xhr.upload) {
+                $(xhr.upload).bind('progress', function (e) {
+                    var oe = e.originalEvent;
+                    // Make sure the progress event properties get copied over:
+                    e.lengthComputable = oe.lengthComputable;
+                    e.loaded = oe.loaded;
+                    e.total = oe.total;
+                    that._onProgress(e, options);
+                });
+                options.xhr = function () {
+                    return xhr;
+                };
+            }
+        },
+
+        _isInstanceOf: function (type, obj) {
+            // Cross-frame instanceof check
+            return Object.prototype.toString.call(obj) === '[object ' + type + ']';
+        },
+
+        _initXHRData: function (options) {
+            var that = this,
+                formData,
+                file = options.files[0],
+                // Ignore non-multipart setting if not supported:
+                multipart = options.multipart || !$.support.xhrFileUpload,
+                paramName = $.type(options.paramName) === 'array' ?
+                    options.paramName[0] : options.paramName;
+            options.headers = $.extend({}, options.headers);
+            if (options.contentRange) {
+                options.headers['Content-Range'] = options.contentRange;
+            }
+            if (!multipart || options.blob || !this._isInstanceOf('File', file)) {
+                options.headers['Content-Disposition'] = 'attachment; filename="' +
+                    encodeURI(file.name) + '"';
+            }
+            if (!multipart) {
+                options.contentType = file.type || 'application/octet-stream';
+                options.data = options.blob || file;
+            } else if ($.support.xhrFormDataFileUpload) {
+                if (options.postMessage) {
+                    // window.postMessage does not allow sending FormData
+                    // objects, so we just add the File/Blob objects to
+                    // the formData array and let the postMessage window
+                    // create the FormData object out of this array:
+                    formData = this._getFormData(options);
+                    if (options.blob) {
+                        formData.push({
+                            name: paramName,
+                            value: options.blob
+                        });
+                    } else {
+                        $.each(options.files, function (index, file) {
+                            formData.push({
+                                name: ($.type(options.paramName) === 'array' &&
+                                    options.paramName[index]) || paramName,
+                                value: file
+                            });
+                        });
+                    }
+                } else {
+                    if (that._isInstanceOf('FormData', options.formData)) {
+                        formData = options.formData;
+                    } else {
+                        formData = new FormData();
+                        $.each(this._getFormData(options), function (index, field) {
+                            formData.append(field.name, field.value);
+                        });
+                    }
+                    if (options.blob) {
+                        formData.append(paramName, options.blob, file.name);
+                    } else {
+                        $.each(options.files, function (index, file) {
+                            // This check allows the tests to run with
+                            // dummy objects:
+                            if (that._isInstanceOf('File', file) ||
+                                    that._isInstanceOf('Blob', file)) {
+                                formData.append(
+                                    ($.type(options.paramName) === 'array' &&
+                                        options.paramName[index]) || paramName,
+                                    file,
+                                    file.uploadName || file.name
+                                );
+                            }
+                        });
+                    }
+                }
+                options.data = formData;
+            }
+            // Blob reference is not needed anymore, free memory:
+            options.blob = null;
+        },
+
+        _initIframeSettings: function (options) {
+            var targetHost = $('<a></a>').prop('href', options.url).prop('host');
+            // Setting the dataType to iframe enables the iframe transport:
+            options.dataType = 'iframe ' + (options.dataType || '');
+            // The iframe transport accepts a serialized array as form data:
+            options.formData = this._getFormData(options);
+            // Add redirect url to form data on cross-domain uploads:
+            if (options.redirect && targetHost && targetHost !== location.host) {
+                options.formData.push({
+                    name: options.redirectParamName || 'redirect',
+                    value: options.redirect
+                });
+            }
+        },
+
+        _initDataSettings: function (options) {
+            if (this._isXHRUpload(options)) {
+                if (!this._chunkedUpload(options, true)) {
+                    if (!options.data) {
+                        this._initXHRData(options);
+                    }
+                    this._initProgressListener(options);
+                }
+                if (options.postMessage) {
+                    // Setting the dataType to postmessage enables the
+                    // postMessage transport:
+                    options.dataType = 'postmessage ' + (options.dataType || '');
+                }
+            } else {
+                this._initIframeSettings(options);
+            }
+        },
+
+        _getParamName: function (options) {
+            var fileInput = $(options.fileInput),
+                paramName = options.paramName;
+            if (!paramName) {
+                paramName = [];
+                fileInput.each(function () {
+                    var input = $(this),
+                        name = input.prop('name') || 'files[]',
+                        i = (input.prop('files') || [1]).length;
+                    while (i) {
+                        paramName.push(name);
+                        i -= 1;
+                    }
+                });
+                if (!paramName.length) {
+                    paramName = [fileInput.prop('name') || 'files[]'];
+                }
+            } else if (!$.isArray(paramName)) {
+                paramName = [paramName];
+            }
+            return paramName;
+        },
+
+        _initFormSettings: function (options) {
+            // Retrieve missing options from the input field and the
+            // associated form, if available:
+            if (!options.form || !options.form.length) {
+                options.form = $(options.fileInput.prop('form'));
+                // If the given file input doesn't have an associated form,
+                // use the default widget file input's form:
+                if (!options.form.length) {
+                    options.form = $(this.options.fileInput.prop('form'));
+                }
+            }
+            options.paramName = this._getParamName(options);
+            if (!options.url) {
+                var x = $("[id=uploadEndpoint]").val() ;
+                options.url = x ;
+                //options.url = options.form.prop('action') || location.href;
+            }
+            // The HTTP request method must be "POST" or "PUT":
+            options.type = (options.type ||
+                ($.type(options.form.prop('method')) === 'string' &&
+                    options.form.prop('method')) || ''
+                ).toUpperCase();
+            if (options.type !== 'POST' && options.type !== 'PUT' &&
+                    options.type !== 'PATCH') {
+                options.type = 'POST';
+            }
+            if (!options.formAcceptCharset) {
+                options.formAcceptCharset = options.form.attr('accept-charset');
+            }
+        },
+
+        _getAJAXSettings: function (data) {
+            var options = $.extend({}, this.options, data);
+            this._initFormSettings(options);
+            this._initDataSettings(options);
+            return options;
+        },
+
+        // jQuery 1.6 doesn't provide .state(),
+        // while jQuery 1.8+ removed .isRejected() and .isResolved():
+        _getDeferredState: function (deferred) {
+            if (deferred.state) {
+                return deferred.state();
+            }
+            if (deferred.isResolved()) {
+                return 'resolved';
+            }
+            if (deferred.isRejected()) {
+                return 'rejected';
+            }
+            return 'pending';
+        },
+
+        // Maps jqXHR callbacks to the equivalent
+        // methods of the given Promise object:
+        _enhancePromise: function (promise) {
+            promise.success = promise.done;
+            promise.error = promise.fail;
+            promise.complete = promise.always;
+            return promise;
+        },
+
+        // Creates and returns a Promise object enhanced with
+        // the jqXHR methods abort, success, error and complete:
+        _getXHRPromise: function (resolveOrReject, context, args) {
+            var dfd = $.Deferred(),
+                promise = dfd.promise();
+            context = context || this.options.context || promise;
+            if (resolveOrReject === true) {
+                dfd.resolveWith(context, args);
+            } else if (resolveOrReject === false) {
+                dfd.rejectWith(context, args);
+            }
+            promise.abort = dfd.promise;
+            return this._enhancePromise(promise);
+        },
+
+        // Adds convenience methods to the data callback argument:
+        _addConvenienceMethods: function (e, data) {
+            var that = this,
+                getPromise = function (args) {
+                    return $.Deferred().resolveWith(that, args).promise();
+                };
+            data.process = function (resolveFunc, rejectFunc) {
+                if (resolveFunc || rejectFunc) {
+                    data._processQueue = this._processQueue =
+                        (this._processQueue || getPromise([this])).pipe(
+                            function () {
+                                if (data.errorThrown) {
+                                    return $.Deferred()
+                                        .rejectWith(that, [data]).promise();
+                                }
+                                return getPromise(arguments);
+                            }
+                        ).pipe(resolveFunc, rejectFunc);
+                }
+                return this._processQueue || getPromise([this]);
+            };
+            data.submit = function () {
+                if (this.state() !== 'pending') {
+                    data.jqXHR = this.jqXHR =
+                        (that._trigger(
+                            'submit',
+                            $.Event('submit', {delegatedEvent: e}),
+                            this
+                        ) !== false) && that._onSend(e, this);
+                }
+                return this.jqXHR || that._getXHRPromise();
+            };
+            data.abort = function () {
+                if (this.jqXHR) {
+                    return this.jqXHR.abort();
+                }
+                this.errorThrown = 'abort';
+                that._trigger('fail', null, this);
+                return that._getXHRPromise(false);
+            };
+            data.state = function () {
+                if (this.jqXHR) {
+                    return that._getDeferredState(this.jqXHR);
+                }
+                if (this._processQueue) {
+                    return that._getDeferredState(this._processQueue);
+                }
+            };
+            data.processing = function () {
+                return !this.jqXHR && this._processQueue && that
+                    ._getDeferredState(this._processQueue) === 'pending';
+            };
+            data.progress = function () {
+                return this._progress;
+            };
+            data.response = function () {
+                return this._response;
+            };
+        },
+
+        // Parses the Range header from the server response
+        // and returns the uploaded bytes:
+        _getUploadedBytes: function (jqXHR) {
+            var range = jqXHR.getResponseHeader('Range'),
+                parts = range && range.split('-'),
+                upperBytesPos = parts && parts.length > 1 &&
+                    parseInt(parts[1], 10);
+            return upperBytesPos && upperBytesPos + 1;
+        },
+
+        // Uploads a file in multiple, sequential requests
+        // by splitting the file up in multiple blob chunks.
+        // If the second parameter is true, only tests if the file
+        // should be uploaded in chunks, but does not invoke any
+        // upload requests:
+        _chunkedUpload: function (options, testOnly) {
+            options.uploadedBytes = options.uploadedBytes || 0;
+            var that = this,
+                file = options.files[0],
+                fs = file.size,
+                ub = options.uploadedBytes,
+                mcs = options.maxChunkSize || fs,
+                slice = this._blobSlice,
+                dfd = $.Deferred(),
+                promise = dfd.promise(),
+                jqXHR,
+                upload;
+            if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||
+                    options.data) {
+                return false;
+            }
+            if (testOnly) {
+                return true;
+            }
+            if (ub >= fs) {
+                file.error = options.i18n('uploadedBytes');
+                return this._getXHRPromise(
+                    false,
+                    options.context,
+                    [null, 'error', file.error]
+                );
+            }
+            // The chunk upload method:
+            upload = function () {
+                // Clone the options object for each chunk upload:
+                var o = $.extend({}, options),
+                    currentLoaded = o._progress.loaded;
+                o.blob = slice.call(
+                    file,
+                    ub,
+                    ub + mcs,
+                    file.type
+                );
+                // Store the current chunk size, as the blob itself
+                // will be dereferenced after data processing:
+                o.chunkSize = o.blob.size;
+                // Expose the chunk bytes position range:
+                o.contentRange = 'bytes ' + ub + '-' +
+                    (ub + o.chunkSize - 1) + '/' + fs;
+                // Process the upload data (the blob and potential form data):
+                that._initXHRData(o);
+                // Add progress listeners for this chunk upload:
+                that._initProgressListener(o);
+                jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||
+                        that._getXHRPromise(false, o.context))
+                    .done(function (result, textStatus, jqXHR) {
+                        ub = that._getUploadedBytes(jqXHR) ||
+                            (ub + o.chunkSize);
+                        // Create a progress event if no final progress event
+                        // with loaded equaling total has been triggered
+                        // for this chunk:
+                        if (currentLoaded + o.chunkSize - o._progress.loaded) {
+                            that._onProgress($.Event('progress', {
+                                lengthComputable: true,
+                                loaded: ub - o.uploadedBytes,
+                                total: ub - o.uploadedBytes
+                            }), o);
+                        }
+                        options.uploadedBytes = o.uploadedBytes = ub;
+                        o.result = result;
+                        o.textStatus = textStatus;
+                        o.jqXHR = jqXHR;
+                        that._trigger('chunkdone', null, o);
+                        that._trigger('chunkalways', null, o);
+                        if (ub < fs) {
+                            // File upload not yet complete,
+                            // continue with the next chunk:
+                            upload();
+                        } else {
+                            dfd.resolveWith(
+                                o.context,
+                                [result, textStatus, jqXHR]
+                            );
+                        }
+                    })
+                    .fail(function (jqXHR, textStatus, errorThrown) {
+                        o.jqXHR = jqXHR;
+                        o.textStatus = textStatus;
+                        o.errorThrown = errorThrown;
+                        that._trigger('chunkfail', null, o);
+                        that._trigger('chunkalways', null, o);
+                        dfd.rejectWith(
+                            o.context,
+                            [jqXHR, textStatus, errorThrown]
+                        );
+                    });
+            };
+            this._enhancePromise(promise);
+            promise.abort = function () {
+                return jqXHR.abort();
+            };
+            upload();
+            return promise;
+        },
+
+        _beforeSend: function (e, data) {
+            if (this._active === 0) {
+                // the start callback is triggered when an upload starts
+                // and no other uploads are currently running,
+                // equivalent to the global ajaxStart event:
+                this._trigger('start');
+                // Set timer for global bitrate progress calculation:
+                this._bitrateTimer = new this._BitrateTimer();
+                // Reset the global progress values:
+                this._progress.loaded = this._progress.total = 0;
+                this._progress.bitrate = 0;
+            }
+            // Make sure the container objects for the .response() and
+            // .progress() methods on the data object are available
+            // and reset to their initial state:
+            this._initResponseObject(data);
+            this._initProgressObject(data);
+            data._progress.loaded = data.loaded = data.uploadedBytes || 0;
+            data._progress.total = data.total = this._getTotal(data.files) || 1;
+            data._progress.bitrate = data.bitrate = 0;
+            this._active += 1;
+            // Initialize the global progress values:
+            this._progress.loaded += data.loaded;
+            this._progress.total += data.total;
+        },
+
+        _onDone: function (result, textStatus, jqXHR, options) {
+            var total = options._progress.total,
+                response = options._response;
+            if (options._progress.loaded < total) {
+                // Create a progress event if no final progress event
+                // with loaded equaling total has been triggered:
+                this._onProgress($.Event('progress', {
+                    lengthComputable: true,
+                    loaded: total,
+                    total: total
+                }), options);
+            }
+            response.result = options.result = result;
+            response.textStatus = options.textStatus = textStatus;
+            response.jqXHR = options.jqXHR = jqXHR;
+            this._trigger('done', null, options);
+        },
+
+        _onFail: function (jqXHR, textStatus, errorThrown, options) {
+            var response = options._response;
+            if (options.recalculateProgress) {
+                // Remove the failed (error or abort) file upload from
+                // the global progress calculation:
+                this._progress.loaded -= options._progress.loaded;
+                this._progress.total -= options._progress.total;
+            }
+            response.jqXHR = options.jqXHR = jqXHR;
+            response.textStatus = options.textStatus = textStatus;
+            response.errorThrown = options.errorThrown = errorThrown;
+            this._trigger('fail', null, options);
+        },
+
+        _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) {
+            // jqXHRorResult, textStatus and jqXHRorError are added to the
+            // options object via done and fail callbacks
+            this._trigger('always', null, options);
+        },
+
+        _onSend: function (e, data) {
+            if (!data.submit) {
+                this._addConvenienceMethods(e, data);
+            }
+            var that = this,
+                jqXHR,
+                aborted,
+                slot,
+                pipe,
+                options = that._getAJAXSettings(data),
+                send = function () {
+                    that._sending += 1;
+                    // Set timer for bitrate progress calculation:
+                    options._bitrateTimer = new that._BitrateTimer();
+                    jqXHR = jqXHR || (
+                        ((aborted || that._trigger(
+                            'send',
+                            $.Event('send', {delegatedEvent: e}),
+                            options
+                        ) === false) &&
+                        that._getXHRPromise(false, options.context, aborted)) ||
+                        that._chunkedUpload(options) || $.ajax(options)
+                    ).done(function (result, textStatus, jqXHR) {
+                        that._onDone(result, textStatus, jqXHR, options);
+                    }).fail(function (jqXHR, textStatus, errorThrown) {
+                        that._onFail(jqXHR, textStatus, errorThrown, options);
+                    }).always(function (jqXHRorResult, textStatus, jqXHRorError) {
+                        that._onAlways(
+                            jqXHRorResult,
+                            textStatus,
+                            jqXHRorError,
+                            options
+                        );
+                        that._sending -= 1;
+                        that._active -= 1;
+                        if (options.limitConcurrentUploads &&
+                                options.limitConcurrentUploads > that._sending) {
+                            // Start the next queued upload,
+                            // that has not been aborted:
+                            var nextSlot = that._slots.shift();
+                            while (nextSlot) {
+                                if (that._getDeferredState(nextSlot) === 'pending') {
+                                    nextSlot.resolve();
+                                    break;
+                                }
+                                nextSlot = that._slots.shift();
+                            }
+                        }
+                        if (that._active === 0) {
+                            // The stop callback is triggered when all uploads have
+                            // been completed, equivalent to the global ajaxStop event:
+                            that._trigger('stop');
+                        }
+                    });
+                    return jqXHR;
+                };
+            this._beforeSend(e, options);
+            if (this.options.sequentialUploads ||
+                    (this.options.limitConcurrentUploads &&
+                    this.options.limitConcurrentUploads <= this._sending)) {
+                if (this.options.limitConcurrentUploads > 1) {
+                    slot = $.Deferred();
+                    this._slots.push(slot);
+                    pipe = slot.pipe(send);
+                } else {
+                    this._sequence = this._sequence.pipe(send, send);
+                    pipe = this._sequence;
+                }
+                // Return the piped Promise object, enhanced with an abort method,
+                // which is delegated to the jqXHR object of the current upload,
+                // and jqXHR callbacks mapped to the equivalent Promise methods:
+                pipe.abort = function () {
+                    aborted = [undefined, 'abort', 'abort'];
+                    if (!jqXHR) {
+                        if (slot) {
+                            slot.rejectWith(options.context, aborted);
+                        }
+                        return send();
+                    }
+                    return jqXHR.abort();
+                };
+                return this._enhancePromise(pipe);
+            }
+            return send();
+        },
+
+        _onAdd: function (e, data) {
+            var that = this,
+                result = true,
+                options = $.extend({}, this.options, data),
+                files = data.files,
+                filesLength = files.length,
+                limit = options.limitMultiFileUploads,
+                limitSize = options.limitMultiFileUploadSize,
+                overhead = options.limitMultiFileUploadSizeOverhead,
+                batchSize = 0,
+                paramName = this._getParamName(options),
+                paramNameSet,
+                paramNameSlice,
+                fileSet,
+                i,
+                j = 0;
+            if (limitSize && (!filesLength || files[0].size === undefined)) {
+                limitSize = undefined;
+            }
+            if (!(options.singleFileUploads || limit || limitSize) ||
+                    !this._isXHRUpload(options)) {
+                fileSet = [files];
+                paramNameSet = [paramName];
+            } else if (!(options.singleFileUploads || limitSize) && limit) {
+                fileSet = [];
+                paramNameSet = [];
+                for (i = 0; i < filesLength; i += limit) {
+                    fileSet.push(files.slice(i, i + limit));
+                    paramNameSlice = paramName.slice(i, i + limit);
+                    if (!paramNameSlice.length) {
+                        paramNameSlice = paramName;
+                    }
+                    paramNameSet.push(paramNameSlice);
+                }
+            } else if (!options.singleFileUploads && limitSize) {
+                fileSet = [];
+                paramNameSet = [];
+                for (i = 0; i < filesLength; i = i + 1) {
+                    batchSize += files[i].size + overhead;
+                    if (i + 1 === filesLength ||
+                            ((batchSize + files[i + 1].size + overhead) > limitSize) ||
+                            (limit && i + 1 - j >= limit)) {
+                        fileSet.push(files.slice(j, i + 1));
+                        paramNameSlice = paramName.slice(j, i + 1);
+                        if (!paramNameSlice.length) {
+                            paramNameSlice = paramName;
+                        }
+                        paramNameSet.push(paramNameSlice);
+                        j = i + 1;
+                        batchSize = 0;
+                    }
+                }
+            } else {
+                paramNameSet = paramName;
+            }
+            data.originalFiles = files;
+            $.each(fileSet || files, function (index, element) {
+                var newData = $.extend({}, data);
+                newData.files = fileSet ? element : [element];
+                newData.paramName = paramNameSet[index];
+                that._initResponseObject(newData);
+                that._initProgressObject(newData);
+                that._addConvenienceMethods(e, newData);
+                result = that._trigger(
+                    'add',
+                    $.Event('add', {delegatedEvent: e}),
+                    newData
+                );
+                return result;
+            });
+            return result;
+        },
+
+        _replaceFileInput: function (input) {
+            var inputClone = input.clone(true);
+            $('<form></form>').append(inputClone)[0].reset();
+            // Detaching allows to insert the fileInput on another form
+            // without loosing the file input value:
+            input.after(inputClone).detach();
+            // Avoid memory leaks with the detached file input:
+            $.cleanData(input.unbind('remove'));
+            // Replace the original file input element in the fileInput
+            // elements set with the clone, which has been copied including
+            // event handlers:
+            this.options.fileInput = this.options.fileInput.map(function (i, el) {
+                if (el === input[0]) {
+                    return inputClone[0];
+                }
+                return el;
+            });
+            // If the widget has been initialized on the file input itself,
+            // override this.element with the file input clone:
+            if (input[0] === this.element[0]) {
+                this.element = inputClone;
+            }
+        },
+
+        _handleFileTreeEntry: function (entry, path) {
+            var that = this,
+                dfd = $.Deferred(),
+                errorHandler = function (e) {
+                    if (e && !e.entry) {
+                        e.entry = entry;
+                    }
+                    // Since $.when returns immediately if one
+                    // Deferred is rejected, we use resolve instead.
+                    // This allows valid files and invalid items
+                    // to be returned together in one set:
+                    dfd.resolve([e]);
+                },
+                dirReader;
+            path = path || '';
+            if (entry.isFile) {
+                if (entry._file) {
+                    // Workaround for Chrome bug #149735
+                    entry._file.relativePath = path;
+                    dfd.resolve(entry._file);
+                } else {
+                    entry.file(function (file) {
+                        file.relativePath = path;
+                        dfd.resolve(file);
+                    }, errorHandler);
+                }
+            } else if (entry.isDirectory) {
+                dirReader = entry.createReader();
+                dirReader.readEntries(function (entries) {
+                    that._handleFileTreeEntries(
+                        entries,
+                        path + entry.name + '/'
+                    ).done(function (files) {
+                        dfd.resolve(files);
+                    }).fail(errorHandler);
+                }, errorHandler);
+            } else {
+                // Return an empy list for file system items
+                // other than files or directories:
+                dfd.resolve([]);
+            }
+            return dfd.promise();
+        },
+
+        _handleFileTreeEntries: function (entries, path) {
+            var that = this;
+            return $.when.apply(
+                $,
+                $.map(entries, function (entry) {
+                    return that._handleFileTreeEntry(entry, path);
+                })
+            ).pipe(function () {
+                return Array.prototype.concat.apply(
+                    [],
+                    arguments
+                );
+            });
+        },
+
+        _getDroppedFiles: function (dataTransfer) {
+            dataTransfer = dataTransfer || {};
+            var items = dataTransfer.items;
+            if (items && items.length && (items[0].webkitGetAsEntry ||
+                    items[0].getAsEntry)) {
+                return this._handleFileTreeEntries(
+                    $.map(items, function (item) {
+                        var entry;
+                        if (item.webkitGetAsEntry) {
+                            entry = item.webkitGetAsEntry();
+                            if (entry) {
+                                // Workaround for Chrome bug #149735:
+                                entry._file = item.getAsFile();
+                            }
+                            return entry;
+                        }
+                        return item.getAsEntry();
+                    })
+                );
+            }
+            return $.Deferred().resolve(
+                $.makeArray(dataTransfer.files)
+            ).promise();
+        },
+
+        _getSingleFileInputFiles: function (fileInput) {
+            fileInput = $(fileInput);
+            var entries = fileInput.prop('webkitEntries') ||
+                    fileInput.prop('entries'),
+                files,
+                value;
+            if (entries && entries.length) {
+                return this._handleFileTreeEntries(entries);
+            }
+            files = $.makeArray(fileInput.prop('files'));
+            if (!files.length) {
+                value = fileInput.prop('value');
+                if (!value) {
+                    return $.Deferred().resolve([]).promise();
+                }
+                // If the files property is not available, the browser does not
+                // support the File API and we add a pseudo File object with
+                // the input value as name with path information removed:
+                files = [{name: value.replace(/^.*\\/, '')}];
+            } else if (files[0].name === undefined && files[0].fileName) {
+                // File normalization for Safari 4 and Firefox 3:
+                $.each(files, function (index, file) {
+                    file.name = file.fileName;
+                    file.size = file.fileSize;
+                });
+            }
+            return $.Deferred().resolve(files).promise();
+        },
+
+        _getFileInputFiles: function (fileInput) {
+            if (!(fileInput instanceof $) || fileInput.length === 1) {
+                return this._getSingleFileInputFiles(fileInput);
+            }
+            return $.when.apply(
+                $,
+                $.map(fileInput, this._getSingleFileInputFiles)
+            ).pipe(function () {
+                return Array.prototype.concat.apply(
+                    [],
+                    arguments
+                );
+            });
+        },
+
+        _onChange: function (e) {
+            var that = this,
+                data = {
+                    fileInput: $(e.target),
+                    form: $(e.target.form)
+                };
+            this._getFileInputFiles(data.fileInput).always(function (files) {
+                data.files = files;
+                if (that.options.replaceFileInput) {
+                    that._replaceFileInput(data.fileInput);
+                }
+                if (that._trigger(
+                        'change',
+                        $.Event('change', {delegatedEvent: e}),
+                        data
+                    ) !== false) {
+                    that._onAdd(e, data);
+                }
+            });
+        },
+
+        _onPaste: function (e) {
+            var items = e.originalEvent && e.originalEvent.clipboardData &&
+                    e.originalEvent.clipboardData.items,
+                data = {files: []};
+            if (items && items.length) {
+                $.each(items, function (index, item) {
+                    var file = item.getAsFile && item.getAsFile();
+                    if (file) {
+                        data.files.push(file);
+                    }
+                });
+                if (this._trigger(
+                        'paste',
+                        $.Event('paste', {delegatedEvent: e}),
+                        data
+                    ) !== false) {
+                    this._onAdd(e, data);
+                }
+            }
+        },
+
+        _onDrop: function (e) {
+            e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
+            var that = this,
+                dataTransfer = e.dataTransfer,
+                data = {};
+            if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {
+                e.preventDefault();
+                this._getDroppedFiles(dataTransfer).always(function (files) {
+                    data.files = files;
+                    if (that._trigger(
+                            'drop',
+                            $.Event('drop', {delegatedEvent: e}),
+                            data
+                        ) !== false) {
+                        that._onAdd(e, data);
+                    }
+                });
+            }
+        },
+
+        _onDragOver: function (e) {
+            e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
+            var dataTransfer = e.dataTransfer;
+            if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 &&
+                    this._trigger(
+                        'dragover',
+                        $.Event('dragover', {delegatedEvent: e})
+                    ) !== false) {
+                e.preventDefault();
+                dataTransfer.dropEffect = 'copy';
+            }
+        },
+
+        _initEventHandlers: function () {
+            if (this._isXHRUpload(this.options)) {
+                this._on(this.options.dropZone, {
+                    dragover: this._onDragOver,
+                    drop: this._onDrop
+                });
+                this._on(this.options.pasteZone, {
+                    paste: this._onPaste
+                });
+            }
+            if ($.support.fileInput) {
+                this._on(this.options.fileInput, {
+                    change: this._onChange
+                });
+            }
+        },
+
+        _destroyEventHandlers: function () {
+            this._off(this.options.dropZone, 'dragover drop');
+            this._off(this.options.pasteZone, 'paste');
+            this._off(this.options.fileInput, 'change');
+        },
+
+        _setOption: function (key, value) {
+            var reinit = $.inArray(key, this._specialOptions) !== -1;
+            if (reinit) {
+                this._destroyEventHandlers();
+            }
+            this._super(key, value);
+            if (reinit) {
+                this._initSpecialOptions();
+                this._initEventHandlers();
+            }
+        },
+
+        _initSpecialOptions: function () {
+            var options = this.options;
+            if (options.fileInput === undefined) {
+                options.fileInput = this.element.is('input[type="file"]') ?
+                        this.element : this.element.find('input[type="file"]');
+            } else if (!(options.fileInput instanceof $)) {
+                options.fileInput = $(options.fileInput);
+            }
+            if (!(options.dropZone instanceof $)) {
+                options.dropZone = $(options.dropZone);
+            }
+            if (!(options.pasteZone instanceof $)) {
+                options.pasteZone = $(options.pasteZone);
+            }
+        },
+
+        _getRegExp: function (str) {
+            var parts = str.split('/'),
+                modifiers = parts.pop();
+            parts.shift();
+            return new RegExp(parts.join('/'), modifiers);
+        },
+
+        _isRegExpOption: function (key, value) {
+            return key !== 'url' && $.type(value) === 'string' &&
+                /^\/.*\/[igm]{0,3}$/.test(value);
+        },
+
+        _initDataAttributes: function () {
+            var that = this,
+                options = this.options,
+                clone = $(this.element[0].cloneNode(false));
+            // Initialize options set via HTML5 data-attributes:
+            $.each(
+                clone.data(),
+                function (key, value) {
+                    var dataAttributeName = 'data-' +
+                        // Convert camelCase to hyphen-ated key:
+                        key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
+                    if (clone.attr(dataAttributeName)) {
+                        if (that._isRegExpOption(key, value)) {
+                            value = that._getRegExp(value);
+                        }
+                        options[key] = value;
+                    }
+                }
+            );
+        },
+
+        _create: function () {
+            this._initDataAttributes();
+            this._initSpecialOptions();
+            this._slots = [];
+            this._sequence = this._getXHRPromise(true);
+            this._sending = this._active = 0;
+            this._initProgressObject(this);
+            this._initEventHandlers();
+        },
+
+        // This method is exposed to the widget API and allows to query
+        // the number of active uploads:
+        active: function () {
+            return this._active;
+        },
+
+        // This method is exposed to the widget API and allows to query
+        // the widget upload progress.
+        // It returns an object with loaded, total and bitrate properties
+        // for the running uploads:
+        progress: function () {
+            return this._progress;
+        },
+
+        // This method is exposed to the widget API and allows adding files
+        // using the fileupload API. The data parameter accepts an object which
+        // must have a files property and can contain additional options:
+        // .fileupload('add', {files: filesList});
+        add: function (data) {
+            var that = this;
+            if (!data || this.options.disabled) {
+                return;
+            }
+            if (data.fileInput && !data.files) {
+                this._getFileInputFiles(data.fileInput).always(function (files) {
+                    data.files = files;
+                    that._onAdd(null, data);
+                });
+            } else {
+                data.files = $.makeArray(data.files);
+                this._onAdd(null, data);
+            }
+        },
+
+        // This method is exposed to the widget API and allows sending files
+        // using the fileupload API. The data parameter accepts an object which
+        // must have a files or fileInput property and can contain additional options:
+        // .fileupload('send', {files: filesList});
+        // The method returns a Promise object for the file upload call.
+        send: function (data) {
+            if (data && !this.options.disabled) {
+                if (data.fileInput && !data.files) {
+                    var that = this,
+                        dfd = $.Deferred(),
+                        promise = dfd.promise(),
+                        jqXHR,
+                        aborted;
+                    promise.abort = function () {
+                        aborted = true;
+                        if (jqXHR) {
+                            return jqXHR.abort();
+                        }
+                        dfd.reject(null, 'abort', 'abort');
+                        return promise;
+                    };
+                    this._getFileInputFiles(data.fileInput).always(
+                        function (files) {
+                            if (aborted) {
+                                return;
+                            }
+                            if (!files.length) {
+                                dfd.reject();
+                                return;
+                            }
+                            data.files = files;
+                            jqXHR = that._onSend(null, data).then(
+                                function (result, textStatus, jqXHR) {
+                                    dfd.resolve(result, textStatus, jqXHR);
+                                },
+                                function (jqXHR, textStatus, errorThrown) {
+                                    dfd.reject(jqXHR, textStatus, errorThrown);
+                                }
+                            );
+                        }
+                    );
+                    return this._enhancePromise(promise);
+                }
+                data.files = $.makeArray(data.files);
+                if (data.files.length) {
+                    return this._onSend(null, data);
+                }
+            }
+            return this._getXHRPromise(false, data && data.context);
+        }
+
+    });
+
+}));


[76/93] [abbrv] jena git commit: Add new graph sizes statistic to Elephas demo

Posted by rv...@apache.org.
Add new graph sizes statistic to Elephas demo

Upgrades the airline library to a more recent and feature rich variant
of the library


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

Branch: refs/heads/hadoop-rdf
Commit: 5a49ce8d4a8604a645ce1dba576f612cc17233ca
Parents: b24e9e7
Author: Rob Vesse <rv...@apache.org>
Authored: Wed Jan 7 15:38:50 2015 +0000
Committer: Rob Vesse <rv...@apache.org>
Committed: Wed Jan 7 15:38:50 2015 +0000

----------------------------------------------------------------------
 jena-elephas/jena-elephas-stats/pom.xml         |   3 +-
 .../apache/jena/hadoop/rdf/stats/RdfStats.java  | 794 ++++++++++---------
 .../jena/hadoop/rdf/stats/jobs/JobFactory.java  |  64 ++
 jena-elephas/pom.xml                            |   8 +
 4 files changed, 481 insertions(+), 388 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/5a49ce8d/jena-elephas/jena-elephas-stats/pom.xml
----------------------------------------------------------------------
diff --git a/jena-elephas/jena-elephas-stats/pom.xml b/jena-elephas/jena-elephas-stats/pom.xml
index 526d060..4fd40d8 100644
--- a/jena-elephas/jena-elephas-stats/pom.xml
+++ b/jena-elephas/jena-elephas-stats/pom.xml
@@ -42,9 +42,8 @@
 
 		<!-- CLI related Dependencies -->
 		<dependency>
-			<groupId>io.airlift</groupId>
+			<groupId>com.github.rvesse</groupId>
 			<artifactId>airline</artifactId>
-			<version>0.6</version>
 		</dependency>
 
 		<!-- Hadoop Dependencies -->

http://git-wip-us.apache.org/repos/asf/jena/blob/5a49ce8d/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/RdfStats.java
----------------------------------------------------------------------
diff --git a/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/RdfStats.java b/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/RdfStats.java
index 5f870ee..b9bd9e7 100644
--- a/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/RdfStats.java
+++ b/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/RdfStats.java
@@ -16,390 +16,412 @@
  * limitations under the License.
  */
 
-package org.apache.jena.hadoop.rdf.stats;
-
-import io.airlift.command.Arguments;
-import io.airlift.command.Command;
-import io.airlift.command.Help;
-import io.airlift.command.HelpOption;
-import io.airlift.command.Option;
-import io.airlift.command.OptionType;
-import io.airlift.command.ParseArgumentsMissingException;
-import io.airlift.command.ParseArgumentsUnexpectedException;
-import io.airlift.command.ParseException;
-import io.airlift.command.ParseOptionMissingException;
-import io.airlift.command.ParseOptionMissingValueException;
-import io.airlift.command.SingleCommand;
-import io.airlift.command.model.CommandMetadata;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import javax.inject.Inject;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.mapreduce.Job;
-import org.apache.hadoop.util.Tool;
-import org.apache.hadoop.util.ToolRunner;
+package org.apache.jena.hadoop.rdf.stats;
+
+import io.airlift.airline.Arguments;
+import io.airlift.airline.Command;
+import io.airlift.airline.HelpOption;
+import io.airlift.airline.Option;
+import io.airlift.airline.ParseArgumentsMissingException;
+import io.airlift.airline.ParseArgumentsUnexpectedException;
+import io.airlift.airline.ParseException;
+import io.airlift.airline.ParseOptionIllegalValueException;
+import io.airlift.airline.ParseOptionMissingException;
+import io.airlift.airline.ParseOptionMissingValueException;
+import io.airlift.airline.SingleCommand;
+import io.airlift.airline.help.Help;
+import io.airlift.airline.model.CommandMetadata;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import javax.inject.Inject;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.mapreduce.Job;
+import org.apache.hadoop.util.Tool;
+import org.apache.hadoop.util.ToolRunner;
 import org.apache.jena.hadoop.rdf.stats.jobs.JobFactory;
-
-
-/**
- * Entry point for the Hadoop job, handles launching all the relevant Hadoop
- * jobs
- */
-@Command(name = "bin/hadoop jar PATH_TO_JAR com.yarcdata.urika.hadoop.rdf.stats.RdfStats", description = "A command which computes statistics on RDF data using Hadoop")
-public class RdfStats implements Tool {
-
-    static final String ANSI_RED = "\u001B[31m";
-    static final String ANSI_RESET = "\u001B[0m";
-
-    private static final String DATA_TYPE_TRIPLES = "triples", DATA_TYPE_QUADS = "quads", DATA_TYPE_MIXED = "mixed";
-
-    /**
-     * Help option
-     */
-    @Inject
-    public HelpOption helpOption;
-
-    /**
-     * Gets/Sets whether all available statistics will be calculated
-     */
-    @Option(name = { "-a", "--all" }, description = "Requests that all available statistics be calculated", type = OptionType.COMMAND)
-    public boolean all = false;
-
-    /**
-     * Gets/Sets whether node usage counts will be calculated
-     */
-    @Option(name = { "-n", "--node-count" }, description = "Requests that node usage counts be calculated", type = OptionType.COMMAND)
-    public boolean nodeCount = false;
-
-    /**
-     * Gets/Sets whether characteristic sets will be calculated
-     */
-    @Option(name = { "-c", "--characteristic-sets" }, description = "Requests that characteristic sets be calculated", type = OptionType.COMMAND)
-    public boolean characteristicSets = false;
-
-    /**
-     * Gets/Sets whether type counts will be calculated
-     */
-    @Option(name = { "-t", "--type-counts" }, description = "Requests that rdf:type usage counts be calculated", type = OptionType.COMMAND)
-    public boolean typeCount = false;
-
-    /**
-     * Gets/Sets whether data type counts will be calculated
-     */
-    @Option(name = { "-d", "--data-types" }, description = "Requests that literal data type usage counts be calculated", type = OptionType.COMMAND)
-    public boolean dataTypeCount = false;
-
-    /**
-     * Gets/Sets whether namespace counts will be calculated
-     */
-    @Option(name = { "--namespaces" }, description = "Requests that namespace usage counts be calculated", type = OptionType.COMMAND)
-    public boolean namespaceCount = false;
-
-    /**
-     * Gets/Sets the input data type used
-     */
-    @Option(name = { "--input-type" }, allowedValues = { DATA_TYPE_MIXED, DATA_TYPE_QUADS, DATA_TYPE_TRIPLES }, description = "Specifies whether the input data is a mixture of quads and triples, just quads or just triples.  Using the most specific data type will yield the most accurrate statistics")
-    public String inputType = DATA_TYPE_MIXED;
-
-    /**
-     * Gets/Sets the output path
-     */
-    @Option(name = { "-o", "--output" }, title = "OutputPath", description = "Sets the output path", arity = 1, required = true)
-    public String outputPath = null;
-
-    /**
-     * Gets/Sets the input path(s)
-     */
-    @Arguments(description = "Sets the input path(s)", title = "InputPath", required = true)
-    public List<String> inputPaths = new ArrayList<String>();
-
-    private Configuration config;
-
-    /**
-     * Entry point method
-     * 
-     * @param args
-     *            Arguments
-     * @throws Exception
-     */
-    public static void main(String[] args) throws Exception {
-        try {
-            // Run and exit with result code if no errors bubble up
-            // Note that the exit code may still be a error code
-            int res = ToolRunner.run(new Configuration(true), new RdfStats(), args);
-            System.exit(res);
-        } catch (Exception e) {
-            System.err.println(ANSI_RED + e.getMessage());
-            e.printStackTrace(System.err);
-        } finally {
-            System.err.print(ANSI_RESET);
-        }
-        // If any errors bubble up exit with non-zero code
-        System.exit(1);
-    }
-
-    private static void showUsage() {
-        CommandMetadata metadata = SingleCommand.singleCommand(RdfStats.class).getCommandMetadata();
-        StringBuilder builder = new StringBuilder();
-        Help.help(metadata, builder);
-        System.err.print(ANSI_RESET);
-        System.err.println(builder.toString());
-        System.exit(1);
-    }
-
-    @Override
-    public void setConf(Configuration conf) {
-        this.config = conf;
-    }
-
-    @Override
-    public Configuration getConf() {
-        return this.config;
-    }
-
-    @Override
-    public int run(String[] args) throws Exception {
-        try {
-            // Parse custom arguments
-            RdfStats cmd = SingleCommand.singleCommand(RdfStats.class).parse(args);
-
-            // Copy Hadoop configuration across
-            cmd.setConf(this.getConf());
-
-            // Show help if requested and exit with success
-            if (cmd.helpOption.showHelpIfRequested()) {
-                return 0;
-            }
-
-            // Run the command and exit with success
-            cmd.run();
-            return 0;
-
-        } catch (ParseOptionMissingException e) {
-            System.err.println(ANSI_RED + e.getMessage());
-            System.err.println();
-            showUsage();
-        } catch (ParseOptionMissingValueException e) {
-            System.err.println(ANSI_RED + e.getMessage());
-            System.err.println();
-            showUsage();
-        } catch (ParseArgumentsMissingException e) {
-            System.err.println(ANSI_RED + e.getMessage());
-            System.err.println();
-            showUsage();
-        } catch (ParseArgumentsUnexpectedException e) {
-            System.err.println(ANSI_RED + e.getMessage());
-            System.err.println();
-            showUsage();
-            // TODO Re-enable as and when we upgrade Airline
-            // } catch (ParseOptionIllegalValueException e) {
-            // System.err.println(ANSI_RED + e.getMessage());
-            // System.err.println();
-            // showUsage();
-        } catch (ParseException e) {
-            System.err.println(ANSI_RED + e.getMessage());
-            System.err.println();
-            showUsage();
-        } catch (UnsupportedOperationException e) {
-            System.err.println(ANSI_RED + e.getMessage());
-        } catch (Throwable e) {
-            System.err.println(ANSI_RED + e.getMessage());
-            e.printStackTrace(System.err);
-        } finally {
-            System.err.print(ANSI_RESET);
-        }
-        return 1;
-    }
-
-    private void run() throws Throwable {
-        if (!this.outputPath.endsWith("/")) {
-            this.outputPath += "/";
-        }
-
-        // If all statistics requested turn on all statistics
-        if (this.all) {
-            this.nodeCount = true;
-            this.characteristicSets = true;
-            this.typeCount = true;
-            this.dataTypeCount = true;
-            this.namespaceCount = true;
-        }
-
-        // How many statistics were requested?
-        int statsRequested = 0;
-        if (this.nodeCount)
-            statsRequested++;
-        if (this.characteristicSets)
-            statsRequested++;
-        if (this.typeCount)
-            statsRequested++;
-        if (this.dataTypeCount)
-            statsRequested++;
-        if (this.namespaceCount)
-            statsRequested++;
-
-        // Error if no statistics requested
-        if (statsRequested == 0) {
-            System.err
-                    .println("You did not request any statistics to be calculated, please use one/more of the relevant options to select the statistics to be computed");
-            return;
-        }
-        int statsComputed = 1;
-
-        // Compute statistics
-        if (this.nodeCount) {
-            Job job = this.selectNodeCountJob();
-            statsComputed = this.computeStatistic(job, statsComputed, statsRequested);
-        }
-        if (this.typeCount) {
-            Job[] jobs = this.selectTypeCountJobs();
-            statsComputed = this.computeStatistic(jobs, false, false, statsComputed, statsRequested);
-        }
-        if (this.dataTypeCount) {
-            Job job = this.selectDataTypeCountJob();
-            statsComputed = this.computeStatistic(job, statsComputed, statsRequested);
-        }
-        if (this.namespaceCount) {
-            Job job = this.selectNamespaceCountJob();
-            statsComputed = this.computeStatistic(job, statsComputed, statsRequested);
-        }
-        if (this.characteristicSets) {
-            Job[] jobs = this.selectCharacteristicSetJobs();
-            statsComputed = this.computeStatistic(jobs, false, false, statsComputed, statsRequested);
-        }
-    }
-
-    private int computeStatistic(Job job, int statsComputed, int statsRequested) throws Throwable {
-        System.out.println(String.format("Computing Statistic %d of %d requested", statsComputed, statsRequested));
-        this.runJob(job);
-        System.out.println(String.format("Computed Statistic %d of %d requested", statsComputed, statsRequested));
-        System.out.println();
-        return ++statsComputed;
-    }
-
-    private int computeStatistic(Job[] jobs, boolean continueOnFailure, boolean continueOnError, int statsComputed,
-            int statsRequested) {
-        System.out.println(String.format("Computing Statistic %d of %d requested", statsComputed, statsRequested));
-        this.runJobSequence(jobs, continueOnFailure, continueOnError);
-        System.out.println(String.format("Computed Statistic %d of %d requested", statsComputed, statsRequested));
-        System.out.println();
-        return ++statsComputed;
-    }
-
-    private boolean runJob(Job job) throws Throwable {
-        System.out.println("Submitting Job " + job.getJobName());
-        long start = System.nanoTime();
-        try {
-            job.submit();
-            if (job.monitorAndPrintJob()) {
-                System.out.println("Job " + job.getJobName() + " succeeded");
-                return true;
-            } else {
-                System.out.println("Job " + job.getJobName() + " failed");
-                return false;
-            }
-        } catch (Throwable e) {
-            System.out.println("Unexpected failure in Job " + job.getJobName());
-            throw e;
-        } finally {
-            long end = System.nanoTime();
-            System.out.println("Job " + job.getJobName() + " finished after "
-                    + String.format("%,d milliseconds", TimeUnit.NANOSECONDS.toMillis(end - start)));
-            System.out.println();
-        }
-    }
-
-    private void runJobSequence(Job[] jobs, boolean continueOnFailure, boolean continueOnError) {
-        for (int i = 0; i < jobs.length; i++) {
-            Job job = jobs[i];
-            try {
-                boolean success = this.runJob(job);
-                if (!success && !continueOnFailure)
-                    throw new IllegalStateException("Unable to complete job sequence because Job " + job.getJobName() + " failed");
-            } catch (IllegalStateException e) {
-                throw e;
-            } catch (Throwable e) {
-                if (!continueOnError)
-                    throw new IllegalStateException("Unable to complete job sequence because job " + job.getJobName()
-                            + " errorred", e);
-            }
-        }
-    }
-
-    private Job selectNodeCountJob() throws IOException {
-        String realOutputPath = outputPath + "node-counts/";
-        String[] inputs = new String[this.inputPaths.size()];
-        this.inputPaths.toArray(inputs);
-
-        if (DATA_TYPE_QUADS.equals(this.inputType)) {
-            return JobFactory.getQuadNodeCountJob(this.config, inputs, realOutputPath);
-        } else if (DATA_TYPE_TRIPLES.equals(this.inputType)) {
-            return JobFactory.getTripleNodeCountJob(this.config, inputs, realOutputPath);
-        } else {
-            return JobFactory.getNodeCountJob(this.config, inputs, realOutputPath);
-        }
-    }
-
-    private Job selectDataTypeCountJob() throws IOException {
-        String realOutputPath = outputPath + "data-type-counts/";
-        String[] inputs = new String[this.inputPaths.size()];
-        this.inputPaths.toArray(inputs);
-
-        if (DATA_TYPE_QUADS.equals(this.inputType)) {
-            return JobFactory.getQuadDataTypeCountJob(this.config, inputs, realOutputPath);
-        } else if (DATA_TYPE_TRIPLES.equals(this.inputType)) {
-            return JobFactory.getTripleDataTypeCountJob(this.config, inputs, realOutputPath);
-        } else {
-            return JobFactory.getDataTypeCountJob(this.config, inputs, realOutputPath);
-        }
-    }
-
-    private Job selectNamespaceCountJob() throws IOException {
-        String realOutputPath = outputPath + "namespace-counts/";
-        String[] inputs = new String[this.inputPaths.size()];
-        this.inputPaths.toArray(inputs);
-
-        if (DATA_TYPE_QUADS.equals(this.inputType)) {
-            return JobFactory.getQuadNamespaceCountJob(this.config, inputs, realOutputPath);
-        } else if (DATA_TYPE_TRIPLES.equals(this.inputType)) {
-            return JobFactory.getTripleNamespaceCountJob(this.config, inputs, realOutputPath);
-        } else {
-            return JobFactory.getNamespaceCountJob(this.config, inputs, realOutputPath);
-        }
-    }
-
-    private Job[] selectCharacteristicSetJobs() throws IOException {
-        String intermediateOutputPath = outputPath + "characteristics/intermediate/";
-        String finalOutputPath = outputPath + "characteristics/final/";
-        String[] inputs = new String[this.inputPaths.size()];
-        this.inputPaths.toArray(inputs);
-
-        if (DATA_TYPE_QUADS.equals(this.inputType)) {
-            return JobFactory.getQuadCharacteristicSetJobs(this.config, inputs, intermediateOutputPath, finalOutputPath);
-        } else if (DATA_TYPE_TRIPLES.equals(this.inputType)) {
-            return JobFactory.getTripleCharacteristicSetJobs(this.config, inputs, intermediateOutputPath, finalOutputPath);
-        } else {
-            return JobFactory.getCharacteristicSetJobs(this.config, inputs, intermediateOutputPath, finalOutputPath);
-        }
-    }
-
-    private Job[] selectTypeCountJobs() throws IOException {
-        String intermediateOutputPath = outputPath + "type-declarations/";
-        String finalOutputPath = outputPath + "type-counts/";
-        String[] inputs = new String[this.inputPaths.size()];
-        this.inputPaths.toArray(inputs);
-
-        if (DATA_TYPE_QUADS.equals(this.inputType)) {
-            return JobFactory.getQuadTypeCountJobs(this.config, inputs, intermediateOutputPath, finalOutputPath);
-        } else if (DATA_TYPE_TRIPLES.equals(this.inputType)) {
-            return JobFactory.getTripleTypeCountJobs(this.config, inputs, intermediateOutputPath, finalOutputPath);
-        } else {
-            return JobFactory.getTypeCountJobs(this.config, inputs, intermediateOutputPath, finalOutputPath);
-        }
-    }
-}
+
+/**
+ * Entry point for the Hadoop job, handles launching all the relevant Hadoop
+ * jobs
+ */
+@Command(name = "bin/hadoop jar PATH_TO_JAR com.yarcdata.urika.hadoop.rdf.stats.RdfStats", description = "A command which computes statistics on RDF data using Hadoop")
+public class RdfStats implements Tool {
+
+    static final String ANSI_RED = "\u001B[31m";
+    static final String ANSI_RESET = "\u001B[0m";
+
+    private static final String DATA_TYPE_TRIPLES = "triples", DATA_TYPE_QUADS = "quads", DATA_TYPE_MIXED = "mixed";
+
+    /**
+     * Help option
+     */
+    @Inject
+    public HelpOption helpOption;
+
+    /**
+     * Gets/Sets whether all available statistics will be calculated
+     */
+    @Option(name = { "-a", "--all" }, description = "Requests that all available statistics be calculated")
+    public boolean all = false;
+
+    /**
+     * Gets/Sets whether node usage counts will be calculated
+     */
+    @Option(name = { "-n", "--node-count" }, description = "Requests that node usage counts be calculated")
+    public boolean nodeCount = false;
+
+    /**
+     * Gets/Sets whether characteristic sets will be calculated
+     */
+    @Option(name = { "-c", "--characteristic-sets" }, hidden = true, description = "Requests that characteristic sets be calculated (hidden as this has scalability issues)")
+    public boolean characteristicSets = false;
+
+    /**
+     * Gets/Sets whether type counts will be calculated
+     */
+    @Option(name = { "-t", "--type-counts" }, description = "Requests that rdf:type usage counts be calculated")
+    public boolean typeCount = false;
+
+    /**
+     * Gets/Sets whether data type counts will be calculated
+     */
+    @Option(name = { "-d", "--data-types" }, description = "Requests that literal data type usage counts be calculated")
+    public boolean dataTypeCount = false;
+
+    /**
+     * Gets/Sets whether namespace counts will be calculated
+     */
+    @Option(name = { "--namespaces" }, description = "Requests that namespace usage counts be calculated")
+    public boolean namespaceCount = false;
+    
+    @Option(name = { "-g", "--graph-sizes" }, description = "Requests that the size of each named graph be counted")
+    public boolean graphSize = false;
+
+    /**
+     * Gets/Sets the input data type used
+     */
+    @Option(name = { "--input-type" }, allowedValues = { DATA_TYPE_MIXED, DATA_TYPE_QUADS, DATA_TYPE_TRIPLES }, description = "Specifies whether the input data is a mixture of quads and triples, just quads or just triples.  Using the most specific data type will yield the most accurrate statistics")
+    public String inputType = DATA_TYPE_MIXED;
+
+    /**
+     * Gets/Sets the output path
+     */
+    @Option(name = { "-o", "--output" }, title = "OutputPath", description = "Sets the output path", arity = 1, required = true)
+    public String outputPath = null;
+
+    /**
+     * Gets/Sets the input path(s)
+     */
+    @Arguments(description = "Sets the input path(s)", title = "InputPath", required = true)
+    public List<String> inputPaths = new ArrayList<String>();
+
+    private Configuration config;
+
+    /**
+     * Entry point method
+     * 
+     * @param args
+     *            Arguments
+     * @throws Exception
+     */
+    public static void main(String[] args) throws Exception {
+        try {
+            // Run and exit with result code if no errors bubble up
+            // Note that the exit code may still be a error code
+            int res = ToolRunner.run(new Configuration(true), new RdfStats(), args);
+            System.exit(res);
+        } catch (Exception e) {
+            System.err.println(ANSI_RED + e.getMessage());
+            e.printStackTrace(System.err);
+        } finally {
+            System.err.print(ANSI_RESET);
+        }
+        // If any errors bubble up exit with non-zero code
+        System.exit(1);
+    }
+
+    private static void showUsage() throws IOException {
+        CommandMetadata metadata = SingleCommand.singleCommand(RdfStats.class).getCommandMetadata();
+        System.err.print(ANSI_RESET);
+        Help.help(metadata, System.err);
+        System.exit(1);
+    }
+
+    @Override
+    public void setConf(Configuration conf) {
+        this.config = conf;
+    }
+
+    @Override
+    public Configuration getConf() {
+        return this.config;
+    }
+
+    @Override
+    public int run(String[] args) throws Exception {
+        try {
+            // Parse custom arguments
+            RdfStats cmd = SingleCommand.singleCommand(RdfStats.class).parse(args);
+
+            // Copy Hadoop configuration across
+            cmd.setConf(this.getConf());
+
+            // Show help if requested and exit with success
+            if (cmd.helpOption.showHelpIfRequested()) {
+                return 0;
+            }
+
+            // Run the command and exit with success
+            cmd.run();
+            return 0;
+
+        } catch (ParseOptionMissingException e) {
+            System.err.println(ANSI_RED + e.getMessage());
+            System.err.println();
+            showUsage();
+        } catch (ParseOptionMissingValueException e) {
+            System.err.println(ANSI_RED + e.getMessage());
+            System.err.println();
+            showUsage();
+        } catch (ParseArgumentsMissingException e) {
+            System.err.println(ANSI_RED + e.getMessage());
+            System.err.println();
+            showUsage();
+        } catch (ParseArgumentsUnexpectedException e) {
+            System.err.println(ANSI_RED + e.getMessage());
+            System.err.println();
+            showUsage();
+        } catch (ParseOptionIllegalValueException e) {
+            System.err.println(ANSI_RED + e.getMessage());
+            System.err.println();
+            showUsage();
+        } catch (ParseException e) {
+            System.err.println(ANSI_RED + e.getMessage());
+            System.err.println();
+            showUsage();
+        } catch (UnsupportedOperationException e) {
+            System.err.println(ANSI_RED + e.getMessage());
+        } catch (Throwable e) {
+            System.err.println(ANSI_RED + e.getMessage());
+            e.printStackTrace(System.err);
+        } finally {
+            System.err.print(ANSI_RESET);
+        }
+        return 1;
+    }
+
+    private void run() throws Throwable {
+        if (!this.outputPath.endsWith("/")) {
+            this.outputPath += "/";
+        }
+
+        // If all statistics requested turn on all statistics
+        if (this.all) {
+            this.nodeCount = true;
+            this.characteristicSets = true;
+            this.typeCount = true;
+            this.dataTypeCount = true;
+            this.namespaceCount = true;
+        }
+
+        // How many statistics were requested?
+        int statsRequested = 0;
+        if (this.nodeCount)
+            statsRequested++;
+        if (this.characteristicSets)
+            statsRequested++;
+        if (this.typeCount)
+            statsRequested++;
+        if (this.dataTypeCount)
+            statsRequested++;
+        if (this.namespaceCount)
+            statsRequested++;
+        if (this.graphSize)
+            statsRequested++;
+
+        // Error if no statistics requested
+        if (statsRequested == 0) {
+            System.err
+                    .println("You did not request any statistics to be calculated, please use one/more of the relevant options to select the statistics to be computed");
+            return;
+        }
+        int statsComputed = 1;
+
+        // Compute statistics
+        if (this.nodeCount) {
+            Job job = this.selectNodeCountJob();
+            statsComputed = this.computeStatistic(job, statsComputed, statsRequested);
+        }
+        if (this.graphSize) {
+            Job job = this.selectGraphSizeJob();
+            statsComputed = this.computeStatistic(job, statsComputed, statsRequested);
+        }
+        if (this.typeCount) {
+            Job[] jobs = this.selectTypeCountJobs();
+            statsComputed = this.computeStatistic(jobs, false, false, statsComputed, statsRequested);
+        }
+        if (this.dataTypeCount) {
+            Job job = this.selectDataTypeCountJob();
+            statsComputed = this.computeStatistic(job, statsComputed, statsRequested);
+        }
+        if (this.namespaceCount) {
+            Job job = this.selectNamespaceCountJob();
+            statsComputed = this.computeStatistic(job, statsComputed, statsRequested);
+        }
+        if (this.characteristicSets) {
+            Job[] jobs = this.selectCharacteristicSetJobs();
+            statsComputed = this.computeStatistic(jobs, false, false, statsComputed, statsRequested);
+        }
+    }
+
+    private int computeStatistic(Job job, int statsComputed, int statsRequested) throws Throwable {
+        System.out.println(String.format("Computing Statistic %d of %d requested", statsComputed, statsRequested));
+        this.runJob(job);
+        System.out.println(String.format("Computed Statistic %d of %d requested", statsComputed, statsRequested));
+        System.out.println();
+        return ++statsComputed;
+    }
+
+    private int computeStatistic(Job[] jobs, boolean continueOnFailure, boolean continueOnError, int statsComputed,
+            int statsRequested) {
+        System.out.println(String.format("Computing Statistic %d of %d requested", statsComputed, statsRequested));
+        this.runJobSequence(jobs, continueOnFailure, continueOnError);
+        System.out.println(String.format("Computed Statistic %d of %d requested", statsComputed, statsRequested));
+        System.out.println();
+        return ++statsComputed;
+    }
+
+    private boolean runJob(Job job) throws Throwable {
+        System.out.println("Submitting Job " + job.getJobName());
+        long start = System.nanoTime();
+        try {
+            job.submit();
+            if (job.monitorAndPrintJob()) {
+                System.out.println("Job " + job.getJobName() + " succeeded");
+                return true;
+            } else {
+                System.out.println("Job " + job.getJobName() + " failed");
+                return false;
+            }
+        } catch (Throwable e) {
+            System.out.println("Unexpected failure in Job " + job.getJobName());
+            throw e;
+        } finally {
+            long end = System.nanoTime();
+            System.out.println("Job " + job.getJobName() + " finished after "
+                    + String.format("%,d milliseconds", TimeUnit.NANOSECONDS.toMillis(end - start)));
+            System.out.println();
+        }
+    }
+
+    private void runJobSequence(Job[] jobs, boolean continueOnFailure, boolean continueOnError) {
+        for (int i = 0; i < jobs.length; i++) {
+            Job job = jobs[i];
+            try {
+                boolean success = this.runJob(job);
+                if (!success && !continueOnFailure)
+                    throw new IllegalStateException("Unable to complete job sequence because Job " + job.getJobName()
+                            + " failed");
+            } catch (IllegalStateException e) {
+                throw e;
+            } catch (Throwable e) {
+                if (!continueOnError)
+                    throw new IllegalStateException("Unable to complete job sequence because job " + job.getJobName()
+                            + " errorred", e);
+            }
+        }
+    }
+
+    private Job selectNodeCountJob() throws IOException {
+        String realOutputPath = outputPath + "node-counts/";
+        String[] inputs = new String[this.inputPaths.size()];
+        this.inputPaths.toArray(inputs);
+
+        if (DATA_TYPE_QUADS.equals(this.inputType)) {
+            return JobFactory.getQuadNodeCountJob(this.config, inputs, realOutputPath);
+        } else if (DATA_TYPE_TRIPLES.equals(this.inputType)) {
+            return JobFactory.getTripleNodeCountJob(this.config, inputs, realOutputPath);
+        } else {
+            return JobFactory.getNodeCountJob(this.config, inputs, realOutputPath);
+        }
+    }
+    
+    private Job selectGraphSizeJob() throws IOException {
+        String realOutputPath = outputPath + "graph-sizes/";
+        String[] inputs = new String[this.inputPaths.size()];
+        this.inputPaths.toArray(inputs);
+        
+        if (DATA_TYPE_QUADS.equals(this.inputType)) {
+            return JobFactory.getQuadGraphSizesJob(this.config, inputs, realOutputPath);
+        } else if (DATA_TYPE_TRIPLES.equals(this.inputType)) {
+            return JobFactory.getTripleGraphSizesJob(this.config, inputs, realOutputPath);
+        } else {
+            return JobFactory.getGraphSizesJob(this.config, inputs, realOutputPath);
+        }
+    }
+
+    private Job selectDataTypeCountJob() throws IOException {
+        String realOutputPath = outputPath + "data-type-counts/";
+        String[] inputs = new String[this.inputPaths.size()];
+        this.inputPaths.toArray(inputs);
+
+        if (DATA_TYPE_QUADS.equals(this.inputType)) {
+            return JobFactory.getQuadDataTypeCountJob(this.config, inputs, realOutputPath);
+        } else if (DATA_TYPE_TRIPLES.equals(this.inputType)) {
+            return JobFactory.getTripleDataTypeCountJob(this.config, inputs, realOutputPath);
+        } else {
+            return JobFactory.getDataTypeCountJob(this.config, inputs, realOutputPath);
+        }
+    }
+
+    private Job selectNamespaceCountJob() throws IOException {
+        String realOutputPath = outputPath + "namespace-counts/";
+        String[] inputs = new String[this.inputPaths.size()];
+        this.inputPaths.toArray(inputs);
+
+        if (DATA_TYPE_QUADS.equals(this.inputType)) {
+            return JobFactory.getQuadNamespaceCountJob(this.config, inputs, realOutputPath);
+        } else if (DATA_TYPE_TRIPLES.equals(this.inputType)) {
+            return JobFactory.getTripleNamespaceCountJob(this.config, inputs, realOutputPath);
+        } else {
+            return JobFactory.getNamespaceCountJob(this.config, inputs, realOutputPath);
+        }
+    }
+
+    private Job[] selectCharacteristicSetJobs() throws IOException {
+        String intermediateOutputPath = outputPath + "characteristics/intermediate/";
+        String finalOutputPath = outputPath + "characteristics/final/";
+        String[] inputs = new String[this.inputPaths.size()];
+        this.inputPaths.toArray(inputs);
+
+        if (DATA_TYPE_QUADS.equals(this.inputType)) {
+            return JobFactory
+                    .getQuadCharacteristicSetJobs(this.config, inputs, intermediateOutputPath, finalOutputPath);
+        } else if (DATA_TYPE_TRIPLES.equals(this.inputType)) {
+            return JobFactory.getTripleCharacteristicSetJobs(this.config, inputs, intermediateOutputPath,
+                    finalOutputPath);
+        } else {
+            return JobFactory.getCharacteristicSetJobs(this.config, inputs, intermediateOutputPath, finalOutputPath);
+        }
+    }
+
+    private Job[] selectTypeCountJobs() throws IOException {
+        String intermediateOutputPath = outputPath + "type-declarations/";
+        String finalOutputPath = outputPath + "type-counts/";
+        String[] inputs = new String[this.inputPaths.size()];
+        this.inputPaths.toArray(inputs);
+
+        if (DATA_TYPE_QUADS.equals(this.inputType)) {
+            return JobFactory.getQuadTypeCountJobs(this.config, inputs, intermediateOutputPath, finalOutputPath);
+        } else if (DATA_TYPE_TRIPLES.equals(this.inputType)) {
+            return JobFactory.getTripleTypeCountJobs(this.config, inputs, intermediateOutputPath, finalOutputPath);
+        } else {
+            return JobFactory.getTypeCountJobs(this.config, inputs, intermediateOutputPath, finalOutputPath);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/5a49ce8d/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/jobs/JobFactory.java
----------------------------------------------------------------------
diff --git a/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/jobs/JobFactory.java b/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/jobs/JobFactory.java
index 55bb8af..7935335 100644
--- a/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/jobs/JobFactory.java
+++ b/jena-elephas/jena-elephas-stats/src/main/java/org/apache/jena/hadoop/rdf/stats/jobs/JobFactory.java
@@ -28,6 +28,7 @@ import org.apache.hadoop.io.SequenceFile.CompressionType;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.compress.BZip2Codec;
 import org.apache.hadoop.mapreduce.Job;
+import org.apache.hadoop.mapreduce.lib.chain.ChainMapper;
 import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
 import org.apache.hadoop.mapreduce.lib.input.NLineInputFormat;
 import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat;
@@ -56,12 +57,14 @@ import org.apache.jena.hadoop.rdf.mapreduce.count.datatypes.QuadDataTypeCountMap
 import org.apache.jena.hadoop.rdf.mapreduce.count.datatypes.TripleDataTypeCountMapper;
 import org.apache.jena.hadoop.rdf.mapreduce.count.namespaces.QuadNamespaceCountMapper;
 import org.apache.jena.hadoop.rdf.mapreduce.count.namespaces.TripleNamespaceCountMapper;
+import org.apache.jena.hadoop.rdf.mapreduce.count.positional.QuadGraphCountMapper;
 import org.apache.jena.hadoop.rdf.mapreduce.count.positional.QuadObjectCountMapper;
 import org.apache.jena.hadoop.rdf.mapreduce.count.positional.TripleObjectCountMapper;
 import org.apache.jena.hadoop.rdf.mapreduce.filter.positional.QuadFilterByPredicateMapper;
 import org.apache.jena.hadoop.rdf.mapreduce.filter.positional.TripleFilterByPredicateUriMapper;
 import org.apache.jena.hadoop.rdf.mapreduce.group.QuadGroupBySubjectMapper;
 import org.apache.jena.hadoop.rdf.mapreduce.group.TripleGroupBySubjectMapper;
+import org.apache.jena.hadoop.rdf.mapreduce.transform.TriplesToQuadsConstantGraphMapper;
 import org.apache.jena.hadoop.rdf.types.CharacteristicSetWritable;
 import org.apache.jena.hadoop.rdf.types.NodeWritable;
 import org.apache.jena.hadoop.rdf.types.QuadWritable;
@@ -178,6 +181,67 @@ public class JobFactory {
         FileOutputFormat.setOutputPath(job, new Path(outputPath));
 
         return job;
+    }
+    
+    public static Job getTripleGraphSizesJob(Configuration config, String[] inputPaths, String outputPath) throws IOException {
+        Job job = Job.getInstance(config);
+        job.setJarByClass(JobFactory.class);
+        job.setJobName("RDF Triples Graph Sizes");
+        
+        // Map/Reduce classes
+        ChainMapper.addMapper(job, TriplesToQuadsConstantGraphMapper.class, LongWritable.class, TripleWritable.class, LongWritable.class, QuadWritable.class, config);
+        ChainMapper.addMapper(job, QuadGraphCountMapper.class, LongWritable.class, QuadWritable.class, NodeWritable.class, LongWritable.class, config);
+        job.setMapOutputKeyClass(NodeWritable.class);
+        job.setMapOutputValueClass(LongWritable.class);
+        job.setReducerClass(NodeCountReducer.class);
+        
+        // Input and Output
+        job.setInputFormatClass(TriplesInputFormat.class);
+        job.setOutputFormatClass(NTriplesNodeOutputFormat.class);
+        FileInputFormat.setInputPaths(job, StringUtils.arrayToString(inputPaths));
+        FileOutputFormat.setOutputPath(job, new Path(outputPath));
+        
+        return job;
+    }
+    
+    public static Job getQuadGraphSizesJob(Configuration config, String[] inputPaths, String outputPath) throws IOException {
+        Job job = Job.getInstance(config);
+        job.setJarByClass(JobFactory.class);
+        job.setJobName("RDF Quads Graph Sizes");
+        
+        // Map/Reduce classes
+        job.setMapperClass(QuadGraphCountMapper.class);
+        job.setMapOutputKeyClass(NodeWritable.class);
+        job.setMapOutputValueClass(LongWritable.class);
+        job.setReducerClass(NodeCountReducer.class);
+        
+        // Input and Output
+        job.setInputFormatClass(QuadsInputFormat.class);
+        job.setOutputFormatClass(NTriplesNodeOutputFormat.class);
+        FileInputFormat.setInputPaths(job, StringUtils.arrayToString(inputPaths));
+        FileOutputFormat.setOutputPath(job, new Path(outputPath));
+        
+        return job;
+    }
+    
+    public static Job getGraphSizesJob(Configuration config, String[] inputPaths, String outputPath) throws IOException {
+        Job job = Job.getInstance(config);
+        job.setJarByClass(JobFactory.class);
+        job.setJobName("RDF Graph Sizes");
+        
+        // Map/Reduce classes
+        job.setMapperClass(QuadGraphCountMapper.class);
+        job.setMapOutputKeyClass(NodeWritable.class);
+        job.setMapOutputValueClass(LongWritable.class);
+        job.setReducerClass(NodeCountReducer.class);
+        
+        // Input and Output
+        job.setInputFormatClass(TriplesOrQuadsInputFormat.class);
+        job.setOutputFormatClass(NTriplesNodeOutputFormat.class);
+        FileInputFormat.setInputPaths(job, StringUtils.arrayToString(inputPaths));
+        FileOutputFormat.setOutputPath(job, new Path(outputPath));
+        
+        return job;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/jena/blob/5a49ce8d/jena-elephas/pom.xml
----------------------------------------------------------------------
diff --git a/jena-elephas/pom.xml b/jena-elephas/pom.xml
index 5245065..040fc9c 100644
--- a/jena-elephas/pom.xml
+++ b/jena-elephas/pom.xml
@@ -38,6 +38,7 @@
     <arq.version>2.12.2-SNAPSHOT</arq.version>
     <junit.version>4.11</junit.version>
     <mrunit.version>1.0.0</mrunit.version>
+    <airline.version>0.8</airline.version>
   </properties>
 
 	<!-- Profiles to allow building for different Hadoop versions -->
@@ -79,6 +80,13 @@
         <artifactId>jena-arq</artifactId>
         <version>${arq.version}</version>
       </dependency>
+      
+      <!-- CLI Related Dependencies -->
+      <dependency>
+        <groupId>com.github.rvesse</groupId>
+        <artifactId>airline</artifactId>
+        <version>${airline.version}</version>
+      </dependency>
 
       <!-- Test Dependencies -->
       <dependency>


[49/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/bin/s-update
----------------------------------------------------------------------
diff --git a/jena-fuseki2/bin/s-update b/jena-fuseki2/bin/s-update
deleted file mode 100755
index 0e3a807..0000000
--- a/jena-fuseki2/bin/s-update
+++ /dev/null
@@ -1,707 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: 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.
-
-# SPARQL HTTP Update, client.
-
-require 'optparse'
-require 'net/http'
-require 'uri'
-require 'cgi'
-require 'pp'
-require 'ostruct'
-
-# ToDo
-#  Allow a choice of media type for GET
-#   --accept "content-type" (and abbreviations)
-#   --header "Add:this"
-#   --user, --password
-#  Basic authentication: request.basic_auth("username", "password")
-#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
-
-SOH_NAME="SOH"
-SOH_VERSION="0.0.0"
-
-$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
-
-# What about direct naming?
-
-# Names
-$mtTurtle           = 'text/turtle;charset=utf-8'
-$mtRDF              = 'application/rdf+xml'
-$mtText             = 'text/plain'
-$mtNQuads           = 'text/n-quads'
-$mtTriG             = 'application/trig'
-$mtSparqlResultsX   = 'application/sparql-results+xml'
-$mtSparqlResultsJ   = 'application/sparql-results+json'
-$mtAppJSON          = 'application/json'
-$mtAppXML           = 'application/xml'
-$mtSparqlResultsTSV = 'application/sparql-results+tsv'
-$mtSparqlResultsCSV = 'application/sparql-results+csv'
-$mtSparqlUpdate     = 'application/sparql-update'
-$mtWWWForm          = 'application/x-www-form-urlencoded'
-$mtSparqlQuery      = "application/sparql-query" ;
-
-# Global media type table.
-$fileMediaTypes = {}
-$fileMediaTypes['ttl']   = $mtTurtle
-$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
-$fileMediaTypes['nt']    = $mtText
-$fileMediaTypes['rdf']   = $mtRDF
-$fileMediaTypes['owl']   = $mtRDF
-$fileMediaTypes['nq']    = $mtNQuads
-$fileMediaTypes['trig']  = $mtTriG
-
-# Global charset : no entry means "don't set"
-$charsetUTF8      = 'utf-8'
-$charset = {}
-$charset[$mtTurtle]   = 'utf-8'
-$charset[$mtText]     = 'ascii'
-$charset[$mtTriG]     = 'utf-8'
-$charset[$mtNQuads]   = 'ascii'
-
-# Headers
-
-$hContentType         = 'Content-Type'
-# $hContentEncoding     = 'Content-Encoding'
-$hContentLength       = 'Content-Length'
-# $hContentLocation     = 'Content-Location'
-# $hContentRange        = 'Content-Range'
-
-$hAccept              = 'Accept'
-$hAcceptCharset       = 'Accept-Charset'
-$hAcceptEncoding      = 'Accept-Encoding'
-$hAcceptRanges        = 'Accept-Ranges' 
-
-$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
-$print_http = false
-
-# Default for GET
-# At least allow anythign (and hope!)
-$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
-# For SPARQL query
-$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
-
-# Accept any in case of trouble.
-$accept_rdf="#{$accept_rdf} , */*;q=0.1"
-$accept_results="#{$accept_results} , */*;q=0.1" 
-
-# The media type usually forces the charset.
-$accept_charset=nil
-
-## Who we are.
-## Two styles:
-##    s-query .....
-##    soh query .....
-
-$cmd = File.basename($0)
-if $cmd == 'soh'
-then
-  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
-end
-
-if ! $cmd.start_with?('s-') && $cmd != 'soh'
-  $cmd = 's-'+$cmd
-end
-
-## -------- 
-
-def GET(dataset, graph)
-  print "GET #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  get_worker(requestURI, headers)
-end
-
-def get_worker(requestURI, headers)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Get.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-def HEAD(dataset, graph)
-  print "HEAD #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Head.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def PUT(dataset, graph, file)
-  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Put)
-end
-
-def POST(dataset, graph, file)
-  print "POST #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Post)
-end
-
-def DELETE(dataset, graph)
-  print "DELETE #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Delete.new(uri.request_uri)
-  headers = {}
-  headers.merge!($headers)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def uri_escape(string)
-  CGI.escape(string)
-end
-
-def target(dataset, graph)
-  return dataset+"?default" if graph == "default"
-  return dataset+"?graph="+uri_escape(graph)
-end
-
-def send_body(dataset, graph, file, method)
-  mt = content_type(file)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hContentType] = mt
-  headers[$hContentLength] = File.size(file).to_s
-  ## p headers
-
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  
-  request = method.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  request.body_stream = File.open(file)
-  response_no_body(uri, request)
-end
-
-def response_no_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue Exception => e  
-    # puts e.message  
-    #puts e.backtrace.inspect  
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-  response = http.request(request)
-  print_http_response(response)
-  case response
-  when Net::HTTPSuccess, Net::HTTPRedirection
-    # OK
-  when Net::HTTPNotFound
-    warn_exit "404 Not found: #{uri}", 9
-    #print response.body
-  else
-    warn_exit "#{response.code} #{response.message} #{uri}", 9
-    # Unreachable
-      response.error!
-  end
-  # NO BODY IN RESPONSE
-end
-
-def response_print_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue => e  
-    #puts e.backtrace.inspect  
-    #print e.class
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-
-  # Add a blank line if headers were output.
-  print "\n" if $http_print ;
-
-  begin
-    response = http.request(request) { |res| 
-      print_http_response(res)
-      #puts res.code
-      res.read_body do |segment|
-        print segment
-      end
-    }
-    case response
-    when Net::HTTPSuccess, Net::HTTPRedirection
-      # OK
-    when Net::HTTPNotFound
-      warn_exit "404 Not found: #{uri}", 9
-      #print response.body
-    else
-      warn_exit "#{response.code}: #{uri}", 9
-      # Unreachable
-      response.error!
-    end
-  rescue EOFError => e
-    warn_exit "IO Error: "+e.message, 3
-  end
-end
-
-def print_http_request(uri, request)
-  return unless $print_http
-  #print "Request\n"
-  print request.method," ",uri, "\n"
-  print_headers("  ",request)
-end
-
-def print_http_response(response)
-  return unless $print_http
-  #print "Response\n"
-  print response.code, " ", response.message, "\n"
-  print_headers("  ",response)
-end
-
-def print_headers(marker, headers)
-  headers.each do |k,v| 
-    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
-    printf "%s%-20s %s\n",marker,k,v
-  end
-end
-
-def content_type(file)
-  file =~ /\.([^.]*)$/
-  ext = $1
-  mt = $fileMediaTypes[ext]
-  cs = $charset[mt]
-  mt = mt+';charset='+cs if ! cs.nil?
-  return mt
-end
-
-def charset(content_type)
-  return $charset[content_type]
-end
-
-def warn_exit(msg, rc)
-    warn msg
-    exit rc ;
-end
-
-def parseURI(uri_string)
-  begin
-    return URI.parse(uri_string).to_s
-  rescue URI::InvalidURIError => err
-    warn_exit "Bad URI: <#{uri_string}>", 2
-  end
-end
-
-## ---- Command
-
-def cmd_soh(command=nil)
-  ## Command line
-  options = {}
-  optparse = OptionParser.new do |opts|
-    # Set a banner, displayed at the top
-    # of the help screen.
-    case $cmd
-    when "s-http", "sparql-http", "soh"
-      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
-    when "s-get", "s-head", "s-delete"
-      banner="$cmd  datasetURI graph"
-    end
-
-    opts.banner = $banner
-    # Define the options, and what they do
-    
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    
-    options[:version] = false
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end
-    
-    # This displays the help screen, all programs are
-    # assumed to have this option.
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  if command.nil?
-    if ARGV.size == 0
-      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
-      exit 1
-    end
-    cmdPrint=ARGV.shift
-    command=cmdPrint.upcase
-  else
-    cmdPrint=command
-  end
-
-  case command
-  when "HEAD", "GET", "DELETE"
-    requiredFile=false
-  when "PUT", "POST"
-    requiredFile=true
-  when "QUERY"
-    cmd_sparql_query
-  when "UPDATE"
-    cmd_sparql_update
-  else
-    warn_exit "Unknown command: #{command}", 2
-  end
-
-  if requiredFile 
-  then
-    if ARGV.size != 3
-      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
-    end
-  else
-    if ARGV.size != 2
-      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
-    end
-  end
-
-  dataset=parseURI(ARGV.shift)
-  # Relative URI?
-  graph=parseURI(ARGV.shift)
-  file=""
-  if requiredFile
-  then
-    file = ARGV.shift if requiredFile
-    if ! File.exist?(file)
-      warn_exit "No such file: "+file, 3
-    end
-    if File.directory?(file)
-      warn_exit "File is a directory: "+file, 3
-    end
-  end
-
-  case command
-  when "GET"
-    GET(dataset, graph)
-  when "HEAD"
-    HEAD(dataset, graph)
-  when "PUT"
-    PUT(dataset, graph, file)
-  when "DELETE"
-    DELETE(dataset, graph)
-  when "POST"
-    POST(dataset, graph, file)
-  else
-    warn_exit "Internal error: Unknown command: #{cmd}", 2
-  end
-  exit 0
-end
-
-## --------
-def string_or_file(arg)
-  return arg if ! arg.match(/^@/)
-  a=(arg[1..-1])
-  open(a, 'rb'){|f| f.read}
-end
-
-## -------- SPARQL Query
-
-## Choose method
-def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
-   if ! query_file.nil?
-    query = open(query_file, 'rb'){|f| f.read}
-  end
-  if forcePOST || query.length >= 2*1024 
-    SPARQL_query_POST(service, query, args2)
-  else
-    SPARQL_query_GET(service, query, args2)
-  end
-end
-
-## By GET
-
-def SPARQL_query_GET(service, query, args2)
-  args = { "query" => query }
-  args.merge!(args2)
-  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  action="#{service}?#{qs}"
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  get_worker(action, headers)
-end
-
-## By POST
-
-def SPARQL_query_POST(service, query, args2)
-  # DRY - body/no body for each of request and response.
-  post_params={ "query" => query }
-  post_params.merge!(args2)
-  uri = URI.parse(service)
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  execute_post_form_body(uri, headers, post_params)
-end
-
-def execute_post_form_body(uri, headers, post_params)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = qs.length.to_s
-  request.initialize_http_header(headers)
-  request.body = qs
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-# Usage: -v --help --file= --query=
-def cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
-      options[:file]=file
-    end
-    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
-            'Set the output argument') do |type|
-      options[:output]=type
-    end
-    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
-            'Set the accept header type') do |type|
-      options[:accept]=type
-    end
-    options[:verbose] = false
-    opts.on( '--post', 'Force use of POST' ) do
-      options[:post] = true
-    end
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
-    warn e
-    exit 1
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-  usePOST = options[:post]
-
-  service = options[:service]
-  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
-
-  # Query
-  query=nil
-  query_file=options[:file]
-  if query_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No query specified.',1
-    end
-  if query_file.nil?
-    query = ARGV.shift
-    if query.match(/^@/)
-      query_file = query[1..-1]
-      query = nil
-    end
-  end
-
-  # --output ==> output= (non-standard)
-  args={}
-  case options[:output]
-  when nil
-  when  "json","xml","text","csv","tsv"
-    args['output'] = options[:output]
-  when :json,:xml,:text,:csv,:tsv
-    args['output'] = options[:output].to_s
-  else
-    warn_exit "Unrecognized output type: "+options[:output],2
-  end
-
-  # --accept
-  # options[:accept]
-
-  print "SPARQL #{service}\n" if $verbose
-  #args={"output"=>"text"}
-  SPARQL_query(service, query, query_file, usePOST, args)
-  exit(0)
-end
-
-## -------- SPARQL Update
-
-# Update sent as a WWW form.
-def SPARQL_update_by_form(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  # args? encode?
-  body="update="+uri_escape(update)
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = body.length.to_s
-  uri = URI.parse(service)
-  execute_post_form(uri, headers, body)
-end
-
-# DRY - query form.
-def execute_post_form(uri, headers, body)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = body
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def SPARQL_update(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  headers[$hContentType] = $mtSparqlUpdate
-  uri = URI.parse(service)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = update
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def cmd_sparql_update(by_raw_post=true)
-  # Share with cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
-      options[:file]=file
-    end
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  service = options[:service]
-  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
-  
-  update=nil
-  update_file=options[:file]
-
-  if update_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No update specified.',1
-    end
-  if update_file.nil?
-    update = ARGV.shift
-    if update.match(/^@/)
-      update_file = update[1..-1]
-      update = nil
-    end
-  end
-  
-  print "SPARQL-Update #{service}\n" if $verbose
-  args={}
-
-  # Reads in the file :-(
-  if update.nil?
-  then
-    update = open(update_file, 'rb'){|f| f.read}
-  else
-    update = string_or_file(update)
-  end
-
-  if by_raw_post
-    SPARQL_update(service, update, args)
-  else
-    SPARQL_update_by_form(service, update, args)
-  end
-  exit(0)
-end
-
-## -------
-
-case $cmd
-when "s-http", "sparql-http", "soh"
-  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
-  cmd_soh
-when "s-get", "s-head", "s-put", "s-delete", "s-post"
-
-  case $cmd
-  when "s-get", "s-head", "s-delete"
-    $banner="#{$cmd} datasetURI graph"
-  when "s-put", "s-post"
-    $banner="#{$cmd} datasetURI graph file"
-  end
-  cmd2 = $cmd.sub(/^s-/, '').upcase
-  cmd_soh cmd2
-
-when "s-query", "sparql-query"
-  cmd_sparql_query
-when "s-update", "sparql-update"
-  cmd_sparql_update true
-when "s-update-form", "sparql-update-form"
-  cmd_sparql_update false
-else 
-  warn_exit "Unknown: "+$cmd, 1
-end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/bin/s-update-form
----------------------------------------------------------------------
diff --git a/jena-fuseki2/bin/s-update-form b/jena-fuseki2/bin/s-update-form
deleted file mode 100755
index 0e3a807..0000000
--- a/jena-fuseki2/bin/s-update-form
+++ /dev/null
@@ -1,707 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: 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.
-
-# SPARQL HTTP Update, client.
-
-require 'optparse'
-require 'net/http'
-require 'uri'
-require 'cgi'
-require 'pp'
-require 'ostruct'
-
-# ToDo
-#  Allow a choice of media type for GET
-#   --accept "content-type" (and abbreviations)
-#   --header "Add:this"
-#   --user, --password
-#  Basic authentication: request.basic_auth("username", "password")
-#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
-
-SOH_NAME="SOH"
-SOH_VERSION="0.0.0"
-
-$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
-
-# What about direct naming?
-
-# Names
-$mtTurtle           = 'text/turtle;charset=utf-8'
-$mtRDF              = 'application/rdf+xml'
-$mtText             = 'text/plain'
-$mtNQuads           = 'text/n-quads'
-$mtTriG             = 'application/trig'
-$mtSparqlResultsX   = 'application/sparql-results+xml'
-$mtSparqlResultsJ   = 'application/sparql-results+json'
-$mtAppJSON          = 'application/json'
-$mtAppXML           = 'application/xml'
-$mtSparqlResultsTSV = 'application/sparql-results+tsv'
-$mtSparqlResultsCSV = 'application/sparql-results+csv'
-$mtSparqlUpdate     = 'application/sparql-update'
-$mtWWWForm          = 'application/x-www-form-urlencoded'
-$mtSparqlQuery      = "application/sparql-query" ;
-
-# Global media type table.
-$fileMediaTypes = {}
-$fileMediaTypes['ttl']   = $mtTurtle
-$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
-$fileMediaTypes['nt']    = $mtText
-$fileMediaTypes['rdf']   = $mtRDF
-$fileMediaTypes['owl']   = $mtRDF
-$fileMediaTypes['nq']    = $mtNQuads
-$fileMediaTypes['trig']  = $mtTriG
-
-# Global charset : no entry means "don't set"
-$charsetUTF8      = 'utf-8'
-$charset = {}
-$charset[$mtTurtle]   = 'utf-8'
-$charset[$mtText]     = 'ascii'
-$charset[$mtTriG]     = 'utf-8'
-$charset[$mtNQuads]   = 'ascii'
-
-# Headers
-
-$hContentType         = 'Content-Type'
-# $hContentEncoding     = 'Content-Encoding'
-$hContentLength       = 'Content-Length'
-# $hContentLocation     = 'Content-Location'
-# $hContentRange        = 'Content-Range'
-
-$hAccept              = 'Accept'
-$hAcceptCharset       = 'Accept-Charset'
-$hAcceptEncoding      = 'Accept-Encoding'
-$hAcceptRanges        = 'Accept-Ranges' 
-
-$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
-$print_http = false
-
-# Default for GET
-# At least allow anythign (and hope!)
-$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
-# For SPARQL query
-$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
-
-# Accept any in case of trouble.
-$accept_rdf="#{$accept_rdf} , */*;q=0.1"
-$accept_results="#{$accept_results} , */*;q=0.1" 
-
-# The media type usually forces the charset.
-$accept_charset=nil
-
-## Who we are.
-## Two styles:
-##    s-query .....
-##    soh query .....
-
-$cmd = File.basename($0)
-if $cmd == 'soh'
-then
-  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
-end
-
-if ! $cmd.start_with?('s-') && $cmd != 'soh'
-  $cmd = 's-'+$cmd
-end
-
-## -------- 
-
-def GET(dataset, graph)
-  print "GET #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  get_worker(requestURI, headers)
-end
-
-def get_worker(requestURI, headers)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Get.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-def HEAD(dataset, graph)
-  print "HEAD #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Head.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def PUT(dataset, graph, file)
-  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Put)
-end
-
-def POST(dataset, graph, file)
-  print "POST #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Post)
-end
-
-def DELETE(dataset, graph)
-  print "DELETE #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Delete.new(uri.request_uri)
-  headers = {}
-  headers.merge!($headers)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def uri_escape(string)
-  CGI.escape(string)
-end
-
-def target(dataset, graph)
-  return dataset+"?default" if graph == "default"
-  return dataset+"?graph="+uri_escape(graph)
-end
-
-def send_body(dataset, graph, file, method)
-  mt = content_type(file)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hContentType] = mt
-  headers[$hContentLength] = File.size(file).to_s
-  ## p headers
-
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  
-  request = method.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  request.body_stream = File.open(file)
-  response_no_body(uri, request)
-end
-
-def response_no_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue Exception => e  
-    # puts e.message  
-    #puts e.backtrace.inspect  
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-  response = http.request(request)
-  print_http_response(response)
-  case response
-  when Net::HTTPSuccess, Net::HTTPRedirection
-    # OK
-  when Net::HTTPNotFound
-    warn_exit "404 Not found: #{uri}", 9
-    #print response.body
-  else
-    warn_exit "#{response.code} #{response.message} #{uri}", 9
-    # Unreachable
-      response.error!
-  end
-  # NO BODY IN RESPONSE
-end
-
-def response_print_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue => e  
-    #puts e.backtrace.inspect  
-    #print e.class
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-
-  # Add a blank line if headers were output.
-  print "\n" if $http_print ;
-
-  begin
-    response = http.request(request) { |res| 
-      print_http_response(res)
-      #puts res.code
-      res.read_body do |segment|
-        print segment
-      end
-    }
-    case response
-    when Net::HTTPSuccess, Net::HTTPRedirection
-      # OK
-    when Net::HTTPNotFound
-      warn_exit "404 Not found: #{uri}", 9
-      #print response.body
-    else
-      warn_exit "#{response.code}: #{uri}", 9
-      # Unreachable
-      response.error!
-    end
-  rescue EOFError => e
-    warn_exit "IO Error: "+e.message, 3
-  end
-end
-
-def print_http_request(uri, request)
-  return unless $print_http
-  #print "Request\n"
-  print request.method," ",uri, "\n"
-  print_headers("  ",request)
-end
-
-def print_http_response(response)
-  return unless $print_http
-  #print "Response\n"
-  print response.code, " ", response.message, "\n"
-  print_headers("  ",response)
-end
-
-def print_headers(marker, headers)
-  headers.each do |k,v| 
-    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
-    printf "%s%-20s %s\n",marker,k,v
-  end
-end
-
-def content_type(file)
-  file =~ /\.([^.]*)$/
-  ext = $1
-  mt = $fileMediaTypes[ext]
-  cs = $charset[mt]
-  mt = mt+';charset='+cs if ! cs.nil?
-  return mt
-end
-
-def charset(content_type)
-  return $charset[content_type]
-end
-
-def warn_exit(msg, rc)
-    warn msg
-    exit rc ;
-end
-
-def parseURI(uri_string)
-  begin
-    return URI.parse(uri_string).to_s
-  rescue URI::InvalidURIError => err
-    warn_exit "Bad URI: <#{uri_string}>", 2
-  end
-end
-
-## ---- Command
-
-def cmd_soh(command=nil)
-  ## Command line
-  options = {}
-  optparse = OptionParser.new do |opts|
-    # Set a banner, displayed at the top
-    # of the help screen.
-    case $cmd
-    when "s-http", "sparql-http", "soh"
-      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
-    when "s-get", "s-head", "s-delete"
-      banner="$cmd  datasetURI graph"
-    end
-
-    opts.banner = $banner
-    # Define the options, and what they do
-    
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    
-    options[:version] = false
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end
-    
-    # This displays the help screen, all programs are
-    # assumed to have this option.
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  if command.nil?
-    if ARGV.size == 0
-      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
-      exit 1
-    end
-    cmdPrint=ARGV.shift
-    command=cmdPrint.upcase
-  else
-    cmdPrint=command
-  end
-
-  case command
-  when "HEAD", "GET", "DELETE"
-    requiredFile=false
-  when "PUT", "POST"
-    requiredFile=true
-  when "QUERY"
-    cmd_sparql_query
-  when "UPDATE"
-    cmd_sparql_update
-  else
-    warn_exit "Unknown command: #{command}", 2
-  end
-
-  if requiredFile 
-  then
-    if ARGV.size != 3
-      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
-    end
-  else
-    if ARGV.size != 2
-      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
-    end
-  end
-
-  dataset=parseURI(ARGV.shift)
-  # Relative URI?
-  graph=parseURI(ARGV.shift)
-  file=""
-  if requiredFile
-  then
-    file = ARGV.shift if requiredFile
-    if ! File.exist?(file)
-      warn_exit "No such file: "+file, 3
-    end
-    if File.directory?(file)
-      warn_exit "File is a directory: "+file, 3
-    end
-  end
-
-  case command
-  when "GET"
-    GET(dataset, graph)
-  when "HEAD"
-    HEAD(dataset, graph)
-  when "PUT"
-    PUT(dataset, graph, file)
-  when "DELETE"
-    DELETE(dataset, graph)
-  when "POST"
-    POST(dataset, graph, file)
-  else
-    warn_exit "Internal error: Unknown command: #{cmd}", 2
-  end
-  exit 0
-end
-
-## --------
-def string_or_file(arg)
-  return arg if ! arg.match(/^@/)
-  a=(arg[1..-1])
-  open(a, 'rb'){|f| f.read}
-end
-
-## -------- SPARQL Query
-
-## Choose method
-def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
-   if ! query_file.nil?
-    query = open(query_file, 'rb'){|f| f.read}
-  end
-  if forcePOST || query.length >= 2*1024 
-    SPARQL_query_POST(service, query, args2)
-  else
-    SPARQL_query_GET(service, query, args2)
-  end
-end
-
-## By GET
-
-def SPARQL_query_GET(service, query, args2)
-  args = { "query" => query }
-  args.merge!(args2)
-  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  action="#{service}?#{qs}"
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  get_worker(action, headers)
-end
-
-## By POST
-
-def SPARQL_query_POST(service, query, args2)
-  # DRY - body/no body for each of request and response.
-  post_params={ "query" => query }
-  post_params.merge!(args2)
-  uri = URI.parse(service)
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  execute_post_form_body(uri, headers, post_params)
-end
-
-def execute_post_form_body(uri, headers, post_params)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = qs.length.to_s
-  request.initialize_http_header(headers)
-  request.body = qs
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-# Usage: -v --help --file= --query=
-def cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
-      options[:file]=file
-    end
-    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
-            'Set the output argument') do |type|
-      options[:output]=type
-    end
-    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
-            'Set the accept header type') do |type|
-      options[:accept]=type
-    end
-    options[:verbose] = false
-    opts.on( '--post', 'Force use of POST' ) do
-      options[:post] = true
-    end
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
-    warn e
-    exit 1
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-  usePOST = options[:post]
-
-  service = options[:service]
-  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
-
-  # Query
-  query=nil
-  query_file=options[:file]
-  if query_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No query specified.',1
-    end
-  if query_file.nil?
-    query = ARGV.shift
-    if query.match(/^@/)
-      query_file = query[1..-1]
-      query = nil
-    end
-  end
-
-  # --output ==> output= (non-standard)
-  args={}
-  case options[:output]
-  when nil
-  when  "json","xml","text","csv","tsv"
-    args['output'] = options[:output]
-  when :json,:xml,:text,:csv,:tsv
-    args['output'] = options[:output].to_s
-  else
-    warn_exit "Unrecognized output type: "+options[:output],2
-  end
-
-  # --accept
-  # options[:accept]
-
-  print "SPARQL #{service}\n" if $verbose
-  #args={"output"=>"text"}
-  SPARQL_query(service, query, query_file, usePOST, args)
-  exit(0)
-end
-
-## -------- SPARQL Update
-
-# Update sent as a WWW form.
-def SPARQL_update_by_form(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  # args? encode?
-  body="update="+uri_escape(update)
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = body.length.to_s
-  uri = URI.parse(service)
-  execute_post_form(uri, headers, body)
-end
-
-# DRY - query form.
-def execute_post_form(uri, headers, body)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = body
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def SPARQL_update(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  headers[$hContentType] = $mtSparqlUpdate
-  uri = URI.parse(service)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = update
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def cmd_sparql_update(by_raw_post=true)
-  # Share with cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
-      options[:file]=file
-    end
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  service = options[:service]
-  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
-  
-  update=nil
-  update_file=options[:file]
-
-  if update_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No update specified.',1
-    end
-  if update_file.nil?
-    update = ARGV.shift
-    if update.match(/^@/)
-      update_file = update[1..-1]
-      update = nil
-    end
-  end
-  
-  print "SPARQL-Update #{service}\n" if $verbose
-  args={}
-
-  # Reads in the file :-(
-  if update.nil?
-  then
-    update = open(update_file, 'rb'){|f| f.read}
-  else
-    update = string_or_file(update)
-  end
-
-  if by_raw_post
-    SPARQL_update(service, update, args)
-  else
-    SPARQL_update_by_form(service, update, args)
-  end
-  exit(0)
-end
-
-## -------
-
-case $cmd
-when "s-http", "sparql-http", "soh"
-  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
-  cmd_soh
-when "s-get", "s-head", "s-put", "s-delete", "s-post"
-
-  case $cmd
-  when "s-get", "s-head", "s-delete"
-    $banner="#{$cmd} datasetURI graph"
-  when "s-put", "s-post"
-    $banner="#{$cmd} datasetURI graph file"
-  end
-  cmd2 = $cmd.sub(/^s-/, '').upcase
-  cmd_soh cmd2
-
-when "s-query", "sparql-query"
-  cmd_sparql_query
-when "s-update", "sparql-update"
-  cmd_sparql_update true
-when "s-update-form", "sparql-update-form"
-  cmd_sparql_update false
-else 
-  warn_exit "Unknown: "+$cmd, 1
-end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/bin/soh
----------------------------------------------------------------------
diff --git a/jena-fuseki2/bin/soh b/jena-fuseki2/bin/soh
deleted file mode 100755
index 0e3a807..0000000
--- a/jena-fuseki2/bin/soh
+++ /dev/null
@@ -1,707 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: 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.
-
-# SPARQL HTTP Update, client.
-
-require 'optparse'
-require 'net/http'
-require 'uri'
-require 'cgi'
-require 'pp'
-require 'ostruct'
-
-# ToDo
-#  Allow a choice of media type for GET
-#   --accept "content-type" (and abbreviations)
-#   --header "Add:this"
-#   --user, --password
-#  Basic authentication: request.basic_auth("username", "password")
-#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
-
-SOH_NAME="SOH"
-SOH_VERSION="0.0.0"
-
-$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
-
-# What about direct naming?
-
-# Names
-$mtTurtle           = 'text/turtle;charset=utf-8'
-$mtRDF              = 'application/rdf+xml'
-$mtText             = 'text/plain'
-$mtNQuads           = 'text/n-quads'
-$mtTriG             = 'application/trig'
-$mtSparqlResultsX   = 'application/sparql-results+xml'
-$mtSparqlResultsJ   = 'application/sparql-results+json'
-$mtAppJSON          = 'application/json'
-$mtAppXML           = 'application/xml'
-$mtSparqlResultsTSV = 'application/sparql-results+tsv'
-$mtSparqlResultsCSV = 'application/sparql-results+csv'
-$mtSparqlUpdate     = 'application/sparql-update'
-$mtWWWForm          = 'application/x-www-form-urlencoded'
-$mtSparqlQuery      = "application/sparql-query" ;
-
-# Global media type table.
-$fileMediaTypes = {}
-$fileMediaTypes['ttl']   = $mtTurtle
-$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
-$fileMediaTypes['nt']    = $mtText
-$fileMediaTypes['rdf']   = $mtRDF
-$fileMediaTypes['owl']   = $mtRDF
-$fileMediaTypes['nq']    = $mtNQuads
-$fileMediaTypes['trig']  = $mtTriG
-
-# Global charset : no entry means "don't set"
-$charsetUTF8      = 'utf-8'
-$charset = {}
-$charset[$mtTurtle]   = 'utf-8'
-$charset[$mtText]     = 'ascii'
-$charset[$mtTriG]     = 'utf-8'
-$charset[$mtNQuads]   = 'ascii'
-
-# Headers
-
-$hContentType         = 'Content-Type'
-# $hContentEncoding     = 'Content-Encoding'
-$hContentLength       = 'Content-Length'
-# $hContentLocation     = 'Content-Location'
-# $hContentRange        = 'Content-Range'
-
-$hAccept              = 'Accept'
-$hAcceptCharset       = 'Accept-Charset'
-$hAcceptEncoding      = 'Accept-Encoding'
-$hAcceptRanges        = 'Accept-Ranges' 
-
-$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
-$print_http = false
-
-# Default for GET
-# At least allow anythign (and hope!)
-$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
-# For SPARQL query
-$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
-
-# Accept any in case of trouble.
-$accept_rdf="#{$accept_rdf} , */*;q=0.1"
-$accept_results="#{$accept_results} , */*;q=0.1" 
-
-# The media type usually forces the charset.
-$accept_charset=nil
-
-## Who we are.
-## Two styles:
-##    s-query .....
-##    soh query .....
-
-$cmd = File.basename($0)
-if $cmd == 'soh'
-then
-  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
-end
-
-if ! $cmd.start_with?('s-') && $cmd != 'soh'
-  $cmd = 's-'+$cmd
-end
-
-## -------- 
-
-def GET(dataset, graph)
-  print "GET #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  get_worker(requestURI, headers)
-end
-
-def get_worker(requestURI, headers)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Get.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-def HEAD(dataset, graph)
-  print "HEAD #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Head.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def PUT(dataset, graph, file)
-  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Put)
-end
-
-def POST(dataset, graph, file)
-  print "POST #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Post)
-end
-
-def DELETE(dataset, graph)
-  print "DELETE #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Delete.new(uri.request_uri)
-  headers = {}
-  headers.merge!($headers)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def uri_escape(string)
-  CGI.escape(string)
-end
-
-def target(dataset, graph)
-  return dataset+"?default" if graph == "default"
-  return dataset+"?graph="+uri_escape(graph)
-end
-
-def send_body(dataset, graph, file, method)
-  mt = content_type(file)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hContentType] = mt
-  headers[$hContentLength] = File.size(file).to_s
-  ## p headers
-
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  
-  request = method.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  request.body_stream = File.open(file)
-  response_no_body(uri, request)
-end
-
-def response_no_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue Exception => e  
-    # puts e.message  
-    #puts e.backtrace.inspect  
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-  response = http.request(request)
-  print_http_response(response)
-  case response
-  when Net::HTTPSuccess, Net::HTTPRedirection
-    # OK
-  when Net::HTTPNotFound
-    warn_exit "404 Not found: #{uri}", 9
-    #print response.body
-  else
-    warn_exit "#{response.code} #{response.message} #{uri}", 9
-    # Unreachable
-      response.error!
-  end
-  # NO BODY IN RESPONSE
-end
-
-def response_print_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue => e  
-    #puts e.backtrace.inspect  
-    #print e.class
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-
-  # Add a blank line if headers were output.
-  print "\n" if $http_print ;
-
-  begin
-    response = http.request(request) { |res| 
-      print_http_response(res)
-      #puts res.code
-      res.read_body do |segment|
-        print segment
-      end
-    }
-    case response
-    when Net::HTTPSuccess, Net::HTTPRedirection
-      # OK
-    when Net::HTTPNotFound
-      warn_exit "404 Not found: #{uri}", 9
-      #print response.body
-    else
-      warn_exit "#{response.code}: #{uri}", 9
-      # Unreachable
-      response.error!
-    end
-  rescue EOFError => e
-    warn_exit "IO Error: "+e.message, 3
-  end
-end
-
-def print_http_request(uri, request)
-  return unless $print_http
-  #print "Request\n"
-  print request.method," ",uri, "\n"
-  print_headers("  ",request)
-end
-
-def print_http_response(response)
-  return unless $print_http
-  #print "Response\n"
-  print response.code, " ", response.message, "\n"
-  print_headers("  ",response)
-end
-
-def print_headers(marker, headers)
-  headers.each do |k,v| 
-    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
-    printf "%s%-20s %s\n",marker,k,v
-  end
-end
-
-def content_type(file)
-  file =~ /\.([^.]*)$/
-  ext = $1
-  mt = $fileMediaTypes[ext]
-  cs = $charset[mt]
-  mt = mt+';charset='+cs if ! cs.nil?
-  return mt
-end
-
-def charset(content_type)
-  return $charset[content_type]
-end
-
-def warn_exit(msg, rc)
-    warn msg
-    exit rc ;
-end
-
-def parseURI(uri_string)
-  begin
-    return URI.parse(uri_string).to_s
-  rescue URI::InvalidURIError => err
-    warn_exit "Bad URI: <#{uri_string}>", 2
-  end
-end
-
-## ---- Command
-
-def cmd_soh(command=nil)
-  ## Command line
-  options = {}
-  optparse = OptionParser.new do |opts|
-    # Set a banner, displayed at the top
-    # of the help screen.
-    case $cmd
-    when "s-http", "sparql-http", "soh"
-      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
-    when "s-get", "s-head", "s-delete"
-      banner="$cmd  datasetURI graph"
-    end
-
-    opts.banner = $banner
-    # Define the options, and what they do
-    
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    
-    options[:version] = false
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end
-    
-    # This displays the help screen, all programs are
-    # assumed to have this option.
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  if command.nil?
-    if ARGV.size == 0
-      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
-      exit 1
-    end
-    cmdPrint=ARGV.shift
-    command=cmdPrint.upcase
-  else
-    cmdPrint=command
-  end
-
-  case command
-  when "HEAD", "GET", "DELETE"
-    requiredFile=false
-  when "PUT", "POST"
-    requiredFile=true
-  when "QUERY"
-    cmd_sparql_query
-  when "UPDATE"
-    cmd_sparql_update
-  else
-    warn_exit "Unknown command: #{command}", 2
-  end
-
-  if requiredFile 
-  then
-    if ARGV.size != 3
-      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
-    end
-  else
-    if ARGV.size != 2
-      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
-    end
-  end
-
-  dataset=parseURI(ARGV.shift)
-  # Relative URI?
-  graph=parseURI(ARGV.shift)
-  file=""
-  if requiredFile
-  then
-    file = ARGV.shift if requiredFile
-    if ! File.exist?(file)
-      warn_exit "No such file: "+file, 3
-    end
-    if File.directory?(file)
-      warn_exit "File is a directory: "+file, 3
-    end
-  end
-
-  case command
-  when "GET"
-    GET(dataset, graph)
-  when "HEAD"
-    HEAD(dataset, graph)
-  when "PUT"
-    PUT(dataset, graph, file)
-  when "DELETE"
-    DELETE(dataset, graph)
-  when "POST"
-    POST(dataset, graph, file)
-  else
-    warn_exit "Internal error: Unknown command: #{cmd}", 2
-  end
-  exit 0
-end
-
-## --------
-def string_or_file(arg)
-  return arg if ! arg.match(/^@/)
-  a=(arg[1..-1])
-  open(a, 'rb'){|f| f.read}
-end
-
-## -------- SPARQL Query
-
-## Choose method
-def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
-   if ! query_file.nil?
-    query = open(query_file, 'rb'){|f| f.read}
-  end
-  if forcePOST || query.length >= 2*1024 
-    SPARQL_query_POST(service, query, args2)
-  else
-    SPARQL_query_GET(service, query, args2)
-  end
-end
-
-## By GET
-
-def SPARQL_query_GET(service, query, args2)
-  args = { "query" => query }
-  args.merge!(args2)
-  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  action="#{service}?#{qs}"
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  get_worker(action, headers)
-end
-
-## By POST
-
-def SPARQL_query_POST(service, query, args2)
-  # DRY - body/no body for each of request and response.
-  post_params={ "query" => query }
-  post_params.merge!(args2)
-  uri = URI.parse(service)
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  execute_post_form_body(uri, headers, post_params)
-end
-
-def execute_post_form_body(uri, headers, post_params)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = qs.length.to_s
-  request.initialize_http_header(headers)
-  request.body = qs
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-# Usage: -v --help --file= --query=
-def cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
-      options[:file]=file
-    end
-    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
-            'Set the output argument') do |type|
-      options[:output]=type
-    end
-    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
-            'Set the accept header type') do |type|
-      options[:accept]=type
-    end
-    options[:verbose] = false
-    opts.on( '--post', 'Force use of POST' ) do
-      options[:post] = true
-    end
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
-    warn e
-    exit 1
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-  usePOST = options[:post]
-
-  service = options[:service]
-  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
-
-  # Query
-  query=nil
-  query_file=options[:file]
-  if query_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No query specified.',1
-    end
-  if query_file.nil?
-    query = ARGV.shift
-    if query.match(/^@/)
-      query_file = query[1..-1]
-      query = nil
-    end
-  end
-
-  # --output ==> output= (non-standard)
-  args={}
-  case options[:output]
-  when nil
-  when  "json","xml","text","csv","tsv"
-    args['output'] = options[:output]
-  when :json,:xml,:text,:csv,:tsv
-    args['output'] = options[:output].to_s
-  else
-    warn_exit "Unrecognized output type: "+options[:output],2
-  end
-
-  # --accept
-  # options[:accept]
-
-  print "SPARQL #{service}\n" if $verbose
-  #args={"output"=>"text"}
-  SPARQL_query(service, query, query_file, usePOST, args)
-  exit(0)
-end
-
-## -------- SPARQL Update
-
-# Update sent as a WWW form.
-def SPARQL_update_by_form(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  # args? encode?
-  body="update="+uri_escape(update)
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = body.length.to_s
-  uri = URI.parse(service)
-  execute_post_form(uri, headers, body)
-end
-
-# DRY - query form.
-def execute_post_form(uri, headers, body)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = body
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def SPARQL_update(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  headers[$hContentType] = $mtSparqlUpdate
-  uri = URI.parse(service)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = update
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def cmd_sparql_update(by_raw_post=true)
-  # Share with cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
-      options[:file]=file
-    end
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  service = options[:service]
-  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
-  
-  update=nil
-  update_file=options[:file]
-
-  if update_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No update specified.',1
-    end
-  if update_file.nil?
-    update = ARGV.shift
-    if update.match(/^@/)
-      update_file = update[1..-1]
-      update = nil
-    end
-  end
-  
-  print "SPARQL-Update #{service}\n" if $verbose
-  args={}
-
-  # Reads in the file :-(
-  if update.nil?
-  then
-    update = open(update_file, 'rb'){|f| f.read}
-  else
-    update = string_or_file(update)
-  end
-
-  if by_raw_post
-    SPARQL_update(service, update, args)
-  else
-    SPARQL_update_by_form(service, update, args)
-  end
-  exit(0)
-end
-
-## -------
-
-case $cmd
-when "s-http", "sparql-http", "soh"
-  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
-  cmd_soh
-when "s-get", "s-head", "s-put", "s-delete", "s-post"
-
-  case $cmd
-  when "s-get", "s-head", "s-delete"
-    $banner="#{$cmd} datasetURI graph"
-  when "s-put", "s-post"
-    $banner="#{$cmd} datasetURI graph file"
-  end
-  cmd2 = $cmd.sub(/^s-/, '').upcase
-  cmd_soh cmd2
-
-when "s-query", "sparql-query"
-  cmd_sparql_query
-when "s-update", "sparql-update"
-  cmd_sparql_update true
-when "s-update-form", "sparql-update-form"
-  cmd_sparql_update false
-else 
-  warn_exit "Unknown: "+$cmd, 1
-end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/dist/ABOUT
----------------------------------------------------------------------
diff --git a/jena-fuseki2/dist/ABOUT b/jena-fuseki2/dist/ABOUT
deleted file mode 100644
index cee2ca2..0000000
--- a/jena-fuseki2/dist/ABOUT
+++ /dev/null
@@ -1 +0,0 @@
-This directory holds the material needed for inclusion in the Fuseki distribution.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/dist/LICENSE
----------------------------------------------------------------------
diff --git a/jena-fuseki2/dist/LICENSE b/jena-fuseki2/dist/LICENSE
deleted file mode 100644
index 10474ab..0000000
--- a/jena-fuseki2/dist/LICENSE
+++ /dev/null
@@ -1,617 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-- - - - - - - - - - - - - - - - - - - - - - - 
-
-  (c) Copyright 2003, Plugged In Software 
-
-  All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
-    derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-- - - - - - - - - - - - - - - - - - - - - - - 
-
-http://www.slf4j.org/license.html
-
- Copyright (c) 2004-2011 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
- 
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
- 
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-- - - - - - - - - - - - - - - - - - - - - - - 
-
-==============================================================
- Jetty Web Container
- Copyright 1995-2012 Mort Bay Consulting Pty Ltd.
-==============================================================
-
-The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd
-unless otherwise noted.
-
-Jetty is dual licensed under both
-
-  * The Apache 2.0 License
-    http://www.apache.org/licenses/LICENSE-2.0.html
-
-      and
-
-  * The Eclipse Public 1.0 License
-    http://www.eclipse.org/legal/epl-v10.html
-
-Jetty may be distributed under either license.
-
-The javax.servlet package used was sourced from the Apache
-Software Foundation and is distributed under the apache 2.0
-license.
-
-The UnixCrypt.java code implements the one way cryptography used by
-Unix systems for simple password protection.  Copyright 1996 Aki Yoshida,
-modified April 2001  by Iris Van den Broeke, Daniel Deville.
-Permission to use, copy, modify and distribute UnixCrypt
-for non-commercial or commercial purposes and without fee is
-granted provided that the copyright notice appears in all copies.
-
-- - - - - - - - - - - - - - - - - - - - - - - 
-
-This product bundles "Bootstrap", which is available under an
-MIT license.  See: https://github.com/twbs/bootstrap/blob/master/LICENSE
-
-This product bundles "codemirror", which is available under an
-MIT license.  See http://codemirror.net/LICENSE
-
-This product bundles "jquery", which is available under an
-MIT license.  See https://jquery.org/license/
-
-This product bundles "jquery.form", which is available under an
-MIT license.  See http://malsup.github.io/mit-license.txt
-
-This product bundles "jquery.xdomainrequest", which is available under an
-MIT license.  See https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest/blob/master/LICENSE.txt
-
-This product bundles "backbone.js", which is available under an
-MIT license.  See https://github.com/jashkenas/backbone/blob/master/LICENSE
-
-This product bundles "backbone.marionette", which is available under an
-MIT license. See http://mutedsolutions.mit-license.org/
-   "backbone.marionette" includes "Backbone.BabySitter" and 
-   "Backbone.Wreqr" also available under the same MIT license.
-
-This product bundles "html5shiv", which is available under an
-MIT license.  See https://code.google.com/p/html5shiv/
-
-This product bundles "RequireJS", which is available under an
-MIT license. 
-https://github.com/jrburke/requirejs/blob/master/LICENSE
-  "RequireJS" is also available with a "30clause BSD license"
-
-This product bundles "Respond", which is available under an
-MIT license. See https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
-
-This product bundles "sprintf.js", which is available under a
-"3 clause BSD" license. 
-  https://github.com/alexei/sprintf.js/blob/master/LICENSE
-
-This product bundles "underscore", which is available under an
-MIT license.  See https://github.com/jashkenas/underscore/blob/master/LICENSE
-
-This product bundles "FontAwesome"
-  "Font Awesome by Dave Gandy - http://fontawesome.io"
-The font is available under an  SIL Open Font License 1.1
-and the CSS files under an MIT License.
-See http://fontawesome.io/license/
-
-This product bundles "jQuery File Upload Plugin" 
-which is available under an MIT License.
-See https://github.com/blueimp/jQuery-File-Upload
-
-This product bundles "Bootstrap-select"
-which is available under an MIT License.
-See https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE
-
-This product bundles "pivot.js"
-which is available under a BSD 3-clause style license.
-https://github.com/rwjblue/pivot.js/blob/master/LICENSE
-
-This product bundles "YASEQE - Yet Another Sparql Query Editor"
-which is available under an MIT License.
-See http://yasqe.yasgui.org/license.txt
-
-This product bundles "YASR - Yet Another Sparql Resultset GUI"
-which is available under an MIT License.
-See http://yasr.yasgui.org/license.txt
-
-- - - - - - - - - - - - - - - - - - - - - - - 
-
-From Apache HttpComponents Client
-
-This project contains annotations derived from JCIP-ANNOTATIONS
-Copyright (c) 2005 Brian Goetz and Tim Peierls.
-See http://www.jcip.net and the Creative Commons Attribution License 
-(http://creativecommons.org/licenses/by/2.5)
-
-- - - - - - - - - - - - - - - - - - - - - - - 
-
-From Apache Lucene
-
-Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was
-derived from unicode conversion examples available at
-http://www.unicode.org/Public/PROGRAMS/CVTUTF.  Here is the copyright
-from those sources:
-
-/*
- * Copyright 2001-2004 Unicode, Inc.
- * 
- * Disclaimer
- * 
- * This source code is provided as is by Unicode, Inc. No claims are
- * made as to fitness for any particular purpose. No warranties of any
- * kind are expressed or implied. The recipient agrees to determine
- * applicability of information provided. If this file has been
- * purchased on magnetic or optical media from Unicode, Inc., the
- * sole remedy for any claim will be exchange of defective media
- * within 90 days of receipt.
- * 
- * Limitations on Rights to Redistribute This Code
- * 
- * Unicode, Inc. hereby grants the right to freely use the information
- * supplied in this file in the creation of products supporting the
- * Unicode Standard, and to make copies of this file in any form
- * for internal or external distribution as long as this notice
- * remains attached.
- */
-
-
-Some code in core/src/java/org/apache/lucene/util/ArrayUtil.java was
-derived from Python 2.4.2 sources available at
-http://www.python.org. Full license is here:
-
-  http://www.python.org/download/releases/2.4.2/license/
-
-Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was
-derived from Python 3.1.2 sources available at
-http://www.python.org. Full license is here:
-
-  http://www.python.org/download/releases/3.1.2/license/
-
-Some code in core/src/java/org/apache/lucene/util/automaton was
-derived from Brics automaton sources available at
-www.brics.dk/automaton/. Here is the copyright from those sources:
-
-/*
- * Copyright (c) 2001-2009 Anders Moeller
- * All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- 
-The levenshtein automata tables in core/src/java/org/apache/lucene/util/automaton 
-were automatically generated with the moman/finenight FSA package.
-Here is the copyright for those sources:
-
-# Copyright (c) 2010, Jean-Philippe Barrette-LaPierre, <jp...@rrette.com>
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use,
-# copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following
-# conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-
-Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was
-derived from ICU (http://www.icu-project.org)
-The full license is available here: 
-  http://source.icu-project.org/repos/icu/icu/trunk/license.html
-
-/*
- * Copyright (C) 1999-2010, International Business Machines
- * Corporation and others.  All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy 
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights 
- * to use, copy, modify, merge, publish, distribute, and/or sell copies of the 
- * Software, and to permit persons to whom the Software is furnished to do so, 
- * provided that the above copyright notice(s) and this permission notice appear 
- * in all copies of the Software and that both the above copyright notice(s) and
- * this permission notice appear in supporting documentation.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. 
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE 
- * LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR 
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 
- * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Except as contained in this notice, the name of a copyright holder shall not 
- * be used in advertising or otherwise to promote the sale, use or other 
- * dealings in this Software without prior written authorization of the 
- * copyright holder.
- */
- 
-The following license applies to the Snowball stemmers:
-
-Copyright (c) 2001, Dr Martin Porter
-Copyright (c) 2002, Richard Boulton
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-    * this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-    * notice, this list of conditions and the following disclaimer in the
-    * documentation and/or other materials provided with the distribution.
-    * Neither the name of the copyright holders nor the names of its contributors
-    * may be used to endorse or promote products derived from this software
-    * without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The following license applies to the KStemmer:
-
-Copyright © 2003,
-Center for Intelligent Information Retrieval,
-University of Massachusetts, Amherst.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3. The names "Center for Intelligent Information Retrieval" and
-"University of Massachusetts" must not be used to endorse or promote products
-derived from this software without prior written permission. To obtain
-permission, contact info@ciir.cs.umass.edu.
-
-THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF MASSACHUSETTS AND OTHER CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-The following license applies to the Morfologik project:
-
-Copyright (c) 2006 Dawid Weiss
-Copyright (c) 2007-2011 Dawid Weiss, Marcin Miłkowski
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, 
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, 
-    this list of conditions and the following disclaimer.
-    
-    * Redistributions in binary form must reproduce the above copyright notice, 
-    this list of conditions and the following disclaimer in the documentation 
-    and/or other materials provided with the distribution.
-    
-    * Neither the name of Morfologik nor the names of its contributors 
-    may be used to endorse or promote products derived from this software 
-    without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
----
-
-The dictionary comes from Morfologik project. Morfologik uses data from 
-Polish ispell/myspell dictionary hosted at http://www.sjp.pl/slownik/en/ and 
-is licenced on the terms of (inter alia) LGPL and Creative Commons 
-ShareAlike. The part-of-speech tags were added in Morfologik project and
-are not found in the data from sjp.pl. The tagset is similar to IPI PAN
-tagset.
-
----
-
-The following license applies to the Morfeusz project,
-used by org.apache.lucene.analysis.morfologik.
-
-BSD-licensed dictionary of Polish (SGJP)
-http://sgjp.pl/morfeusz/
-
-Copyright © 2011 Zygmunt Saloni, Włodzimierz Gruszczyński, 
-	    	 Marcin Woliński, Robert Wołosz
-
-All rights reserved.
-
-Redistribution and  use in  source and binary  forms, with  or without
-modification, are permitted provided that the following conditions are
-met:
-
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the
-   distribution.
-
-THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS “AS IS” AND ANY EXPRESS
-OR  IMPLIED WARRANTIES,  INCLUDING, BUT  NOT LIMITED  TO,  THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT  SHALL COPYRIGHT  HOLDERS OR  CONTRIBUTORS BE
-LIABLE FOR  ANY DIRECT,  INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES  (INCLUDING, BUT NOT LIMITED  TO, PROCUREMENT OF
-SUBSTITUTE  GOODS OR  SERVICES;  LOSS  OF USE,  DATA,  OR PROFITS;  OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF LIABILITY,
-WHETHER IN  CONTRACT, STRICT LIABILITY, OR  TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-


[39/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap.css.map
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap.css.map b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap.css.map
new file mode 100644
index 0000000..6bc5a2d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["less/normalize.less","less/print.less","less/scaffolding.less","less/mixins.less","less/variables.less","less/thumbnails.less","less/carousel.less","less/type.less","less/code.less","less/grid.less","less/tables.less","less/forms.less","less/buttons.less","less/button-groups.less","less/component-animations.less","less/glyphicons.less","less/dropdowns.less","less/input-groups.less","less/navs.less","less/navbar.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/pager.less","less/labels.less","less/badges.less","less/jumbotron.less","less/alerts.less","less/progress-bars.less","less/media.less","less/list-group.less","less/panels.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/popovers.less","less/responsive-utilities.less"],"names":[],"mappings":";AAQA;EACE,uBAAA;EACA,0BAAA;EACA,8BAAA;;AAOF;EACE,SAAA;;AAUF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,cAAA;;AAQF;AACA;AACA;AACA
 ;EACE,qBAAA;EACA,wBAAA;;AAQF,KAAK,IAAI;EACP,aAAA;EACA,SAAA;;AAQF;AACA;EACE,aAAA;;AAUF;EACE,uBAAA;;AAOF,CAAC;AACD,CAAC;EACC,UAAA;;AAUF,IAAI;EACF,yBAAA;;AAOF;AACA;EACE,iBAAA;;AAOF;EACE,kBAAA;;AAQF;EACE,cAAA;EACA,gBAAA;;AAOF;EACE,gBAAA;EACA,WAAA;;AAOF;EACE,cAAA;;AAOF;AACA;EACE,cAAA;EACA,cAAA;EACA,kBAAA;EACA,wBAAA;;AAGF;EACE,WAAA;;AAGF;EACE,eAAA;;AAUF;EACE,SAAA;;AAOF,GAAG,IAAI;EACL,gBAAA;;AAUF;EACE,gBAAA;;AAOF;EACE,4BAAA;EACA,uBAAA;EACA,SAAA;;AAOF;EACE,cAAA;;AAOF;AACA;AACA;AACA;EACE,iCAAA;EACA,cAAA;;AAkBF;AACA;AACA;A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BnCF;EACE,mBAAA;;AAKF;AACA;AACA;AACA;ElCylBE,wBAAA;;AkCjlBF,QAHqC;EAGrC;IlCykBE,yBAAA;;EACA,KAAK;IAAK,cAAA;;EACV,EAAE;IAAQ,kBAAA;;EACV,EAAE;EACF,EAAE;IAAQ,mBAAA;;;AkCxkBZ,QAHqC,uBAAgC;EAGrE;IlCokBE,yBAAA;;EACA,KAAK;IAAK,cAAA;;EACV,EAAE;IAAQ,kBAAA;;EACV,EAAE;EACF,EAAE;IAAQ,mBAAA;;;AkCnkBZ,QAHqC,uBAAgC;EAGrE;IlC+jBE,yBAAA;;EACA,KAAK;IAAK,cAAA;;EACV,EAAE;IAAQ,kBAAA;;EACV,EAAE;EACF,EAAE;IAAQ,mBAAA;;;AkC9jBZ,QAHqC;EAGrC;IlC0jBE,yBAAA;;EACA,KAAK;IAAK,cAAA;;EACV,EAAE;IAAQ,kBAAA;;EACV,EAAE;EACF,EAAE;IAAQ,mBAAA;;;AkCxjBZ,QAHqC;EAGrC;IlC4jBE,wBAAA;;;AkCvjBF,QAHqC,uBAAgC;EAGrE;IlCujBE,wBAAA;;;AkCljBF,QAHqC,uBAAgC;EAGrE;IlCkjBE,wBAAA;;;AkC7iBF,QAHqC;EAGrC;IlC6iBE,wBAAA;;;AkCtiBF;ElCsiBE,wBAAA;;AkChiBF;EAAA;IlCwhBE,yBAAA;;EACA,KAAK;IAAK,cAAA;;EACV,EAAE;IAAQ,kBAAA;;EACV,EAAE;EACF,EAAE;IAAQ,mBAAA;;;AkCthBZ;EAAA;IlC0hBE,wBAAA","sourcesContent":["/*! normalize.css v3.0.0 |
  MIT License | git.io/normalize */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS text size adjust after orientation change, without disabling\n//    user zoom.\n//\n\nhtml {\n  font-family: sans-serif; // 1\n  -ms-text-size-adjust: 100%; // 2\n  -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n  margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined in IE 8/9.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection,\nsummary {\n  display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block; // 1\n  vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio
 ` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9.\n// Hide the `template` element in IE, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n  display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n  background: transparent;\n}\n\n//\n// Improve readability when focused and also mouse hovered in all browsers.\n//\n\na:active,\na:hover {\n  outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9, Safari 5, and Chrome.\n//\n\nabbr[title] {\n  border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.\n//\n\nb,\nstrong {\n  font-weight: bold;\n}\n\n//\n
 // Address styling not present in Safari 5 and Chrome.\n//\n\ndfn {\n  font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari 5, and Chrome.\n//\n\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n  background: #ff0;\n  color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n  font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\n\nsup {\n  top: -0.5em;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9.\n//\n\nimg {\n  border: 0;\n}\n\n//\n// Correct overflow displayed oddly in IE 9.\n//\n\nsvg:no
 t(:root) {\n  overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari 5.\n//\n\nfigure {\n  margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n  overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n//    Known issue: affects color of disabled elements.\n// 2. Correct fon
 t properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  color: inherit; // 1\n  font: inherit; // 2\n  margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10.\n//\n\nbutton {\n  overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8+, and Opera\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n  text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n//    and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n//    `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], 
 // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button; // 2\n  cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  border: 0;\n  padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n  line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  box-sizing: border-box; // 1\n  padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For cert
 ain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\n//    (include `-moz` to future-proof).\n//\n\ninput[type=\"search\"] {\n  -webkit-appearance: textfield; // 1\n  -moz-box-sizing: content-box;\n  -webkit-box-sizing: content-box; // 2\n  box-sizing: content-box;\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\n//\n// Def
 ine consistent border, margin, and padding.\n//\n\nfieldset {\n  border: 1px solid #c0c0c0;\n  margin: 0 2px;\n  padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n  border: 0; // 1\n  padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9.\n//\n\ntextarea {\n  overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n  font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n\ntd,\nth {\n  padding: 0;\n}","//\n// Basic print styles\n// --------------------------------------------------\n// Source: https://github.com/h5bp/html5-
 boilerplate/blob/master/css/main.css\n\n@media print {\n\n  * {\n    text-shadow: none !important;\n    color: #000 !important; // Black prints faster: h5bp.com/s\n    background: transparent !important;\n    box-shadow: none !important;\n  }\n\n  a,\n  a:visited {\n    text-decoration: underline;\n  }\n\n  a[href]:after {\n    content: \" (\" attr(href) \")\";\n  }\n\n  abbr[title]:after {\n    content: \" (\" attr(title) \")\";\n  }\n\n  // Don't show links for images, or javascript/internal links\n  a[href^=\"javascript:\"]:after,\n  a[href^=\"#\"]:after {\n    content: \"\";\n  }\n\n  pre,\n  blockquote {\n    border: 1px solid #999;\n    page-break-inside: avoid;\n  }\n\n  thead {\n    display: table-header-group; // h5bp.com/t\n  }\n\n  tr,\n  img {\n    page-break-inside: avoid;\n  }\n\n  img {\n    max-width: 100% !important;\n  }\n\n  p,\n  h2,\n  h3 {\n    orphans: 3;\n    widows: 3;\n  }\n\n  h2,\n  h3 {\n    page-break-after: avoid;\n  }\n\n  // Chrome (OSX) fix for http
 s://github.com/twbs/bootstrap/issues/11245\n  // Once fixed, we can just straight up remove this.\n  select {\n    background: #fff !important;\n  }\n\n  // Bootstrap components\n  .navbar {\n    display: none;\n  }\n  .table {\n    td,\n    th {\n      background-color: #fff !important;\n    }\n  }\n  .btn,\n  .dropup > .btn {\n    > .caret {\n      border-top-color: #000 !important;\n    }\n  }\n  .label {\n    border: 1px solid #000;\n  }\n\n  .table {\n    border-collapse: collapse !important;\n  }\n  .table-bordered {\n    th,\n    td {\n      border: 1px solid #ddd !important;\n    }\n  }\n\n}\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n  .box-sizing(border-box);\n}\n*:before,\n*:after {\n  .box-sizing(border-box)
 ;\n}\n\n\n// Body reset\n\nhtml {\n  font-size: 62.5%;\n  -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n  font-family: @font-family-base;\n  font-size: @font-size-base;\n  line-height: @line-height-base;\n  color: @text-color;\n  background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\n\n\n// Links\n\na {\n  color: @link-color;\n  text-decoration: none;\n\n  &:hover,\n  &:focus {\n    color: @link-hover-color;\n    text-decoration: underline;\n  }\n\n  &:focus {\n    .tab-focus();\n  }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n  margin: 0;\n}\n\n\n// Images\n\nimg {\n  vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n  .img-responsive();\n}\n\n/
 / Rounded corners\n.img-rounded {\n  border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n  padding: @thumbnail-padding;\n  line-height: @line-height-base;\n  background-color: @thumbnail-bg;\n  border: 1px solid @thumbnail-border;\n  border-radius: @thumbnail-border-radius;\n  .transition(all .2s ease-in-out);\n\n  // Keep them at most 100% wide\n  .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n  border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n  margin-top:    @line-height-computed;\n  margin-bottom: @line-height-computed;\n  border: 0;\n  border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content/\n\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0,0,0,
 0);\n  border: 0;\n}\n","//\n// Mixins\n// --------------------------------------------------\n\n\n// Utilities\n// -------------------------\n\n// Clearfix\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n//    contenteditable attribute is included anywhere else in the document.\n//    Otherwise it causes space to appear at the top and bottom of elements\n//    that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n//    `:before` to contain the top-margins of child elements.\n.clearfix() {\n  &:before,\n  &:after {\n    content: \" \"; // 1\n    display: table; // 2\n  }\n  &:after {\n    clear: both;\n  }\n}\n\n// WebKit-style focus\n.tab-focus() {\n  // Default\n  outline: thin dotted;\n  // WebKit\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n\n// Center-align a block level element\n.center-block() {\n 
  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n\n// Sizing shortcuts\n.size(@width; @height) {\n  width: @width;\n  height: @height;\n}\n.square(@size) {\n  .size(@size; @size);\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n  &::-moz-placeholder           { color: @color;   // Firefox\n                                  opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526\n  &:-ms-input-placeholder       { color: @color; } // Internet Explorer 10+\n  &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome\n}\n\n// Text overflow\n// Requires inline-block or block for proper styling\n.text-overflow() {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n// CSS image replacement\n//\n// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` a
 nd deprecated `.hide-text()`. Note\n// that we cannot chain the mixins together in Less, so they are repeated.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (will be removed in v4)\n.hide-text() {\n  font: ~\"0/0\" a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n// New mixin to use as of v3.0.1\n.text-hide() {\n  .hide-text();\n}\n\n\n\n// CSS3 PROPERTIES\n// --------------------------------------------------\n\n// Single side border-radius\n.border-top-radius(@radius) {\n  border-top-right-radius: @radius;\n   border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n  border-bottom-right-radius: @radius;\n     border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n  border-bottom-right-radius: @radius;\n   border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n  border-bottom-left-radius: @radius;\n     border-top-left-radi
 us: @radius;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n//   supported browsers that have box shadow capabilities now support the\n//   standard `box-shadow` property.\n.box-shadow(@shadow) {\n  -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n          box-shadow: @shadow;\n}\n\n// Transitions\n.transition(@transition) {\n  -webkit-transition: @transition;\n          transition: @transition;\n}\n.transition-property(@transition-property) {\n  -webkit-transition-property: @transition-property;\n          transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n  -webkit-transition-delay: @transition-delay;\n          transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n  -webkit-transition-duration: @transition-duration;\n          transition-duration: @transition-duration;\n}\n.transition-transform(@transition) {\n  -webkit-transition: -webkit-transform
  @transition;\n     -moz-transition: -moz-transform @transition;\n       -o-transition: -o-transform @transition;\n          transition: transform @transition;\n}\n\n// Transformations\n.rotate(@degrees) {\n  -webkit-transform: rotate(@degrees);\n      -ms-transform: rotate(@degrees); // IE9 only\n          transform: rotate(@degrees);\n}\n.scale(@ratio; @ratio-y...) {\n  -webkit-transform: scale(@ratio, @ratio-y);\n      -ms-transform: scale(@ratio, @ratio-y); // IE9 only\n          transform: scale(@ratio, @ratio-y);\n}\n.translate(@x; @y) {\n  -webkit-transform: translate(@x, @y);\n      -ms-transform: translate(@x, @y); // IE9 only\n          transform: translate(@x, @y);\n}\n.skew(@x; @y) {\n  -webkit-transform: skew(@x, @y);\n      -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n          transform: skew(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n  -webkit-transform: translate3d(@x, @y, @z);\n          transform: translate3d(@x, @y
 , @z);\n}\n\n.rotateX(@degrees) {\n  -webkit-transform: rotateX(@degrees);\n      -ms-transform: rotateX(@degrees); // IE9 only\n          transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n  -webkit-transform: rotateY(@degrees);\n      -ms-transform: rotateY(@degrees); // IE9 only\n          transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n  -webkit-perspective: @perspective;\n     -moz-perspective: @perspective;\n          perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n  -webkit-perspective-origin: @perspective;\n     -moz-perspective-origin: @perspective;\n          perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n  -webkit-transform-origin: @origin;\n     -moz-transform-origin: @origin;\n      -ms-transform-origin: @origin; // IE9 only\n          transform-origin: @origin;\n}\n\n// Animations\n.animation(@animation) {\n  -webkit-animation: @animation;\n          animation: @animation;\n}\n.animation-name(@name) {\n  -we
 bkit-animation-name: @name;\n          animation-name: @name;\n}\n.animation-duration(@duration) {\n  -webkit-animation-duration: @duration;\n          animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n  -webkit-animation-timing-function: @timing-function;\n          animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n  -webkit-animation-delay: @delay;\n          animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n  -webkit-animation-iteration-count: @iteration-count;\n          animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n  -webkit-animation-direction: @direction;\n          animation-direction: @direction;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n.backface-visibility(@visibility){\n  -webkit-backface-visibility: @visibility;\n     -moz-backfac
 e-visibility: @visibility;\n          backface-visibility: @visibility;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n  -webkit-box-sizing: @boxmodel;\n     -moz-box-sizing: @boxmodel;\n          box-sizing: @boxmodel;\n}\n\n// User select\n// For selecting text on the page\n.user-select(@select) {\n  -webkit-user-select: @select;\n     -moz-user-select: @select;\n      -ms-user-select: @select; // IE10+\n          user-select: @select;\n}\n\n// Resize anything\n.resizable(@direction) {\n  resize: @direction; // Options: horizontal, vertical, both\n  overflow: auto; // Safari fix\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n  -webkit-column-count: @column-count;\n     -moz-column-count: @column-count;\n          column-count: @column-count;\n  -webkit-column-gap: @column-gap;\n     -moz-column-gap: @column-gap;\n          column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n  word-wrap: break-word;\n 
  -webkit-hyphens: @mode;\n     -moz-hyphens: @mode;\n      -ms-hyphens: @mode; // IE10+\n       -o-hyphens: @mode;\n          hyphens: @mode;\n}\n\n// Opacity\n.opacity(@opacity) {\n  opacity: @opacity;\n  // IE8 filter\n  @opacity-ie: (@opacity * 100);\n  filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n\n\n\n// GRADIENTS\n// --------------------------------------------------\n\n#gradient {\n\n  // Horizontal gradient, from left to right\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+\n    background-image:  linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Op
 era 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  // Vertical gradient, from top to bottom\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+\n    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', Gradien
 tType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n    background-repeat: repeat-x;\n    background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n    background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n  }\n  .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallb
 ack\n  }\n  .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .radial(@inner-color: #555; @outer-color: #333) {\n    background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n    background-image: radial-gradient(circle, @inner-color, @outer-color);\n    background-repeat: no-repeat;\n  }\n  .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n    background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @co
 lor 75%, transparent 75%, transparent);\n    background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n  }\n}\n\n// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n.reset-filter() {\n  filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n\n\n\n// Retina images\n//\n// Short retina mixin for setting background-image and -size\n\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n  background-image: url(\"@{file-1x}\");\n\n  @media\n  only screen and (-webkit-min-device-pixel-ratio: 2),\n  only screen and (   min--moz-device-pixel-ratio: 2),\n  only screen and (     -o-min-device-pixel-ratio: 2/1),\n  only screen and (        min-device-pixel-ratio: 2),\n  only screen and (                min-resolution: 192dpi),\n  only screen and (                min-resolution: 
 2dppx) {\n    background-image: url(\"@{file-2x}\");\n    background-size: @width-1x @height-1x;\n  }\n}\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n\n.img-responsive(@display: block) {\n  display: @display;\n  max-width: 100%; // Part 1: Set a maximum relative to the parent\n  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// COMPONENT MIXINS\n// --------------------------------------------------\n\n// Horizontal dividers\n// -------------------------\n// Dividers (basically an hr) within dropdowns and nav lists\n.nav-divider(@color: #e5e5e5) {\n  height: 1px;\n  margin: ((@line-height-computed / 2) - 1) 0;\n  overflow: hidden;\n  background-color: @color;\n}\n\n// Panels\n// -------------------------\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n  border-color: @border;\n\n  & > .panel-heading {\n    color: @heading-text-color;\n    backg
 round-color: @heading-bg-color;\n    border-color: @heading-border;\n\n    + .panel-collapse .panel-body {\n      border-top-color: @border;\n    }\n  }\n  & > .panel-footer {\n    + .panel-collapse .panel-body {\n      border-bottom-color: @border;\n    }\n  }\n}\n\n// Alerts\n// -------------------------\n.alert-variant(@background; @border; @text-color) {\n  background-color: @background;\n  border-color: @border;\n  color: @text-color;\n\n  hr {\n    border-top-color: darken(@border, 5%);\n  }\n  .alert-link {\n    color: darken(@text-color, 10%);\n  }\n}\n\n// Tables\n// -------------------------\n.table-row-variant(@state; @background) {\n  // Exact selectors below required to override `.table-striped` and prevent\n  // inheritance to nested tables.\n  .table > thead > tr,\n  .table > tbody > tr,\n  .table > tfoot > tr {\n    > td.@{state},\n    > th.@{state},\n    &.@{state} > td,\n    &.@{state} > th {\n      background-color: @background;\n    }\n  }\n\n  // Hover states fo
 r `.table-hover`\n  // Note: this is not available for cells or rows within `thead` or `tfoot`.\n  .table-hover > tbody > tr {\n    > td.@{state}:hover,\n    > th.@{state}:hover,\n    &.@{state}:hover > td,\n    &.@{state}:hover > th {\n      background-color:

<TRUNCATED>

[80/93] [abbrv] jena git commit: Split up LocationTests that use StoreConnection.

Posted by rv...@apache.org.
Split up LocationTests that use StoreConnection.

By splitting LocationTests into those on the machinary and those related
to StoreConnection, the StoreConnection tests can be put in the
tdb/store package.  This breaks the package dependency on tdb/base/file
on tdb/store,.

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

Branch: refs/heads/hadoop-rdf
Commit: a6b5b55e97f9b08a76f474c91acd5fe4a1168a60
Parents: 2e4c6c7
Author: Andy Seaborne <an...@apache.org>
Authored: Fri Jan 9 15:43:09 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri Jan 9 15:43:09 2015 +0000

----------------------------------------------------------------------
 .../jena/tdb/base/file/TestLocationLock.java    | 47 ----------
 .../com/hp/hpl/jena/tdb/store/TS_Store.java     |  1 +
 .../store/TestLocationLockStoreConnection.java  | 98 ++++++++++++++++++++
 3 files changed, 99 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/a6b5b55e/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/base/file/TestLocationLock.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/base/file/TestLocationLock.java b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/base/file/TestLocationLock.java
index 1ad2a6f..27e51d7 100644
--- a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/base/file/TestLocationLock.java
+++ b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/base/file/TestLocationLock.java
@@ -29,7 +29,6 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
-import com.hp.hpl.jena.tdb.StoreConnection;
 import com.hp.hpl.jena.tdb.TDBException;
 import com.hp.hpl.jena.tdb.sys.ProcessUtils;
 
@@ -98,28 +97,6 @@ public class TestLocationLock {
         Assert.assertFalse(lock.canObtain());
     }
 
-    @Test
-    public void location_lock_dir_03() {
-        Location dir = Location.create(tempDir.getRoot().getAbsolutePath());
-        LocationLock lock = dir.getLock();
-        Assert.assertTrue(lock.canLock());
-        Assert.assertFalse(lock.isLocked());
-        Assert.assertFalse(lock.isOwned());
-        Assert.assertTrue(lock.canObtain());
-
-        // Creating a StoreConnection on the location will obtain the lock
-        StoreConnection.make(dir);
-        Assert.assertTrue(lock.isLocked());
-        Assert.assertTrue(lock.isOwned());
-        Assert.assertTrue(lock.canObtain());
-
-        // Releasing the connection releases the lock
-        StoreConnection.release(dir);
-        Assert.assertFalse(lock.isLocked());
-        Assert.assertFalse(lock.isOwned());
-        Assert.assertTrue(lock.canObtain());
-    }
-
     @Test(expected = TDBException.class)
     public void location_lock_dir_error_01() throws IOException {
         Assume.assumeTrue(negativePidsTreatedAsAlive);
@@ -168,28 +145,4 @@ public class TestLocationLock {
         Assert.assertFalse(lock.canObtain());
         lock.release();
     }
-
-    @Test(expected = TDBException.class)
-    public void location_lock_dir_error_03() throws IOException {
-        Assume.assumeTrue(negativePidsTreatedAsAlive);
-        
-        Location dir = Location.create(tempDir.getRoot().getAbsolutePath());
-        LocationLock lock = dir.getLock();
-        Assert.assertTrue(lock.canLock());
-        Assert.assertFalse(lock.isLocked());
-        Assert.assertFalse(lock.isOwned());
-        Assert.assertTrue(lock.canObtain());
-
-        // Write a fake PID to the lock file
-        try(BufferedWriter writer = 
-            new BufferedWriter(new FileWriter(dir.getPath("tdb.lock")))) {
-            // Fake PID that would never be valid
-            writer.write(Integer.toString(-1234)); 
-        }
-        Assert.assertTrue(lock.isLocked());
-        Assert.assertFalse(lock.isOwned());
-
-        // Attempting to create a connection on this location should error
-        StoreConnection.make(dir);
-    }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/a6b5b55e/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TS_Store.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TS_Store.java b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TS_Store.java
index 916f88b..4c6abc5 100644
--- a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TS_Store.java
+++ b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TS_Store.java
@@ -43,6 +43,7 @@ import com.hp.hpl.jena.tdb.sys.TestOps ;
     , TestDynamicDatasetTDB.class
     , TestStoreConnectionsDirect.class
     , TestStoreConnectionsMapped.class
+    , TestLocationLockStoreConnection.class
 } )
 public class TS_Store
 { 

http://git-wip-us.apache.org/repos/asf/jena/blob/a6b5b55e/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TestLocationLockStoreConnection.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TestLocationLockStoreConnection.java b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TestLocationLockStoreConnection.java
new file mode 100644
index 0000000..0c3cc94
--- /dev/null
+++ b/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TestLocationLockStoreConnection.java
@@ -0,0 +1,98 @@
+/*
+ * 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 com.hp.hpl.jena.tdb.store;
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+
+import com.hp.hpl.jena.tdb.StoreConnection;
+import com.hp.hpl.jena.tdb.TDBException;
+import com.hp.hpl.jena.tdb.base.file.Location ;
+import com.hp.hpl.jena.tdb.base.file.LocationLock ;
+import com.hp.hpl.jena.tdb.sys.ProcessUtils;
+
+/**
+ * Tests for {@link LocationLock} inconjucntion with {@link StoreConnection}s 
+ */
+public class TestLocationLockStoreConnection {
+
+    private static boolean negativePidsTreatedAsAlive = false;
+    
+    @Rule
+    public TemporaryFolder tempDir = new TemporaryFolder();
+    
+    @BeforeClass
+    public static void setup() {
+        negativePidsTreatedAsAlive = ProcessUtils.negativePidsTreatedAsAlive();
+    }
+    
+    @Test
+    public void location_lock_store_connection_01() {
+        Location dir = Location.create(tempDir.getRoot().getAbsolutePath());
+        LocationLock lock = dir.getLock();
+        Assert.assertTrue(lock.canLock());
+        Assert.assertFalse(lock.isLocked());
+        Assert.assertFalse(lock.isOwned());
+        Assert.assertTrue(lock.canObtain());
+
+        // Creating a StoreConnection on the location will obtain the lock
+        StoreConnection.make(dir);
+        Assert.assertTrue(lock.isLocked());
+        Assert.assertTrue(lock.isOwned());
+        Assert.assertTrue(lock.canObtain());
+
+        // Releasing the connection releases the lock
+        StoreConnection.release(dir);
+        Assert.assertFalse(lock.isLocked());
+        Assert.assertFalse(lock.isOwned());
+        Assert.assertTrue(lock.canObtain());
+    }
+
+    @Test(expected = TDBException.class)
+    public void location_lock_store_connection_02() throws IOException {
+        Assume.assumeTrue(negativePidsTreatedAsAlive);
+        
+        Location dir = Location.create(tempDir.getRoot().getAbsolutePath());
+        LocationLock lock = dir.getLock();
+        Assert.assertTrue(lock.canLock());
+        Assert.assertFalse(lock.isLocked());
+        Assert.assertFalse(lock.isOwned());
+        Assert.assertTrue(lock.canObtain());
+
+        // Write a fake PID to the lock file
+        try(BufferedWriter writer = 
+            new BufferedWriter(new FileWriter(dir.getPath("tdb.lock")))) {
+            // Fake PID that would never be valid
+            writer.write(Integer.toString(-1234)); 
+        }
+        Assert.assertTrue(lock.isLocked());
+        Assert.assertFalse(lock.isOwned());
+
+        // Attempting to create a connection on this location should error
+        StoreConnection.make(dir);
+    }
+}


[89/93] [abbrv] jena git commit: JENA-846 : retain maximum compatibility for checked exceptions.

Posted by rv...@apache.org.
JENA-846 : retain maximum compatibility for checked exceptions.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/2941cf75
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/2941cf75
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/2941cf75

Branch: refs/heads/hadoop-rdf
Commit: 2941cf75412e8ddb75f18aad8b6673b73737cf51
Parents: 067e099
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 12 20:18:36 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 12 20:18:36 2015 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/jena/iri/IRI.java  |  4 ++-
 .../org/apache/jena/iri/impl/AbsIRIImpl.java    | 27 +++++++++++++-------
 2 files changed, 21 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/2941cf75/jena-iri/src/main/java/org/apache/jena/iri/IRI.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/IRI.java b/jena-iri/src/main/java/org/apache/jena/iri/IRI.java
index 8fbe519..209803f 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/IRI.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/IRI.java
@@ -20,6 +20,7 @@ package org.apache.jena.iri;
 
 import java.net.MalformedURLException ;
 import java.net.URI ;
+import java.net.URISyntaxException ;
 import java.net.URL ;
 import java.util.Iterator ;
 
@@ -410,8 +411,9 @@ abstract public class IRI  extends AbsIRIFactoryImpl implements IRIFactoryI, IRI
      * Converts the IRI to an ASCII string, and then to a java.net.URI.
      * 
      * @return a URL corresponding to this IRI.
+     * @throws URISyntaxException If IDNA conversion failed.
      */
-    abstract public URI toURI() ;
+    abstract public URI toURI() throws URISyntaxException ;
 
     /**
      * Resolves an IRI against this one.

http://git-wip-us.apache.org/repos/asf/jena/blob/2941cf75/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java
index 2416bf2..76d9f1b 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java
@@ -268,9 +268,12 @@ abstract public class AbsIRIImpl extends  IRI implements
     }
 
     @Override
-    public URI toURI() {
-        String x = createASCIIString() ;
-        return URI.create(x) ;
+    public URI toURI() throws URISyntaxException {
+        try {
+            String x = createASCIIString() ;
+            return new URI(x) ;
+        } catch (MalformedIDNException ex) 
+        { throw new URISyntaxException(toDisplayString(), ex.getMessage()) ; }
     }
 
     // TODO ToAsciiMask
@@ -283,14 +286,14 @@ abstract public class AbsIRIImpl extends  IRI implements
             | (1l << DOUBLE_DASH_IN_REG_NAME);
 */
     @Override
-    public String toASCIIString() {
+    public String toASCIIString() throws MalformedIDNException {
         if (hasExceptionMask(ToAsciiMask)) {
             return createASCIIString();
         }
         return toString();
     }
 
-    private String createASCIIString() {
+    private String createASCIIString() throws MalformedIDNException {
         StringBuffer asciiString = new StringBuffer();
 
         if (has(SCHEME)) {
@@ -323,7 +326,7 @@ abstract public class AbsIRIImpl extends  IRI implements
         return asciiString.toString();
     }
 
-    private void regNameToAscii(StringBuffer asciiString, String host) {
+    private void regNameToAscii(StringBuffer asciiString, String host) throws MalformedIDNException  {
         if ((errors(HOST) & ToAsciiMask) == 0) {
             asciiString.append(host);
             return;
@@ -331,9 +334,15 @@ abstract public class AbsIRIImpl extends  IRI implements
         asciiString.append(domainToAscii(host));
     }
 
-    static CharSequence domainToAscii(String host) {
-        
-        return IDNP.toASCII(host, IDN.USE_STD3_ASCII_RULES|IDN.ALLOW_UNASSIGNED);
+    private static CharSequence domainToAscii(String host) throws MalformedIDNException {
+        try {
+            return IDNP.toASCII(host, IDN.USE_STD3_ASCII_RULES|IDN.ALLOW_UNASSIGNED);
+            // IDNP (patched IDN) throws IlleaglArgimentException
+            
+        } catch (IllegalArgumentException ex) {
+            // IDNP (patched IDN) throws IlleaglArgumentException
+            throw new MalformedIDNException(ex) ; 
+        }
         /*
         int u[] = new int[host.length()];
         for (int i = 0; i < host.length(); i++)


[87/93] [abbrv] jena git commit: Remove duplicated test package org.apache.jena.iri.test

Posted by rv...@apache.org.
Remove duplicated test package org.apache.jena.iri.test

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

Branch: refs/heads/hadoop-rdf
Commit: e89146d814968269eacbd146c531266f8c8a4e3a
Parents: ecdcd0d
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 12 19:09:27 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 12 19:09:27 2015 +0000

----------------------------------------------------------------------
 .../org/apache/jena/iri/TestMoreExamples.java   |    2 +-
 .../org/apache/jena/iri/test/Additional.java    |   61 -
 .../org/apache/jena/iri/test/MoreTests.java     |   98 -
 .../org/apache/jena/iri/test/TestCreator.java   |  254 -
 .../apache/jena/iri/test/TestErrorMessages.java |  144 -
 .../org/apache/jena/iri/test/TestExample.java   |  279 -
 .../org/apache/jena/iri/test/TestMEIri.java     |   39 -
 .../apache/jena/iri/test/TestMERelativize.java  |   50 -
 .../org/apache/jena/iri/test/TestMEResolve.java |   42 -
 .../org/apache/jena/iri/test/TestMEResult.java  |   46 -
 .../apache/jena/iri/test/TestMoreExamples.java  |  264 -
 .../org/apache/jena/iri/test/TestPackage.java   |   36 -
 .../resources/org/apache/jena/iri/test/test.xml | 9217 ------------------
 .../resources/org/apache/jena/iri/test/uris.xml |  463 -
 14 files changed, 1 insertion(+), 10994 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/TestMoreExamples.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/TestMoreExamples.java b/jena-iri/src/test/java/org/apache/jena/iri/TestMoreExamples.java
index 0db1755..7ae0371 100644
--- a/jena-iri/src/test/java/org/apache/jena/iri/TestMoreExamples.java
+++ b/jena-iri/src/test/java/org/apache/jena/iri/TestMoreExamples.java
@@ -242,7 +242,7 @@ public class TestMoreExamples extends TestCase implements
         SAXParserFactory fact = SAXParserFactory.newInstance();
         TestSuite result = new TestSuite();
         result.setName("More IRI Tests");
-        try ( InputStream in = TestCreator.class.getClassLoader().getResourceAsStream("org/apache/jena/iri/test/test.xml") ) {
+        try ( InputStream in = TestCreator.class.getClassLoader().getResourceAsStream("org/apache/jena/iri/test.xml") ) {
             fact.newSAXParser().parse(in, new TestReader(result) );
             return result;
         }

http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/test/Additional.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/test/Additional.java b/jena-iri/src/test/java/org/apache/jena/iri/test/Additional.java
deleted file mode 100644
index b1189a6..0000000
--- a/jena-iri/src/test/java/org/apache/jena/iri/test/Additional.java
+++ /dev/null
@@ -1,61 +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.jena.iri.test ;
-
-import java.net.MalformedURLException;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.jena.iri.IRI ;
-import org.apache.jena.iri.IRIFactory ;
-import org.junit.Assert;
-import org.junit.Test;
-
-
-public class Additional
-{
-    // Test added in response to reports and bugs from 2009.
-    
-    static public junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(Additional.class) ;
-    }
-    
-    @Test public void relDotSlash1() throws MalformedURLException
-    {
-       IRIFactory f = IRIFactory.iriImplementation() ;
-       IRI iri = f.construct("http://a/b/c/dddd;pppp?qqqqq") ;
-       IRI iri2 = iri.resolve("./") ;
-       test(iri2, "http://a/b/c/") ;
-    }
-    
-    @Test public void relDotSlash2() throws MalformedURLException
-    {
-       IRIFactory f = IRIFactory.iriImplementation() ;
-       IRI iri = f.construct("http://a/b/c/dddd;pppp?qqqqq") ;
-       IRI iri2 = iri.resolve("./foo") ;
-       test(iri2, "http://a/b/c/foo") ;
-    }
-
-    
-    private static void test(IRI iri, String iriStr) throws MalformedURLException
-    {
-        Assert.assertEquals(iriStr, iri.toASCIIString()) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/test/MoreTests.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/test/MoreTests.java b/jena-iri/src/test/java/org/apache/jena/iri/test/MoreTests.java
deleted file mode 100644
index bacfbb2..0000000
--- a/jena-iri/src/test/java/org/apache/jena/iri/test/MoreTests.java
+++ /dev/null
@@ -1,98 +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.jena.iri.test;
-
-
-import java.util.Iterator;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.apache.jena.iri.IRI ;
-import org.apache.jena.iri.IRIFactory ;
-import org.apache.jena.iri.Violation ;
-
-public class MoreTests extends TestCase {
-	
-	static public Test suite() {
-		TestSuite suite = new TestSuite("Additional IRI Tests");
-
-		
-		suite.addTest(new MoreTests("testRelativizeFrag1"));
-		suite.addTest(new MoreTests("testRelativizeFrag2"));
-		suite.addTest(new MoreTests("testXPointer"));
-		suite.addTest(new MoreTests("testNotIDN"));
-		
-		return suite;
-	}
-
-	public MoreTests(String s) {
-		super(s);
-	}
-
-	
-	public void testRelativizeFrag1() {
-		IRIFactory f = IRIFactory.jenaImplementation();
-		IRI base = f.create("http://example.org/somefolder/mybase.rdf");
-		IRI frag = f.create("http://example.org#foo");
-		IRI rel = base.relativize(frag);
-		assertEquals(frag,rel);
-//		System.err.println(rel.toString());
-		IRI back = base.resolve(rel);
-		assertEquals(frag,back);
-	}
-
-	public void testRelativizeFrag2() {
-		IRIFactory f = IRIFactory.jenaImplementation();
-		IRI base = f.create("http://example.org/somefolder/mybase.rdf");
-		IRI frag = f.create("http://example.org/#foo");
-		IRI rel = base.relativize(frag);
-		assertEquals("/#foo",rel.toString());
-		IRI back = base.resolve(rel);
-		assertEquals(frag,back);
-	}
-	
-	public void testXPointer() {
-		IRIFactory f = IRIFactory.jenaImplementation();
-		IRI base = f.create("http://example.org/");
-		IRI frag = base.resolve("http://eg.com/test.txt#xpointer(/unit[5])");
-		Iterator<Violation> it = frag.violations(false);
-        assertTrue(it.hasNext()) ;
-
-//		while (it.hasNext()) {
-//			System.err.println(it.next().getLongMessage());
-//		}
-		
-	}
-	public void testNotIDN() {
-		IRIFactory f = IRIFactory.jenaImplementation();
-		IRI base = f.create("http://example.org/");
-		IRI frag = base.resolve("outbind://4-00000000C45F478BF9F2A048A7A59DE"+
-				"3AE35F7230700D3E3AEE226D20A49A390BCD779EC5D4700"+
-				"00003DB3650000D3E3AEE226D20A49A390BCD779EC5D470"+
-					"00001182DB0000/www.uconnectevent.org");
-		Iterator <Violation>it = frag.violations(false);
-		assertTrue(it.hasNext()) ;
-		
-//		while (it.hasNext()) {
-//			System.err.println(it.next().getLongMessage());
-//		}
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/test/TestCreator.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/test/TestCreator.java b/jena-iri/src/test/java/org/apache/jena/iri/test/TestCreator.java
deleted file mode 100644
index 2217e14..0000000
--- a/jena-iri/src/test/java/org/apache/jena/iri/test/TestCreator.java
+++ /dev/null
@@ -1,254 +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.jena.iri.test;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.apache.jena.iri.IRI ;
-import org.apache.jena.iri.IRIFactory ;
-import org.apache.jena.iri.IRIRelativize ;
-import org.apache.jena.iri.Violation ;
-import org.apache.jena.iri.impl.AbsIRIImpl ;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
-
-
-final class TestCreator extends DefaultHandler implements IRIRelativize {
-    
-    static final int RelativizeFlags = ABSOLUTE|GRANDPARENT|NETWORK|PARENT|CHILD|SAMEDOCUMENT;
-    public static String substituteStandardEntities(String s) {
-        s = replace(s, "&", "&amp;");
-        s = replace(s, "<", "&lt;");
-        s = replace(s, ">", "&gt;");
-        s = replace(s, "'", "&apos;");
-        s = replace(s, "\t", "&#9;");
-        s = replace(s, "\n", "&#xA;");
-        s = replace(s, "\r", "&#xD;");
-        return replace(s, "\"", "&quot;");
-    }
-
-    public static String replace(
-        String s,
-        String oldString,
-        String newString) {
-        String result = "";
-        int length = oldString.length();
-        int pos = s.indexOf(oldString);
-        int lastPos = 0;
-        while (pos >= 0) {
-            result = result + s.substring(lastPos, pos) + newString;
-            lastPos = pos + length;
-            pos = s.indexOf(oldString, lastPos);
-        }
-        return result + s.substring(lastPos, s.length());
-    }
-//    static final IRI empty = IRIFactory.defaultFactory().emptyIRI();
-    static final Class<?> attSign[] = new Class[] { Attributes.class };
-    static final Class<?> nullSign[] = new Class[] { };
-
-    static PrintWriter out;
-    static void load() throws SAXException, IOException, ParserConfigurationException {
-        SAXParserFactory fact = SAXParserFactory.newInstance();
-        out = new PrintWriter(new OutputStreamWriter(
-          new FileOutputStream("src/test/resources/org/apache/jena/iri/test/test.xml"),
-          "utf-8"
-        ));
-        out.println("<UriTests>");
-        
-        try (InputStream in = TestCreator.class.getClassLoader().getResourceAsStream("org/apache/jena/iri/test/uris.xml")) {
-            fact.newSAXParser().parse(in, new TestCreator()) ;
-            out.println("</UriTests>") ;
-            out.close() ;
-        }
-    }
-    
-    static public void main(String args[]) throws IOException, ParserConfigurationException, SAXException{
-        try {
-            load();
-        } catch (SAXParseException e) {
-            System.err.println(e.getLineNumber());
-            System.err.println(e.toString());
-            System.err.println(e.getMessage());
-            
-        } 
-    }
-    
-    
-    @Override
-    public void startElement(
-    String arg1,
-    String arg2,
-    String name,
-    Attributes att
-    ) {
-        try {
-            this.getClass().getDeclaredMethod(name,attSign)
-            .invoke(this, att );
-        } catch (IllegalArgumentException | NoSuchMethodException | InvocationTargetException | IllegalAccessException | SecurityException e) {
-            e.printStackTrace();
-        }
-    }
-    @Override
-    public void endElement(
-            String arg1,
-            String arg2,
-            String name
-            ) {
-    }
-            
-    private void uris(Attributes att) {
-    }
-
-    private void uri(Attributes att) {
-        String absolute = att.getValue("absolute");
-        String base = att.getValue("base");
-        String relative = att.getValue("relative");
-        
-        doIt(absolute);
-        
-        if (base!=null) {
-            out.println("<Resolve>");
-            IRI b = doIt(base);
-            IRI r = doIt(relative);
-            out.println("<Result>");
-            IRI result = b.create(r);
-            doIt(result);
-            out.println("</Result>");
-            IRI rAgain =  b.relativize(
-                    result,
-                  RelativizeFlags  
-                    );
-            if (r.equals(rAgain)) {
-                out.println("<Relativize same='true'/>");
-            } else {
-                out.println("<Relativize>");
-                  doIt(rAgain);
-                out.println("</Relativize>");
-            }
-            
-           out.println("</Resolve>");
-        }
-    }
-
-
-    static String methods[] =  {
-        "getRawHost",
-        "getRawPath",
-        "getPort",
-        "getRawQuery",
-        "getScheme",
-        "getRawUserinfo",
-        "getRawFragment",
-        "getASCIIHost",
-        "isRootless",
-        "toString",
-        "toDisplayString",
-//        "hasException",
-        "isAbsolute",
-//        "isIRI",
-//        "isOpaque",
-//        "isRDFURIReference",
-        "isRelative",
-//        "isURIinASCII",
-//        "isVeryBad",
-//        "isXSanyURI",
-        "toASCIIString"
-    };
-
-    private void doIt(IRI iri) {
-        if (iri==null)
-            return;
-        for ( String m : methods )
-        {
-            try
-            {
-                Object r = IRI.class.getDeclaredMethod( m, nullSign ).invoke( iri, new Object[]{ } );
-                if ( r == null )
-                {
-                    out.println( "<" + m +
-                                     " nullValue='true'/>" );
-                }
-                else
-                {
-                    out.println( "<" + m +
-                                     " value='" +
-                                     substituteStandardEntities( r.toString() ) + "'/>" );
-                }
-
-
-            }
-            catch ( IllegalArgumentException | NoSuchMethodException | IllegalAccessException | SecurityException e )
-            {
-                e.printStackTrace();
-            }
-            catch ( InvocationTargetException e )
-            {
-                Throwable t = e;
-                if ( t.getCause() != null )
-                {
-                    t = t.getCause();
-                }
-                String s = t.getMessage() != null ? t.getMessage() : t.toString();
-                out.println( "<" + m +
-                                 " exception='" +
-                                 substituteStandardEntities( s ) + "'/>" );
-            }
-
-        }
-
-        Iterator<Violation> it = ((AbsIRIImpl)iri).allViolations();
-        out.println("<violations>");
-        while (it.hasNext()) {
-            out.print("<violation>");
-            out.print((it.next()).codeName());
-            out.println("</violation>");
-                    
-        }
-        out.println("</violations>");
-    }
-
-    private IRI doIt(String iri) {
-        if (iri==null)
-            return null;
-        IRI rslt = 
-            factory.create(iri);
-//            empty.create(iri);
-        out.println("<IRI iri='"+substituteStandardEntities(iri)+"'>");
-        doIt(rslt);
-        out.println("</IRI>");
-        return rslt;
-    }
-    // TODO set conformance level for this factory
-    static IRIFactory factory = new IRIFactory();
-    static {
-        factory.setSameSchemeRelativeReferences("file");
-        factory.useSchemeSpecificRules("*",true);
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/test/TestErrorMessages.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/test/TestErrorMessages.java b/jena-iri/src/test/java/org/apache/jena/iri/test/TestErrorMessages.java
deleted file mode 100644
index 3c84790..0000000
--- a/jena-iri/src/test/java/org/apache/jena/iri/test/TestErrorMessages.java
+++ /dev/null
@@ -1,144 +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.jena.iri.test;
-
-import java.util.Iterator;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.apache.jena.iri.IRI ;
-import org.apache.jena.iri.IRIFactory ;
-import org.apache.jena.iri.Violation ;
-import org.apache.jena.iri.ViolationCodes ;
-import org.apache.jena.iri.impl.IRIExamples ;
-import org.apache.jena.iri.impl.Specification ;
-import org.apache.jena.iri.impl.ViolationCodeInfo ;
-
-
-public class TestErrorMessages extends TestCase
-   implements ViolationCodes {
-    static {
-        new ViolationCodes.Initialize();
-    }
-
- 
-    static Specification specs[] = Specification.all
-                    .values().toArray(new Specification[0]);
-
-
-    String uri;
-
-    ViolationCodeInfo violation;
-
-   
-    
-    boolean good;
-
-    public TestErrorMessages( String uri, ViolationCodeInfo info, boolean good) {
-        super(escapeAndShorten(uri));
-        this.uri = uri;
-        this.violation = info;
-        this.good = good;
-    }
-
-
-
-    private static String escapeAndShorten(String uri2) {
-        StringBuilder rslt = new StringBuilder();
-        int ln = uri2.length();
-        if (ln > 80)
-            ln = 80;
-        for (int i = 0; i < ln; i++) {
-            int ch = uri2.charAt(i);
-            if (ch > 127 || ch < 32) {
-                rslt.append("&#");
-                rslt.append(ch);
-                rslt.append(";");
-            } else
-                rslt.append((char) ch);
-        }
-        return rslt.toString();
-    }
-
-
-   
-
-	private void printErrorMessages(Violation v) {
-			System.err.println(v.getShortMessage());
-		
-	}
-
-
-    static public IRIFactory f = IRIFactory.jenaImplementation();
-   
-    @Override
-    public void runTest() {
-        IRI iri = f.create(uri);
-        Iterator<Violation> it = iri.violations(true);
-        while (it.hasNext()) {
-            Violation v = it.next();
-            printErrorMessages(v);
-            
-        }
-    }
-
-    public static TestSuite suite() {
-        TestSuite rslt = new TestSuite();
-
-        rslt.setName("Error messages");
-        addAllTestsFromExamples( rslt);
- 
-        return rslt;
-    }
-
-    private static void addAllTestsFromExamples( TestSuite spec) {
-        for (int i = 0; i < ViolationCodeInfo.all.length; i++) {
-            addTestsFromExamples(spec,  ViolationCodeInfo.all[i]);
-        }
-        for ( Specification spec1 : specs )
-        {
-            addExamples( null, spec1, spec );
-        }
-    }
-
-    private static void addTestsFromExamples(TestSuite rslt,  ViolationCodeInfo violationCodeInfo) {
-      
-        if (violationCodeInfo != null) {
-            TestSuite ex = new TestSuite();
-            ex.setName(violationCodeInfo.getCodeName());
-            addExamples(violationCodeInfo, violationCodeInfo, ex);
-            if (ex.countTestCases()>0)
-            rslt.addTest(ex);
-        }
-    }
-
-    private static void addExamples(ViolationCodeInfo violationCodeInfo, IRIExamples examples, TestSuite ex) {
-        String e[] = examples.getBadExamples();
-        for ( String anE1 : e )
-        {
-            ex.addTest( new TestErrorMessages( anE1, violationCodeInfo, false ) );
-        }
-        e = examples.getGoodExamples();
-        for ( String anE : e )
-        {
-            ex.addTest( new TestErrorMessages( anE, violationCodeInfo, true ) );
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/test/TestExample.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/test/TestExample.java b/jena-iri/src/test/java/org/apache/jena/iri/test/TestExample.java
deleted file mode 100644
index 49d5b90..0000000
--- a/jena-iri/src/test/java/org/apache/jena/iri/test/TestExample.java
+++ /dev/null
@@ -1,279 +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.jena.iri.test;
-
-import java.util.Iterator;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.apache.jena.iri.IRI ;
-import org.apache.jena.iri.IRIFactory ;
-import org.apache.jena.iri.Violation ;
-import org.apache.jena.iri.ViolationCodes ;
-import org.apache.jena.iri.impl.Force ;
-import org.apache.jena.iri.impl.IRIExamples ;
-import org.apache.jena.iri.impl.Specification ;
-import org.apache.jena.iri.impl.ViolationCodeInfo ;
-
-
-public class TestExample extends TestCase
-   implements ViolationCodes {
-    static {
-        new ViolationCodes.Initialize();
-    }
-
-    // static {
-    // Iterator it = Specification.iris.values().iterator();
-    // while (it.hasNext())
-    // System.err.println(it.next().getClass().toString());
-    // }
-    static Specification specs[] = Specification.all
-                    .values().toArray(new Specification[0]);
-
-    static IRIFactory all[][] = new IRIFactory[specs.length][Force.SIZE];
-
-    
-    static {
-        for (int i = 0; i < specs.length; i++)
-            for (int j = 0; j < Force.SIZE; j++) {
-                all[i][j] = new IRIFactory();
-                all[i][j].dnsViolation(false, false);
-                all[i][j].mintingViolation(false, false);
-                all[i][j].shouldViolation(false, false);
-                all[i][j].securityViolation(false, false);
-//                all[i][j].schemeViolation(false, false);
-                switch (j) {
-                case Force.DNS:
-                    all[i][j].dnsViolation(false, true);
-                    break;
-                case Force.MINTING:
-                    all[i][j].mintingViolation(false, true);
-                    break;
-                case Force.MUST:
-                    break;
-                case Force.SECURITY:
-                    all[i][j].securityViolation(false, true);
-                    break;
-                case Force.SHOULD:
-                    all[i][j].shouldViolation(false, true);
-                    break;
-//                case Force.SCHEME_SPECIFIC:
-//                    all[i][j].schemeViolation(false, true);
-//                    all[i][j].useSchemeSpecificRules("*");
-//                    break;
-                }
-                if (specs[i].name().equals("IRI")) {
-                    all[i][j].useSpecificationIRI(false);
-                        
-                }
-                if (specs[i].name().equals("URI"))
-                    all[i][j].useSpecificationURI(false);
-                if (specs[i].name().equals("XLink"))
-                    all[i][j].useSpecificationXLink(false);
-                if (specs[i].name().equals("RDF"))
-                    all[i][j].useSpecificationRDF(false);
-                if (specs[i].name().equals("XML"))
-                    all[i][j].useSpecificationXMLSystemID(false);
-                if (specs[i].name().equals("Schema"))
-                    all[i][j].useSpecificationXMLSchema(false);
-
-            }
-    }
-
-    String uri;
-
-    ViolationCodeInfo violation;
-
-    int specID;
-    
-    boolean good;
-
-    public TestExample(int spec, String uri, ViolationCodeInfo info, boolean good) {
-        super(escapeAndShorten(uri));
-        this.uri = uri;
-        this.violation = info;
-        specID = spec;
-        this.good = good;
-    }
-
-//    public TestExample(String uri, ViolationCodeInfo info, boolean good) {
-//        super(escapeAndShorten(uri));
-//        this.uri = uri;
-//        this.violation = info;
-//        specID = -1;
-//    }
-
-    private static String escapeAndShorten(String uri2) {
-        StringBuilder rslt = new StringBuilder();
-        int ln = uri2.length();
-        if (ln > 80)
-            ln = 80;
-        for (int i = 0; i < ln; i++) {
-            int ch = uri2.charAt(i);
-            if (ch > 127 || ch < 32) {
-                rslt.append("&#");
-                rslt.append(ch);
-                rslt.append(";");
-            } else
-                rslt.append((char) ch);
-        }
-        return rslt.toString();
-    }
-
-    @Override
-    public void runTest() {
-        if (specID == -1)
-            runTestErrorCode();
-        else if (violation==null)
-            runTestJustSpec();
-        else
-            runTestSpec();
-    }
-
-    private void runTestJustSpec() {
-        IRIFactory f = 
-            specs[specID].isSchemeSpec()?
-                    IRIFactory.iriImplementation():
-                    all[specID][Force.MUST];
-        
-        IRI iri = f.create(uri);
-        if (iri.hasViolation(false)) {
-            if (good) fail("Unexpected violation found: "+
-            ((iri.violations(false).next())).codeName()
-            
-            );
-        } else {
-            if (!good) fail("Expected a violation, none found.");
-        }
-            
-        
-    }
-
-	
-
-    private void runTestErrorCode() {
-        IRIFactory f = new IRIFactory();
-        f.setIsError(violation.getCode(), true);
-
-        runTest(f,
-                true,
-                false,
-                "Just this error");
-
-    }
-
-    private void runTestSpec() {
-        boolean inSpec = violation.appliesTo(specs[specID]);
-        int force = violation.getForce();
-        for (int f = 0; f < Force.SIZE; f++) {
-            
-            runTest(all[specID][f],
-                    (force & Force.must)!=0 && inSpec,
-                    (force & (1<<f))!=0 && inSpec,
-                    "Force: " + f + "; spec: " + specs[specID].name());
-        }
-
-    }
-
-    private void runTest(IRIFactory f, boolean expectError,
-            boolean expectWarning, String desc) {
-        IRI iri = f.create(uri);
-        boolean implemented = violation.isImplemented();
-        expectError = expectError && implemented;
-        expectWarning = expectWarning && (!expectError) && implemented;
-        if (good) {
-            expectError = expectWarning = false;
-        }
-        boolean hasError = false;
-        boolean hasWarning = false;
-        Iterator<Violation> it = iri.violations(true);
-        while (it.hasNext()) {
-            Violation v = it.next();
-            if (v.getViolationCode() == violation.getCode()) {
-                if (v.isError()) {
-                    if (!expectError)
-                        fail("Unexpected error, "+desc);
-                    hasError = true;
-                } else {
-                    if (!expectWarning)
-                        fail("Unexpected warning, "+desc);
-                    hasWarning = true;
-                }
-                break;
-            }
-        }
-        if (expectWarning && !hasWarning)
-            fail("No warning detected: "+expectError);
-        if (expectError && !hasError)
-            fail("No error detected: "+expectError);
-    }
-
-    public static TestSuite suite() {
-        TestSuite rslt = new TestSuite();
-
-        rslt.setName("Examples from documentation");
-        for (int sp = 0; sp < specs.length; sp++) {
-            TestSuite spec = new TestSuite();
-            
-            String specName = specs[sp].name();
-            spec.setName(specName);
-//            if (!specName.equals("http"))
-//                continue;
-            if (specs[sp].isIRISpec())
-                addAllTestsFromExamples(sp, spec);
-            
-            addExamples(sp,null,specs[sp],spec);
-            if (spec.countTestCases()>0)
-                rslt.addTest(spec);
-        }
-//        if (false)
-        addAllTestsFromExamples(-1, rslt);
-        return rslt;
-    }
-
-    private static void addAllTestsFromExamples(int sp, TestSuite spec) {
-        for (int i = 0; i < ViolationCodeInfo.all.length; i++)
-            addTestsFromExamples(spec, sp, ViolationCodeInfo.all[i]);
-    }
-
-    private static void addTestsFromExamples(TestSuite rslt, int sp, ViolationCodeInfo violationCodeInfo) {
-      
-        if (violationCodeInfo != null) {
-            TestSuite ex = new TestSuite();
-            ex.setName(violationCodeInfo.getCodeName());
-            addExamples(sp, violationCodeInfo, violationCodeInfo, ex);
-            if (ex.countTestCases()>0)
-            rslt.addTest(ex);
-        }
-    }
-
-    private static void addExamples(int sp, ViolationCodeInfo violationCodeInfo, IRIExamples examples, TestSuite ex) {
-        String e[] = examples.getBadExamples();
-        for ( String anE1 : e )
-        {
-            ex.addTest( new TestExample( sp, anE1, violationCodeInfo, false ) );
-        }
-        e = examples.getGoodExamples();
-        for ( String anE : e )
-        {
-            ex.addTest( new TestExample( sp, anE, violationCodeInfo, true ) );
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEIri.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEIri.java b/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEIri.java
deleted file mode 100644
index e6dc82b..0000000
--- a/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEIri.java
+++ /dev/null
@@ -1,39 +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.jena.iri.test;
-
-import org.apache.jena.iri.IRI ;
-import org.xml.sax.Attributes;
-
-
-public class TestMEIri extends TestMoreExamples {
-    static int count;
-
-    public TestMEIri(Attributes att) {
-//        super(att.getValue("iri"),att); 
-        super(true? ( //"["+(++count)+"]" + 
-                att.getValue("iri").replaceAll("\n","\\\\n")) :( "iri"+(++count)),att);
-    }
-
-    @Override
-    IRI computeIRI() {
-        return TestCreator.factory.create(att.get("iri"));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/test/TestMERelativize.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/test/TestMERelativize.java b/jena-iri/src/test/java/org/apache/jena/iri/test/TestMERelativize.java
deleted file mode 100644
index 7182853..0000000
--- a/jena-iri/src/test/java/org/apache/jena/iri/test/TestMERelativize.java
+++ /dev/null
@@ -1,50 +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.jena.iri.test;
-
-import junit.framework.TestSuite;
-
-import org.apache.jena.iri.IRI ;
-import org.xml.sax.Attributes;
-
-
-public class TestMERelativize extends TestMoreExamples {
-    static int count;
-    public TestMERelativize(Attributes att, TestSuite suite) {
-        super("relativize"+ (++count),att,suite);
-    }
-
-    @Override
-    IRI computeIRI() {
-        IRI base = ((TestMoreExamples)parent.testAt(0)).getIRI();
-        IRI rel = ((TestMoreExamples)parent.testAt(2)).getIRI();
-        return base.relativize(rel, TestCreator.RelativizeFlags);
-    }
-    
-    @Override
-    public void runTest() {
-    	if (!"true".equals(att.get("same"))) {
-    		super.runTest();
-    	} else {
-    		assertEquals(computeIRI(),
-    				((TestMoreExamples)parent.testAt(1)).getIRI());
-    	}
-    	
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEResolve.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEResolve.java b/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEResolve.java
deleted file mode 100644
index bbd3a9e..0000000
--- a/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEResolve.java
+++ /dev/null
@@ -1,42 +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.jena.iri.test;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.xml.sax.Attributes;
-
-
-public class TestMEResolve extends TestSuite {
-
-    public TestMEResolve(Attributes att) {
-        super();
-    }
-    
-    void pop() {
-        setName(((TestCase)testAt(0)).getName() + "  " +
-                ((TestCase)testAt(1)).getName());
-    }
-    
-//    public void runTest(Test arg0, TestResult arg1) {
-//        super.runTest(arg0,arg1);
-//    }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEResult.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEResult.java b/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEResult.java
deleted file mode 100644
index 4db38a5..0000000
--- a/jena-iri/src/test/java/org/apache/jena/iri/test/TestMEResult.java
+++ /dev/null
@@ -1,46 +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.jena.iri.test;
-
-import junit.framework.TestSuite;
-
-import org.apache.jena.iri.IRI ;
-import org.xml.sax.Attributes;
-
-
-public class TestMEResult extends TestMoreExamples {
-    static int count;
-    
-    public TestMEResult(Attributes att, TestSuite suite) {
-        super("result"+ (++count),att, suite);
-    }
-
-    @Override
-    IRI computeIRI() {
-        IRI base = ((TestMoreExamples)parent.testAt(0)).getIRI();
-        IRI rel = ((TestMoreExamples)parent.testAt(1)).getIRI();
-        return base.create(rel);
-    }
-    
-    @Override
-    public void runTest() {
-        super.runTest();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/test/TestMoreExamples.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/test/TestMoreExamples.java b/jena-iri/src/test/java/org/apache/jena/iri/test/TestMoreExamples.java
deleted file mode 100644
index 70ee785..0000000
--- a/jena-iri/src/test/java/org/apache/jena/iri/test/TestMoreExamples.java
+++ /dev/null
@@ -1,264 +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.jena.iri.test;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Stack;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.apache.jena.iri.IRI ;
-import org.apache.jena.iri.Violation ;
-import org.apache.jena.iri.ViolationCodes ;
-import org.apache.jena.iri.impl.AbsIRIImpl ;
-import org.apache.jena.iri.impl.PatternCompiler ;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-
-public class TestMoreExamples extends TestCase implements
-        ViolationCodes {
-    static class TestReader extends DefaultHandler {
-        private Stack<Test> stack = new Stack<>();
-
-        TestReader(TestSuite s) {
-            stack.push(s);
-        }
-        private void push(Test t) {
-            ((TestSuite)stack.peek()).addTest(t);
-            stack.push(t);
-        }
-
-        @Override
-        public void startElement(String arg1, String arg2, String name,
-                Attributes att) {
-            if (name.equals("IRI"))
-                push(new TestMEIri(att));
-            else if (name.equals("Result"))
-                push(new TestMEResult(att,(TestSuite)stack.peek()));
-            else if (name.equals("Relativize"))
-                push(new TestMERelativize(att,(TestSuite)stack.peek()));
-            else if (name.equals("Resolve"))
-                push(new TestSuite());
-            else if (!name.equals("UriTests"))
-                add(name, att);
-        }
-
-        private void add(String name, Attributes att) {
-            ((TestMoreExamples) stack.peek()).add(name, att);
-        }
-
-        @Override
-        public void characters(char ch[], int st, int lg) {
-            String text = new String(ch,st,lg).trim();
-            if (text.length()>0)
-                ((TestMoreExamples) stack.peek()).add(text);
-        }
-        @Override
-        public void endElement(String arg1, String arg2, String name) {
-            if (name.equals("Resolve")) {
-                TestSuite t = (TestSuite) stack.pop();
-                t.
-                setName(((TestCase)t.testAt(0)).getName() + "  " +
-                        ((TestCase)t.testAt(1)).getName());
-            } else if (name.equals("IRI") || name.equals("Result")
-                    || name.equals("Relativize")) {
-                stack.pop();
-            }
-
-        }
-
-    }
-
-    static Map<String, String> attr2map(Attributes a) {
-        Map<String, String> rslt = new HashMap<>();
-        for (int i = a.getLength()-1;i>=0;i--)
-            rslt.put(a.getQName(i),a.getValue(i));
-        return rslt;
-    }
-    Map<String, String> att;
-    TestSuite parent;
-    private Map<String, Map<String, String>> methods = new HashMap<>();
-    private long violations = 0l;
-    private IRI iri;
-
-    public TestMoreExamples(String nm, Attributes att) {
-        this(nm,att,null);
-    }
-
-    private String savedText = null;
-    public void add(String text) {
-        if (savedText!=null) {
-            text = savedText + text;
-            savedText = null;
-//            System.err.println(text);
-        }
-        try {
-        violations |= (1l << PatternCompiler.errorCode(text));
-        }
-        catch (NoSuchFieldException e){
-                savedText = text;
-        }
-    }
-
-    public TestMoreExamples(String nm, Attributes att, TestSuite suite) {
-        super(escape(nm));
-        this.att = attr2map(att);
-        this.parent = suite;
-    }
-
-    private static String escape(String nm) {
-        StringBuilder rslt = new StringBuilder();
-        for (int i=0; i<nm.length();i++) {
-            char ch = nm.charAt(i);
-            if (ch>=32 && ch<=126)
-                rslt.append(ch);
-            else
-                rslt.append("\\u"+pad4(Integer.toHexString(ch)));
-                
-        }
-        return rslt.toString();
-    }
-
-    private static String pad4(String string) {
-        switch (string.length()) {
-        case 0:
-            return "0000";
-        case 1:
-            return "000"+string;
-        case 2:
-            return "00"+string;
-        case 3:
-            return "0"+string;
-            default:
-                return string;
-       
-        }
-    }
-
-    public TestMoreExamples(String string) {
-        super(escape(string));
-    }
-    
-//    static int cnt = 0;
-    
-    @Override
-    public void setUp() throws Exception {
-//        System.err.println("setUp"+cnt);
-        super.setUp();
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-//        System.err.println("tearDown"+cnt++);
-        super.tearDown();
-    }
-    private void add(String name, Attributes attrs) {
-        if (name.equals("violation"))
-            return;
-        if (name.equals("violations"))
-            return;
-        methods.put(name,attr2map(attrs));
-    }
-
-    private long getViolations() {
-    	long result = 0l;
-    	Iterator<Violation> it = ((AbsIRIImpl)iri).allViolations();
-        while (it.hasNext()) {
-           result |= (1l<<(it.next()).getViolationCode());
-                  
-        }
-        return result;
-    }
-    @Override
-    public void runTest() {
-//        System.err.println("runTest"+cnt + " " + getName());
-       iri = getIRI();
-       
-       
-       assertEquals("violations",violations,getViolations());
-       
-       Iterator<Map.Entry<String, Map<String,String>>> it = methods.entrySet().iterator();
-       while (it.hasNext()) {
-           Map.Entry<String, Map<String,String>> ent = it.next();
-           String m = ent.getKey();
-           Map<String,String> attrs = ent.getValue();
-           try {
-               Object r = IRI.class.getDeclaredMethod(m,TestCreator.nullSign)
-                .invoke(iri,new Object[]{});
-               if (r==null)
-                   assertEquals(attrs.get("nullValue"),"true");
-               else
-                   assertEquals(attrs.get("value"),r.toString());
-               
-            } catch (IllegalArgumentException | NoSuchMethodException | IllegalAccessException | SecurityException e) {
-                e.printStackTrace();
-            }
-           catch (InvocationTargetException e) {
-                Throwable t = e;
-                if (t.getCause()!=null)
-                    t= t.getCause();
-                String s = t.getMessage()!=null?t.getMessage():t.toString();
-                
-                assertEquals(attrs.get("exception"),s);
-            }
-       }
-    }
-
-    final IRI getIRI() { if (iri==null) iri = computeIRI(); return iri; }
-
-    IRI computeIRI() {
-        throw new UnsupportedOperationException();
-    }
-
-    static TestSuite suitex() throws SAXException, IOException, ParserConfigurationException {
-        SAXParserFactory fact = SAXParserFactory.newInstance();
-        TestSuite result = new TestSuite();
-        result.setName("More IRI Tests");
-        try (InputStream in = TestCreator.class.getClassLoader().getResourceAsStream("org/apache/jena/iri/test/test.xml")) {
-            fact.newSAXParser().parse(in,new TestReader(result));
-            return result;
-        }
-    }
-    public static TestSuite suite() {
-        try {
-            return 
-             suitex();
-            
-        } catch (SAXException | ParserConfigurationException | IOException e) {
-            e.printStackTrace();
-        }
-//        System.err.println("Yes chris we know");
-//        return 
-        TestSuite r2 = new TestSuite("exception-while-building-testsuite");
-//        r2.addTest(new TestMoreExamples("testDummy"));
-        return r2;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/java/org/apache/jena/iri/test/TestPackage.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/test/TestPackage.java b/jena-iri/src/test/java/org/apache/jena/iri/test/TestPackage.java
deleted file mode 100644
index 5a4bccc..0000000
--- a/jena-iri/src/test/java/org/apache/jena/iri/test/TestPackage.java
+++ /dev/null
@@ -1,36 +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.jena.iri.test;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-public class TestPackage extends TestCase{
-    
-    public static TestSuite suite() {
-        TestSuite rslt = new TestSuite();
-
-        rslt.setName("IRI");
-        rslt.addTest(TestExample.suite());
-        rslt.addTest(TestMoreExamples.suite());
-        rslt.addTest(MoreTests.suite());
-        rslt.addTest(Additional.suite());
-        return rslt;
-    }
-}


[44/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/RequestLog.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/RequestLog.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/RequestLog.java
new file mode 100644
index 0000000..db79d6a
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/RequestLog.java
@@ -0,0 +1,148 @@
+/**
+ * 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.jena.fuseki.server;
+
+import java.text.DateFormat ;
+import java.text.SimpleDateFormat ;
+import java.util.Collection ;
+import java.util.Date ;
+import java.util.Enumeration ;
+import java.util.TimeZone ;
+
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.fuseki.servlets.HttpAction ;
+
+/** Create standard request logs (NCSA etc) */ 
+public class RequestLog {
+    /*
+      http://httpd.apache.org/docs/current/mod/mod_log_config.html
+Common Log Format (CLF)
+    "%h %l %u %t \"%r\" %>s %b"
+Common Log Format with Virtual Host
+    "%v %h %l %u %t \"%r\" %>s %b"
+NCSA extended/combined log format
+    "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
+     */
+    /*
+        %l -- Identity or -
+        %u -- Remote user or -
+        %t -- Timestamp
+        "%r" -- Request line
+        %>s -- Final request status
+        %b -- Size in bytes
+        Headers.
+        %{}i for request header.
+        %{}o for response header.
+      */  
+    
+    private static DateFormat dateFormatter ; 
+    static {
+        dateFormatter = new SimpleDateFormat("dd/MMM/yyyy:HH:mm:ss Z") ;
+        dateFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
+    }
+
+    /** NCSA combined log format *
+     * LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b  \"%{Referer}i\" \"%{User-Agent}i\"" combinedfwd
+     * XXX.XXX.XXX.XXX - - [01/Feb/2014:03:19:09 +0000] "GET / HTTP/1.1" 200 6190  "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
+     */
+    public static String combinedNCSA(HttpAction action) {
+        StringBuilder builder = new StringBuilder() ;
+        HttpServletRequest request = action.request ;
+        HttpServletResponse response = action.response ;
+        
+        // Remote
+        String remote = get(request, "X-Forwarded-For", request.getRemoteAddr()) ;
+        builder.append(remote) ;
+        builder.append(" ") ;
+        
+        // %l %u : User identity (unrelaible)
+        builder.append("- - ") ;
+        
+        // %t
+        // Expensive? 
+        builder.append("[");
+        // Better?
+        builder.append(dateFormatter.format(new Date())) ;
+        builder.append("] ");
+        
+        // "%r"
+        builder.append("\"")  ;
+        builder.append(request.getMethod()) ;
+        builder.append(" ") ;
+        // No query string - they are long and logged readably elsewhere
+        builder.append(request.getRequestURI()) ; 
+        builder.append("\"")  ;
+        //%>s -- Final request status
+        builder.append(" ")  ;
+        builder.append(response.getStatus())  ;
+        
+        //%b -- Size in bytes
+        builder.append(" ")  ;
+        //String size = getField()
+        String size = get(response, "Content-Length", "-") ;
+        builder.append(size)  ;
+        
+        // "%{Referer}i" 
+        builder.append(" \"")  ;
+        builder.append(get(request, "Referer", "")) ;
+        builder.append("\"")  ;
+        // "%{User-Agent}i"
+        builder.append(" \"")  ;
+        builder.append(get(request, "User-Agent", "")) ;
+        builder.append("\"")  ;
+        
+        return builder.toString() ;
+    }
+    
+    private static String get(HttpServletRequest request, String name, String dft) {
+        String x = get(request, name) ;
+        if ( x == null )
+            x = dft ;
+        return x ;
+    }
+    
+    private static String get(HttpServletRequest request, String name) {
+        Enumeration<String> en = request.getHeaders(name) ;
+        if ( ! en.hasMoreElements() ) return null ;
+        String x = en.nextElement() ;
+        if ( en.hasMoreElements() ) {
+            Log.warn(RequestLog.class, "Multiple request header values") ;
+        }
+        return x ;
+    }
+
+    private static String get(HttpServletResponse response, String name, String dft) {
+        String x = get(response, name) ;
+        if ( x == null )
+            x = dft ;
+        return x ;
+    }
+
+    
+    private static String get(HttpServletResponse response, String name) {
+        Collection<String> en = response.getHeaders(name) ;
+        if ( en.isEmpty() )return null ;
+        if ( en.size() != 1 ) Log.warn(RequestLog.class, "Multiple response header values") ;
+        return response.getHeader(name) ;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
new file mode 100644
index 0000000..67f5d26
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
@@ -0,0 +1,40 @@
+/**
+ * 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.jena.fuseki.server;
+
+import java.util.HashMap ;
+import java.util.Map ;
+
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+
+/** Dataset setup (command line, config file) for a dataset (or several if config file) */
+public class ServerInitialConfig {
+    // Either this ...
+    public String    templateFile     = null ;
+    public Map<String,String> params  = new HashMap<>() ;
+    public String    datasetPath      = null ;
+    public boolean   allowUpdate      = false ;
+    // Or this ...
+    public String    fusekiConfigFile = null ;
+    
+    // Special case - directly pass in the dataset graphs - datasetPath must be given.
+    // This is not persistet across server restarts. 
+    public DatasetGraph dsg           = null ;
+    
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServiceMXBean.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServiceMXBean.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServiceMXBean.java
new file mode 100644
index 0000000..11c7330
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServiceMXBean.java
@@ -0,0 +1,32 @@
+/**
+ * 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.jena.fuseki.server;
+
+public interface ServiceMXBean
+{
+    String getName() ;
+    
+    long getRequests() ;
+    long getRequestsGood() ;
+    long getRequestsBad() ;
+    
+//    void enable() ;
+//    void disable() ;
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ShiroEnvironmentLoader.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ShiroEnvironmentLoader.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ShiroEnvironmentLoader.java
new file mode 100644
index 0000000..f33fe92
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ShiroEnvironmentLoader.java
@@ -0,0 +1,164 @@
+/**
+ * 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.jena.fuseki.server;
+
+import java.io.IOException ;
+import java.io.InputStream ;
+import java.nio.file.Path ;
+import java.nio.file.Paths ;
+
+import javax.servlet.ServletContext ;
+import javax.servlet.ServletContextEvent ;
+import javax.servlet.ServletContextListener ;
+
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.shiro.config.ConfigurationException ;
+import org.apache.shiro.io.ResourceUtils ;
+import org.apache.shiro.web.env.EnvironmentLoader ;
+import org.apache.shiro.web.env.ResourceBasedWebEnvironment ;
+import org.apache.shiro.web.env.WebEnvironment ;
+
+import com.hp.hpl.jena.util.FileUtils ;
+
+/** A place to perform Fuseki-specific initialization of Apache Shiro.
+ *  Runs after listener FusekiServerEnvironmentInit and before FusekiServerListener
+ *  This means finding shiro.ini in multiple possible places, based on
+ *  different deployment setups.
+ */
+public class ShiroEnvironmentLoader extends EnvironmentLoader implements ServletContextListener {
+    private ServletContext servletContext ; 
+    
+    public ShiroEnvironmentLoader() {}
+    
+    @Override
+    public void contextInitialized(ServletContextEvent sce) {
+        FusekiServer.init() ; 
+        this.servletContext = sce.getServletContext() ;
+        try { 
+            // Shiro.
+            initEnvironment(servletContext);
+        } catch (ConfigurationException  ex) {
+            Fuseki.configLog.error("Shiro initialization failed: "+ex.getMessage());
+            // Exit?
+            throw ex ;
+        }
+    }
+
+    @Override
+    public void contextDestroyed(ServletContextEvent sce) {
+        destroyEnvironment(sce.getServletContext());
+    }
+
+    /** 
+     * Normal Shiro initialization only supports one location for an INI file.
+     *  
+     * When given multiple multiple locations for the shiro.ini file, and 
+     * if a {@link ResourceBasedWebEnvironment}, check the list of configuration
+     * locations, testing whether the name identified an existing resource.  
+     * For the first resource name found to exist, reset the {@link ResourceBasedWebEnvironment}
+     * to name that resource alone so the normal Shiro initialization  
+     */
+    @Override
+    protected void customizeEnvironment(WebEnvironment environment) {
+        if ( environment instanceof ResourceBasedWebEnvironment ) {
+            ResourceBasedWebEnvironment env = (ResourceBasedWebEnvironment)environment ;
+            String[] locations = env.getConfigLocations() ;
+            String loc = huntForShiroIni(locations) ;
+            Fuseki.configLog.info("Shiro file: "+loc);
+            if (loc != null )
+                locations = new String[] {loc} ;
+            env.setConfigLocations(locations);
+        }
+    }
+    
+    private static final String FILE = "file" ;
+    
+    /** Look for a Shiro ini file, or return null */
+    private static String huntForShiroIni(String[] locations) {
+        FusekiEnv.setEnvironment() ;
+        Fuseki.init();
+        for ( String loc : locations ) {
+            // If file:, look for that file.
+            // If a relative name without scheme, look in FUSEKI_BASE, FUSEKI_HOME, webapp. 
+            String scheme = FileUtils.getScheme(loc) ;
+            
+            // Covers C:\\ as a "scheme name"
+            if ( scheme != null ) {
+                if ( scheme.equalsIgnoreCase(FILE)) {
+                    // Test file: for exists
+                    Path p = Paths.get(loc.substring(FILE.length()+1)) ;
+                    if ( ! p.toFile().exists() )
+                        continue ;
+                    // Fall through.
+                }
+                // Can't test - try 
+                return loc ;
+            }
+            // No scheme .
+            Path p = Paths.get(loc) ;
+            
+            String fn = resolve(FusekiEnv.FUSEKI_BASE, p) ;
+            if ( fn != null )
+                return "file://"+fn ;
+            fn = resolve(FusekiEnv.FUSEKI_HOME, p) ;
+            if ( fn != null )
+                return "file://"+fn ;
+            
+            // Try in webapp.
+            
+            try ( InputStream is = ResourceUtils.getInputStreamForPath(loc); ) {
+                boolean exists = (is != null ) ;
+                return loc ;
+            } catch (IOException e) { }
+        }
+        return null ;
+    }
+    
+    /** Directory + name -> filename if it exists */ 
+    private static String resolve(Path dir, Path file) {
+        Path p = dir.resolve(file) ;
+        if ( p.toFile().exists() )
+            return p.normalize().toString() ;
+        return null ;
+    }
+
+//    /** 
+//     * Test whether a name identified an existing resource
+//     * @param resource    A String in Shiro-resource name format (e.g. URL scheme names) 
+//     * @return True/false as to whether the resource can be found or not. 
+//     */
+//    
+//    private boolean resourceExists(String resource) {
+//        try {
+//            // See IniWebEnvironment.convertPathToIni
+//            if (!ResourceUtils.hasResourcePrefix(resource)) {
+//                //Sort out "path" and open as a webapp resource.
+//                resource = WebUtils.normalize(resource);
+//                URL url = servletContext.getResource(resource) ;
+//                return ( url == null ) ;
+//            } else {
+//                // Treat as a plain name. 
+//                InputStream is = ResourceUtils.getInputStreamForPath(resource);
+//                boolean exists = (is != null ) ;
+//                is.close() ;
+//                return exists ;
+//            }
+//        } catch (IOException e) { return false ; }
+//    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/SystemState.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/SystemState.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/SystemState.java
new file mode 100644
index 0000000..74117c9
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/SystemState.java
@@ -0,0 +1,108 @@
+/**
+ * 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.jena.fuseki.server;
+
+import org.apache.jena.atlas.lib.FileOps ;
+import org.apache.jena.atlas.lib.StrUtils ;
+import org.apache.jena.fuseki.Fuseki ;
+
+import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.tdb.StoreConnection ;
+import com.hp.hpl.jena.tdb.TDB ;
+import com.hp.hpl.jena.tdb.TDBFactory ;
+import com.hp.hpl.jena.tdb.base.block.FileMode ;
+import com.hp.hpl.jena.tdb.base.file.Location ;
+import com.hp.hpl.jena.tdb.setup.StoreParams ;
+import com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction ;
+
+public class SystemState {
+    private static String SystemDatabaseLocation ;
+    // Testing may reset this.
+    public static Location location ; 
+    
+    private  static Dataset                 dataset   = null ;
+    private  static DatasetGraphTransaction dsg       = null ;
+    
+    public static Dataset getDataset() {
+        init() ;
+        return dataset ;
+    }
+    
+    public static DatasetGraphTransaction getDatasetGraph() {
+        init() ;
+        return dsg ;
+    }
+    
+    private static boolean initialized = false ; 
+    private static void init() {
+        init$() ;
+    }
+    
+    /** Small footprint database.  The system database records the server state.
+     * It should not be performance critical, mainly being used for system admin
+     * functions.
+     * <p>Direct mode so that it is not competing for OS file cache space.
+     * <p>Small caches - 
+     */
+    private static final StoreParams systemDatabaseParams = StoreParams.builder()
+        .fileMode(FileMode.direct)
+        .blockReadCacheSize(20)
+        .blockWriteCacheSize(20)
+        .node2NodeIdCacheSize(5000)
+        .nodeId2NodeCacheSize(5000)
+        .nodeMissCacheSize(100)
+        .build() ;
+    
+    public /* for testing */ static void init$() {
+        if ( initialized )
+            return ;
+        initialized = true ;
+        
+        if ( location == null )
+            location = Location.create(FusekiServer.dirSystemDatabase.toString()) ;
+        
+        if ( ! location.isMem() )
+            FileOps.ensureDir(location.getDirectoryPath()) ;
+        
+        // Force it into the store connection as a low footprint
+        if ( StoreConnection.getExisting(location) != null )
+            Fuseki.serverLog.warn("System database already in the StoreConnection cache") ;
+        StoreConnection.make(location, systemDatabaseParams) ;
+        
+        dataset = TDBFactory.createDataset(location) ;
+        dsg     = (DatasetGraphTransaction)(dataset.asDatasetGraph()) ;
+        dsg.getContext().set(TDB.symUnionDefaultGraph, false) ;
+    }
+    
+    public static String PREFIXES = StrUtils.strjoinNL
+        ("BASE <http://example/base#>",
+         "PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>",
+         "PREFIX fu:      <http://jena.apache.org/fuseki#>",
+         "PREFIX fuseki:  <http://jena.apache.org/fuseki#>",
+         "PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>",
+         "PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>",
+         "PREFIX tdb:     <http://jena.hpl.hp.com/2008/tdb#>",
+         "PREFIX sdb:     <http://jena.hpl.hp.com/20087/sdb#>",
+         "PREFIX list:    <http://jena.hpl.hp.com/ARQ/list#>",
+         "PREFIX xsd:     <http://www.w3.org/2001/XMLSchema#>",
+         "PREFIX apf:     <http://jena.hpl.hp.com/ARQ/property#>",
+         "PREFIX afn:     <http://jena.hpl.hp.com/ARQ/function#>",
+         "") ;
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java
new file mode 100644
index 0000000..3e45c78
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java
@@ -0,0 +1,265 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import static java.lang.String.format ;
+
+import java.io.IOException ;
+import java.util.Enumeration ;
+import java.util.Map ;
+
+import javax.servlet.ServletException ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.RuntimeIOException ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.riot.web.HttpNames ;
+import org.apache.jena.web.HttpSC ;
+import org.slf4j.Logger ;
+
+import com.hp.hpl.jena.query.ARQ ;
+import com.hp.hpl.jena.query.QueryCancelledException ;
+import com.hp.hpl.jena.sparql.util.Context ;
+
+/** General request lifecycle */
+public abstract class ActionBase extends ServletBase
+{
+    protected final Logger log ;
+
+    protected ActionBase(Logger log) {
+        super() ;
+        this.log = log ;
+    }
+    
+    @Override 
+    public void init() {
+//        log.info("["+Utils.className(this)+"] ServletContextName = "+getServletContext().getServletContextName()) ;
+//        log.info("["+Utils.className(this)+"] ContextPath        = "+getServletContext().getContextPath()) ;
+
+        //super.init() ;
+    }
+    
+    /**
+     * Common framework for handling HTTP requests.
+     * @param request
+     * @param response
+     */
+    protected void doCommon(HttpServletRequest request, HttpServletResponse response)
+    {
+        try {
+            long id = allocRequestId(request, response);
+            
+            // Lifecycle
+            HttpAction action = allocHttpAction(id, request, response) ;
+
+            printRequest(action) ;
+            action.setStartTime() ;
+            
+            // The response may be changed to a HttpServletResponseTracker
+            response = action.response ;
+            initResponse(request, response) ;
+            Context cxt = ARQ.getContext() ;
+            
+            try {
+                execCommonWorker(action) ;
+            } catch (QueryCancelledException ex) {
+                // Also need the per query info ...
+                String message = String.format("The query timed out (restricted to %s ms)", cxt.get(ARQ.queryTimeout));
+                // Possibility :: response.setHeader("Retry-after", "600") ;    // 5 minutes
+                ServletOps.responseSendError(response, HttpSC.SERVICE_UNAVAILABLE_503, message);
+            } catch (ActionErrorException ex) {
+                if ( ex.exception != null )
+                    ex.exception.printStackTrace(System.err) ;
+                // Log message done by printResponse in a moment.
+                if ( ex.message != null )
+                    ServletOps.responseSendError(response, ex.rc, ex.message) ;
+                else
+                    ServletOps.responseSendError(response, ex.rc) ;
+            } catch (RuntimeIOException ex) {
+                log.warn(format("[%d] Runtime IO Exception (client left?) RC = %d : %s", id, HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()), ex) ;
+                ServletOps.responseSendError(response, HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()) ;
+            } catch (Throwable ex) {
+                // This should not happen.
+                //ex.printStackTrace(System.err) ;
+                log.warn(format("[%d] RC = %d : %s", id, HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()), ex) ;
+                ServletOps.responseSendError(response, HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()) ;
+            }
+    
+            action.setFinishTime() ;
+            printResponse(action) ;
+            archiveHttpAction(action) ;
+        } catch (Throwable th) {
+            log.error("Internal error", th) ;
+        }
+    }
+
+    // ---- Operation lifecycle
+
+    /**
+     * Returns a fresh HTTP Action for this request.
+     * @param id the Request ID
+     * @param request HTTP request
+     * @param response HTTP response
+     * @return a new HTTP Action
+     */
+    protected HttpAction allocHttpAction(long id, HttpServletRequest request, HttpServletResponse response) {
+        // Need a way to set verbose logging on a per servlet and per request basis. 
+        return new HttpAction(id, log, request, response, Fuseki.verboseLogging) ;
+    }
+
+    /**
+     * Begin handling an {@link HttpAction}  
+     * @param action
+     */
+    protected final void startRequest(HttpAction action) {
+        action.startRequest() ;
+    }
+    
+    /**
+     * Stop handling an {@link HttpAction}  
+     */
+    protected final void finishRequest(HttpAction action) {
+        action.finishRequest() ;
+    }
+    
+    /**
+     * Archives the HTTP Action.
+     * @param action HTTP Action
+     * @see HttpAction#minimize()
+     */
+    private void archiveHttpAction(HttpAction action) {
+        action.minimize() ;
+    }
+
+    /**
+     * Execute this request, which maybe a admin operation or a client request. 
+     * @param action HTTP Action
+     */
+    protected abstract void execCommonWorker(HttpAction action) ;
+    
+    /** Extract the name after the container name (serverlet name).
+     * Returns "/name" or null 
+     */  
+    protected static String extractItemName(HttpAction action) {
+//      action.log.info("context path  = "+action.request.getContextPath()) ;
+//      action.log.info("pathinfo      = "+action.request.getPathInfo()) ;
+//      action.log.info("servlet path  = "+action.request.getServletPath()) ;
+      // if /name
+      //    request.getServletPath() otherwise it's null
+      // if /*
+      //    request.getPathInfo() ; otherwise it's null.
+      
+      // PathInfo is after the servlet name. 
+      String x1 = action.request.getServletPath() ;
+      String x2 = action.request.getPathInfo() ;
+      
+      String pathInfo = action.request.getPathInfo() ;
+      if ( pathInfo == null || pathInfo.isEmpty() || pathInfo.equals("/") )
+          // Includes calling as a container. 
+          return null ;
+      String name = pathInfo ;
+      // pathInfo starts with a "/"
+      int idx = pathInfo.lastIndexOf('/') ;
+      if ( idx > 0 )
+          name = name.substring(idx) ;
+      // Returns "/name"
+      return name ; 
+  }
+
+    @SuppressWarnings("unused") // ServletException
+    protected void doPatch(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "HTTP PATCH not supported");
+    }
+    
+    private void printRequest(HttpAction action) {
+        String url = ActionLib.wholeRequestURL(action.request) ;
+        String method = action.request.getMethod() ;
+
+        log.info(format("[%d] %s %s", action.id, method, url)) ;
+        if ( action.verbose ) {
+            Enumeration<String> en = action.request.getHeaderNames() ;
+            for (; en.hasMoreElements();) {
+                String h = en.nextElement() ;
+                Enumeration<String> vals = action.request.getHeaders(h) ;
+                if ( !vals.hasMoreElements() )
+                    log.info(format("[%d]   ", action.id, h)) ;
+                else {
+                    for (; vals.hasMoreElements();)
+                        log.info(format("[%d]   %-20s %s", action.id, h, vals.nextElement())) ;
+                }
+            }
+        }
+    }
+
+    private void initResponse(HttpServletRequest request, HttpServletResponse response) {
+        setCommonHeaders(response) ;
+        String method = request.getMethod() ;
+        // All GET and HEAD operations are sensitive to conneg so ...
+        if ( HttpNames.METHOD_GET.equalsIgnoreCase(method) || HttpNames.METHOD_HEAD.equalsIgnoreCase(method) )
+            setVaryHeader(response) ;
+    }
+
+    private void printResponse(HttpAction action) {
+        long time = action.getTime() ;
+
+        HttpServletResponseTracker response = action.response ;
+        if ( action.verbose ) {
+            if ( action.contentType != null )
+                log.info(format("[%d]   %-20s %s", action.id, HttpNames.hContentType, action.contentType)) ;
+            if ( action.contentLength != -1 )
+                log.info(format("[%d]   %-20s %d", action.id, HttpNames.hContentLengh, action.contentLength)) ;
+            for (Map.Entry<String, String> e : action.headers.entrySet())
+                log.info(format("[%d]   %-20s %s", action.id, e.getKey(), e.getValue())) ;
+        }
+
+        String timeStr = fmtMillis(time) ;
+
+        if ( action.message == null )
+            log.info(String.format("[%d] %d %s (%s) ", action.id, action.statusCode,
+                                   HttpSC.getMessage(action.statusCode), timeStr)) ;
+        else
+            log.info(String.format("[%d] %d %s (%s) ", action.id, action.statusCode, action.message, timeStr)) ;
+        
+        // See also HttpAction.finishRequest - request logging happens there.
+    }
+
+    /**
+     * <p>Given a time point, return the time as a milli second string if it is less than 1000,
+     * otherwise return a seconds string.</p>
+     * <p>It appends a 'ms' suffix when using milli seconds,
+     *  and <i>s</i> for seconds.</p>
+     * <p>For instance: </p>
+     * <ul>
+     * <li>10 emits 10 ms</li>
+     * <li>999 emits 999 ms</li>
+     * <li>1000 emits 1.000 s</li>
+     * <li>10000 emits 10.000 s</li>
+     * </ul>
+     * @param time the time in milliseconds
+     * @return the time as a display string
+     */
+
+    private static String fmtMillis(long time) {
+        // Millis only? seconds only?
+        if ( time < 1000 )
+            return String.format("%,d ms", time) ;
+        return String.format("%,.3f s", time / 1000.0) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionErrorException.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionErrorException.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionErrorException.java
new file mode 100644
index 0000000..c87cfe8
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionErrorException.java
@@ -0,0 +1,32 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+public class ActionErrorException extends RuntimeException
+{
+    public final Throwable exception ;
+    public final String message ;
+    public final int rc ;
+    public ActionErrorException(Throwable ex, String message, int rc)
+    {
+        this.exception = ex ;
+        this.message = message ;
+        this.rc = rc ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java
new file mode 100644
index 0000000..182b46e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java
@@ -0,0 +1,180 @@
+/**
+ * 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.jena.fuseki.servlets;
+
+import javax.servlet.http.HttpServletRequest ;
+
+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.conneg.ConNeg ;
+import org.apache.jena.fuseki.server.DataAccessPoint ;
+import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
+
+/** Operations related to servlets */
+
+public class ActionLib {
+    /**
+     * A possible implementation for {@link ActionSPARQL#mapRequestToDataset}
+     * that assumes the form /dataset/service.
+     * @param action the request
+     * @return the dataset
+     */    public static String mapRequestToDataset(HttpAction action) {
+         String uri = action.getActionURI() ;
+         return mapActionRequestToDataset(uri) ;
+     }
+    
+    /** Map request to uri in the registry.
+     *  A possible implementation for mapRequestToDataset(String)
+     *  that assumes the form /dataset/service 
+     *  Returning null means no mapping found.
+     *  The URI must be the action URI (no contact path) 
+     */
+    
+    public static String mapActionRequestToDataset(String uri) {
+        // Chop off trailing part - the service selector
+        // e.g. /dataset/sparql => /dataset 
+        int i = uri.lastIndexOf('/') ;
+        if ( i == -1 )
+            return null ;
+        if ( i == 0 )
+        {
+            // started with '/' - leave.
+            return uri ;
+        }
+        
+        return uri.substring(0, i) ;
+    }
+
+    /** Calculate the operation , given action and data access point */ 
+    public static String mapRequestToOperation(HttpAction action, DataAccessPoint dsRef) {
+        if ( dsRef == null )
+            return "" ;
+        String uri = action.getActionURI() ;
+        String name = dsRef.getName();
+        if ( name.length() >= uri.length() )
+            return "" ;
+        return uri.substring(name.length()+1) ;   // Skip the separating "/"
+        
+    }
+    
+    /** Implementation of mapRequestToDataset(String) that looks for
+     * the longest match in the registry.
+     * This includes use in direct naming GSP. 
+     */
+    public static String mapRequestToDatasetLongest$(String uri) 
+    {
+        if ( uri == null )
+            return null ;
+        
+        // This covers local, using the URI as a direct name for
+        // a graph, not just using the indirect ?graph= or ?default 
+        // forms.
+
+        String ds = null ;
+        for ( String ds2 : DataAccessPointRegistry.get().keys() ) {
+            if ( ! uri.startsWith(ds2) )
+                continue ;
+
+            if ( ds == null )
+            {
+                ds = ds2 ;
+                continue ; 
+            }
+            if ( ds.length() < ds2.length() )
+            {
+                ds = ds2 ;
+                continue ;
+            }
+        }
+        return ds ;
+    }
+
+    /** Calculate the fill URL including query string
+     * for the HTTP request. This may be quite long.
+     * @param request HttpServletRequest
+     * @return String The full URL, including query string.
+     */
+    public static String wholeRequestURL(HttpServletRequest request) {
+        StringBuffer sb = request.getRequestURL() ;
+        String queryString = request.getQueryString() ;
+        if ( queryString != null ) {
+            sb.append("?") ;
+            sb.append(queryString) ;
+        }
+        return sb.toString() ;
+    }
+
+    /* 
+     * The context path can be:
+     * "" for the root context
+     * "/APP" for named contexts
+     * so:
+     * "/dataset/server" becomes "/dataset/server"
+     * "/APP/dataset/server" becomes "/dataset/server"
+     */
+    public static String removeContextPath(HttpAction action) {
+
+        return actionURI(action.request) ;
+    }
+    
+    public static String actionURI(HttpServletRequest request) {
+//      Log.info(this, "URI                     = '"+request.getRequestURI()) ;
+//      Log.info(this, "Context path            = '"+request.getContextPath()+"'") ;
+//      Log.info(this, "Servlet path            = '"+request.getServletPath()+"'") ;
+//      ServletContext cxt = this.getServletContext() ;
+//      Log.info(this, "ServletContext path     = '"+cxt.getContextPath()+"'") ;
+        
+        String contextPath = request.getServletContext().getContextPath() ;
+        String uri = request.getRequestURI() ;
+        if ( contextPath == null )
+            return uri ;
+        if ( contextPath.isEmpty())
+            return uri ;
+        String x = uri ;
+        if ( uri.startsWith(contextPath) )
+            x = uri.substring(contextPath.length()) ;
+        //log.info("uriWithoutContextPath: uri = "+uri+" contextPath="+contextPath+ "--> x="+x) ;
+        return x ;
+    }
+
+    /** Negotiate the content-type and set the response headers */ 
+    public static MediaType contentNegotation(HttpAction action, AcceptList myPrefs,
+                                              MediaType defaultMediaType) {
+        MediaType mt = ConNeg.chooseContentType(action.request, myPrefs, defaultMediaType) ;
+        if ( mt == null )
+            return null ;
+        if ( mt.getContentType() != null )
+            action.response.setContentType(mt.getContentType()) ;
+        if ( mt.getCharset() != null )
+            action.response.setCharacterEncoding(mt.getCharset()) ;
+        return mt ;
+    }
+    
+    /** Negotiate the content-type for an RDF triples syntax and set the response headers */ 
+    public static MediaType contentNegotationRDF(HttpAction action) {
+        return contentNegotation(action, DEF.rdfOffer, DEF.acceptRDFXML) ;
+    }
+
+    /** Negotiate the content-type for an RDF quads syntax and set the response headers */ 
+    public static MediaType contentNegotationQuads(HttpAction action) {
+        return contentNegotation(action, DEF.quadsOffer, DEF.acceptNQuads) ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java
new file mode 100644
index 0000000..e2c7e4a
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java
@@ -0,0 +1,161 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import java.io.IOException ;
+import java.util.Locale ;
+
+import javax.servlet.ServletException ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.fuseki.server.CounterName ;
+
+/** Common point for operations that are "REST"ish (use GET/PUT etc as operations). */ 
+public abstract class ActionREST extends ActionSPARQL
+{
+    public ActionREST()
+    { super() ; }
+
+    @Override
+    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        // Direct all verbs to our common framework.
+        doCommon(request, response) ;
+    }
+    
+    @Override
+    protected void perform(HttpAction action) {
+        dispatch(action) ;
+    }
+
+    private void dispatch(HttpAction action) {
+        HttpServletRequest req = action.request ;
+        HttpServletResponse resp = action.response ;
+        String method = req.getMethod().toUpperCase(Locale.ROOT) ;
+
+        if (method.equals(METHOD_GET))
+            doGet$(action);
+        else if (method.equals(METHOD_HEAD))
+            doHead$(action);
+        else if (method.equals(METHOD_POST))
+            doPost$(action);
+        else if (method.equals(METHOD_PATCH))
+            doPatch$(action) ;
+        else if (method.equals(METHOD_OPTIONS))
+            doOptions$(action) ;
+        else if (method.equals(METHOD_TRACE))
+            //doTrace(action) ;
+            ServletOps.errorMethodNotAllowed("TRACE") ;
+        else if (method.equals(METHOD_PUT))
+            doPut$(action) ;   
+        else if (method.equals(METHOD_DELETE))
+            doDelete$(action) ;
+        else
+            ServletOps.errorNotImplemented("Unknown method: "+method) ;
+    }
+
+    // Counter wrappers
+    
+    // XXX Out of date - we now add HTTP counters to all endpoints. 
+    
+    private final void doGet$(HttpAction action) {
+        incCounter(action.getEndpoint(), CounterName.HTTPget) ;
+        try {
+            doGet(action) ;
+            incCounter(action.getEndpoint(), CounterName.HTTPgetGood) ;
+        } catch ( ActionErrorException ex) {
+            incCounter(action.getEndpoint(), CounterName.HTTPGetBad) ;
+            throw ex ;
+        }
+    }
+
+    private final void doHead$(HttpAction action) {
+        incCounter(action.getEndpoint(), CounterName.HTTPhead) ;
+        try {
+            doHead(action) ;
+            incCounter(action.getEndpoint(), CounterName.HTTPheadGood) ;
+        } catch ( ActionErrorException ex) {
+            incCounter(action.getEndpoint(), CounterName.HTTPheadBad) ;
+            throw ex ;
+        }
+    }
+
+    private final void doPost$(HttpAction action) {
+        incCounter(action.getEndpoint(), CounterName.HTTPpost) ;
+        try {
+            doPost(action) ;
+            incCounter(action.getEndpoint(), CounterName.HTTPpostGood) ;
+        } catch ( ActionErrorException ex) {
+            incCounter(action.getEndpoint(), CounterName.HTTPpostBad) ;
+            throw ex ;
+        }
+    }
+
+    private final void doPatch$(HttpAction action) {
+        incCounter(action.getEndpoint(), CounterName.HTTPpatch) ;
+        try {
+            doPatch(action) ;
+            incCounter(action.getEndpoint(), CounterName.HTTPpatchGood) ;
+        } catch ( ActionErrorException ex) {
+            incCounter(action.getEndpoint(), CounterName.HTTPpatchBad) ;
+            throw ex ;
+        }
+    }
+
+    private final void doDelete$(HttpAction action) {
+        incCounter(action.getEndpoint(), CounterName.HTTPdelete) ;
+        try {
+            doDelete(action) ;
+            incCounter(action.getEndpoint(), CounterName.HTTPdeleteGood) ;
+        } catch ( ActionErrorException ex) {
+            incCounter(action.getEndpoint(), CounterName.HTTPdeleteBad) ;
+            throw ex ;
+        }
+    }
+
+    private final void doPut$(HttpAction action) {
+        incCounter(action.getEndpoint(), CounterName.HTTPput) ;
+        try {
+            doPut(action) ;
+            incCounter(action.getEndpoint(), CounterName.HTTPputGood) ;
+        } catch ( ActionErrorException ex) {
+            incCounter(action.getEndpoint(), CounterName.HTTPputBad) ;
+            throw ex ;
+        }
+    }
+
+    private final void doOptions$(HttpAction action) {
+        incCounter(action.getEndpoint(), CounterName.HTTPoptions) ;
+        try {
+            doOptions(action) ;
+            incCounter(action.getEndpoint(), CounterName.HTTPoptionsGood) ;
+        } catch ( ActionErrorException ex) {
+            incCounter(action.getEndpoint(), CounterName.HTTPoptionsBad) ;
+            throw ex ;
+        }
+    }
+    
+    protected abstract void doGet(HttpAction action) ;
+    protected abstract void doHead(HttpAction action) ;
+    protected abstract void doPost(HttpAction action) ;
+    protected abstract void doPatch(HttpAction action) ;
+    protected abstract void doDelete(HttpAction action) ;
+    protected abstract void doPut(HttpAction action) ;
+    protected abstract void doOptions(HttpAction action) ;
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java
new file mode 100644
index 0000000..d26bc55
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java
@@ -0,0 +1,207 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import static org.apache.jena.fuseki.server.CounterName.Requests ;
+import static org.apache.jena.fuseki.server.CounterName.RequestsBad ;
+import static org.apache.jena.fuseki.server.CounterName.RequestsGood ;
+
+import java.io.InputStream ;
+
+import org.apache.jena.atlas.RuntimeIOException ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.server.* ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.ReaderRIOT ;
+import org.apache.jena.riot.RiotException ;
+import org.apache.jena.riot.system.ErrorHandler ;
+import org.apache.jena.riot.system.ErrorHandlerFactory ;
+import org.apache.jena.riot.system.StreamRDF ;
+
+import com.hp.hpl.jena.query.QueryCancelledException ;
+
+/** SPARQL request lifecycle */
+public abstract class ActionSPARQL extends ActionBase
+{
+    protected ActionSPARQL() { super(Fuseki.actionLog) ; }
+    
+    protected abstract void validate(HttpAction action) ;
+    protected abstract void perform(HttpAction action) ;
+
+    /**
+     * Executes common tasks, including mapping the request to the right dataset, setting the dataset into the HTTP
+     * action, and retrieving the service for the dataset requested. Finally, it calls the
+     * {@link #executeAction(HttpAction)} method, which executes the HTTP Action life cycle.
+     * @param action HTTP Action
+     */
+    @Override
+    protected void execCommonWorker(HttpAction action) {
+        DataAccessPoint dataAccessPoint ;
+        DataService dSrv ;
+        
+        String datasetUri = mapRequestToDataset(action) ;
+        if ( datasetUri != null ) {
+            dataAccessPoint = DataAccessPointRegistry.get().get(datasetUri) ;
+            if ( dataAccessPoint == null ) {
+                ServletOps.errorNotFound("No dataset for URI: "+datasetUri) ;
+                return ;
+            }
+            //dataAccessPoint.
+            dSrv = dataAccessPoint.getDataService() ;
+            if ( ! dSrv.isAcceptingRequests() ) {
+                ServletOps.errorNotFound("Dataset not active: "+datasetUri) ;
+                return ;
+            }
+        } else {
+            dataAccessPoint = null ;
+            dSrv = DataService.serviceOnlyDataService() ;
+        }
+
+        String operationName = mapRequestToOperation(action, dataAccessPoint) ;
+        action.setRequest(dataAccessPoint, dSrv) ;
+        
+        //operationName = ""
+        
+        Endpoint op = dSrv.getOperation(operationName) ;
+        action.setEndpoint(op, operationName);
+        executeAction(action) ;
+    }
+
+    /** Execute a SPARQL request. Statistics have not been adjusted at this point.
+     * 
+     * @param action
+     */
+    protected void executeAction(HttpAction action) {
+        executeLifecycle(action) ;
+    }
+    
+    /** 
+     * Standard execution lifecycle for a SPARQL Request.
+     * <ul>
+     * <li>{@link #startRequest(HttpAction)}</li>
+     * <li>initial statistics,</li>
+     * <li>{@link #validate(HttpAction)} request,</li>
+     * <li>{@link #perform(HttpAction)} request,</li>
+     * <li>completion/error statistics,</li>
+     * <li>{@link #finishRequest(HttpAction)}
+     * </ul>
+     * 
+     * @param action
+     */
+    // This is the service request lifecycle.
+    final
+    protected void executeLifecycle(HttpAction action) {
+        startRequest(action) ;
+        // And also HTTP counter
+        CounterSet csService = action.getDataService().getCounters() ;
+        CounterSet csOperation = action.getEndpoint().getCounters() ;
+        
+        incCounter(csService, Requests) ;
+        incCounter(csOperation, Requests) ;
+        try {
+            // Either exit this via "bad request" on validation
+            // or in execution in perform. 
+            try {
+                validate(action) ;
+            } catch (ActionErrorException ex) {
+                incCounter(csOperation, RequestsBad) ;
+                incCounter(csService, RequestsBad) ;
+                throw ex ;
+            }
+
+            try {
+                perform(action) ;
+                // Success
+                incCounter(csOperation, RequestsGood) ;
+                incCounter(csService, RequestsGood) ;
+            } catch (ActionErrorException | QueryCancelledException | RuntimeIOException ex) {
+                incCounter(csOperation, RequestsBad) ;
+                incCounter(csService, RequestsBad) ;
+                throw ex ;
+            }
+        } finally {
+            finishRequest(action) ;
+        }
+    }
+    
+    /**
+     * Map request {@link HttpAction} to uri in the registry.
+     * A return of ull means no mapping done (passthrough).
+     * @param uri the URI
+     * @return the dataset
+     */
+    protected String mapRequestToDataset(HttpAction action) {
+        return ActionLib.mapRequestToDataset(action) ;
+    }
+
+    /**
+     * Map request to uri in the registry. null means no mapping done
+     * (passthrough).
+     */
+    protected String mapRequestToOperation(HttpAction action, DataAccessPoint dataAccessPoint) {
+        return ActionLib.mapRequestToOperation(action, dataAccessPoint) ;
+    }
+
+    /** Increment counter */
+    protected static void incCounter(Counters counters, CounterName name) {
+        if ( counters == null ) return ;
+        incCounter(counters.getCounters(), name) ; 
+    }
+    
+    /** Decrement counter */
+    protected static void decCounter(Counters counters, CounterName name) {
+        if ( counters == null ) return ;
+        decCounter(counters.getCounters(), name) ; 
+    }
+
+    protected static void incCounter(CounterSet counters, CounterName name) {
+        if ( counters == null )
+            return ;
+        try {
+            if ( counters.contains(name) )
+                counters.inc(name) ;
+        } catch (Exception ex) {
+            Fuseki.serverLog.warn("Exception on counter inc", ex) ;
+        }
+    }
+    
+    protected static void decCounter(CounterSet counters, CounterName name) {
+        if ( counters == null )
+            return ;
+        try {
+            if ( counters.contains(name) )
+                counters.dec(name) ;
+        } catch (Exception ex) {
+            Fuseki.serverLog.warn("Exception on counter dec", ex) ;
+        }
+    }
+
+    public static void parse(HttpAction action, StreamRDF dest, InputStream input, Lang lang, String base) {
+        try {
+            ReaderRIOT r = RDFDataMgr.createReader(lang) ;
+            if ( r == null )
+                ServletOps.errorBadRequest("No parser for language '"+lang.getName()+"'") ;
+            ErrorHandler errorHandler = ErrorHandlerFactory.errorHandlerStd(action.log);
+            r.setErrorHandler(errorHandler); 
+            r.read(input, base, null, dest, null) ; 
+        } 
+        catch (RiotException ex) { ServletOps.errorBadRequest("Parse error: "+ex.getMessage()) ; }
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ConcurrencyPolicyMRSW.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ConcurrencyPolicyMRSW.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ConcurrencyPolicyMRSW.java
new file mode 100644
index 0000000..1f86539
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ConcurrencyPolicyMRSW.java
@@ -0,0 +1,113 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import java.util.ConcurrentModificationException ;
+import java.util.concurrent.atomic.AtomicLong ;
+
+import org.apache.jena.fuseki.Fuseki ;
+import org.slf4j.Logger ;
+
+public final class ConcurrencyPolicyMRSW
+{
+    static private Logger log = Fuseki.actionLog ; //org.slf4j.LoggerFactory.getLogger(ConcurrencyPolicyMRSW.class) ;
+    static private final boolean logging = false ; //log.isDebugEnabled() ;
+    
+    // This is a simplified version of ConcurrencyPolicyMRSW from TDB. 
+    private final AtomicLong readCounter = new AtomicLong(0) ;
+    private final AtomicLong writeCounter = new AtomicLong(0) ;
+    static private final AtomicLong policyCounter = new AtomicLong(0) ;
+
+    public ConcurrencyPolicyMRSW()
+    { policyCounter.incrementAndGet() ; }
+
+    // Loggin -inside the operation.
+    
+    //@Override
+    public void startRead()
+    {
+        readCounter.getAndIncrement() ;
+        log() ;
+        checkConcurrency() ;
+    }
+
+    //@Override
+    public void finishRead()
+    {
+        log() ;
+        readCounter.decrementAndGet() ;
+        checkConcurrency() ;
+    }
+
+    //@Override
+    public void startUpdate()
+    {
+        writeCounter.getAndIncrement() ;
+        log() ;
+        checkConcurrency() ;
+    }
+
+    //@Override
+    public void finishUpdate()
+    {
+        log() ;
+        writeCounter.decrementAndGet() ;
+        checkConcurrency() ;
+    }
+
+    private synchronized void checkConcurrency()
+    {
+        long R = readCounter.get() ;
+        long W = writeCounter.get() ;
+        long id = policyCounter.get();
+        if ( R > 0 && W > 0 )
+            policyError(id, R, W) ;
+        if ( W > 1 )
+            policyError(id, R, W) ;
+    }
+
+    private void log()
+    {
+        if ( ! logging ) 
+            return ;
+        long R , W , id ;
+        synchronized(this)
+        {
+            R = readCounter.get() ;
+            W = writeCounter.get() ;
+            id = policyCounter.get();
+        }
+        log.info(format(id, R, W)) ;
+    }
+    
+    private static void policyError(long id, long R, long W)
+    {
+        policyError(format(id, R, W)) ;
+    }
+
+    private static void policyError(String message)
+    {
+        throw new ConcurrentModificationException(message) ;
+    }
+    
+    private static String format(long id, long R, long W)
+    {
+        return String.format("(lock=%d) Reader = %d, Writer = %d", id, R, W) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/FusekiFilter.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/FusekiFilter.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/FusekiFilter.java
new file mode 100644
index 0000000..7a79cd3
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/FusekiFilter.java
@@ -0,0 +1,87 @@
+/**
+ * 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.jena.fuseki.servlets;
+
+import java.io.IOException ;
+
+import javax.servlet.* ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
+import org.slf4j.Logger ;
+
+/** Look at all requests and see if they match a registered dataset name; 
+ * if they do, pass down to the uber servlet, which can dispatch any request
+ * for any service. 
+ */
+public class FusekiFilter implements Filter {
+    private static Logger log = Fuseki.serverLog ;
+    private static SPARQL_UberServlet überServlet = new SPARQL_UberServlet.AccessByConfig() ;
+    
+    @Override
+    public void init(FilterConfig filterConfig) throws ServletException {
+//        log.info("Filter: ["+Utils.className(this)+"] ServletContextName = "+filterConfig.getServletContext().getServletContextName()) ;
+//        log.info("Filter: ["+Utils.className(this)+"] ContextPath        = "+filterConfig.getServletContext().getContextPath()) ;
+    }
+
+    private static final boolean LogFilter = false ;     // Development debugging (can be excessive!)
+    
+    @Override
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
+        throws IOException, ServletException {
+        try {
+            HttpServletRequest req = (HttpServletRequest)request ;
+            HttpServletResponse resp = (HttpServletResponse)response ;
+
+            // Handle context path
+            String uri = ActionLib.actionURI(req) ;
+            String datasetUri = ActionLib.mapActionRequestToDataset(uri) ;
+
+            // is it a long running operation?
+            // (this could be a separate filter)
+            
+            if ( LogFilter ) {
+                log.info("Filter: Request URI = "+req.getRequestURI()) ;
+                log.info("Filter: Action URI  = "+uri) ;
+                log.info("Filter: Dataset URI = "+datasetUri) ;
+            }
+            
+            if ( datasetUri != null ) {        
+                if ( DataAccessPointRegistry.get().isRegistered(datasetUri) ) {
+                    if ( LogFilter )
+                        log.info("Filter: dispatch") ;
+                    überServlet.doCommon(req, resp) ;
+                    return ;
+                }
+            }
+        } catch (Exception ex) {}
+        
+        if ( LogFilter )
+            log.info("Filter: pass to chain") ;
+        // Not found - continue. 
+        chain.doFilter(request, response);
+    }
+
+    @Override
+    public void destroy() {}
+
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
new file mode 100644
index 0000000..245ed0f
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
@@ -0,0 +1,387 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import static com.hp.hpl.jena.query.ReadWrite.READ ;
+import static com.hp.hpl.jena.query.ReadWrite.WRITE ;
+
+import java.util.HashMap ;
+import java.util.Map ;
+
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.FusekiException ;
+import org.apache.jena.fuseki.server.* ;
+import org.slf4j.Logger ;
+
+import com.hp.hpl.jena.query.ReadWrite ;
+import com.hp.hpl.jena.sparql.SystemARQ ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphWithLock ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphWrapper ;
+import com.hp.hpl.jena.sparql.core.Transactional ;
+
+/**
+ * HTTP action that represents the user request lifecycle. Its state is handled in the
+ * {@link ActionSPARQL#executeAction(HttpAction)} method.
+ */
+public class HttpAction
+{
+    public final long id ;
+    public final boolean verbose ;
+    public final Logger log ;
+    
+    // ----
+    // Worth subclassing? Given this is allocated in the general lifecycle
+    // it would mean there are downcasts to the specific type.
+    
+    // -- Valid only for operational actions (e.g. SPARQL).
+    
+    public  String          endpointName    = null ;        // Endpoint name srv was found under 
+    public  Endpoint        endpoint        = null ;
+    private Transactional   transactional   = null ;
+    private boolean         isTransactional = false ;
+    private DatasetGraph    activeDSG       = null ;        // Set when inside begin/end.
+    private ReadWrite       activeMode      = null ;        // Set when inside begin/end.
+    
+    // -- Valid only for administration actions.
+    
+    // -- Shared items (but exact meaning may differ)
+    /** Handle to dataset+services being acted on (maybe null) */
+    private DataAccessPoint dataAccessPoint = null ;
+    private DataService dataService         = null ;
+    private String datasetName              = null ;        // Dataset URI used (e.g. registry)
+    private DatasetGraph dsg                = null ;
+
+    // ----
+    
+    private boolean startTimeIsSet = false ;
+    private boolean finishTimeIsSet = false ;
+
+    private long startTime = -2 ;
+    private long finishTime = -2 ;
+    
+    // Outcome.
+    public int statusCode = -1 ;
+    public String message = null ;
+    public int contentLength = -1 ;
+    public String contentType = null ;
+    
+    // Cleared to archive:
+    public Map <String, String> headers = new HashMap<>() ;
+    public HttpServletRequest request;
+    public HttpServletResponseTracker response ;
+    private final String actionURI ;
+    private final String contextPath ;
+    
+    /**
+     * Creates a new HTTP Action, using the HTTP request and response, and a given ID.
+     *
+     * @param id given ID
+     * @param log Logger for this action 
+     * @param request HTTP request
+     * @param response HTTP response
+     * @param verbose verbose flag
+     */
+    public HttpAction(long id, Logger log, HttpServletRequest request, HttpServletResponse response, boolean verbose) {
+        this.id = id ;
+        this.log = log ;
+        this.request = request ;
+        this.response = new HttpServletResponseTracker(this, response) ;
+        // Should this be set when setDataset is called from the dataset context?
+        // Currently server-wide, e.g. from the command line.
+        this.verbose = verbose ;
+        this.contextPath = request.getServletContext().getContextPath() ;
+        this.actionURI = ActionLib.actionURI(request) ;
+    }
+
+    /** Initialization after action creation during lifecycle setup.
+     * <p>Sets the action dataset. Setting will replace any existing {@link DataAccessPoint} and {@link DataService},
+     * as the {@link DatasetGraph} of the current HTTP Action.</p>
+     *
+     * <p>Once it has updated its members, the HTTP Action will change its transactional state and
+     * {@link Transactional} instance according to its base dataset graph.</p>
+     *
+     * @param dataAccessPoint {@link DataAccessPoint}
+     * @param dService {@link DataService}
+     * @see Transactional
+     */
+    
+    public void setRequest(DataAccessPoint dataAccessPoint, DataService dService) {
+        this.dataAccessPoint = dataAccessPoint ;
+        if ( dataAccessPoint != null )
+            this.datasetName = dataAccessPoint.getName() ; 
+
+        if ( this.dataService != null )
+            throw new FusekiException("Redefinition of DatasetRef in the request action") ;
+        
+        this.dataService = dService ;
+        if ( dService == null || dService.getDataset() == null )
+            // Null does not happens for service requests, (it does for admin requests - call setControlRequest) 
+            throw new FusekiException("Null DataService in the request action") ;
+        
+        this.dsg = dService.getDataset() ;
+        DatasetGraph basedsg = unwrap(dsg) ;
+
+        if ( isTransactional(basedsg) && isTransactional(dsg) ) {
+            // Use transactional if it looks safe - abort is necessary.
+            transactional = (Transactional)dsg ;
+            isTransactional = true ;
+        } else {
+            // Unsure if safesetControlRef
+            transactional = new DatasetGraphWithLock(dsg) ;
+            // No real abort.
+            isTransactional = false ;
+        }
+    }
+    
+    public void setControlRequest(DataAccessPoint dataAccessPoint, String datasetUri) {
+        this.dataAccessPoint = dataAccessPoint ;
+        this.dataService = null ;
+        this.datasetName = datasetUri ;
+    }
+    
+    /**
+     * Returns <code>true</code> iff the given {@link DatasetGraph} is an instance of {@link Transactional},
+     * <code>false otherwise</code>.
+     *
+     * @param dsg a {@link DatasetGraph}
+     * @return <code>true</code> iff the given {@link DatasetGraph} is an instance of {@link Transactional},
+     * <code>false otherwise</code>
+     */
+    private static boolean isTransactional(DatasetGraph dsg) {
+        return (dsg instanceof Transactional) ;
+    }
+
+    /**
+     * A {@link DatasetGraph} may contain other <strong>wrapped DatasetGraph's</strong>. This method will return
+     * the first instance (including the argument to this method) that <strong>is not</strong> an instance of
+     * {@link DatasetGraphWrapper}.
+     *
+     * @param dsg a {@link DatasetGraph}
+     * @return the first found {@link DatasetGraph} that is not an instance of {@link DatasetGraphWrapper}
+     */
+   private static DatasetGraph unwrap(DatasetGraph dsg) {
+        while (dsg instanceof DatasetGraphWrapper) {
+            dsg = ((DatasetGraphWrapper)dsg).getWrapped() ;
+        }
+        return dsg ;
+    }
+        
+    /** This is the requestURI with the context path removed.
+     *  It should be used internally for dispatch.
+     */
+    public String getActionURI() {
+        return actionURI ;
+    }
+    
+    /** Get the context path.
+     */
+    public String getContextPath() {
+        return contextPath ;
+    }
+    
+    
+    /** Set the endpoint and endpoint name that this is an action for. 
+     * @param srvRef {@link Endpoint}
+     * @param endpointName
+     */
+    public void setEndpoint(Endpoint srvRef, String endpointName) {
+        this.endpoint = srvRef ; 
+        this.endpointName = endpointName ;
+    }
+    
+    /** Get the endpoint for the action (may be null) . */
+    public Endpoint getEndpoint() {
+        return endpoint ; 
+    }
+
+    /**
+     * Returns whether or not the underlying DatasetGraph is fully transactional (supports rollback)
+     */
+    public boolean isTransactional() {
+        return isTransactional ;
+    }
+
+    public void beginRead() {
+        activeMode = READ ;
+        transactional.begin(READ) ;
+        activeDSG = dsg ;
+        dataService.startTxn(READ) ;
+    }
+
+    public void endRead() {
+        dataService.finishTxn(READ) ;
+        activeMode = null ;
+        transactional.end() ;
+        activeDSG = null ;
+    }
+
+    public void beginWrite() {
+        transactional.begin(WRITE) ;
+        activeMode = WRITE ;
+        activeDSG = dsg ;
+        dataService.startTxn(WRITE) ;
+    }
+
+    public void commit() {
+        transactional.commit() ;
+        activeDSG = null ;
+    }
+
+    public void abort() {
+        try { transactional.abort() ; } 
+        catch (Exception ex) {
+            // Some datasets claim to be transactional but
+            // don't provide a real abort. We tried to avoid
+            // them earlier but even if they sneek through,
+            // we try to continue server operation.
+            Log.warn(this, "Exception during abort (operation attempts to continue): "+ex.getMessage()) ; 
+        }
+        activeDSG = null ;
+    }
+
+    public void endWrite() {
+        dataService.finishTxn(WRITE) ;
+        activeMode = null ;
+
+        if ( transactional.isInTransaction() ) {
+            Log.warn(this, "Transaction still active in endWriter - no commit or abort seen (forced abort)") ;
+            try {
+                transactional.abort() ;
+            } catch (RuntimeException ex) {
+                Log.warn(this, "Exception in forced abort (trying to continue)", ex) ;
+            }
+        }
+        transactional.end() ;
+        activeDSG = null ;
+    }
+
+    public final void startRequest()
+    { 
+        if ( dataAccessPoint != null ) 
+            dataAccessPoint.startRequest(this) ;
+    }
+
+    public final void finishRequest() { 
+        if ( dataAccessPoint != null ) 
+            dataAccessPoint.finishRequest(this) ;
+        // Standard logging goes here.
+        if ( Fuseki.requestLog != null && Fuseki.requestLog.isInfoEnabled() ) { 
+            String s = RequestLog.combinedNCSA(this) ;
+            Fuseki.requestLog.info(s);
+        }
+    }
+    
+    /** If inside the transaction for the action, return the active {@link DatasetGraph},
+     *  otherwise return null.
+     * @return Current active {@link DatasetGraph}
+     */
+    public final DatasetGraph getActiveDSG() {
+        return activeDSG ;
+    }
+
+    public final DataAccessPoint getDataAccessPoint() {
+        return dataAccessPoint;
+    }
+
+//    public void setDataAccessPoint(DataAccessPoint dataAccessPoint) {
+//        this.dataAccessPoint = dataAccessPoint;
+//    }
+
+    public final DataService getDataService() {
+        return dataService;
+    }
+
+//    public final void setDataService(DataService dataService) {
+//        this.dataService = dataService;
+//    }
+
+    public final String getDatasetName() {
+        return datasetName;
+    }
+
+//    public void setDatasetName(String datasetName) {
+//        this.datasetName = datasetName;
+//    }
+
+    /** Reduce to a size that can be kept around for sometime. 
+     * Release resources like datasets that may be closed, reset etc.
+     */
+    public void minimize() {
+        this.request = null ;
+        this.response = null ;
+        this.dsg = null ;
+        this.dataService = null ;
+        this.activeDSG = null ;
+        this.endpoint = null ;
+    }
+
+    public void setStartTime() {
+        if ( startTimeIsSet ) 
+            Log.warn(this,  "Start time reset") ;
+        startTimeIsSet = true ;
+        this.startTime = System.nanoTime() ;
+    }
+
+    /** Start time, in system nanos */
+    public long getStartTime() { 
+        if ( ! startTimeIsSet ) 
+            Log.warn(this,  "Start time is not set") ;
+        return startTime ;
+    }
+
+    /** Start time, in system nanos */
+    public long getFinishTime() { 
+        if ( ! finishTimeIsSet ) 
+            Log.warn(this,  "Finish time is not set") ;
+        return finishTime ;
+    }
+    
+    public void setFinishTime() {
+        if ( finishTimeIsSet ) 
+            Log.warn(this,  "Finish time reset") ;
+        finishTimeIsSet = true ;
+        this.finishTime = System.nanoTime() ;
+    }
+
+    public HttpServletRequest getRequest()              { return request ; }
+
+    public HttpServletResponseTracker getResponse()     { return response ; }
+    
+    /** Return the recorded time taken in milliseconds. 
+     *  {@link #setStartTime} and {@link #setFinishTime}
+     *  must have been called.
+     */
+    public long getTime()
+    {
+        if ( ! startTimeIsSet ) 
+            Log.warn(this,  "Start time not set") ;
+        if ( ! finishTimeIsSet ) 
+            Log.warn(this,  "Finish time not set") ;
+        return (finishTime-startTime)/(1000*1000) ;
+    }
+
+    public void sync() {
+        SystemARQ.sync(dsg) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpServletResponseTracker.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpServletResponseTracker.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpServletResponseTracker.java
new file mode 100644
index 0000000..c39e728
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpServletResponseTracker.java
@@ -0,0 +1,140 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import java.io.IOException ;
+
+import javax.servlet.http.HttpServletResponse ;
+import javax.servlet.http.HttpServletResponseWrapper ;
+
+import org.apache.jena.atlas.logging.Log ;
+
+/** Intercepting wrapper so we can track the response settings for logging purposes */
+
+public class HttpServletResponseTracker extends HttpServletResponseWrapper
+{
+    private final HttpAction action ;
+
+    public HttpServletResponseTracker(HttpAction action, HttpServletResponse response)
+    {
+        super(response) ;
+        this.action = action ;
+    }
+
+    @Override
+    public void sendError(int sc, String msg) throws IOException
+    {
+        action.statusCode = sc ;
+        action.message = msg ;
+        super.sendError(sc, msg) ;
+    }
+
+    @Override
+    public void sendError(int sc) throws IOException
+    {
+        action.statusCode = sc ;
+        action.message = null ;
+        super.sendError(sc) ;
+    }
+
+    @Override
+    public void setHeader(String name, String value)
+    {
+        super.setHeader(name, value) ;
+        action.headers.put(name, value) ;
+    }
+
+    @Override
+    public void addHeader(String name, String value)
+    {
+        Log.warn(this, "Unexpected addHeader - not recorded in log") ;
+        super.addHeader(name, value) ;
+    }
+    @Override
+    public void setStatus(int sc) 
+    {
+        action.statusCode = sc ;
+        action.message = null ;
+        super.setStatus(sc) ;
+    }
+
+    @Override
+    @Deprecated
+    public void setStatus(int sc, String sm)
+    {
+        action.statusCode = sc ;
+        action.message = sm ;
+        super.setStatus(sc, sm) ;
+    }
+
+    @Override
+    public void setContentLength(int len)
+    {
+        action.contentLength = len ;
+        super.setContentLength(len) ;
+    }
+
+    @Override
+    public void setContentType(String type)
+    {
+        action.contentType = type ;
+        super.setContentType(type) ;
+    }
+      
+      // From HttpServletResponse
+//      public void addCookie(Cookie cookie) {}
+//      public boolean containsHeader(String name) {}
+//      public String encodeURL(String url) { }
+//      public String encodeRedirectURL(String url) {}
+//      public String encodeUrl(String url) {}
+//      public String encodeRedirectUrl(String url) {}
+//      public void sendError(int sc, String msg) throws IOException
+//      public void sendError(int sc) throws IOException
+//      public void sendRedirect(String location) throws IOException {}
+//      public void setDateHeader(String name, long date) {}
+//      public void addDateHeader(String name, long date) {}
+//      public void setHeader(String name, String value)
+//      public void addHeader(String name, String value)
+//      public void setIntHeader(String name, int value) {}
+//      public void addIntHeader(String name, int value) {}
+//      public void setStatus(int sc) 
+//      public void setStatus(int sc, String sm)
+//      public void sendRedirect(String location) throws IOException {}
+//      public void setDateHeader(String name, long date) {}
+//      public void addDateHeader(String name, long date) {}
+        
+        // From ServletResponse.
+//         public ServletResponse getResponse() {}
+//         public void setResponse(ServletResponse response) {}
+//         public void setCharacterEncoding(String charset) {}
+//         public String getCharacterEncoding() {}
+//         public ServletOutputStream getOutputStream() throws IOException {}
+//         public PrintWriter getWriter() throws IOException {}
+//         public void setContentLength(int len) {}
+//         public void setContentType(String type) {}
+//         public String getContentType() {
+//         public void setBufferSize(int size) {}
+//         public int getBufferSize() {}
+//         public void flushBuffer() throws IOException {}
+//         public boolean isCommitted() {}
+//         public void reset() {}
+//         public void resetBuffer() {}
+//         public void setLocale(Locale loc) {}
+//         public Locale getLocale() {}
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/NullOutputStream.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/NullOutputStream.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/NullOutputStream.java
new file mode 100644
index 0000000..63e6562
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/NullOutputStream.java
@@ -0,0 +1,53 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import java.io.* ;
+
+/** 
+* Code needed to implement an OutputStream that does nothing.
+*/
+
+
+public class NullOutputStream extends /*Filter*/OutputStream
+{
+	public NullOutputStream()
+	{
+	}
+
+	// The OutputStream operations
+	@Override
+    public void close() { /* .close() ;*/ }
+	@Override
+    public void flush() { /* .flush() ;*/ }
+
+	// Need to implement this one.
+	@Override
+    public void write(int b) { /* .write(b) ;*/ }
+	@Override
+    public void write(byte b[]) { /* this.write(b, 0, b.length) ; */}
+
+	// Good to implement this one.
+	@Override
+    public void write(byte[] b, int off, int len)
+	{
+		// Work function
+	}
+	
+}


[31/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone.js
new file mode 100644
index 0000000..f7783c2
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/backbone.js
@@ -0,0 +1,1581 @@
+//     Backbone.js 1.1.0
+
+//     (c) 2010-2011 Jeremy Ashkenas, DocumentCloud Inc.
+//     (c) 2011-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+//     Backbone may be freely distributed under the MIT license.
+//     For all details and documentation:
+//     http://backbonejs.org
+
+(function(){
+
+  // Initial Setup
+  // -------------
+
+  // Save a reference to the global object (`window` in the browser, `exports`
+  // on the server).
+  var root = this;
+
+  // Save the previous value of the `Backbone` variable, so that it can be
+  // restored later on, if `noConflict` is used.
+  var previousBackbone = root.Backbone;
+
+  // Create local references to array methods we'll want to use later.
+  var array = [];
+  var push = array.push;
+  var slice = array.slice;
+  var splice = array.splice;
+
+  // The top-level namespace. All public Backbone classes and modules will
+  // be attached to this. Exported for both the browser and the server.
+  var Backbone;
+  if (typeof exports !== 'undefined') {
+    Backbone = exports;
+  } else {
+    Backbone = root.Backbone = {};
+  }
+
+  // Current version of the library. Keep in sync with `package.json`.
+  Backbone.VERSION = '1.1.0';
+
+  // Require Underscore, if we're on the server, and it's not already present.
+  var _ = root._;
+  if (!_ && (typeof require !== 'undefined')) _ = require('underscore');
+
+  // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
+  // the `$` variable.
+  Backbone.$ = root.jQuery || root.Zepto || root.ender || root.$;
+
+  // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
+  // to its previous owner. Returns a reference to this Backbone object.
+  Backbone.noConflict = function() {
+    root.Backbone = previousBackbone;
+    return this;
+  };
+
+  // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
+  // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and
+  // set a `X-Http-Method-Override` header.
+  Backbone.emulateHTTP = false;
+
+  // Turn on `emulateJSON` to support legacy servers that can't deal with direct
+  // `application/json` requests ... will encode the body as
+  // `application/x-www-form-urlencoded` instead and will send the model in a
+  // form param named `model`.
+  Backbone.emulateJSON = false;
+
+  // Backbone.Events
+  // ---------------
+
+  // A module that can be mixed in to *any object* in order to provide it with
+  // custom events. You may bind with `on` or remove with `off` callback
+  // functions to an event; `trigger`-ing an event fires all callbacks in
+  // succession.
+  //
+  //     var object = {};
+  //     _.extend(object, Backbone.Events);
+  //     object.on('expand', function(){ alert('expanded'); });
+  //     object.trigger('expand');
+  //
+  var Events = Backbone.Events = {
+
+    // Bind an event to a `callback` function. Passing `"all"` will bind
+    // the callback to all events fired.
+    on: function(name, callback, context) {
+      if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this;
+      this._events || (this._events = {});
+      var events = this._events[name] || (this._events[name] = []);
+      events.push({callback: callback, context: context, ctx: context || this});
+      return this;
+    },
+
+    // Bind an event to only be triggered a single time. After the first time
+    // the callback is invoked, it will be removed.
+    once: function(name, callback, context) {
+      if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;
+      var self = this;
+      var once = _.once(function() {
+        self.off(name, once);
+        callback.apply(this, arguments);
+      });
+      once._callback = callback;
+      return this.on(name, once, context);
+    },
+
+    // Remove one or many callbacks. If `context` is null, removes all
+    // callbacks with that function. If `callback` is null, removes all
+    // callbacks for the event. If `name` is null, removes all bound
+    // callbacks for all events.
+    off: function(name, callback, context) {
+      var retain, ev, events, names, i, l, j, k;
+      if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
+      if (!name && !callback && !context) {
+        this._events = {};
+        return this;
+      }
+      names = name ? [name] : _.keys(this._events);
+      for (i = 0, l = names.length; i < l; i++) {
+        name = names[i];
+        if (events = this._events[name]) {
+          this._events[name] = retain = [];
+          if (callback || context) {
+            for (j = 0, k = events.length; j < k; j++) {
+              ev = events[j];
+              if ((callback && callback !== ev.callback && callback !== ev.callback._callback) ||
+                  (context && context !== ev.context)) {
+                retain.push(ev);
+              }
+            }
+          }
+          if (!retain.length) delete this._events[name];
+        }
+      }
+
+      return this;
+    },
+
+    // Trigger one or many events, firing all bound callbacks. Callbacks are
+    // passed the same arguments as `trigger` is, apart from the event name
+    // (unless you're listening on `"all"`, which will cause your callback to
+    // receive the true name of the event as the first argument).
+    trigger: function(name) {
+      if (!this._events) return this;
+      var args = slice.call(arguments, 1);
+      if (!eventsApi(this, 'trigger', name, args)) return this;
+      var events = this._events[name];
+      var allEvents = this._events.all;
+      if (events) triggerEvents(events, args);
+      if (allEvents) triggerEvents(allEvents, arguments);
+      return this;
+    },
+
+    // Tell this object to stop listening to either specific events ... or
+    // to every object it's currently listening to.
+    stopListening: function(obj, name, callback) {
+      var listeningTo = this._listeningTo;
+      if (!listeningTo) return this;
+      var remove = !name && !callback;
+      if (!callback && typeof name === 'object') callback = this;
+      if (obj) (listeningTo = {})[obj._listenId] = obj;
+      for (var id in listeningTo) {
+        obj = listeningTo[id];
+        obj.off(name, callback, this);
+        if (remove || _.isEmpty(obj._events)) delete this._listeningTo[id];
+      }
+      return this;
+    }
+
+  };
+
+  // Regular expression used to split event strings.
+  var eventSplitter = /\s+/;
+
+  // Implement fancy features of the Events API such as multiple event
+  // names `"change blur"` and jQuery-style event maps `{change: action}`
+  // in terms of the existing API.
+  var eventsApi = function(obj, action, name, rest) {
+    if (!name) return true;
+
+    // Handle event maps.
+    if (typeof name === 'object') {
+      for (var key in name) {
+        obj[action].apply(obj, [key, name[key]].concat(rest));
+      }
+      return false;
+    }
+
+    // Handle space separated event names.
+    if (eventSplitter.test(name)) {
+      var names = name.split(eventSplitter);
+      for (var i = 0, l = names.length; i < l; i++) {
+        obj[action].apply(obj, [names[i]].concat(rest));
+      }
+      return false;
+    }
+
+    return true;
+  };
+
+  // A difficult-to-believe, but optimized internal dispatch function for
+  // triggering events. Tries to keep the usual cases speedy (most internal
+  // Backbone events have 3 arguments).
+  var triggerEvents = function(events, args) {
+    var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
+    switch (args.length) {
+      case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;
+      case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
+      case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
+      case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
+      default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);
+    }
+  };
+
+  var listenMethods = {listenTo: 'on', listenToOnce: 'once'};
+
+  // Inversion-of-control versions of `on` and `once`. Tell *this* object to
+  // listen to an event in another object ... keeping track of what it's
+  // listening to.
+  _.each(listenMethods, function(implementation, method) {
+    Events[method] = function(obj, name, callback) {
+      var listeningTo = this._listeningTo || (this._listeningTo = {});
+      var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
+      listeningTo[id] = obj;
+      if (!callback && typeof name === 'object') callback = this;
+      obj[implementation](name, callback, this);
+      return this;
+    };
+  });
+
+  // Aliases for backwards compatibility.
+  Events.bind   = Events.on;
+  Events.unbind = Events.off;
+
+  // Allow the `Backbone` object to serve as a global event bus, for folks who
+  // want global "pubsub" in a convenient place.
+  _.extend(Backbone, Events);
+
+  // Backbone.Model
+  // --------------
+
+  // Backbone **Models** are the basic data object in the framework --
+  // frequently representing a row in a table in a database on your server.
+  // A discrete chunk of data and a bunch of useful, related methods for
+  // performing computations and transformations on that data.
+
+  // Create a new model with the specified attributes. A client id (`cid`)
+  // is automatically generated and assigned for you.
+  var Model = Backbone.Model = function(attributes, options) {
+    var attrs = attributes || {};
+    options || (options = {});
+    this.cid = _.uniqueId('c');
+    this.attributes = {};
+    if (options.collection) this.collection = options.collection;
+    if (options.parse) attrs = this.parse(attrs, options) || {};
+    attrs = _.defaults({}, attrs, _.result(this, 'defaults'));
+    this.set(attrs, options);
+    this.changed = {};
+    this.initialize.apply(this, arguments);
+  };
+
+  // Attach all inheritable methods to the Model prototype.
+  _.extend(Model.prototype, Events, {
+
+    // A hash of attributes whose current and previous value differ.
+    changed: null,
+
+    // The value returned during the last failed validation.
+    validationError: null,
+
+    // The default name for the JSON `id` attribute is `"id"`. MongoDB and
+    // CouchDB users may want to set this to `"_id"`.
+    idAttribute: 'id',
+
+    // Initialize is an empty function by default. Override it with your own
+    // initialization logic.
+    initialize: function(){},
+
+    // Return a copy of the model's `attributes` object.
+    toJSON: function(options) {
+      return _.clone(this.attributes);
+    },
+
+    // Proxy `Backbone.sync` by default -- but override this if you need
+    // custom syncing semantics for *this* particular model.
+    sync: function() {
+      return Backbone.sync.apply(this, arguments);
+    },
+
+    // Get the value of an attribute.
+    get: function(attr) {
+      return this.attributes[attr];
+    },
+
+    // Get the HTML-escaped value of an attribute.
+    escape: function(attr) {
+      return _.escape(this.get(attr));
+    },
+
+    // Returns `true` if the attribute contains a value that is not null
+    // or undefined.
+    has: function(attr) {
+      return this.get(attr) != null;
+    },
+
+    // Set a hash of model attributes on the object, firing `"change"`. This is
+    // the core primitive operation of a model, updating the data and notifying
+    // anyone who needs to know about the change in state. The heart of the beast.
+    set: function(key, val, options) {
+      var attr, attrs, unset, changes, silent, changing, prev, current;
+      if (key == null) return this;
+
+      // Handle both `"key", value` and `{key: value}` -style arguments.
+      if (typeof key === 'object') {
+        attrs = key;
+        options = val;
+      } else {
+        (attrs = {})[key] = val;
+      }
+
+      options || (options = {});
+
+      // Run validation.
+      if (!this._validate(attrs, options)) return false;
+
+      // Extract attributes and options.
+      unset           = options.unset;
+      silent          = options.silent;
+      changes         = [];
+      changing        = this._changing;
+      this._changing  = true;
+
+      if (!changing) {
+        this._previousAttributes = _.clone(this.attributes);
+        this.changed = {};
+      }
+      current = this.attributes, prev = this._previousAttributes;
+
+      // Check for changes of `id`.
+      if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];
+
+      // For each `set` attribute, update or delete the current value.
+      for (attr in attrs) {
+        val = attrs[attr];
+        if (!_.isEqual(current[attr], val)) changes.push(attr);
+        if (!_.isEqual(prev[attr], val)) {
+          this.changed[attr] = val;
+        } else {
+          delete this.changed[attr];
+        }
+        unset ? delete current[attr] : current[attr] = val;
+      }
+
+      // Trigger all relevant attribute changes.
+      if (!silent) {
+        if (changes.length) this._pending = true;
+        for (var i = 0, l = changes.length; i < l; i++) {
+          this.trigger('change:' + changes[i], this, current[changes[i]], options);
+        }
+      }
+
+      // You might be wondering why there's a `while` loop here. Changes can
+      // be recursively nested within `"change"` events.
+      if (changing) return this;
+      if (!silent) {
+        while (this._pending) {
+          this._pending = false;
+          this.trigger('change', this, options);
+        }
+      }
+      this._pending = false;
+      this._changing = false;
+      return this;
+    },
+
+    // Remove an attribute from the model, firing `"change"`. `unset` is a noop
+    // if the attribute doesn't exist.
+    unset: function(attr, options) {
+      return this.set(attr, void 0, _.extend({}, options, {unset: true}));
+    },
+
+    // Clear all attributes on the model, firing `"change"`.
+    clear: function(options) {
+      var attrs = {};
+      for (var key in this.attributes) attrs[key] = void 0;
+      return this.set(attrs, _.extend({}, options, {unset: true}));
+    },
+
+    // Determine if the model has changed since the last `"change"` event.
+    // If you specify an attribute name, determine if that attribute has changed.
+    hasChanged: function(attr) {
+      if (attr == null) return !_.isEmpty(this.changed);
+      return _.has(this.changed, attr);
+    },
+
+    // Return an object containing all the attributes that have changed, or
+    // false if there are no changed attributes. Useful for determining what
+    // parts of a view need to be updated and/or what attributes need to be
+    // persisted to the server. Unset attributes will be set to undefined.
+    // You can also pass an attributes object to diff against the model,
+    // determining if there *would be* a change.
+    changedAttributes: function(diff) {
+      if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
+      var val, changed = false;
+      var old = this._changing ? this._previousAttributes : this.attributes;
+      for (var attr in diff) {
+        if (_.isEqual(old[attr], (val = diff[attr]))) continue;
+        (changed || (changed = {}))[attr] = val;
+      }
+      return changed;
+    },
+
+    // Get the previous value of an attribute, recorded at the time the last
+    // `"change"` event was fired.
+    previous: function(attr) {
+      if (attr == null || !this._previousAttributes) return null;
+      return this._previousAttributes[attr];
+    },
+
+    // Get all of the attributes of the model at the time of the previous
+    // `"change"` event.
+    previousAttributes: function() {
+      return _.clone(this._previousAttributes);
+    },
+
+    // Fetch the model from the server. If the server's representation of the
+    // model differs from its current attributes, they will be overridden,
+    // triggering a `"change"` event.
+    fetch: function(options) {
+      options = options ? _.clone(options) : {};
+      if (options.parse === void 0) options.parse = true;
+      var model = this;
+      var success = options.success;
+      options.success = function(resp) {
+        if (!model.set(model.parse(resp, options), options)) return false;
+        if (success) success(model, resp, options);
+        model.trigger('sync', model, resp, options);
+      };
+      wrapError(this, options);
+      return this.sync('read', this, options);
+    },
+
+    // Set a hash of model attributes, and sync the model to the server.
+    // If the server returns an attributes hash that differs, the model's
+    // state will be `set` again.
+    save: function(key, val, options) {
+      var attrs, method, xhr, attributes = this.attributes;
+
+      // Handle both `"key", value` and `{key: value}` -style arguments.
+      if (key == null || typeof key === 'object') {
+        attrs = key;
+        options = val;
+      } else {
+        (attrs = {})[key] = val;
+      }
+
+      options = _.extend({validate: true}, options);
+
+      // If we're not waiting and attributes exist, save acts as
+      // `set(attr).save(null, opts)` with validation. Otherwise, check if
+      // the model will be valid when the attributes, if any, are set.
+      if (attrs && !options.wait) {
+        if (!this.set(attrs, options)) return false;
+      } else {
+        if (!this._validate(attrs, options)) return false;
+      }
+
+      // Set temporary attributes if `{wait: true}`.
+      if (attrs && options.wait) {
+        this.attributes = _.extend({}, attributes, attrs);
+      }
+
+      // After a successful server-side save, the client is (optionally)
+      // updated with the server-side state.
+      if (options.parse === void 0) options.parse = true;
+      var model = this;
+      var success = options.success;
+      options.success = function(resp) {
+        // Ensure attributes are restored during synchronous saves.
+        model.attributes = attributes;
+        var serverAttrs = model.parse(resp, options);
+        if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs);
+        if (_.isObject(serverAttrs) && !model.set(serverAttrs, options)) {
+          return false;
+        }
+        if (success) success(model, resp, options);
+        model.trigger('sync', model, resp, options);
+      };
+      wrapError(this, options);
+
+      method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');
+      if (method === 'patch') options.attrs = attrs;
+      xhr = this.sync(method, this, options);
+
+      // Restore attributes.
+      if (attrs && options.wait) this.attributes = attributes;
+
+      return xhr;
+    },
+
+    // Destroy this model on the server if it was already persisted.
+    // Optimistically removes the model from its collection, if it has one.
+    // If `wait: true` is passed, waits for the server to respond before removal.
+    destroy: function(options) {
+      options = options ? _.clone(options) : {};
+      var model = this;
+      var success = options.success;
+
+      var destroy = function() {
+        model.trigger('destroy', model, model.collection, options);
+      };
+
+      options.success = function(resp) {
+        if (options.wait || model.isNew()) destroy();
+        if (success) success(model, resp, options);
+        if (!model.isNew()) model.trigger('sync', model, resp, options);
+      };
+
+      if (this.isNew()) {
+        options.success();
+        return false;
+      }
+      wrapError(this, options);
+
+      var xhr = this.sync('delete', this, options);
+      if (!options.wait) destroy();
+      return xhr;
+    },
+
+    // Default URL for the model's representation on the server -- if you're
+    // using Backbone's restful methods, override this to change the endpoint
+    // that will be called.
+    url: function() {
+      var base = _.result(this, 'urlRoot') || _.result(this.collection, 'url') || urlError();
+      if (this.isNew()) return base;
+      return base + (base.charAt(base.length - 1) === '/' ? '' : '/') + encodeURIComponent(this.id);
+    },
+
+    // **parse** converts a response into the hash of attributes to be `set` on
+    // the model. The default implementation is just to pass the response along.
+    parse: function(resp, options) {
+      return resp;
+    },
+
+    // Create a new model with identical attributes to this one.
+    clone: function() {
+      return new this.constructor(this.attributes);
+    },
+
+    // A model is new if it has never been saved to the server, and lacks an id.
+    isNew: function() {
+      return this.id == null;
+    },
+
+    // Check if the model is currently in a valid state.
+    isValid: function(options) {
+      return this._validate({}, _.extend(options || {}, { validate: true }));
+    },
+
+    // Run validation against the next complete set of model attributes,
+    // returning `true` if all is well. Otherwise, fire an `"invalid"` event.
+    _validate: function(attrs, options) {
+      if (!options.validate || !this.validate) return true;
+      attrs = _.extend({}, this.attributes, attrs);
+      var error = this.validationError = this.validate(attrs, options) || null;
+      if (!error) return true;
+      this.trigger('invalid', this, error, _.extend(options, {validationError: error}));
+      return false;
+    }
+
+  });
+
+  // Underscore methods that we want to implement on the Model.
+  var modelMethods = ['keys', 'values', 'pairs', 'invert', 'pick', 'omit'];
+
+  // Mix in each Underscore method as a proxy to `Model#attributes`.
+  _.each(modelMethods, function(method) {
+    Model.prototype[method] = function() {
+      var args = slice.call(arguments);
+      args.unshift(this.attributes);
+      return _[method].apply(_, args);
+    };
+  });
+
+  // Backbone.Collection
+  // -------------------
+
+  // If models tend to represent a single row of data, a Backbone Collection is
+  // more analagous to a table full of data ... or a small slice or page of that
+  // table, or a collection of rows that belong together for a particular reason
+  // -- all of the messages in this particular folder, all of the documents
+  // belonging to this particular author, and so on. Collections maintain
+  // indexes of their models, both in order, and for lookup by `id`.
+
+  // Create a new **Collection**, perhaps to contain a specific type of `model`.
+  // If a `comparator` is specified, the Collection will maintain
+  // its models in sort order, as they're added and removed.
+  var Collection = Backbone.Collection = function(models, options) {
+    options || (options = {});
+    if (options.model) this.model = options.model;
+    if (options.comparator !== void 0) this.comparator = options.comparator;
+    this._reset();
+    this.initialize.apply(this, arguments);
+    if (models) this.reset(models, _.extend({silent: true}, options));
+  };
+
+  // Default options for `Collection#set`.
+  var setOptions = {add: true, remove: true, merge: true};
+  var addOptions = {add: true, remove: false};
+
+  // Define the Collection's inheritable methods.
+  _.extend(Collection.prototype, Events, {
+
+    // The default model for a collection is just a **Backbone.Model**.
+    // This should be overridden in most cases.
+    model: Model,
+
+    // Initialize is an empty function by default. Override it with your own
+    // initialization logic.
+    initialize: function(){},
+
+    // The JSON representation of a Collection is an array of the
+    // models' attributes.
+    toJSON: function(options) {
+      return this.map(function(model){ return model.toJSON(options); });
+    },
+
+    // Proxy `Backbone.sync` by default.
+    sync: function() {
+      return Backbone.sync.apply(this, arguments);
+    },
+
+    // Add a model, or list of models to the set.
+    add: function(models, options) {
+      return this.set(models, _.extend({merge: false}, options, addOptions));
+    },
+
+    // Remove a model, or a list of models from the set.
+    remove: function(models, options) {
+      var singular = !_.isArray(models);
+      models = singular ? [models] : _.clone(models);
+      options || (options = {});
+      var i, l, index, model;
+      for (i = 0, l = models.length; i < l; i++) {
+        model = models[i] = this.get(models[i]);
+        if (!model) continue;
+        delete this._byId[model.id];
+        delete this._byId[model.cid];
+        index = this.indexOf(model);
+        this.models.splice(index, 1);
+        this.length--;
+        if (!options.silent) {
+          options.index = index;
+          model.trigger('remove', model, this, options);
+        }
+        this._removeReference(model);
+      }
+      return singular ? models[0] : models;
+    },
+
+    // Update a collection by `set`-ing a new list of models, adding new ones,
+    // removing models that are no longer present, and merging models that
+    // already exist in the collection, as necessary. Similar to **Model#set**,
+    // the core operation for updating the data contained by the collection.
+    set: function(models, options) {
+      options = _.defaults({}, options, setOptions);
+      if (options.parse) models = this.parse(models, options);
+      var singular = !_.isArray(models);
+      models = singular ? (models ? [models] : []) : _.clone(models);
+      var i, l, id, model, attrs, existing, sort;
+      var at = options.at;
+      var targetModel = this.model;
+      var sortable = this.comparator && (at == null) && options.sort !== false;
+      var sortAttr = _.isString(this.comparator) ? this.comparator : null;
+      var toAdd = [], toRemove = [], modelMap = {};
+      var add = options.add, merge = options.merge, remove = options.remove;
+      var order = !sortable && add && remove ? [] : false;
+
+      // Turn bare objects into model references, and prevent invalid models
+      // from being added.
+      for (i = 0, l = models.length; i < l; i++) {
+        attrs = models[i];
+        if (attrs instanceof Model) {
+          id = model = attrs;
+        } else {
+          id = attrs[targetModel.prototype.idAttribute];
+        }
+
+        // If a duplicate is found, prevent it from being added and
+        // optionally merge it into the existing model.
+        if (existing = this.get(id)) {
+          if (remove) modelMap[existing.cid] = true;
+          if (merge) {
+            attrs = attrs === model ? model.attributes : attrs;
+            if (options.parse) attrs = existing.parse(attrs, options);
+            existing.set(attrs, options);
+            if (sortable && !sort && existing.hasChanged(sortAttr)) sort = true;
+          }
+          models[i] = existing;
+
+        // If this is a new, valid model, push it to the `toAdd` list.
+        } else if (add) {
+          model = models[i] = this._prepareModel(attrs, options);
+          if (!model) continue;
+          toAdd.push(model);
+
+          // Listen to added models' events, and index models for lookup by
+          // `id` and by `cid`.
+          model.on('all', this._onModelEvent, this);
+          this._byId[model.cid] = model;
+          if (model.id != null) this._byId[model.id] = model;
+        }
+        if (order) order.push(existing || model);
+      }
+
+      // Remove nonexistent models if appropriate.
+      if (remove) {
+        for (i = 0, l = this.length; i < l; ++i) {
+          if (!modelMap[(model = this.models[i]).cid]) toRemove.push(model);
+        }
+        if (toRemove.length) this.remove(toRemove, options);
+      }
+
+      // See if sorting is needed, update `length` and splice in new models.
+      if (toAdd.length || (order && order.length)) {
+        if (sortable) sort = true;
+        this.length += toAdd.length;
+        if (at != null) {
+          for (i = 0, l = toAdd.length; i < l; i++) {
+            this.models.splice(at + i, 0, toAdd[i]);
+          }
+        } else {
+          if (order) this.models.length = 0;
+          var orderedModels = order || toAdd;
+          for (i = 0, l = orderedModels.length; i < l; i++) {
+            this.models.push(orderedModels[i]);
+          }
+        }
+      }
+
+      // Silently sort the collection if appropriate.
+      if (sort) this.sort({silent: true});
+
+      // Unless silenced, it's time to fire all appropriate add/sort events.
+      if (!options.silent) {
+        for (i = 0, l = toAdd.length; i < l; i++) {
+          (model = toAdd[i]).trigger('add', model, this, options);
+        }
+        if (sort || (order && order.length)) this.trigger('sort', this, options);
+      }
+      
+      // Return the added (or merged) model (or models).
+      return singular ? models[0] : models;
+    },
+
+    // When you have more items than you want to add or remove individually,
+    // you can reset the entire set with a new list of models, without firing
+    // any granular `add` or `remove` events. Fires `reset` when finished.
+    // Useful for bulk operations and optimizations.
+    reset: function(models, options) {
+      options || (options = {});
+      for (var i = 0, l = this.models.length; i < l; i++) {
+        this._removeReference(this.models[i]);
+      }
+      options.previousModels = this.models;
+      this._reset();
+      models = this.add(models, _.extend({silent: true}, options));
+      if (!options.silent) this.trigger('reset', this, options);
+      return models;
+    },
+
+    // Add a model to the end of the collection.
+    push: function(model, options) {
+      return this.add(model, _.extend({at: this.length}, options));
+    },
+
+    // Remove a model from the end of the collection.
+    pop: function(options) {
+      var model = this.at(this.length - 1);
+      this.remove(model, options);
+      return model;
+    },
+
+    // Add a model to the beginning of the collection.
+    unshift: function(model, options) {
+      return this.add(model, _.extend({at: 0}, options));
+    },
+
+    // Remove a model from the beginning of the collection.
+    shift: function(options) {
+      var model = this.at(0);
+      this.remove(model, options);
+      return model;
+    },
+
+    // Slice out a sub-array of models from the collection.
+    slice: function() {
+      return slice.apply(this.models, arguments);
+    },
+
+    // Get a model from the set by id.
+    get: function(obj) {
+      if (obj == null) return void 0;
+      return this._byId[obj.id] || this._byId[obj.cid] || this._byId[obj];
+    },
+
+    // Get the model at the given index.
+    at: function(index) {
+      return this.models[index];
+    },
+
+    // Return models with matching attributes. Useful for simple cases of
+    // `filter`.
+    where: function(attrs, first) {
+      if (_.isEmpty(attrs)) return first ? void 0 : [];
+      return this[first ? 'find' : 'filter'](function(model) {
+        for (var key in attrs) {
+          if (attrs[key] !== model.get(key)) return false;
+        }
+        return true;
+      });
+    },
+
+    // Return the first model with matching attributes. Useful for simple cases
+    // of `find`.
+    findWhere: function(attrs) {
+      return this.where(attrs, true);
+    },
+
+    // Force the collection to re-sort itself. You don't need to call this under
+    // normal circumstances, as the set will maintain sort order as each item
+    // is added.
+    sort: function(options) {
+      if (!this.comparator) throw new Error('Cannot sort a set without a comparator');
+      options || (options = {});
+
+      // Run sort based on type of `comparator`.
+      if (_.isString(this.comparator) || this.comparator.length === 1) {
+        this.models = this.sortBy(this.comparator, this);
+      } else {
+        this.models.sort(_.bind(this.comparator, this));
+      }
+
+      if (!options.silent) this.trigger('sort', this, options);
+      return this;
+    },
+
+    // Pluck an attribute from each model in the collection.
+    pluck: function(attr) {
+      return _.invoke(this.models, 'get', attr);
+    },
+
+    // Fetch the default set of models for this collection, resetting the
+    // collection when they arrive. If `reset: true` is passed, the response
+    // data will be passed through the `reset` method instead of `set`.
+    fetch: function(options) {
+      options = options ? _.clone(options) : {};
+      if (options.parse === void 0) options.parse = true;
+      var success = options.success;
+      var collection = this;
+      options.success = function(resp) {
+        var method = options.reset ? 'reset' : 'set';
+        collection[method](resp, options);
+        if (success) success(collection, resp, options);
+        collection.trigger('sync', collection, resp, options);
+      };
+      wrapError(this, options);
+      return this.sync('read', this, options);
+    },
+
+    // Create a new instance of a model in this collection. Add the model to the
+    // collection immediately, unless `wait: true` is passed, in which case we
+    // wait for the server to agree.
+    create: function(model, options) {
+      options = options ? _.clone(options) : {};
+      if (!(model = this._prepareModel(model, options))) return false;
+      if (!options.wait) this.add(model, options);
+      var collection = this;
+      var success = options.success;
+      options.success = function(model, resp, options) {
+        if (options.wait) collection.add(model, options);
+        if (success) success(model, resp, options);
+      };
+      model.save(null, options);
+      return model;
+    },
+
+    // **parse** converts a response into a list of models to be added to the
+    // collection. The default implementation is just to pass it through.
+    parse: function(resp, options) {
+      return resp;
+    },
+
+    // Create a new collection with an identical list of models as this one.
+    clone: function() {
+      return new this.constructor(this.models);
+    },
+
+    // Private method to reset all internal state. Called when the collection
+    // is first initialized or reset.
+    _reset: function() {
+      this.length = 0;
+      this.models = [];
+      this._byId  = {};
+    },
+
+    // Prepare a hash of attributes (or other model) to be added to this
+    // collection.
+    _prepareModel: function(attrs, options) {
+      if (attrs instanceof Model) {
+        if (!attrs.collection) attrs.collection = this;
+        return attrs;
+      }
+      options = options ? _.clone(options) : {};
+      options.collection = this;
+      var model = new this.model(attrs, options);
+      if (!model.validationError) return model;
+      this.trigger('invalid', this, model.validationError, options);
+      return false;
+    },
+
+    // Internal method to sever a model's ties to a collection.
+    _removeReference: function(model) {
+      if (this === model.collection) delete model.collection;
+      model.off('all', this._onModelEvent, this);
+    },
+
+    // Internal method called every time a model in the set fires an event.
+    // Sets need to update their indexes when models change ids. All other
+    // events simply proxy through. "add" and "remove" events that originate
+    // in other collections are ignored.
+    _onModelEvent: function(event, model, collection, options) {
+      if ((event === 'add' || event === 'remove') && collection !== this) return;
+      if (event === 'destroy') this.remove(model, options);
+      if (model && event === 'change:' + model.idAttribute) {
+        delete this._byId[model.previous(model.idAttribute)];
+        if (model.id != null) this._byId[model.id] = model;
+      }
+      this.trigger.apply(this, arguments);
+    }
+
+  });
+
+  // Underscore methods that we want to implement on the Collection.
+  // 90% of the core usefulness of Backbone Collections is actually implemented
+  // right here:
+  var methods = ['forEach', 'each', 'map', 'collect', 'reduce', 'foldl',
+    'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select',
+    'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke',
+    'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest',
+    'tail', 'drop', 'last', 'without', 'difference', 'indexOf', 'shuffle',
+    'lastIndexOf', 'isEmpty', 'chain'];
+
+  // Mix in each Underscore method as a proxy to `Collection#models`.
+  _.each(methods, function(method) {
+    Collection.prototype[method] = function() {
+      var args = slice.call(arguments);
+      args.unshift(this.models);
+      return _[method].apply(_, args);
+    };
+  });
+
+  // Underscore methods that take a property name as an argument.
+  var attributeMethods = ['groupBy', 'countBy', 'sortBy'];
+
+  // Use attributes instead of properties.
+  _.each(attributeMethods, function(method) {
+    Collection.prototype[method] = function(value, context) {
+      var iterator = _.isFunction(value) ? value : function(model) {
+        return model.get(value);
+      };
+      return _[method](this.models, iterator, context);
+    };
+  });
+
+  // Backbone.View
+  // -------------
+
+  // Backbone Views are almost more convention than they are actual code. A View
+  // is simply a JavaScript object that represents a logical chunk of UI in the
+  // DOM. This might be a single item, an entire list, a sidebar or panel, or
+  // even the surrounding frame which wraps your whole app. Defining a chunk of
+  // UI as a **View** allows you to define your DOM events declaratively, without
+  // having to worry about render order ... and makes it easy for the view to
+  // react to specific changes in the state of your models.
+
+  // Creating a Backbone.View creates its initial element outside of the DOM,
+  // if an existing element is not provided...
+  var View = Backbone.View = function(options) {
+    this.cid = _.uniqueId('view');
+    options || (options = {});
+    _.extend(this, _.pick(options, viewOptions));
+    this._ensureElement();
+    this.initialize.apply(this, arguments);
+    this.delegateEvents();
+  };
+
+  // Cached regex to split keys for `delegate`.
+  var delegateEventSplitter = /^(\S+)\s*(.*)$/;
+
+  // List of view options to be merged as properties.
+  var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];
+
+  // Set up all inheritable **Backbone.View** properties and methods.
+  _.extend(View.prototype, Events, {
+
+    // The default `tagName` of a View's element is `"div"`.
+    tagName: 'div',
+
+    // jQuery delegate for element lookup, scoped to DOM elements within the
+    // current view. This should be preferred to global lookups where possible.
+    $: function(selector) {
+      return this.$el.find(selector);
+    },
+
+    // Initialize is an empty function by default. Override it with your own
+    // initialization logic.
+    initialize: function(){},
+
+    // **render** is the core function that your view should override, in order
+    // to populate its element (`this.el`), with the appropriate HTML. The
+    // convention is for **render** to always return `this`.
+    render: function() {
+      return this;
+    },
+
+    // Remove this view by taking the element out of the DOM, and removing any
+    // applicable Backbone.Events listeners.
+    remove: function() {
+      this.$el.remove();
+      this.stopListening();
+      return this;
+    },
+
+    // Change the view's element (`this.el` property), including event
+    // re-delegation.
+    setElement: function(element, delegate) {
+      if (this.$el) this.undelegateEvents();
+      this.$el = element instanceof Backbone.$ ? element : Backbone.$(element);
+      this.el = this.$el[0];
+      if (delegate !== false) this.delegateEvents();
+      return this;
+    },
+
+    // Set callbacks, where `this.events` is a hash of
+    //
+    // *{"event selector": "callback"}*
+    //
+    //     {
+    //       'mousedown .title':  'edit',
+    //       'click .button':     'save',
+    //       'click .open':       function(e) { ... }
+    //     }
+    //
+    // pairs. Callbacks will be bound to the view, with `this` set properly.
+    // Uses event delegation for efficiency.
+    // Omitting the selector binds the event to `this.el`.
+    // This only works for delegate-able events: not `focus`, `blur`, and
+    // not `change`, `submit`, and `reset` in Internet Explorer.
+    delegateEvents: function(events) {
+      if (!(events || (events = _.result(this, 'events')))) return this;
+      this.undelegateEvents();
+      for (var key in events) {
+        var method = events[key];
+        if (!_.isFunction(method)) method = this[events[key]];
+        if (!method) continue;
+
+        var match = key.match(delegateEventSplitter);
+        var eventName = match[1], selector = match[2];
+        method = _.bind(method, this);
+        eventName += '.delegateEvents' + this.cid;
+        if (selector === '') {
+          this.$el.on(eventName, method);
+        } else {
+          this.$el.on(eventName, selector, method);
+        }
+      }
+      return this;
+    },
+
+    // Clears all callbacks previously bound to the view with `delegateEvents`.
+    // You usually don't need to use this, but may wish to if you have multiple
+    // Backbone views attached to the same DOM element.
+    undelegateEvents: function() {
+      this.$el.off('.delegateEvents' + this.cid);
+      return this;
+    },
+
+    // Ensure that the View has a DOM element to render into.
+    // If `this.el` is a string, pass it through `$()`, take the first
+    // matching element, and re-assign it to `el`. Otherwise, create
+    // an element from the `id`, `className` and `tagName` properties.
+    _ensureElement: function() {
+      if (!this.el) {
+        var attrs = _.extend({}, _.result(this, 'attributes'));
+        if (this.id) attrs.id = _.result(this, 'id');
+        if (this.className) attrs['class'] = _.result(this, 'className');
+        var $el = Backbone.$('<' + _.result(this, 'tagName') + '>').attr(attrs);
+        this.setElement($el, false);
+      } else {
+        this.setElement(_.result(this, 'el'), false);
+      }
+    }
+
+  });
+
+  // Backbone.sync
+  // -------------
+
+  // Override this function to change the manner in which Backbone persists
+  // models to the server. You will be passed the type of request, and the
+  // model in question. By default, makes a RESTful Ajax request
+  // to the model's `url()`. Some possible customizations could be:
+  //
+  // * Use `setTimeout` to batch rapid-fire updates into a single request.
+  // * Send up the models as XML instead of JSON.
+  // * Persist models via WebSockets instead of Ajax.
+  //
+  // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
+  // as `POST`, with a `_method` parameter containing the true HTTP method,
+  // as well as all requests with the body as `application/x-www-form-urlencoded`
+  // instead of `application/json` with the model in a param named `model`.
+  // Useful when interfacing with server-side languages like **PHP** that make
+  // it difficult to read the body of `PUT` requests.
+  Backbone.sync = function(method, model, options) {
+    var type = methodMap[method];
+
+    // Default options, unless specified.
+    _.defaults(options || (options = {}), {
+      emulateHTTP: Backbone.emulateHTTP,
+      emulateJSON: Backbone.emulateJSON
+    });
+
+    // Default JSON-request options.
+    var params = {type: type, dataType: 'json'};
+
+    // Ensure that we have a URL.
+    if (!options.url) {
+      params.url = _.result(model, 'url') || urlError();
+    }
+
+    // Ensure that we have the appropriate request data.
+    if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
+      params.contentType = 'application/json';
+      params.data = JSON.stringify(options.attrs || model.toJSON(options));
+    }
+
+    // For older servers, emulate JSON by encoding the request into an HTML-form.
+    if (options.emulateJSON) {
+      params.contentType = 'application/x-www-form-urlencoded';
+      params.data = params.data ? {model: params.data} : {};
+    }
+
+    // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
+    // And an `X-HTTP-Method-Override` header.
+    if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {
+      params.type = 'POST';
+      if (options.emulateJSON) params.data._method = type;
+      var beforeSend = options.beforeSend;
+      options.beforeSend = function(xhr) {
+        xhr.setRequestHeader('X-HTTP-Method-Override', type);
+        if (beforeSend) return beforeSend.apply(this, arguments);
+      };
+    }
+
+    // Don't process data on a non-GET request.
+    if (params.type !== 'GET' && !options.emulateJSON) {
+      params.processData = false;
+    }
+
+    // If we're sending a `PATCH` request, and we're in an old Internet Explorer
+    // that still has ActiveX enabled by default, override jQuery to use that
+    // for XHR instead. Remove this line when jQuery supports `PATCH` on IE8.
+    if (params.type === 'PATCH' && noXhrPatch) {
+      params.xhr = function() {
+        return new ActiveXObject("Microsoft.XMLHTTP");
+      };
+    }
+
+    // Make the request, allowing the user to override any Ajax options.
+    var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
+    model.trigger('request', model, xhr, options);
+    return xhr;
+  };
+
+  var noXhrPatch = typeof window !== 'undefined' && !!window.ActiveXObject && !(window.XMLHttpRequest && (new XMLHttpRequest).dispatchEvent);
+
+  // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
+  var methodMap = {
+    'create': 'POST',
+    'update': 'PUT',
+    'patch':  'PATCH',
+    'delete': 'DELETE',
+    'read':   'GET'
+  };
+
+  // Set the default implementation of `Backbone.ajax` to proxy through to `$`.
+  // Override this if you'd like to use a different library.
+  Backbone.ajax = function() {
+    return Backbone.$.ajax.apply(Backbone.$, arguments);
+  };
+
+  // Backbone.Router
+  // ---------------
+
+  // Routers map faux-URLs to actions, and fire events when routes are
+  // matched. Creating a new one sets its `routes` hash, if not set statically.
+  var Router = Backbone.Router = function(options) {
+    options || (options = {});
+    if (options.routes) this.routes = options.routes;
+    this._bindRoutes();
+    this.initialize.apply(this, arguments);
+  };
+
+  // Cached regular expressions for matching named param parts and splatted
+  // parts of route strings.
+  var optionalParam = /\((.*?)\)/g;
+  var namedParam    = /(\(\?)?:\w+/g;
+  var splatParam    = /\*\w+/g;
+  var escapeRegExp  = /[\-{}\[\]+?.,\\\^$|#\s]/g;
+
+  // Set up all inheritable **Backbone.Router** properties and methods.
+  _.extend(Router.prototype, Events, {
+
+    // Initialize is an empty function by default. Override it with your own
+    // initialization logic.
+    initialize: function(){},
+
+    // Manually bind a single named route to a callback. For example:
+    //
+    //     this.route('search/:query/p:num', 'search', function(query, num) {
+    //       ...
+    //     });
+    //
+    route: function(route, name, callback) {
+      if (!_.isRegExp(route)) route = this._routeToRegExp(route);
+      if (_.isFunction(name)) {
+        callback = name;
+        name = '';
+      }
+      if (!callback) callback = this[name];
+      var router = this;
+      Backbone.history.route(route, function(fragment) {
+        var args = router._extractParameters(route, fragment);
+        callback && callback.apply(router, args);
+        router.trigger.apply(router, ['route:' + name].concat(args));
+        router.trigger('route', name, args);
+        Backbone.history.trigger('route', router, name, args);
+      });
+      return this;
+    },
+
+    // Simple proxy to `Backbone.history` to save a fragment into the history.
+    navigate: function(fragment, options) {
+      Backbone.history.navigate(fragment, options);
+      return this;
+    },
+
+    // Bind all defined routes to `Backbone.history`. We have to reverse the
+    // order of the routes here to support behavior where the most general
+    // routes can be defined at the bottom of the route map.
+    _bindRoutes: function() {
+      if (!this.routes) return;
+      this.routes = _.result(this, 'routes');
+      var route, routes = _.keys(this.routes);
+      while ((route = routes.pop()) != null) {
+        this.route(route, this.routes[route]);
+      }
+    },
+
+    // Convert a route string into a regular expression, suitable for matching
+    // against the current location hash.
+    _routeToRegExp: function(route) {
+      route = route.replace(escapeRegExp, '\\$&')
+                   .replace(optionalParam, '(?:$1)?')
+                   .replace(namedParam, function(match, optional) {
+                     return optional ? match : '([^\/]+)';
+                   })
+                   .replace(splatParam, '(.*?)');
+      return new RegExp('^' + route + '$');
+    },
+
+    // Given a route, and a URL fragment that it matches, return the array of
+    // extracted decoded parameters. Empty or unmatched parameters will be
+    // treated as `null` to normalize cross-browser behavior.
+    _extractParameters: function(route, fragment) {
+      var params = route.exec(fragment).slice(1);
+      return _.map(params, function(param) {
+        return param ? decodeURIComponent(param) : null;
+      });
+    }
+
+  });
+
+  // Backbone.History
+  // ----------------
+
+  // Handles cross-browser history management, based on either
+  // [pushState](http://diveintohtml5.info/history.html) and real URLs, or
+  // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
+  // and URL fragments. If the browser supports neither (old IE, natch),
+  // falls back to polling.
+  var History = Backbone.History = function() {
+    this.handlers = [];
+    _.bindAll(this, 'checkUrl');
+
+    // Ensure that `History` can be used outside of the browser.
+    if (typeof window !== 'undefined') {
+      this.location = window.location;
+      this.history = window.history;
+    }
+  };
+
+  // Cached regex for stripping a leading hash/slash and trailing space.
+  var routeStripper = /^[#\/]|\s+$/g;
+
+  // Cached regex for stripping leading and trailing slashes.
+  var rootStripper = /^\/+|\/+$/g;
+
+  // Cached regex for detecting MSIE.
+  var isExplorer = /msie [\w.]+/;
+
+  // Cached regex for removing a trailing slash.
+  var trailingSlash = /\/$/;
+
+  // Cached regex for stripping urls of hash and query.
+  var pathStripper = /[?#].*$/;
+
+  // Has the history handling already been started?
+  History.started = false;
+
+  // Set up all inheritable **Backbone.History** properties and methods.
+  _.extend(History.prototype, Events, {
+
+    // The default interval to poll for hash changes, if necessary, is
+    // twenty times a second.
+    interval: 50,
+
+    // Gets the true hash value. Cannot use location.hash directly due to bug
+    // in Firefox where location.hash will always be decoded.
+    getHash: function(window) {
+      var match = (window || this).location.href.match(/#(.*)$/);
+      return match ? match[1] : '';
+    },
+
+    // Get the cross-browser normalized URL fragment, either from the URL,
+    // the hash, or the override.
+    getFragment: function(fragment, forcePushState) {
+      if (fragment == null) {
+        if (this._hasPushState || !this._wantsHashChange || forcePushState) {
+          fragment = this.location.pathname;
+          var root = this.root.replace(trailingSlash, '');
+          if (!fragment.indexOf(root)) fragment = fragment.slice(root.length);
+        } else {
+          fragment = this.getHash();
+        }
+      }
+      return fragment.replace(routeStripper, '');
+    },
+
+    // Start the hash change handling, returning `true` if the current URL matches
+    // an existing route, and `false` otherwise.
+    start: function(options) {
+      if (History.started) throw new Error("Backbone.history has already been started");
+      History.started = true;
+
+      // Figure out the initial configuration. Do we need an iframe?
+      // Is pushState desired ... is it available?
+      this.options          = _.extend({root: '/'}, this.options, options);
+      this.root             = this.options.root;
+      this._wantsHashChange = this.options.hashChange !== false;
+      this._wantsPushState  = !!this.options.pushState;
+      this._hasPushState    = !!(this.options.pushState && this.history && this.history.pushState);
+      var fragment          = this.getFragment();
+      var docMode           = document.documentMode;
+      var oldIE             = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));
+
+      // Normalize root to always include a leading and trailing slash.
+      this.root = ('/' + this.root + '/').replace(rootStripper, '/');
+
+      if (oldIE && this._wantsHashChange) {
+        this.iframe = Backbone.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;
+        this.navigate(fragment);
+      }
+
+      // Depending on whether we're using pushState or hashes, and whether
+      // 'onhashchange' is supported, determine how we check the URL state.
+      if (this._hasPushState) {
+        Backbone.$(window).on('popstate', this.checkUrl);
+      } else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {
+        Backbone.$(window).on('hashchange', this.checkUrl);
+      } else if (this._wantsHashChange) {
+        this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
+      }
+
+      // Determine if we need to change the base url, for a pushState link
+      // opened by a non-pushState browser.
+      this.fragment = fragment;
+      var loc = this.location;
+      var atRoot = loc.pathname.replace(/[^\/]$/, '$&/') === this.root;
+
+      // Transition from hashChange to pushState or vice versa if both are
+      // requested.
+      if (this._wantsHashChange && this._wantsPushState) {
+
+        // If we've started off with a route from a `pushState`-enabled
+        // browser, but we're currently in a browser that doesn't support it...
+        if (!this._hasPushState && !atRoot) {
+          this.fragment = this.getFragment(null, true);
+          this.location.replace(this.root + this.location.search + '#' + this.fragment);
+          // Return immediately as browser will do redirect to new url
+          return true;
+
+        // Or if we've started out with a hash-based route, but we're currently
+        // in a browser where it could be `pushState`-based instead...
+        } else if (this._hasPushState && atRoot && loc.hash) {
+          this.fragment = this.getHash().replace(routeStripper, '');
+          this.history.replaceState({}, document.title, this.root + this.fragment + loc.search);
+        }
+
+      }
+
+      if (!this.options.silent) return this.loadUrl();
+    },
+
+    // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
+    // but possibly useful for unit testing Routers.
+    stop: function() {
+      Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);
+      clearInterval(this._checkUrlInterval);
+      History.started = false;
+    },
+
+    // Add a route to be tested when the fragment changes. Routes added later
+    // may override previous routes.
+    route: function(route, callback) {
+      this.handlers.unshift({route: route, callback: callback});
+    },
+
+    // Checks the current URL to see if it has changed, and if it has,
+    // calls `loadUrl`, normalizing across the hidden iframe.
+    checkUrl: function(e) {
+      var current = this.getFragment();
+      if (current === this.fragment && this.iframe) {
+        current = this.getFragment(this.getHash(this.iframe));
+      }
+      if (current === this.fragment) return false;
+      if (this.iframe) this.navigate(current);
+      this.loadUrl();
+    },
+
+    // Attempt to load the current URL fragment. If a route succeeds with a
+    // match, returns `true`. If no defined routes matches the fragment,
+    // returns `false`.
+    loadUrl: function(fragment) {
+      fragment = this.fragment = this.getFragment(fragment);
+      return _.any(this.handlers, function(handler) {
+        if (handler.route.test(fragment)) {
+          handler.callback(fragment);
+          return true;
+        }
+      });
+    },
+
+    // Save a fragment into the hash history, or replace the URL state if the
+    // 'replace' option is passed. You are responsible for properly URL-encoding
+    // the fragment in advance.
+    //
+    // The options object can contain `trigger: true` if you wish to have the
+    // route callback be fired (not usually desirable), or `replace: true`, if
+    // you wish to modify the current URL without adding an entry to the history.
+    navigate: function(fragment, options) {
+      if (!History.started) return false;
+      if (!options || options === true) options = {trigger: !!options};
+
+      var url = this.root + (fragment = this.getFragment(fragment || ''));
+
+      // Strip the fragment of the query and hash for matching.
+      fragment = fragment.replace(pathStripper, '');
+
+      if (this.fragment === fragment) return;
+      this.fragment = fragment;
+
+      // Don't include a trailing slash on the root.
+      if (fragment === '' && url !== '/') url = url.slice(0, -1);
+
+      // If pushState is available, we use it to set the fragment as a real URL.
+      if (this._hasPushState) {
+        this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
+
+      // If hash changes haven't been explicitly disabled, update the hash
+      // fragment to store history.
+      } else if (this._wantsHashChange) {
+        this._updateHash(this.location, fragment, options.replace);
+        if (this.iframe && (fragment !== this.getFragment(this.getHash(this.iframe)))) {
+          // Opening and closing the iframe tricks IE7 and earlier to push a
+          // history entry on hash-tag change.  When replace is true, we don't
+          // want this.
+          if(!options.replace) this.iframe.document.open().close();
+          this._updateHash(this.iframe.location, fragment, options.replace);
+        }
+
+      // If you've told us that you explicitly don't want fallback hashchange-
+      // based history, then `navigate` becomes a page refresh.
+      } else {
+        return this.location.assign(url);
+      }
+      if (options.trigger) return this.loadUrl(fragment);
+    },
+
+    // Update the hash location, either replacing the current entry, or adding
+    // a new one to the browser history.
+    _updateHash: function(location, fragment, replace) {
+      if (replace) {
+        var href = location.href.replace(/(javascript:|#).*$/, '');
+        location.replace(href + '#' + fragment);
+      } else {
+        // Some browsers require that `hash` contains a leading #.
+        location.hash = '#' + fragment;
+      }
+    }
+
+  });
+
+  // Create the default Backbone.history.
+  Backbone.history = new History;
+
+  // Helpers
+  // -------
+
+  // Helper function to correctly set up the prototype chain, for subclasses.
+  // Similar to `goog.inherits`, but uses a hash of prototype properties and
+  // class properties to be extended.
+  var extend = function(protoProps, staticProps) {
+    var parent = this;
+    var child;
+
+    // The constructor function for the new subclass is either defined by you
+    // (the "constructor" property in your `extend` definition), or defaulted
+    // by us to simply call the parent's constructor.
+    if (protoProps && _.has(protoProps, 'constructor')) {
+      child = protoProps.constructor;
+    } else {
+      child = function(){ return parent.apply(this, arguments); };
+    }
+
+    // Add static properties to the constructor function, if supplied.
+    _.extend(child, parent, staticProps);
+
+    // Set the prototype chain to inherit from `parent`, without calling
+    // `parent`'s constructor function.
+    var Surrogate = function(){ this.constructor = child; };
+    Surrogate.prototype = parent.prototype;
+    child.prototype = new Surrogate;
+
+    // Add prototype properties (instance properties) to the subclass,
+    // if supplied.
+    if (protoProps) _.extend(child.prototype, protoProps);
+
+    // Set a convenience property in case the parent's prototype is needed
+    // later.
+    child.__super__ = parent.prototype;
+
+    return child;
+  };
+
+  // Set up inheritance for the model, collection, router, view and history.
+  Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
+
+  // Throw an error when a URL is needed, and none is supplied.
+  var urlError = function() {
+    throw new Error('A "url" property or function must be specified');
+  };
+
+  // Wrap an optional error callback with a fallback error event.
+  var wrapError = function(model, options) {
+    var error = options.error;
+    options.error = function(resp) {
+      if (error) error(model, resp, options);
+      model.trigger('error', model, resp, options);
+    };
+  };
+
+}).call(this);


[52/93] [abbrv] jena git commit: Remove Guava from dependency management

Posted by rv...@apache.org.
Remove Guava from dependency management


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/47bf098e
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/47bf098e
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/47bf098e

Branch: refs/heads/hadoop-rdf
Commit: 47bf098eb34407533d54bf88433c6e8ca3eaabbf
Parents: 470ee4d
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 18:04:20 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 18:04:20 2015 +0000

----------------------------------------------------------------------
 jena-parent/pom.xml | 7 -------
 1 file changed, 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/47bf098e/jena-parent/pom.xml
----------------------------------------------------------------------
diff --git a/jena-parent/pom.xml b/jena-parent/pom.xml
index e185fb2..e399b5a 100644
--- a/jena-parent/pom.xml
+++ b/jena-parent/pom.xml
@@ -57,7 +57,6 @@
     <ver.lucene>4.6.1</ver.lucene>
     <ver.solr>4.6.1</ver.solr>
     <ver.spatial4j>0.4</ver.spatial4j>
-    <ver.guava>18.0</ver.guava>
 
     <jdk.version>1.7</jdk.version>
     <targetJdk>${jdk.version}</targetJdk> <!-- MPMD-86 workaround -->
@@ -289,12 +288,6 @@
         </exclusions>
       </dependency>
 
-      <dependency>
-	<groupId>com.google.guava</groupId>
-	<artifactId>guava</artifactId>
-	<version>${ver.guava}</version>
-      </dependency>
-
     </dependencies>
   </dependencyManagement>
 


[36/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/dataset.html
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/dataset.html b/jena-fuseki2/jena-fuseki-core/src/main/webapp/dataset.html
new file mode 100644
index 0000000..a6b6a1d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/dataset.html
@@ -0,0 +1,245 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Apache Jena Fuseki - inspect dataset</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
+    <link href="css/font-awesome.min.css" rel="stylesheet" media="screen">
+    <link href="css/qonsole.css" rel="stylesheet" media="screen">
+    <link href="css/bootstrap-select.min.css" rel="stylesheet" media="screen">
+
+    <link href="css/jquery.fileupload-ui.css" rel="stylesheet" media="screen">
+    <link href="css/jquery.fileupload.css" rel="stylesheet" media="screen">
+
+    <link href="css/fui.css" rel="stylesheet" media="screen">
+    
+    <link href="css/codemirror.min.css" rel="stylesheet">
+    <link href="css/yasqe.min.css" rel="stylesheet">
+    <link href="css/yasr.min.css" rel="stylesheet">
+    
+
+    
+
+    <!--[if lt IE 9]>
+      <script src="js/lib/html5shiv.js"></script>
+      <script src="js/lib/respond.min.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <nav class="navbar navbar-default" role="navigation">
+      <div class="container">
+        <div class="row">
+          <!-- Brand and toggle get grouped for better mobile display -->
+          <div class="navbar-header">
+            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
+              <span class="sr-only">Toggle navigation</span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+            </button>
+            <a class="navbar-brand" href="index.html">
+              <img src="images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" />
+              <div>Apache<br />Jena<br /><strong>Fuseki</strong></div>
+            </a>
+          </div>
+
+          <!-- Collect the nav links, forms, and other content for toggling -->
+          <div class="collapse navbar-collapse navbar-ex1-collapse">
+            <ul class="nav navbar-nav">
+              <li class=""><a href="index.html"><i class="fa fa-home"></i></a></li>
+              <li class="active"><a href="dataset.html"><i class="fa fa-database"></i> dataset</a></li>
+              <li class=""><a href="manage.html"><i class="fa fa-cogs"></i> manage datasets</a></li>
+              <li class=""><a href="services.html"><i class="fa fa-wrench"></i> services</a></li>
+              <li class=""><a href="documentation.html"><i class="fa fa-info-circle"></i> help</a></li>
+            </ul>
+            <ul class="nav navbar-nav navbar-right">
+              <li class="status-indicator">
+                <div>Server<br />status:</div>
+              </li>
+              <li class="status-indicator">
+                <a class="" href="admin/server-log.html" id="server-status-light" title="current server status">
+                  <span class="server-up"></span>
+                </a>
+              </li>
+            </ul>
+          </div><!-- /.navbar-collapse -->
+        </div><!-- /row -->
+      </div><!-- /container -->
+    </nav>
+
+    <div class="container">
+
+      <div class="row">
+        <div class="col-md-12">
+          <div class="dataset-selector-container"></div>
+        </div>
+      </div>
+
+      <div class="row">
+        <div class="col-md-12">
+          <div class="content-frame">
+            <ul class="nav nav-tabs">
+              <li><a href="#query" data-toggle="tab"><i class='fa fa-question-circle'></i> query</a></li>
+              <li><a href="#upload" data-toggle="tab"><i class='fa fa-upload'></i> upload files</a></li>
+              <li><a href="#edit" data-toggle="tab"><i class='fa fa-edit'></i> edit</a></li>
+              <li><a href="#info" data-toggle="tab"><i class='fa fa-dashboard'></i> info</a></li>
+            </ul>
+
+            <!-- Tab panes -->
+            <div class="tab-content">
+              <div class="tab-pane" id="query">
+                <div class="no-dataset">Please select a dataset.</div>
+                <div class="with-dataset hidden">
+                  <div class="row">
+                    <div class="col-md-12">
+                      <h2>SPARQL query</h2>
+                      <p>To try out some SPARQL queries against the selected dataset, enter your
+                      query here.</p>
+
+                      <div class="qonsole">
+                        <div class="col-md-12 well">
+                          <h2 class="">Example queries</h2>
+                          <ul class="list-inline examples">
+                          </ul>
+                        </div>
+
+                        <div class="col-md-12 well vertical">
+                          <h2 class="">Prefixes</h2>
+                          <ul class="list-inline prefixes">
+                            <li class="keep">
+                              <a data-toggle="modal" href="#prefixEditor" class="button" title="Add a SPARQL prefix">
+                                <i class="icon-plus-sign"></i>
+                              </a>
+                            </li>
+                          </ul>
+                        </div>
+                        <div class="col-md-12 well">
+                            <div class="query-chrome" style="margin-top:0px; display:inline-block;width:40%">
+                                  <div class="form-group">
+	                                <label for="sparqlEndpoint">SPARQL endpoint</label>
+	                                <input type="text" class="form-control" id="sparqlEndpoint" />
+	                              </div>
+                            </div>
+                             <div class="query-chrome" style="margin-top:0px; display:inline-block; width:28%">
+                                  <div class="form-group">
+                                    <label for="selectContentType">Content Type (Select)</label>
+                                    <select id="selectContentType" class="form-control">
+                                      <option value="application/sparql-results+json">JSON</option>
+                                      <option value="application/sparql-results+xml">XML</option>
+                                      <option value="text/csv">CSV</option>
+                                      <option value="text/tab-separated-values">TSV</option>
+                                    </select>
+                                  </div>
+                            </div>
+                            <div class="query-chrome" style="margin-top:0px; display:inline-block; width:28%">
+                                  <div class="form-group">
+                                    <label for="graphContentType">Content Type (Graph)</label>
+                                    <select id="graphContentType" class="form-control">
+									  <option value="text/turtle">Turtle</option>
+									  <option value="application/rdf+xml">XML</option>
+									</select>
+                                  </div>
+                            </div>
+                        </div>
+                        <div class="col-md-12 well">
+                          <div class="query-edit">
+                            <div id="query-edit-cm" class=""></div>
+                          </div>
+                        </div>
+
+                        <!-- results -->
+                        <div id="results-block" class="row sparql sparql-results">
+                          <div class="col-md-12">
+                            <div class="well">
+                              <div class="row">
+                                <div class="col-md-12">
+                                  <span class="loadingSpinner hidden">
+                                    <img src="images/wait30.gif" alt="waiting for server action to complete" />
+                                  </span>
+                                  <span class="timeTaken hidden"></span>
+                                </div>
+                              </div>
+                              <div class="row">
+                                <div class="col-md-12" id="results">
+                                  <h2 class="col-md-12">Query results</h2>
+                                </div>
+                              </div>
+                            </div>
+                          </div>
+                        </div>
+
+                        <div class="row clearfix"></div>
+                      </div><!-- /.qonsole -->
+
+                      <!-- modal dialogue -->
+                      <div class="modal fade" id="prefixEditor" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+                        <div class="modal-dialog">
+                          <div class="modal-content">
+                            <div class="modal-header">
+                              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+                              <h4 class="modal-title">Add a SPARQL prefix</h4>
+                            </div>
+                            <div class="modal-body">
+                              <form class="form-horizontal" role="form">
+                                <div class="form-group">
+                                  <label for="inputPrefix" class="col-lg-2 control-label">Prefix</label>
+                                  <div class="col-lg-10">
+                                    <input type="text" class="form-control" id="inputPrefix" placeholder="Prefix" autofocus>
+                                  </div>
+                                </div>
+                                <div class="form-group">
+                                  <div class="col-lg-offset-2 col-lg-10">
+                                    <button class="btn btn-sm btn-primary" id="lookupPrefix">Lookup <span></span> on prefix.cc</button>
+                                  </div>
+                                </div>
+                                <div class="form-group">
+                                  <label for="inputURI" class="col-lg-2 control-label">URI</label>
+                                  <div class="col-lg-10">
+                                    <input type="text" class="form-control" id="inputURI" placeholder="URI">
+                                  </div>
+                                </div>
+                              </form>
+                            </div>
+                            <div class="modal-footer">
+                              <button type="button" class="btn btn-default" data-dismiss="modal">cancel</button>
+                              <button type="button" class="btn btn-primary" data-dismiss="modal" id="addPrefix">add prefix</button>
+                            </div>
+                          </div><!-- /.modal-content -->
+                        </div><!-- /.modal-dialog -->
+                      </div><!-- /.modal -->
+
+                    </div>
+
+                  </div> <!-- .col-md-12 -->
+                </div> <!-- /.with-dataset -->
+              </div>
+
+              <div class="tab-pane" id="upload">
+                <div class="no-dataset">Please select a dataset.</div>
+                <div class="with-dataset hidden">
+                  <div class="row">
+                    <div id="file-upload"></div>
+                  </div> <!-- /.row -->
+                </div>
+              </div>
+
+              <div class="tab-pane" id="edit">
+                <div class="no-dataset">Please select a dataset.</div>
+                <div class="with-dataset hidden"></div>
+              </div>
+
+              <div class="tab-pane" id="info">
+                <div class="no-dataset">Please select a dataset.</div>
+                <div class="with-dataset hidden">
+                </div>
+              </div>
+
+            </div>
+          </div>
+        </div>
+      </div>
+
+    </div>
+    <script data-main="js/app/main.dataset.js" src="js/lib/require.js"></script>
+  </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/documentation.html
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/documentation.html b/jena-fuseki2/jena-fuseki-core/src/main/webapp/documentation.html
new file mode 100644
index 0000000..cef0ceb
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/documentation.html
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Apache Jena Fuseki - documentation</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
+    <link href="css/font-awesome.min.css" rel="stylesheet" media="screen">
+    <link href="css/codemirror.css" rel="stylesheet" media="screen">
+    <link href="css/qonsole.css" rel="stylesheet" media="screen">
+    <link href="css/jquery.dataTables.css" rel="stylesheet" media="screen">
+    <link href="css/fui.css" rel="stylesheet" media="screen">
+
+    <!--[if lt IE 9]>
+      <script src="../js/lib/html5shiv.js"></script>
+      <script src="../js/lib/respond.min.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <nav class="navbar navbar-default" role="navigation">
+      <div class="container">
+        <div class="row">
+          <!-- Brand and toggle get grouped for better mobile display -->
+          <div class="navbar-header">
+            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
+              <span class="sr-only">Toggle navigation</span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+            </button>
+            <a class="navbar-brand" href="index.html">
+              <img src="images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" />
+              <div>Apache<br />Jena<br /><strong>Fuseki</strong></div>
+            </a>
+          </div>
+
+          <!-- Collect the nav links, forms, and other content for toggling -->
+          <div class="collapse navbar-collapse navbar-ex1-collapse">
+            <ul class="nav navbar-nav">
+              <li class=""><a href="index.html"><i class="fa fa-home"></i></a></li>
+              <li class=""><a href="dataset.html"><i class="fa fa-database"></i> dataset</a></li>
+              <li class=""><a href="manage.html"><i class="fa fa-cogs"></i> manage datasets</a></li>
+              <li class=""><a href="services.html"><i class="fa fa-wrench"></i> services</a></li>
+              <li class="active"><a href="documentation.html"><i class="fa fa-info-circle"></i> help</a></li>
+            </ul>
+            <ul class="nav navbar-nav navbar-right">
+              <li class="status-indicator">
+                <div>Server<br />status:</div>
+              </li>
+              <li class="status-indicator">
+                <a class="" href="admin/server-log.html" id="server-status-light" title="current server status">
+                  <span class="server-up"></span>
+                </a>
+              </li>
+            </ul>
+          </div><!-- /.navbar-collapse -->
+        </div><!-- /row -->
+      </div><!-- /container -->
+    </nav>
+
+    <div class="container">
+      <div class="row">
+        <h1>Fuseki &ndash; documentation</h1>
+
+        <p><a href="http://jena.apache.org/documentation/serving_data/index.html"
+              >Apache Jena Fuseki</a></p>
+
+        <h4>Standards</h4>
+        <ul>
+          <li> <a href="http://www.w3.org/TR/sparql11-query/">SPARQL 1.1 Query</a></li>
+          <li> <a href="http://www.w3.org/TR/sparql11-update/">SPARQL 1.1 Update</a></li>
+          <li> <a href="http://www.w3.org/TR/sparql11-protocol/">SPARQL 1.1 Protocol</a></li>
+          <li> <a href="http://www.w3.org/TR/sparql11-http-rdf-update/">SPARQL 1.1 Graph Store HTTP Protocol</a></li>
+    </ul>
+      </div>
+    </div>
+
+    <script src="../js/lib/jquery-1.10.2.min.js"></script>
+    <script src="../js/lib/bootstrap.min.js"></script>
+  </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/FontAwesome.otf
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/FontAwesome.otf b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/FontAwesome.otf
new file mode 100644
index 0000000..3461e3f
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/FontAwesome.otf differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.eot
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.eot b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.eot
new file mode 100755
index 0000000..6cfd566
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.eot differ


[77/93] [abbrv] jena git commit: Remove commented section - use instead

Posted by rv...@apache.org.
Remove commented section - use <outputFileNameMapping> instead


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

Branch: refs/heads/hadoop-rdf
Commit: eb9400df7daeda740099f466587cf2c0474a6714
Parents: 9daed3a
Author: Andy Seaborne <an...@apache.org>
Authored: Wed Jan 7 15:49:45 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Wed Jan 7 15:49:45 2015 +0000

----------------------------------------------------------------------
 jena-fuseki2/jena-fuseki-dist/assembly-dist.xml | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/eb9400df/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml b/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml
index d1c22b5..3c6c66e 100644
--- a/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml
+++ b/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml
@@ -17,8 +17,8 @@
 -->
 
 <!-- 
-The distribution.
-Assumes jar made and onejar has been assembled.
+  The distribution.
+  Assumes jar made and onejar has been assembled.
 -->
 
 <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
@@ -57,18 +57,6 @@ Assumes jar made and onejar has been assembled.
 
   <files>
     
-    <!--
-    <file>
-      <source>${project.build.directory}/${server.jar.name}.jar</source>
-      <outputDirectory></outputDirectory>
-      <destName>fuseki-server.jar</destName>
-    </file>
-    <file>
-      <source>${project.build.directory}/${project.build.finalName}.war</source>
-      <outputDirectory></outputDirectory>
-      <destName>fuseki-server.war</destName>
-    </file>
-    -->
     <file>
       <source>dist/LICENSE</source>
       <destName>LICENSE</destName>


[29/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/bootstrap-select.min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/bootstrap-select.min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/bootstrap-select.min.js
new file mode 100644
index 0000000..3cfa786
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/bootstrap-select.min.js
@@ -0,0 +1,8 @@
+/*!
+ * bootstrap-select v1.5.4
+ * http://silviomoreto.github.io/bootstrap-select/
+ *
+ * Copyright 2013 bootstrap-select
+ * Licensed under the MIT license
+ */
+;!function(b){b.expr[":"].icontains=function(e,c,d){return b(e).text().toUpperCase().indexOf(d[3].toUpperCase())>=0};var a=function(d,c,f){if(f){f.stopPropagation();f.preventDefault()}this.$element=b(d);this.$newElement=null;this.$button=null;this.$menu=null;this.$lis=null;this.options=b.extend({},b.fn.selectpicker.defaults,this.$element.data(),typeof c=="object"&&c);if(this.options.title===null){this.options.title=this.$element.attr("title")}this.val=a.prototype.val;this.render=a.prototype.render;this.refresh=a.prototype.refresh;this.setStyle=a.prototype.setStyle;this.selectAll=a.prototype.selectAll;this.deselectAll=a.prototype.deselectAll;this.init()};a.prototype={constructor:a,init:function(){var c=this,d=this.$element.attr("id");this.$element.hide();this.multiple=this.$element.prop("multiple");this.autofocus=this.$element.prop("autofocus");this.$newElement=this.createView();this.$element.after(this.$newElement);this.$menu=this.$newElement.find("> .dropdown-menu");this.$button=th
 is.$newElement.find("> button");this.$searchbox=this.$newElement.find("input");if(d!==undefined){this.$button.attr("data-id",d);b('label[for="'+d+'"]').click(function(f){f.preventDefault();c.$button.focus()})}this.checkDisabled();this.clickListener();if(this.options.liveSearch){this.liveSearchListener()}this.render();this.liHeight();this.setStyle();this.setWidth();if(this.options.container){this.selectPosition()}this.$menu.data("this",this);this.$newElement.data("this",this)},createDropdown:function(){var c=this.multiple?" show-tick":"";var d=this.$element.parent().hasClass("input-group")?" input-group-btn":"";var i=this.autofocus?" autofocus":"";var h=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;</button>'+this.options.header+"</div>":"";var g=this.options.liveSearch?'<div class="bootstrap-select-searchbox"><input type="text" class="input-block-level form-control" /></div>':"";var f=this.options.actionsBox?'<div class
 ="bs-actionsbox"><div class="btn-group btn-block"><button class="actions-btn bs-select-all btn btn-sm btn-default">Select All</button><button class="actions-btn bs-deselect-all btn btn-sm btn-default">Deselect All</button></div></div>':"";var e='<div class="btn-group bootstrap-select'+c+d+'"><button type="button" class="btn dropdown-toggle selectpicker" data-toggle="dropdown"'+i+'><span class="filter-option pull-left"></span>&nbsp;<span class="caret"></span></button><div class="dropdown-menu open">'+h+g+f+'<ul class="dropdown-menu inner selectpicker" role="menu"></ul></div></div>';return b(e)},createView:function(){var c=this.createDropdown();var d=this.createLi();c.find("ul").append(d);return c},reloadLi:function(){this.destroyLi();var c=this.createLi();this.$menu.find("ul").append(c)},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var d=this,e=[],c="";this.$element.find("option").each(function(){var i=b(this);var g=i.attr("class")||"";var h=i.attr("style"
 )||"";var m=i.data("content")?i.data("content"):i.html();var k=i.data("subtext")!==undefined?'<small class="muted text-muted">'+i.data("subtext")+"</small>":"";var j=i.data("icon")!==undefined?'<i class="'+d.options.iconBase+" "+i.data("icon")+'"></i> ':"";if(j!==""&&(i.is(":disabled")||i.parent().is(":disabled"))){j="<span>"+j+"</span>"}if(!i.data("content")){m=j+'<span class="text">'+m+k+"</span>"}if(d.options.hideDisabled&&(i.is(":disabled")||i.parent().is(":disabled"))){e.push('<a style="min-height: 0; padding: 0"></a>')}else{if(i.parent().is("optgroup")&&i.data("divider")!==true){if(i.index()===0){var l=i.parent().attr("label");var n=i.parent().data("subtext")!==undefined?'<small class="muted text-muted">'+i.parent().data("subtext")+"</small>":"";var f=i.parent().data("icon")?'<i class="'+i.parent().data("icon")+'"></i> ':"";l=f+'<span class="text">'+l+n+"</span>";if(i[0].index!==0){e.push('<div class="div-contain"><div class="divider"></div></div><dt>'+l+"</dt>"+d.createA(m,"o
 pt "+g,h))}else{e.push("<dt>"+l+"</dt>"+d.createA(m,"opt "+g,h))}}else{e.push(d.createA(m,"opt "+g,h))}}else{if(i.data("divider")===true){e.push('<div class="div-contain"><div class="divider"></div></div>')}else{if(b(this).data("hidden")===true){e.push("<a></a>")}else{e.push(d.createA(m,g,h))}}}}});b.each(e,function(g,h){var f=h==="<a></a>"?'class="hide is-hidden"':"";c+='<li rel="'+g+'"'+f+">"+h+"</li>"});if(!this.multiple&&this.$element.find("option:selected").length===0&&!this.options.title){this.$element.find("option").eq(0).prop("selected",true).attr("selected","selected")}return b(c)},createA:function(e,c,d){return'<a tabindex="0" class="'+c+'" style="'+d+'">'+e+'<i class="'+this.options.iconBase+" "+this.options.tickIcon+' icon-ok check-mark"></i></a>'},render:function(e){var d=this;if(e!==false){this.$element.find("option").each(function(i){d.setDisabled(i,b(this).is(":disabled")||b(this).parent().is(":disabled"));d.setSelected(i,b(this).is(":selected"))})}this.tabIndex();va
 r h=this.$element.find("option:selected").map(function(){var k=b(this);var j=k.data("icon")&&d.options.showIcon?'<i class="'+d.options.iconBase+" "+k.data("icon")+'"></i> ':"";var i;if(d.options.showSubtext&&k.attr("data-subtext")&&!d.multiple){i=' <small class="muted text-muted">'+k.data("subtext")+"</small>"}else{i=""}if(k.data("content")&&d.options.showContent){return k.data("content")}else{if(k.attr("title")!==undefined){return k.attr("title")}else{return j+k.html()+i}}}).toArray();var g=!this.multiple?h[0]:h.join(this.options.multipleSeparator);if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var c=this.options.selectedTextFormat.split(">");var f=this.options.hideDisabled?":not([disabled])":"";if((c.length>1&&h.length>c[1])||(c.length==1&&h.length>=2)){g=this.options.countSelectedText.replace("{0}",h.length).replace("{1}",this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+f).length)}}this.options.title=this.$element.attr("titl
 e");if(!g){g=this.options.title!==undefined?this.options.title:this.options.noneSelectedText}this.$button.attr("title",b.trim(g));this.$newElement.find(".filter-option").html(g)},setStyle:function(e,d){if(this.$element.attr("class")){this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device/gi,""))}var c=e?e:this.options.style;if(d=="add"){this.$button.addClass(c)}else{if(d=="remove"){this.$button.removeClass(c)}else{this.$button.removeClass(this.options.style);this.$button.addClass(c)}}},liHeight:function(){if(this.options.size===false){return}var f=this.$menu.parent().clone().find("> .dropdown-toggle").prop("autofocus",false).end().appendTo("body"),g=f.addClass("open").find("> .dropdown-menu"),e=g.find("li > a").outerHeight(),d=this.options.header?g.find(".popover-title").outerHeight():0,h=this.options.liveSearch?g.find(".bootstrap-select-searchbox").outerHeight():0,c=this.options.actionsBox?g.find(".bs-actionsbox").outerHeight():0;f.remove();this.$
 newElement.data("liHeight",e).data("headerHeight",d).data("searchHeight",h).data("actionsHeight",c)},setSize:function(){var i=this,d=this.$menu,j=d.find(".inner"),u=this.$newElement.outerHeight(),f=this.$newElement.data("liHeight"),s=this.$newElement.data("headerHeight"),m=this.$newElement.data("searchHeight"),h=this.$newElement.data("actionsHeight"),l=d.find("li .divider").outerHeight(true),r=parseInt(d.css("padding-top"))+parseInt(d.css("padding-bottom"))+parseInt(d.css("border-top-width"))+parseInt(d.css("border-bottom-width")),p=this.options.hideDisabled?":not(.disabled)":"",o=b(window),g=r+parseInt(d.css("margin-top"))+parseInt(d.css("margin-bottom"))+2,q,v,t,k=function(){v=i.$newElement.offset().top-o.scrollTop();t=o.height()-v-u};k();if(this.options.header){d.css("padding-top",0)}if(this.options.size=="auto"){var e=function(){var x,w=i.$lis.not(".hide");k();q=t-g;if(i.options.dropupAuto){i.$newElement.toggleClass("dropup",(v>t)&&((q-g)<d.height()))}if(i.$newElement.hasClass("
 dropup")){q=v-g}if((w.length+w.find("dt").length)>3){x=f*3+g-2}else{x=0}d.css({"max-height":q+"px",overflow:"hidden","min-height":x+s+m+h+"px"});j.css({"max-height":q-s-m-h-r+"px","overflow-y":"auto","min-height":Math.max(x-r,0)+"px"})};e();this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",e);b(window).off("resize.getSize").on("resize.getSize",e);b(window).off("scroll.getSize").on("scroll.getSize",e)}else{if(this.options.size&&this.options.size!="auto"&&d.find("li"+p).length>this.options.size){var n=d.find("li"+p+" > *").filter(":not(.div-contain)").slice(0,this.options.size).last().parent().index();var c=d.find("li").slice(0,n+1).find(".div-contain").length;q=f*this.options.size+c*l+r;if(i.options.dropupAuto){this.$newElement.toggleClass("dropup",(v>t)&&(q<d.height()))}d.css({"max-height":q+s+m+h+"px",overflow:"hidden"});j.css({"max-height":q-r+"px","overflow-y":"auto"})}}},setWidth:function(){if(this.options.width=="auto"){this.$
 menu.css("min-width","0");var e=this.$newElement.clone().appendTo("body");var c=e.find("> .dropdown-menu").css("width");var d=e.css("width","auto").find("> button").css("width");e.remove();this.$newElement.css("width",Math.max(parseInt(c),parseInt(d))+"px")}else{if(this.options.width=="fit"){this.$menu.css("min-width","");this.$newElement.css("width","").addClass("fit-width")}else{if(this.options.width){this.$menu.css("min-width","");this.$newElement.css("width",this.options.width)}else{this.$menu.css("min-width","");this.$newElement.css("width","")}}}if(this.$newElement.hasClass("fit-width")&&this.options.width!=="fit"){this.$newElement.removeClass("fit-width")}},selectPosition:function(){var e=this,d="<div />",f=b(d),h,g,c=function(i){f.addClass(i.attr("class").replace(/form-control/gi,"")).toggleClass("dropup",i.hasClass("dropup"));h=i.offset();g=i.hasClass("dropup")?0:i[0].offsetHeight;f.css({top:h.top+g,left:h.left,width:i[0].offsetWidth,position:"absolute"})};this.$newElement.
 on("click",function(){if(e.isDisabled()){return}c(b(this));f.appendTo(e.options.container);f.toggleClass("open",!b(this).hasClass("open"));f.append(e.$menu)});b(window).resize(function(){c(e.$newElement)});b(window).on("scroll",function(){c(e.$newElement)});b("html").on("click",function(i){if(b(i.target).closest(e.$newElement).length<1){f.removeClass("open")}})},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement);if(this.options.container){this.$menu.hide()}},refresh:function(){this.$lis=null;this.reloadLi();this.render();this.setWidth();this.setStyle();this.checkDisabled();this.liHeight()},update:function(){this.reloadLi();this.setWidth();this.setStyle();this.checkDisabled();this.liHeight()},setSelected:function(c,d){if(this.$lis==null){this.$lis=this.$menu.find("li")}b(this.$lis[c]).toggleClass("selected",d)},setDisabled:function(c,d){if(this.$lis==null){this.$lis=this.$menu.find("li")}if(d){b(this.$lis[c]).addClass("disabled").find("a").attr("href
 ","#").attr("tabindex",-1)}else{b(this.$lis[c]).removeClass("disabled").find("a").removeAttr("href").attr("tabindex",0)}},isDisabled:function(){return this.$element.is(":disabled")},checkDisabled:function(){var c=this;if(this.isDisabled()){this.$button.addClass("disabled").attr("tabindex",-1)}else{if(this.$button.hasClass("disabled")){this.$button.removeClass("disabled")}if(this.$button.attr("tabindex")==-1){if(!this.$element.data("tabindex")){this.$button.removeAttr("tabindex")}}}this.$button.click(function(){return !c.isDisabled()})},tabIndex:function(){if(this.$element.is("[tabindex]")){this.$element.data("tabindex",this.$element.attr("tabindex"));this.$button.attr("tabindex",this.$element.data("tabindex"))}},clickListener:function(){var c=this;b("body").on("touchstart.dropdown",".dropdown-menu",function(d){d.stopPropagation()});this.$newElement.on("click",function(){c.setSize();if(!c.options.liveSearch&&!c.multiple){setTimeout(function(){c.$menu.find(".selected a").focus()},10)}
 });this.$menu.on("click","li a",function(n){var t=b(this).parent().index(),m=c.$element.val(),i=c.$element.prop("selectedIndex");if(c.multiple){n.stopPropagation()}n.preventDefault();if(!c.isDisabled()&&!b(this).parent().hasClass("disabled")){var l=c.$element.find("option"),d=l.eq(t),f=d.prop("selected"),r=d.parent("optgroup"),p=c.options.maxOptions,h=r.data("maxOptions")||false;if(!c.multiple){l.prop("selected",false);d.prop("selected",true);c.$menu.find(".selected").removeClass("selected");c.setSelected(t,true)}else{d.prop("selected",!f);c.setSelected(t,!f);if((p!==false)||(h!==false)){var o=p<l.filter(":selected").length,j=h<r.find("option:selected").length,s=c.options.maxOptionsText,g=s[0].replace("{n}",p),q=s[1].replace("{n}",h),k=b('<div class="notify"></div>');if((p&&o)||(h&&j)){if(s[2]){g=g.replace("{var}",s[2][p>1?0:1]);q=q.replace("{var}",s[2][h>1?0:1])}d.prop("selected",false);c.$menu.append(k);if(p&&o){k.append(b("<div>"+g+"</div>"));c.$element.trigger("maxReached.bs.sel
 ect")}if(h&&j){k.append(b("<div>"+q+"</div>"));c.$element.trigger("maxReachedGrp.bs.select")}setTimeout(function(){c.setSelected(t,false)},10);k.delay(750).fadeOut(300,function(){b(this).remove()})}}}if(!c.multiple){c.$button.focus()}else{if(c.options.liveSearch){c.$searchbox.focus()}}if((m!=c.$element.val()&&c.multiple)||(i!=c.$element.prop("selectedIndex")&&!c.multiple)){c.$element.change()}}});this.$menu.on("click","li.disabled a, li dt, li .div-contain, .popover-title, .popover-title :not(.close)",function(d){if(d.target==this){d.preventDefault();d.stopPropagation();if(!c.options.liveSearch){c.$button.focus()}else{c.$searchbox.focus()}}});this.$menu.on("click",".popover-title .close",function(){c.$button.focus()});this.$searchbox.on("click",function(d){d.stopPropagation()});this.$menu.on("click",".actions-btn",function(d){if(c.options.liveSearch){c.$searchbox.focus()}else{c.$button.focus()}d.preventDefault();d.stopPropagation();if(b(this).is(".bs-select-all")){c.selectAll()}else
 {c.deselectAll()}c.$element.change()});this.$element.change(function(){c.render(false)})},liveSearchListener:function(){var d=this,c=b('<li class="no-results"></li>');this.$newElement.on("click.dropdown.data-api",function(){d.$menu.find(".active").removeClass("active");if(!!d.$searchbox.val()){d.$searchbox.val("");d.$lis.not(".is-hidden").removeClass("hide");if(!!c.parent().length){c.remove()}}if(!d.multiple){d.$menu.find(".selected").addClass("active")}setTimeout(function(){d.$searchbox.focus()},10)});this.$searchbox.on("input propertychange",function(){if(d.$searchbox.val()){d.$lis.not(".is-hidden").removeClass("hide").find("a").not(":icontains("+d.$searchbox.val()+")").parent().addClass("hide");if(!d.$menu.find("li").filter(":visible:not(.no-results)").length){if(!!c.parent().length){c.remove()}c.html(d.options.noneResultsText+' "'+d.$searchbox.val()+'"').show();d.$menu.find("li").last().after(c)}else{if(!!c.parent().length){c.remove()}}}else{d.$lis.not(".is-hidden").removeClass(
 "hide");if(!!c.parent().length){c.remove()}}d.$menu.find("li.active").removeClass("active");d.$menu.find("li").filter(":visible:not(.divider)").eq(0).addClass("active").find("a").focus();b(this).focus()});this.$menu.on("mouseenter","a",function(f){d.$menu.find(".active").removeClass("active");b(f.currentTarget).parent().not(".disabled").addClass("active")});this.$menu.on("mouseleave","a",function(){d.$menu.find(".active").removeClass("active")})},val:function(c){if(c!==undefined){this.$element.val(c);this.$element.change();return this.$element}else{return this.$element.val()}},selectAll:function(){if(this.$lis==null){this.$lis=this.$menu.find("li")}this.$element.find("option:enabled").prop("selected",true);b(this.$lis).filter(":not(.disabled)").addClass("selected");this.render(false)},deselectAll:function(){if(this.$lis==null){this.$lis=this.$menu.find("li")}this.$element.find("option:enabled").prop("selected",false);b(this.$lis).filter(":not(.disabled)").removeClass("selected");thi
 s.render(false)},keydown:function(p){var q,o,i,n,k,j,r,f,h,m,d,s,g={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};q=b(this);i=q.parent();if(q.is("input")){i=q.parent().parent()}m=i.data("this");if(m.options.liveSearch){i=q.parent().parent()}if(m.options.container){i=m.$menu}o=b("[role=menu] li:not(.divider) a",i);s=m.$menu.parent().hasClass("open");if(!s&&/([0-9]|[A-z])/.test(String.fromCharCode(p.keyCode))){if(!m.options.container){m.setSize();m.$menu.parent().addClass("open");s=m.$menu.parent().hasClass("open")}else{m.$newElement.trigger("click")}m.$searchbox.focus()}if(m.options.liveSearch){if(/(^9$|27)/.test(p.keyCode)&&s&&m.$menu.find(".active").length===0){p.preventDefault();m.$menu.pa
 rent().removeClass("open");m.$button.focus()}o=b("[role=menu] li:not(.divider):visible",i);if(!q.val()&&!/(38|40)/.test(p.keyCode)){if(o.filter(".active").length===0){o=m.$newElement.find("li").filter(":icontains("+g[p.keyCode]+")")}}}if(!o.length){return}if(/(38|40)/.test(p.keyCode)){n=o.index(o.filter(":focus"));j=o.parent(":not(.disabled):visible").first().index();r=o.parent(":not(.disabled):visible").last().index();k=o.eq(n).parent().nextAll(":not(.disabled):visible").eq(0).index();f=o.eq(n).parent().prevAll(":not(.disabled):visible").eq(0).index();h=o.eq(k).parent().prevAll(":not(.disabled):visible").eq(0).index();if(m.options.liveSearch){o.each(function(e){if(b(this).is(":not(.disabled)")){b(this).data("index",e)}});n=o.index(o.filter(".active"));j=o.filter(":not(.disabled):visible").first().data("index");r=o.filter(":not(.disabled):visible").last().data("index");k=o.eq(n).nextAll(":not(.disabled):visible").eq(0).data("index");f=o.eq(n).prevAll(":not(.disabled):visible").eq(0)
 .data("index");h=o.eq(k).prevAll(":not(.disabled):visible").eq(0).data("index")}d=q.data("prevIndex");if(p.keyCode==38){if(m.options.liveSearch){n-=1}if(n!=h&&n>f){n=f}if(n<j){n=j}if(n==d){n=r}}if(p.keyCode==40){if(m.options.liveSearch){n+=1}if(n==-1){n=0}if(n!=h&&n<k){n=k}if(n>r){n=r}if(n==d){n=j}}q.data("prevIndex",n);if(!m.options.liveSearch){o.eq(n).focus()}else{p.preventDefault();if(!q.is(".dropdown-toggle")){o.removeClass("active");o.eq(n).addClass("active").find("a").focus();q.focus()}}}else{if(!q.is("input")){var c=[],l,t;o.each(function(){if(b(this).parent().is(":not(.disabled)")){if(b.trim(b(this).text().toLowerCase()).substring(0,1)==g[p.keyCode]){c.push(b(this).parent().index())}}});l=b(document).data("keycount");l++;b(document).data("keycount",l);t=b.trim(b(":focus").text().toLowerCase()).substring(0,1);if(t!=g[p.keyCode]){l=1;b(document).data("keycount",l)}else{if(l>=c.length){b(document).data("keycount",0);if(l>c.length){l=1}}}o.eq(c[l-1]).focus()}}if(/(13|32|^9$)/.te
 st(p.keyCode)&&s){if(!/(32)/.test(p.keyCode)){p.preventDefault()}if(!m.options.liveSearch){b(":focus").click()}else{if(!/(32)/.test(p.keyCode)){m.$menu.find(".active a").click();q.focus()}}b(document).data("keycount",0)}if((/(^9$|27)/.test(p.keyCode)&&s&&(m.multiple||m.options.liveSearch))||(/(27)/.test(p.keyCode)&&!s)){m.$menu.parent().removeClass("open");m.$button.focus()}},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},destroy:function(){this.$newElement.remove();this.$element.remove()}};b.fn.selectpicker=function(e,f){var c=arguments;var g;var d=this.each(function(){if(b(this).is("select")){var m=b(this),l=m.data("selectpicker"),h=typeof e=="object"&&e;if(!l){m.data("selectpicker",(l=new a(this,h,f)))}else{if(h){for(var j in h){l.options[j]=h[j]}}}if(typeof e=="string"){var k=e;if(l[k] instanceof Function){[].shift.apply(c);g=l[k].apply(l,c)}else{g=l.options[k]}}}});if(g!==undefined){return g}else{return d}};b.fn.selectpicker.defaults={style:"b
 tn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nothing selected",noneResultsText:"No results match",countSelectedText:"{0} of {1} selected",maxOptionsText:["Limit reached ({n} {var} max)","Group limit reached ({n} {var} max)",["items","item"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,actionsBox:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:false};b(document).data("keycount",0).on("keydown",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",a.prototype.keydown).on("focusin.modal",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",function(c){c.stopPropagation()})}(window.jQuery);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/bootstrap.min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/bootstrap.min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/bootstrap.min.js
new file mode 100644
index 0000000..b04a0e8
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/bootstrap.min.js
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.
 Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).re
 moveAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-in
 dicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .p
 rev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.h
 asClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.a
 ttr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transition
 ing)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collap
 se")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in
 ")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("op
 en").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on(
 "keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidde
 n",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.o
 n("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.
 $backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",functi
 on(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector
 ?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="o
 ut",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHei
 ght:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b
 .left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.
 hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enabl
 e=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content
 :"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.
 $tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.fi
 nd(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li"
 ).addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this
 .activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DE
 FAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));va
 r i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetT
 op),b.affix(c)})})}(jQuery);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/html5shiv.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/html5shiv.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/html5shiv.js
new file mode 100644
index 0000000..784f221
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/html5shiv.js
@@ -0,0 +1,8 @@
+/*
+ HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+*/
+(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
+a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
+c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
+"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
+for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);


[56/93] [abbrv] jena git commit: Remove

Posted by rv...@apache.org.
Remove


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/20393b59
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/20393b59
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/20393b59

Branch: refs/heads/hadoop-rdf
Commit: 20393b594b87f56178de7c98e425a283196d089e
Parents: 63228de
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 18:09:41 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 18:09:41 2015 +0000

----------------------------------------------------------------------
 .../dependency-reduced-pom.xml                  | 93 --------------------
 1 file changed, 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/20393b59/jena-fuseki2/jena-fuseki-server/dependency-reduced-pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-server/dependency-reduced-pom.xml b/jena-fuseki2/jena-fuseki-server/dependency-reduced-pom.xml
deleted file mode 100644
index 270d99a..0000000
--- a/jena-fuseki2/jena-fuseki-server/dependency-reduced-pom.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<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">
-  <parent>
-    <artifactId>jena-fuseki</artifactId>
-    <groupId>org.apache.jena</groupId>
-    <version>2.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>jena-fuseki-server</artifactId>
-  <name>Apache Jena Fuseki - Server Standalone Jar</name>
-  <version>2.0.0-SNAPSHOT</version>
-  <description>Fuseki server - combined jar with built-in webserver.</description>
-  <url>http://jena.apache.org/</url>
-  <licenses>
-    <license>
-      <name>Apache 2.0 License</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
-    </license>
-  </licenses>
-  <organization>
-    <name>Apache Jena</name>
-    <url>http://jena.apache.org/</url>
-  </organization>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-shade-plugin</artifactId>
-        <version>2.1</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <shadedArtifactAttached>false</shadedArtifactAttached>
-          <transformers>
-            <transformer>
-              <mainClass>org.apache.jena.fuseki.FusekiCmd</mainClass>
-            </transformer>
-            <transformer />
-            <transformer />
-            <transformer>
-              <addHeader>false</addHeader>
-            </transformer>
-          </transformers>
-          <filters>
-            <filter>
-              <artifact>*:*</artifact>
-              <excludes>
-                <exclude>META-INF/*.SF</exclude>
-                <exclude>META-INF/*.DSA</exclude>
-                <exclude>META-INF/*.RSA</exclude>
-              </excludes>
-            </filter>
-          </filters>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  <repositories>
-    <repository>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <id>apache.snapshots</id>
-      <name>Apache Snapshot Repository</name>
-      <url>http://repository.apache.org/snapshots</url>
-    </repository>
-  </repositories>
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.11</version>
-      <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <artifactId>hamcrest-core</artifactId>
-          <groupId>org.hamcrest</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-  </dependencies>
-  <properties>
-    <this.root>${project.artifactId}-${project.version}</this.root>
-    <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
-    <build.time.xsd>${maven.build.timestamp}</build.time.xsd>
-  </properties>
-</project>
-


[71/93] [abbrv] jena git commit: Fix RIOT initialization.

Posted by rv...@apache.org.
Fix RIOT initialization.

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

Branch: refs/heads/hadoop-rdf
Commit: 6a121cab4b8464453da71943a6539889849cdb0e
Parents: 10296ff
Author: Andy Seaborne <an...@apache.org>
Authored: Wed Jan 7 10:17:44 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Wed Jan 7 10:17:44 2015 +0000

----------------------------------------------------------------------
 jena-core/src/main/java/jena/rdfcat.java | 61 ++++++++-------------------
 1 file changed, 17 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/6a121cab/jena-core/src/main/java/jena/rdfcat.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/jena/rdfcat.java b/jena-core/src/main/java/jena/rdfcat.java
index 8b94f80..13d257f 100644
--- a/jena-core/src/main/java/jena/rdfcat.java
+++ b/jena-core/src/main/java/jena/rdfcat.java
@@ -24,24 +24,25 @@ package jena;
 // Imports
 ///////////////
 
-import static jena.cmdline.CmdLineUtils.setLog4jConfiguration;
+import static jena.cmdline.CmdLineUtils.setLog4jConfiguration ;
 
-import java.io.OutputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.*;
+import java.io.OutputStream ;
+import java.util.* ;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import jena.cmdline.ArgDecl ;
+import jena.cmdline.ArgHandler ;
+import jena.cmdline.CommandLine ;
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
 
-import com.hp.hpl.jena.rdf.model.*;
-import com.hp.hpl.jena.rdf.model.impl.RDFWriterFImpl;
-import com.hp.hpl.jena.shared.NoWriterForLangException;
-import com.hp.hpl.jena.util.FileManager;
-import com.hp.hpl.jena.util.FileUtils;
-import com.hp.hpl.jena.vocabulary.*;
-
-import jena.cmdline.*;
+import com.hp.hpl.jena.rdf.model.* ;
+import com.hp.hpl.jena.rdf.model.impl.IO_Ctl ;
+import com.hp.hpl.jena.rdf.model.impl.RDFWriterFImpl ;
+import com.hp.hpl.jena.shared.NoWriterForLangException ;
+import com.hp.hpl.jena.util.FileManager ;
+import com.hp.hpl.jena.util.FileUtils ;
+import com.hp.hpl.jena.vocabulary.OWL ;
+import com.hp.hpl.jena.vocabulary.RDFS ;
 
 
 /**
@@ -445,35 +446,7 @@ public class rdfcat
      * Enable the new RIOT parser subsystem if it is available
      */
     private void enableRIOTParser() {
-        try {
-            Class<?> sysRIOT = Class.forName( "org.openjena.riot.SysRIOT" );
-            Method initMethod = sysRIOT.getMethod( "init" );
-            initMethod.invoke( null );
-        }
-        catch (ClassNotFoundException e) {
-            // log if we're in debug mode, but otherwise ignore
-//            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
-        catch (SecurityException e) {
-            // log if we're in debug mode, but otherwise ignore
-            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
-        catch (NoSuchMethodException e) {
-            // log if we're in debug mode, but otherwise ignore
-            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
-        catch (IllegalArgumentException e) {
-            // log if we're in debug mode, but otherwise ignore
-            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
-        catch (IllegalAccessException e) {
-            // log if we're in debug mode, but otherwise ignore
-            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
-        catch (InvocationTargetException e) {
-            // log if we're in debug mode, but otherwise ignore
-            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
+        IO_Ctl.init(); 
     }
 
     //==============================================================================


[26/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-ui.min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-ui.min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-ui.min.js
new file mode 100644
index 0000000..b1523d1
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-ui.min.js
@@ -0,0 +1,7 @@
+/*! jQuery UI - v1.11.2 - 2014-12-16
+* http://jqueryui.com
+* Includes: core.js, widget.js, mouse.js, sortable.js
+* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
+
+(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var a,n,o,r=t.nodeName.toLowerCase();return"area"===r?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(o=e("img[usemap='#"+n+"']")[0],!!o&&i(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,a=t?/(auto|scroll|hidden)/:/(auto|scroll)/,n=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:a.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))
 }).eq(0);return"fixed"!==i&&n.length?n:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),a=isNaN(s);return(a||s>=0)&&t(i,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,n){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),n&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===i?["Left","Right"]:["Top","Bottom"],n=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.inn
 erHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(n,s(this,t)+"px")})},e.fn["outer"+i]=function(t,a){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(n,s(this,t,!0,a)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mouse
 down";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,a=e(this[0]);a.length&&a[0]!==document;){if(i=a.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i,s){var a,n=e.plugins[t];if(n&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(a=0;n.length>a;a++)e.options[n[a][0]]&&n[a][1].apply(e.element,i)}};var s=0,a=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,a,n;for(n=0;null!=(a=i[n]);n++)try{s=e._data(a,"events"),s&&s.remove&&e(a).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=f
 unction(t,i,s){var a,n,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],a=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[l]=e[l]||{},n=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,n,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},a=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,n=this._superApply;return this._super=e,this._superApply=a,t=s.apply(this,arguments),this._super=i,this._superApply=n,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:n?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(e.each(n._childConstructors,function(t,i){var s=i.prototype;e.
 widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,n=a.call(arguments,1),o=0,r=n.length;r>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(n){var o="string"==typeof n,r=a.call(arguments,1),h=this;return n=!o&&r.length?e.widget.extend.apply(null,[n].concat(r)):n,o?this.each(function(){var i,a=e.data(this,s);return"instance"===n?(h=a,!1):a?e.isFunction(a[n])&&"_"!==n.charAt(0)?(i=a[n].apply(a,r),i!==a&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+n+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+n+"'")}):this.each(function(){var t=e.data(this,
 s);t?(t.option(n||{}),t._init&&t._init()):e.data(this,s,new i(n,this))}),h}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind
 (this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,a,n,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(a=o[t]=e.widget.extend({},this.options[t]),n=0;s.length-1>n;n++)a[s[n]]=a[s[n]]||{},a=a[s[n]];if(t=s.pop(),1===arguments.length)return void 0===a[t]?null:a[t];a[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.o
 ptions[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var a,n=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=a=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,a=this.widget()),e.each(s,function(s,o){function r(){return t||n.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?n[o]:o).apply(n,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+n.eventNamespace,u=h[2];u?a.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get())
 ,this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var a,n,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],n=i.originalEvent)for(a in n)a in i||(i[a]=n[a]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},functi
 on(t,i){e.Widget.prototype["_"+t]=function(s,a,n){"string"==typeof a&&(a={effect:a});var o,r=a?a===!0||"number"==typeof a?i:a.effect||i:t;a=a||{},"number"==typeof a&&(a={duration:a}),o=!e.isEmptyObject(a),a.complete=n,a.delay&&s.delay(a.delay),o&&e.effects&&e.effects.effect[r]?s[t](a):r!==t&&s[r]?s[r](a.duration,a.easing,n):s.queue(function(i){e(this)[t](),n&&n.call(s[0]),i()})}}),e.widget;var n=!1;e(document).mouseup(function(){n=!1}),e.widget("ui.mouse",{version:"1.11.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.un
 bind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,a="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!a&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bin
 d("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),n=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(t
 his._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){var e=this.options;this.containerCache
 ={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||this._isFloating(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,a=!1,n=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(
 t),e(t.target).parents().each(function(){return e.data(this,n.widgetName+"-item")===n?(s=e(this),!1):void 0}),e.data(t.target,n.widgetName+"-item")===n&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find("*").addBack().each(function(){this===t.target&&(a=!0)}),a)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,s){var a,n,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosit
 ion(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",o.cursor),this.storedStylesheet=e("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(n)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelper
 Proportions(),!s)for(a=this.containers.length-1;a>=0;a--)this.containers[a]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,a,n,o=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:t.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<
 o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:t.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(t.pageY-e(document).scrollTop()<o.scrollSensitivity?r=e(document).scrollTop(e(document).scrollTop()-o.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<o.scrollSensitivity&&(r=e(document).scrollTop(e(document).scrollTop()+o.scrollSpeed)),t.pageX-e(document).scrollLeft()<o.scrollSensitivity?r=e(document).scrollLeft(e(document).scrollLeft()-o.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<o.scrollSensitivity&&(r=e(document).scrollLeft(e(document).scrollLeft()+o.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.ax
 is&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],a=s.item[0],n=this._intersectsWithPointer(s),n&&s.instance===this.currentContainer&&a!==this.currentItem[0]&&this.placeholder[1===n?"next":"prev"]()[0]!==a&&!e.contains(this.placeholder[0],a)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],a):!0)){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,a=this.placeholder.offset(),n=this.options.axis,o={};n&&"x"!==n||(o.left=a.left-this.offset.parent.left-this.margins.left+(this.o
 ffsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(o.top=a.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper
 .remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,a=s+this.helperProportions.height,n=e.left,o=n+e.width,r=e.top,h=r+e.height,l=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||s+l>r&&h>s+l,c="y"===this.options.axis||t+u>n
 &&o>t+u,p=d&&c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:t+this.helperProportions.width/2>n&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>a-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),s=t&&i,a=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return s?this.floating?n&&"right"===n||"down"===a?2:1:a&&("down"===a?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this.
 _getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?"right"===a&&i||"left"===a&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){r.push(this)}var s,a,n,o,r=[],h=[],l=this._connectWith();if(l&&t)for(s=l.length-1;s>=0;s--)for(n=e(l[s]),a=n.length-1;a>=0;a--)o=e.data(n[a],this.widgetFullName),o&&o!==this&&!o.options.disabled&&h.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not("
 .ui-sortable-placeholder"),o]);for(h.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,a,n,o,r,h,l,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(i=c.length-1;i>=0;i--)for(a=e(c[i]),s=a.length-1;s>=0;s--)n=e.data(a[s],this.widgetFullName),n&&n!==this&&!n.options.disabled&&(d.push([e.isFunction(n.options.items)?n.options.items.call(n
 .element[0],t,{item:this.currentItem}):e(n.options.items,n.element),n]),this.containers.push(n));for(i=d.length-1;i>=0;i--)for(o=d[i][1],r=d[i][0],s=0,l=r.length;l>s;s++)h=e(r[s]),h.data(this.widgetName+"-item",o),u.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,a,n;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(a=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=a.outerWidth(),s.height=a.outerHeight()),n=a.offset(),s.left=n.left,s.top=n.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)n=this.containers[i].element.offset(),this.containers[i].containerCache.left=n.left,this.containers[i].containerCache.top=n.top,this.c
 ontainers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,s=t.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentItem[0].nodeName.toLowerCase(),a=e("<"+s+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?t.currentItem.children().each(function(){e("<td>&#160;</td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(a)}):"img"===s&&a.attr("src",t.currentItem.attr("src")),i||a.css("visibility","hidden"),a},update:function(e,a){(!i||s.forcePlaceholderSize)&&(a.height()||a.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),a.width()||a.width(t.currentItem.innerWidth()-parseInt(t
 .currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var i,s,a,n,o,r,h,l,u,d,c=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(c&&e.contains(this.containers[i].element[0],c.element[0]))continue;c=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(a=1e4,n=null,u=c.floating||this._isFloating(this.currentItem),o=u?"left":"top",r=u?"width":"height",d=
 u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[o],l=!1,t[d]-h>this.items[s][r]/2&&(l=!0),a>Math.abs(t[d]-h)&&(a=Math.abs(t[d]-h),n=this.items[s],this.direction=l?"up":"down"));if(!n&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;n?this._rearrange(t,n,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=th
 is.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bott
 om"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargi
 ns:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,a=this.options;"parent"===a.containment&&(a.containment=this.helper[0].parentNode),("document"===a.containment||"window"===a.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===a.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===a.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(a.containment)||(t=e(a.containment)[0],i=e(a.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLef
 tWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])
+},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,n=/(html|body)/i.test(a[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():n?0:a.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():n?0:a.scrollLeft())*s}},_generatePosition:function(t){var i,s,a=this.options,n=t.pageX,o=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffse
 t()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(n=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(n=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),a.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/a.grid[1])*a.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-a.grid[1]:i+a.grid[1]:i,s=this.originalPageX+Math.round((n-this.originalPageX)/a.grid[0])*a.grid[0],n=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-a.grid[0]:s+a.grid[0]:s)),{top:o-this.offset.click
 .top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var a=this.counter;this._delay(function(){a===this.counter&&this.refreshPositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,a=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this
 .currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&a.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||a.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(a.push(function(e){this._trigger("remove",e,this._uiHash())}),a.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),a.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||a.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(a.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.docum
 ent.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(s=0;a.length>s;s++)a[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}})});
\ No newline at end of file


[93/93] [abbrv] jena git commit: Fix missing license header introduced by JENA-847 changes

Posted by rv...@apache.org.
Fix missing license header introduced by JENA-847 changes


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/72d29e63
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/72d29e63
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/72d29e63

Branch: refs/heads/master
Commit: 72d29e631447cc41c10f727b0c599e0e0ed8008b
Parents: 4ee8d9e
Author: Rob Vesse <rv...@apache.org>
Authored: Wed Jan 14 10:30:15 2015 +0000
Committer: Rob Vesse <rv...@apache.org>
Committed: Wed Jan 14 10:30:15 2015 +0000

----------------------------------------------------------------------
 jena-parent/pom.xml                               |  2 +-
 .../apache/jena/security/AssemblerConstants.java  | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/72d29e63/jena-parent/pom.xml
----------------------------------------------------------------------
diff --git a/jena-parent/pom.xml b/jena-parent/pom.xml
index e399b5a..5a303f6 100644
--- a/jena-parent/pom.xml
+++ b/jena-parent/pom.xml
@@ -343,7 +343,7 @@
       <plugin>
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
-	<version>0.11</version>
+        <version>0.11</version>
         <executions>
           <execution>
             <id>rat-checks</id>

http://git-wip-us.apache.org/repos/asf/jena/blob/72d29e63/jena-security/src/main/java/org/apache/jena/security/AssemblerConstants.java
----------------------------------------------------------------------
diff --git a/jena-security/src/main/java/org/apache/jena/security/AssemblerConstants.java b/jena-security/src/main/java/org/apache/jena/security/AssemblerConstants.java
index 43c2034..ca65b7a 100644
--- a/jena-security/src/main/java/org/apache/jena/security/AssemblerConstants.java
+++ b/jena-security/src/main/java/org/apache/jena/security/AssemblerConstants.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.jena.security;
 
 import com.hp.hpl.jena.rdf.model.Property;


[88/93] [abbrv] jena git commit: Reformat

Posted by rv...@apache.org.
Reformat

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/067e0994
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/067e0994
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/067e0994

Branch: refs/heads/hadoop-rdf
Commit: 067e09946f66b7f37747ef24be243f4ce6fff0e3
Parents: e89146d
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 12 20:17:36 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 12 20:17:36 2015 +0000

----------------------------------------------------------------------
 jena-iri/src/test/java/org/apache/jena/iri/TestExample.java | 9 ++++-----
 .../src/test/java/org/apache/jena/iri/TestMoreExamples.java | 5 +----
 2 files changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/067e0994/jena-iri/src/test/java/org/apache/jena/iri/TestExample.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/TestExample.java b/jena-iri/src/test/java/org/apache/jena/iri/TestExample.java
index cfe6a80..ce32940 100644
--- a/jena-iri/src/test/java/org/apache/jena/iri/TestExample.java
+++ b/jena-iri/src/test/java/org/apache/jena/iri/TestExample.java
@@ -154,12 +154,11 @@ public class TestExample extends TestCase
         
         IRI iri = f.create(uri);
         if (iri.hasViolation(false)) {
-            if (good) fail("Unexpected violation found: "+
-            ((iri.violations(false).next())).codeName()
-            
-            );
+            if (good) 
+                fail("Unexpected violation found: "+((iri.violations(false).next())).codeName());
         } else {
-            if (!good) fail("Expected a violation, none found.");
+            if (!good)
+                fail("Expected a violation, none found.");
         }
             
         

http://git-wip-us.apache.org/repos/asf/jena/blob/067e0994/jena-iri/src/test/java/org/apache/jena/iri/TestMoreExamples.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/TestMoreExamples.java b/jena-iri/src/test/java/org/apache/jena/iri/TestMoreExamples.java
index 7ae0371..e87b67e 100644
--- a/jena-iri/src/test/java/org/apache/jena/iri/TestMoreExamples.java
+++ b/jena-iri/src/test/java/org/apache/jena/iri/TestMoreExamples.java
@@ -202,7 +202,6 @@ public class TestMoreExamples extends TestCase implements
 //        System.err.println("runTest"+cnt + " " + getName());
        iri = getIRI();
        
-       
        assertEquals("violations",violations,getViolations());
        
        Iterator<Map.Entry<String, Map<String,String>>> it = methods.entrySet().iterator();
@@ -211,8 +210,7 @@ public class TestMoreExamples extends TestCase implements
            String m = ent.getKey();
            Map<String,String> attrs = ent.getValue();
            try {
-               Object r = IRI.class.getDeclaredMethod(m,TestCreator.nullSign)
-                .invoke(iri,new Object[]{});
+               Object r = IRI.class.getDeclaredMethod(m,TestCreator.nullSign).invoke(iri,new Object[]{});
                if (r==null)
                    assertEquals(attrs.get("nullValue"),"true");
                else
@@ -226,7 +224,6 @@ public class TestMoreExamples extends TestCase implements
                 if (t.getCause()!=null)
                     t= t.getCause();
                 String s = t.getMessage()!=null?t.getMessage():t.toString();
-                
                 assertEquals(attrs.get("exception"),s);
             }
        }


[48/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/dist/NOTICE
----------------------------------------------------------------------
diff --git a/jena-fuseki2/dist/NOTICE b/jena-fuseki2/dist/NOTICE
deleted file mode 100644
index a840c0b..0000000
--- a/jena-fuseki2/dist/NOTICE
+++ /dev/null
@@ -1,216 +0,0 @@
-Apache Jena - module Fuseki
-Copyright 2011-2013 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-Portions of this software were originally based on the following:
-  - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
-  - Copyright 2010, 2011 Epimorphics Ltd.
-  - Copyright 2010, 2011 Talis Systems Ltd.
-These have been licensed to the Apache Software Foundation under a software grant.
-
-- - - - - - - - - - - - - - - - - - - - - - - 
-
-slf4j:
- Copyright (c) 2004-2011 QOS.ch
- All rights reserved.
-
-- - - - - - - - - - - - - - - - - - - - - - -
-
-(c) Copyright 2003, Plugged In Software 
-This product includes software developed by
-PluggedIn Software under a BSD license.
-
-- - - - - - - - - - - - - - - - - - - - - - -
-
- Jetty Web Container
- Copyright 1995-2012 Mort Bay Consulting Pty Ltd.
-
-under the Apache 2.0 License. 
-
-The Jetty Web Container includes:
-
-UnixCrypt.java
-Copyright 1996 Aki Yoshida,
-modified April 2001  by Iris Van den Broeke, Daniel Deville.
-
-- - - - - - - - - - - - - - - - - - - - - - -
-
-From Apache HttpComponents Client:
-
-This project contains annotations derived from JCIP-ANNOTATIONS
-Copyright (c) 2005 Brian Goetz and Tim Peierls. See http://www.jcip.net
-
-- - - - - - - - - - - - - - - - - - - - - - -
-
-  Apache Xerces Java
-   Copyright 1999-2013 The Apache Software Foundation
-
-   This product includes software developed at
-   The Apache Software Foundation (http://www.apache.org/).
-
-   Portions of this software were originally based on the following:
-     - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
-     - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
-     - voluntary contributions made by Paul Eng on behalf of the 
-       Apache Software Foundation that were originally developed at iClick, Inc.,
-       software copyright (c) 1999.
-
-- - - - - - - - - - - - - - - - - - - - - - -
-
-From Apache Lucene:
-
-ICU4J, (under analysis/icu) is licensed under an MIT styles license
-and Copyright (c) 1995-2008 International Business Machines Corporation and others
-
-Some data files (under analysis/icu/src/data) are derived from Unicode data such
-as the Unicode Character Database. See http://unicode.org/copyright.html for more
-details.
-
-Brics Automaton (under core/src/java/org/apache/lucene/util/automaton) is 
-BSD-licensed, created by Anders Møller. See http://www.brics.dk/automaton/
-
-The levenshtein automata tables (under core/src/java/org/apache/lucene/util/automaton) were
-automatically generated with the moman/finenight FSA library, created by
-Jean-Philippe Barrette-LaPierre. This library is available under an MIT license,
-see http://sites.google.com/site/rrettesite/moman and 
-http://bitbucket.org/jpbarrette/moman/overview/
-
-This product includes code (JaspellTernarySearchTrie) from Java Spelling 
-Checking Package (jaspell): http://jaspell.sourceforge.net/
-License: The BSD License (http://www.opensource.org/licenses/bsd-license.php)
-
-The snowball stemmers in
-  analysis/common/src/java/net/sf/snowball
-were developed by Martin Porter and Richard Boulton.
-The snowball stopword lists in
-  analysis/common/src/resources/org/apache/lucene/analysis/snowball
-were developed by Martin Porter and Richard Boulton.
-The full snowball package is available from
-  http://snowball.tartarus.org/
-
-The KStem stemmer in
-  analysis/common/src/org/apache/lucene/analysis/en
-was developed by Bob Krovetz and Sergio Guzman-Lara (CIIR-UMass Amherst)
-under the BSD-license.
-
-The Arabic,Persian,Romanian,Bulgarian, and Hindi analyzers (common) come with a default
-stopword list that is BSD-licensed created by Jacques Savoy.
-See http://members.unine.ch/jacques.savoy/clef/index.html.
-
-The German,Spanish,Finnish,French,Hungarian,Italian,Portuguese,Russian and Swedish light stemmers
-(common) are based on BSD-licensed reference implementations created by Jacques Savoy and
-Ljiljana Dolamic.
-
-The Stempel analyzer (stempel) includes BSD-licensed software developed 
-by the Egothor project http://egothor.sf.net/, created by Leo Galambos, Martin Kvapil,
-and Edmond Nolan.
-
-The Polish analyzer (stempel) comes with a default
-stopword list that is BSD-licensed created by the Carrot2 project. The file resides
-in stempel/src/resources/org/apache/lucene/analysis/pl/stopwords.txt.
-See http://project.carrot2.org/license.html.
-
-The SmartChineseAnalyzer source code (smartcn) was
-provided by Xiaoping Gao and copyright 2009 by www.imdict.net.
-
-WordBreakTestUnicode_*.java (under modules/analysis/common/src/test/) 
-is derived from Unicode data such as the Unicode Character Database. 
-See http://unicode.org/copyright.html for more details.
-
-The Morfologik analyzer (morfologik) includes BSD-licensed software
-developed by Dawid Weiss and Marcin Miłkowski (http://morfologik.blogspot.com/).
-
-Morfologik uses data from Polish ispell/myspell dictionary
-(http://www.sjp.pl/slownik/en/) licenced on the terms of (inter alia)
-LGPL and Creative Commons ShareAlike.
-
-Morfologic includes data from BSD-licensed dictionary of Polish (SGJP)
-(http://sgjp.pl/morfeusz/)
-
-Servlet-api.jar and javax.servlet-*.jar are under the CDDL license, the original
-source code for this can be found at http://www.eclipse.org/jetty/downloads.php
-
-===========================================================================
-Kuromoji Japanese Morphological Analyzer - Apache Lucene Integration
-===========================================================================
-
-This software includes a binary and/or source version of data from
-
-  mecab-ipadic-2.7.0-20070801
-
-which can be obtained from
-
-  http://atilika.com/releases/mecab-ipadic/mecab-ipadic-2.7.0-20070801.tar.gz
-
-or
-
-  http://jaist.dl.sourceforge.net/project/mecab/mecab-ipadic/2.7.0-20070801/mecab-ipadic-2.7.0-20070801.tar.gz
-
-===========================================================================
-mecab-ipadic-2.7.0-20070801 Notice
-===========================================================================
-
-Nara Institute of Science and Technology (NAIST),
-the copyright holders, disclaims all warranties with regard to this
-software, including all implied warranties of merchantability and
-fitness, in no event shall NAIST be liable for
-any special, indirect or consequential damages or any damages
-whatsoever resulting from loss of use, data or profits, whether in an
-action of contract, negligence or other tortuous action, arising out
-of or in connection with the use or performance of this software.
-
-A large portion of the dictionary entries
-originate from ICOT Free Software.  The following conditions for ICOT
-Free Software applies to the current dictionary as well.
-
-Each User may also freely distribute the Program, whether in its
-original form or modified, to any third party or parties, PROVIDED
-that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear
-on, or be attached to, the Program, which is distributed substantially
-in the same form as set out herein and that such intended
-distribution, if actually made, will neither violate or otherwise
-contravene any of the laws and regulations of the countries having
-jurisdiction over the User or the intended distribution itself.
-
-NO WARRANTY
-
-The program was produced on an experimental basis in the course of the
-research and development conducted during the project and is provided
-to users as so produced on an experimental basis.  Accordingly, the
-program is provided without any warranty whatsoever, whether express,
-implied, statutory or otherwise.  The term "warranty" used herein
-includes, but is not limited to, any warranty of the quality,
-performance, merchantability and fitness for a particular purpose of
-the program and the nonexistence of any infringement or violation of
-any right of any third party.
-
-Each user of the program will agree and understand, and be deemed to
-have agreed and understood, that there is no warranty whatsoever for
-the program and, accordingly, the entire risk arising from or
-otherwise connected with the program is assumed by the user.
-
-Therefore, neither ICOT, the copyright holder, or any other
-organization that participated in or was otherwise related to the
-development of the program and their respective officials, directors,
-officers and other employees shall be held liable for any and all
-damages, including, without limitation, general, special, incidental
-and consequential damages, arising out of or otherwise in connection
-with the use or inability to use the program or any product, material
-or result produced or otherwise obtained by using the program,
-regardless of whether they have been advised of, or otherwise had
-knowledge of, the possibility of such damages at any time during the
-project or thereafter.  Each user will be deemed to have agreed to the
-foregoing by his or her commencement of use of the program.  The term
-"use" as used herein includes, but is not limited to, the use,
-modification, copying and distribution of the program and the
-production of secondary products from the program.
-
-In the case where the program, whether in its original form or
-modified, was distributed or delivered to or received by a user from
-any person, organization or entity other than ICOT, unless it makes or
-grants independently of ICOT any specific warranty to the user in
-writing, such person, organization or entity, will also be exempted
-from and not be held liable to the user for any such damages as noted
-above as far as the program is concerned.

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/dwim
----------------------------------------------------------------------
diff --git a/jena-fuseki2/dwim b/jena-fuseki2/dwim
deleted file mode 100755
index a541688..0000000
--- a/jena-fuseki2/dwim
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-# 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.
-
-curl -XPOST --header "Content-type: text/trig" --data-binary @D.trig \
-     http://localhost:3030/ds/data

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/dwim-upload
----------------------------------------------------------------------
diff --git a/jena-fuseki2/dwim-upload b/jena-fuseki2/dwim-upload
deleted file mode 100755
index 903561d..0000000
--- a/jena-fuseki2/dwim-upload
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-# 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.
-
-# How to do a file upload in curl
-
-# GSP strict
-U='http://localhost:3030/ds/data?graph=http://example/G'
-# PUT
-## curl --upload-file D.ttl --header 'Content-Type: text/turtle' "$U"
-
-# POST
-curl -XPOST --upload-file D.ttl --header 'Content-Type: text/turtle' "$U"
-
-# GSP strict / file upload
-## curl -F 'file=@D.ttl' http://localhost:3030/ds/data
-
-# Quads to GSP
-
-## curl -F 'file=@D.ttl' http://localhost:3030/ds/data
-## curl -F 'file=@D.trig' http://localhost:3030/ds/data
-
-# Quads to graph : NGs in data ignored
-# curl -F 'file=@D.trig' 'http://localhost:3030/ds/data?default'
-#curl -F 'file=@D.trig' 'http://localhost:3030/ds/data?graph=http://example/G'
-
-# Dataset
-## curl -F 'file=@D.trig' http://localhost:3030/ds
-
-# Upload service
-## curl -F 'file=@D.trig' -F 'name=http://graph/' 'http://localhost:3030/ds/upload'
-
-
-echo "==== Dataset"
-curl  http://localhost:3030/ds

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/fuseki
----------------------------------------------------------------------
diff --git a/jena-fuseki2/fuseki b/jena-fuseki2/fuseki
deleted file mode 100644
index 9cc1fe8..0000000
--- a/jena-fuseki2/fuseki
+++ /dev/null
@@ -1,477 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-#
-# =========
-#
-# Startup script for Fuseki under *nix systems (works with cygwin too)
-#
-# Configuration
-# -------------
-# Default values are loaded from /etc/default/fuseki, if it exists.
-#
-# JAVA
-#   Command to invoke Java. If not set, java (from the PATH) will be used.
-#
-# JAVA_OPTIONS
-#   Extra options to pass to the JVM.
-#
-# FUSEKI_HOME
-#   Where Fuseki is installed.  If not set, the script will try
-#   to guess it based on the script invokation path.
-# 
-# FUSEKI_BASE
-#   The root of the runtime area - logs files, system files, local configuration.
-#   Defaults to /etc/fuseki.
-#
-# FUSEKI_RUN
-#   Where the fuseki.pid file should be stored.  It defaults
-#   first available of /var/run, /usr/var/run, and /tmp if not set.
-#
-# FUSEKI_PID
-#   The FUSEKI PID file, defaults to $FUSEKI_RUN/fuseki.pid
-#
-# FUSEKI_ARGS
-#   The arguments to pass to the Fuseki server on the command line. Defaults to:
-#                                        # if FUSEKI_CONF is not set
-#    --config=$FUSEKI_CONF               # if FUSEKI_CONF is set
-#
-# FUSEKI_START
-#   Path to the jar file. Defaults to $FUSEKI_HOME/fuseki-server.jar 
-
-# FUSEKI_CONF
-#   The Fuseki configuration file, usually in RDF Turtle notation.
-#
-# FUSEKI_USER
-#   If set, the server will be run as this user
-#
-# FUSEKI_LOGS
-#   Directory where logs will be generated. 
-#   Fixed as $FUSEKI_BASE/logs.
-#
-# FUSEKI_LOGS_STDERROUT
-#   Log file with stderr and stdout log output from Fuseki. 
-#   Defaults to $FUSEKI_LOGS/stderrout.log
-
-### BEGIN INIT INFO
-# Provides:          fuseki
-# Required-Start:    $remote_fs $network
-# Required-Stop:     $remote_fs $network
-# Default-Start:     3 4 5
-# Default-Stop:      0 1 2 6
-# Short-Description: Start Jena Fuseki at boot time
-# Description:       Jena Fuseki is a service that provides a SPARQL API over HTTP
-### END INIT INFO
-
-# DEBUG=1
-NAME=fuseki
-if [ -f /etc/default/$NAME ]; then
-  . /etc/default/$NAME
-fi
-
-if [ -f /lib/lsb/init-functions ]; then
-  . /lib/lsb/init-functions
-else
-  # simple replacements for LSB daemon logging functions if not defined
-  log_daemon_msg() {
-    echo $1
-  }
-  log_begin_msg() {
-    echo $1
-  }
-  log_end_msg() {
-    if [ $1 -eq 0]; then
-      echo '[OK]'
-    else
-      echo '[failed]'
-    fi
-  }
-fi
-
-usage()
-{
-  echo "Usage: ${0##*/} {start|stop|restart|run|status}"
-  exit 1
-}
-
-[ $# -gt 0 ] || usage
-CMD="$1"
-
-# Utility functions
-
-findDirectory()
-{
-  local L OP=$1
-  shift
-  for L in "$@"; do
-    [ "$OP" "$L" ] || continue
-    printf %s "$L"
-    break
-  done
-}
-
-findFile()
-{
-  local L F=$1
-  shift
-  for L in "$@"; do
-    [ -f "${L}/${F}" ] || continue
-    printf %s "${L}/${F}"
-    break
-  done
-}
-
-running()
-{
-  local PID=$(cat "$1" 2>/dev/null) || return 1
-  ps -p "$PID" >/dev/null 2>&1
-}
-
-# Are we running in cygwin?
-cygwin=false
-case "`uname`" in
-    CYGWIN*) cygwin=true;;
-esac
-
-# Set FUSKEI_HOME to the script invocation directory if it is not specified
-if [ -z "$FUSEKI_HOME" ]
-then
-  SCRIPT="$0"
-  # Catch common issue: script has been symlinked
-  if [ -L "$SCRIPT" ]
-  then
-    SCRIPT="$(readlink "$0")"
-    # If link is relative
-    case "$SCRIPT" in
-      /*) ;; # fine
-      *) SCRIPT=$( dirname "$0" )/$SCRIPT;; # fix
-    esac
-  fi
-
-  # Work out root from script location
-  FUSEKI_HOME="$( cd "$( dirname "$SCRIPT" )" && pwd )"
-
-fi
-
-# Deal with Cygwin path issues
-if [ "$cygwin" == "true" ]
-then
-  FUSEKI_HOME=`cygpath -w "$FUSEKI_HOME"`
-fi
-
-if [ ! -e "$FUSEKI_HOME" ]
-then
-  log_daemon_msg "FUSEKI_HOME '$FUSEKI_HOME' does not exist" 1>&2
-  exit 1
-fi
-
-if [ -z "$FUSEKI_BASE" ]
-then
-  FUSEKI_BASE="/etc/fuseki"
-fi
-
-if [ "$cygwin" == "true" ]
-then
-  FUSEKI_BASE=`cygpath -w "$FUSEKI_BASE"`
-fi
-
-
-if [ ! -e "$FUSEKI_BASE" -o ! -d "$FUSEKI_BASE" ]
-then
-  log_daemon_msg "FUSEKI_BASE '$FUSEKI_BASE' does not exist or is not a directory" 1>&2
-  exit 1
-fi
-
-if [ ! -w "$FUSEKI_BASE" ]
-then
-  log_daemon_msg "FUSEKI_BASE '$FUSEKI_BASE' is not writable." 1>&2
-  exit 1
-fi
-
-
-# Deal with Cygwin path issues
-if [ "$cygwin" == "true" ]
-then
-  FUSEKI_HOME=`cygpath -w "$FUSEKI_HOME"`
-  FUSEKI_BASE=`cygpath -w "$FUSEKI_BASE"`
- fi
-
-# Find a location for the pid file
-if [ -z "$FUSEKI_RUN" ]
-then
-  FUSEKI_RUN=$(findDirectory -w /var/run /usr/var/run $FUSEKI_HOME /tmp)
-fi
-
-# Get PID file name
-if [ -z "$FUSEKI_PID" ]
-then
-  FUSEKI_PID="$FUSEKI_RUN/fuseki.pid"
-fi
-
-# Log directory
-if [ -n "$FUSEKI_LOGS" ]
-then
-    log_daemon_message "FUSEKI_LOGS can not be set externally - ignored" 1>&2
-fi
-FUSEKI_LOGS="$FUSEKI_BASE/logs"
-
-# Std Err and Out log
-if [ -z "$FUSEKI_LOGS_STDERROUT" ]
-then
-  FUSEKI_LOGS_STDERROUT="$FUSEKI_LOGS/stderrout.log"
-fi
-
-# Data directory
-if [ -z "$FUSEKI_DATA_DIR" ]
-then
-  FUSEKI_DATA_DIR="$FUSEKI_HOME/DB"
-fi
-
-# Set up JAVA if not set
-if [ -z "$JAVA" ]
-then
-  JAVA=$(which java)
-fi
-if [ -z "$JAVA" ]
-then
-  echo "Cannot find a Java JDK. Please set either set JAVA or put java (>=1.7) in your PATH." 2>&2
-  exit 1
-fi
-
-# The location of the start up JAR
-FUSEKI_START=${FUSEKI_START:-$FUSEKI_HOME/fuseki-server.jar}
-
-# Deal with Cygwin path issues
-if [ "$cygwin" == "true" ]
-then
-  DATA_DIR=`cygpath -w "$FUSEKI_DATA_DIR"`
-  FUSEKI_START=`cygpath -w "$FUSEKI_START"`
-else
-  DATA_DIR="$FUSEKI_DATA_DIR"
-fi
-
-# Some JVM settings
-if [ -z "$JAVA_OPTIONS" ]
-then
-  JAVA_OPTIONS="-Xmx1200M"
-fi
-
-# Default Fuseki Arguments
-if [ -z "$FUSEKI_ARGS" ]
-then
-  if [ -z "$FUSEKI_CONF" ]
-  then
-    FUSEKI_ARGS=""
-  else
-    FUSEKI_ARGS="--config=$FUSEKI_CONF"
-  fi
-fi
-
-# Run command
-
-RUN_ARGS=(${JAVA_OPTIONS[@]} -jar "$FUSEKI_START" $FUSEKI_ARGS)
-RUN_CMD=("$JAVA" ${RUN_ARGS[@]})
-
-
-#####################################################
-# Comment these out after you're happy with what
-# the script is doing.
-#####################################################
-if (( DEBUG ))
-then
-  log_daemon_msg "FUSEKI_HOME    =  $FUSEKI_HOME"
-  log_daemon_msg "FUSEKI_CONF    =  $FUSEKI_CONF"
-  log_daemon_msg "FUSEKI_RUN     =  $FUSEKI_RUN"
-  log_daemon_msg "FUSEKI_PID     =  $FUSEKI_PID"
-  log_daemon_msg "FUSEKI_ARGS    =  $FUSEKI_ARGS"
-  log_daemon_msg "FUSEKI_START   =  $FUSEKI_START"
-  log_daemon_msg "CONFIGS        =  ${CONFIGS[*]}"
-  log_daemon_msg "JAVA           =  $JAVA"
-  log_daemon_msg "JAVA_OPTIONS   =  ${JAVA_OPTIONS[*]}"
-  log_daemon_msg "RUN_ARGS       =  ${RUN_ARGS[@]}"
-  log_daemon_msg "RUN_CMD        =  ${RUN_CMD[@]}"
-fi
-
-NO_START=0
-
-# Life cycle functions
-start() {
-  if (( NO_START )); then
-    log_daemon_msg "Not starting Fuseki - NO_START=1"
-    exit
-  fi
-
-  # Make sure the data and log directories exist
-  mkdir -p "$FUSEKI_DATA_DIR"
-  mkdir -p "$FUSEKI_LOGS"
-
-  # Make sure the .jar file exists
-  if [ ! -e $FUSEKI_START ]; then
-    log_daemon_msg "Could not see Fuseki .jar file: \$FUSEKI_START has value '$FUSEKI_START'"
-    exit 1
-  fi
-
-  log_begin_msg "Starting Fuseki"
-  if type start-stop-daemon > /dev/null 2>&1
-  then
-    unset CH_USER
-    if [ -n "$FUSEKI_USER" ]
-    then
-      CH_USER="--chuid $FUSEKI_USER"
-    fi
-    if start-stop-daemon --start $CH_USER --chdir "$FUSEKI_HOME" --background --make-pidfile --pidfile "$FUSEKI_PID" --startas /bin/bash -- -c "exec $JAVA ${RUN_ARGS[*]} > $FUSEKI_LOGS_STDERROUT 2>&1"
-    then
-      sleep 2
-      if running "$FUSEKI_PID"
-      then
-        log_end_msg 0
-        print_started
-      else
-        log_end_msg 1
-      fi
-    else
-      log_end_msg 1
-      log_daemon_msg "** start-stop-daemon failed to run"
-    fi
-  else
-    if running $FUSEKI_PID
-    then
-      log_end_msg 1
-      log_daemon_msg 'Already Running!'
-      exit 1
-    else
-      # dead pid file - remove
-      rm -f "$FUSEKI_PID"
-    fi
-
-    if [ "$FUSEKI_USER" ]
-    then
-      touch "$FUSEKI_PID"
-      chown "$FUSEKI_USER" "$FUSEKI_PID"
-      su - "$FUSEKI_USER" -c "
-        log_daemon_msg "Redirecting Fuseki stderr/stdout to $FUSEKI_LOGS_STDERROUT"
-        exec ${RUN_CMD[*]} &
-        disown \$!
-        echo \$! > '$FUSEKI_PID'"
-    else
-      #log_daemon_msg "Redirecting Fuseki stderr/stdout to $FUSEKI_LOGS_STDERROUT"
-      exec "${RUN_CMD[@]}" &> "$FUSEKI_LOGS_STDERROUT" &
-      disown $!
-      echo $! > "$FUSEKI_PID"
-    fi
-
-    log_end_msg 0
-    print_started
-  fi
-}
-
-print_started() {
-  log_daemon_msg "STARTED Fuseki `date`"
-  log_daemon_msg "PID=$(cat "$FUSEKI_PID" 2>/dev/null)"
-}
-
-delete_fuseki_pid_file() {
-  rm -f "$FUSEKI_PID"
-}
-
-stop() {
-  log_begin_msg "Stopping Fuseki: "
-
-  if ! running "$FUSEKI_PID"
-  then
-    log_end_msg 1
-
-    # if a stop rather than a restart, signal failure to stop
-    if [ -z "$1" ]
-    then
-      exit 1
-    fi
-  fi
-
-  ###############################################################
-  # !!!! This code needs to be improved, too many repeats !!!!  #
-  ###############################################################
-  if type start-stop-daemon > /dev/null 2>&1; then
-    start-stop-daemon --stop --pidfile "$FUSEKI_PID" --chdir "$FUSEKI_HOME" --startas "$JAVA" --signal HUP
-
-    ## Die after a 30 second timeout
-    TIMEOUT=30
-    while running "$FUSEKI_PID"; do
-      if (( TIMEOUT-- == 0 )); then
-        start-stop-daemon --stop --pidfile "$FUSEKI_PID" --chdir "$FUSEKI_HOME" --startas "$JAVA" --signal KILL
-      fi
-        sleep 1
-    done
-    delete_fuseki_pid_file
-    log_end_msg 0
-  else
-    PID=$(cat "$FUSEKI_PID" 2>/dev/null)
-    kill "$PID" 2>/dev/null
-
-    TIMEOUT=30
-    while running $FUSEKI_PID; do
-      if (( TIMEOUT-- == 0 )); then
-        kill -KILL "$PID" 2>/dev/null
-      fi
-      sleep 1
-    done
-    delete_fuseki_pid_file
-    log_end_msg 0
-  fi
-}
-
-
-# Run in the foreground, as the current user
-run() {
-  # Make sure the .jar file exists
-  if [ ! -e $FUSEKI_START ]; then
-    log_daemon_msg "Could not see Fuseki .jar file: \$FUSEKI_START has value '$FUSEKI_START'"
-    exit 1
-  fi
-  exec "${RUN_CMD[@]}"
-}
-
-case $CMD in
-  start)
-    start
-  ;;
-  stop)
-    stop
-  ;;
-  restart)
-    stop "restarting"
-    start
-  ;;
-  run)
-    run
-  ;;
-  status)
-    FUSEKI_PID=$(findFile fuseki.pid /var/run /usr/var/run $FUSEKI_HOME /tmp)
-    if running $FUSEKI_PID
-    then
-      PID=`cat "$FUSEKI_PID"`
-      log_daemon_msg "Fuseki is running with pid: $PID"
-    else
-      log_daemon_msg "Fuseki is not running"
-    fi
-  ;;
-  *)
-    usage
-  ;;
-esac
-
-exit 0

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/fuseki-server
----------------------------------------------------------------------
diff --git a/jena-fuseki2/fuseki-server b/jena-fuseki2/fuseki-server
deleted file mode 100755
index 679b3bd..0000000
--- a/jena-fuseki2/fuseki-server
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-# 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.
-
-# Run fuseki as a standalone server
-
-export FUSEKI_HOME="${FUSEKI_HOME:-$PWD}"
-
-if [ ! -e "$FUSEKI_HOME" ]
-then
-    echo "$FUSEKI_HOME does not exist" 1>&2
-    exit 1
-    fi
-
-JAR1="$FUSEKI_HOME/fuseki-server.jar"
-JAR2="$FUSEKI_HOME/jena-fuseki-*-server.jar"
-JAR=""
-
-for J in "$JAR1" "$JAR2"
-do
-    # Expand
-    J="$(echo $J)"
-    if [ -e "$J" ]
-    then
-	JAR="$J"
-	break
-    fi
-done
-
-if [ "$JAR" = "" ]
-then
-    echo "Can't find jarfile to run"
-    exit 1
-fi
-
-# Deal with Cygwin path issues
-cygwin=false
-case "`uname`" in
-    CYGWIN*) cygwin=true;;
-esac
-if [ "$cygwin" = "true" ]
-then
-    JAR=`cygpath -w "$JAR"`
-    FUSEKI_HOME=`cygpath -w "$FUSEKI_HOME"`
-fi
-
-export FUSEKI_BASE="${FUSEKI_BASE:-$PWD/run}"
-
-JVM_ARGS=${JVM_ARGS:--Xmx1200M}
-
-exec java  $JVM_ARGS -jar "$JAR" "$@"

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/fuseki-server.bat
----------------------------------------------------------------------
diff --git a/jena-fuseki2/fuseki-server.bat b/jena-fuseki2/fuseki-server.bat
deleted file mode 100644
index 5881660..0000000
--- a/jena-fuseki2/fuseki-server.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements.  See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership.  The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License.  You may obtain a copy of the License at
-@REM
-@REM     http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-
-@echo off
-@REM modify this to name the server jar
-java -Xmx1200M -jar fuseki-server.jar %*

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/pom.xml b/jena-fuseki2/jena-fuseki-core/pom.xml
new file mode 100644
index 0000000..efe35ec
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/pom.xml
@@ -0,0 +1,301 @@
+<?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>
+  <parent>
+    <groupId>org.apache.jena</groupId>
+    <artifactId>jena-fuseki</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+    <relativePath>../</relativePath>
+  </parent> 
+  
+  <name>Apache Jena Fuseki - Server engine</name>
+  <artifactId>jena-fuseki-core</artifactId>
+
+  <!-- We make the JAR file so that the shade plugin includes it.
+       The war:war goal is added to the package phase.
+  -->
+  <packaging>jar</packaging>
+  <description>Fuseki is a SPARQL 1.1 Server which provides query, update and graph store protocol endpoints that can be used to expose triple stores over HTTP</description>
+  <url>http://jena.apache.org/</url>
+
+
+  <!-- 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>
+
+  <properties>
+    <this.root>${project.artifactId}-${project.version}</this.root>
+    
+    <server.jar.name>${this.root}-server</server.jar.name>
+    <!-- Eventually, move to jena-parent -->
+    <ver.jetty>9.1.1.v20140108</ver.jetty>
+    <ver.shiro>1.2.2</ver.shiro>
+
+    <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
+    <build.time.xsd>${maven.build.timestamp}</build.time.xsd>  
+  </properties>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-arq</artifactId>
+      <version>2.12.2-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-arq</artifactId>
+      <version>2.12.2-SNAPSHOT</version>
+      <classifier>tests</classifier>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-core</artifactId>
+      <version>2.12.2-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-tdb</artifactId>
+      <version>1.1.2-SNAPSHOT</version>
+    </dependency>
+
+    <!--
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>sdb</artifactId>
+      <version>${ver.sdb}</version>
+      <optional>true</optional>
+    </dependency>
+    -->
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-text</artifactId>
+      <version>1.1.2-SNAPSHOT</version>
+      <exclusions>
+        <!-- 
+          Get this via commons-fileupload and also via jena-text/sol4j
+        -->
+        <exclusion>
+          <groupId>commons-io</groupId>
+          <artifactId>commons-io</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.jena</groupId>
+      <artifactId>jena-spatial</artifactId>
+      <version>1.1.2-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.shiro</groupId>
+      <artifactId>shiro-core</artifactId>
+      <version>${ver.shiro}</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.shiro</groupId>
+      <artifactId>shiro-web</artifactId>
+      <version>${ver.shiro}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <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>
+    </dependency>
+
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-webapp</artifactId>
+      <version>${ver.jetty}</version>
+    </dependency>    
+
+
+    <!--
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-runner</artifactId>
+      <version>${ver.jetty}</version>
+    </dependency>    
+    -->
+
+    <!-- Development and standalone jar (if built) -->
+    <!-- Jetty's useful servlets, inc compression -->
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-servlets</artifactId>
+      <version>${ver.jetty}</version>
+    </dependency>    
+    
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+    </dependency>
+
+    <!-- Intercept any uses of Jakarta Commons Logging e.g. Apache Common HTTP client. -->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+    </dependency>
+
+    <!-- Needed because the Fuseki command line and the test suite reset logging levels -->
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <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>
+    <resources>
+      <resource>
+        <filtering>false</filtering>
+        <directory>src/main/resources</directory>
+        <excludes>
+          <exclude>org/apache/jena/fuseki/fuseki-properties.xml</exclude>
+        </excludes>
+      </resource>
+      <resource>
+        <filtering>true</filtering>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>org/apache/jena/fuseki/fuseki-properties.xml</include>
+        </includes>
+      </resource>
+    </resources>
+    
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <phase>package</phase>
+            <goals>
+              <goal>jar-no-fork</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <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>
+        <configuration>
+          <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+
+    </plugins>
+
+  </build>
+  
+</project>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/DEF.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/DEF.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/DEF.java
new file mode 100644
index 0000000..8d8495a
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/DEF.java
@@ -0,0 +1,79 @@
+/*
+ * 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.jena.fuseki;
+
+import org.apache.jena.atlas.web.AcceptList ;
+import org.apache.jena.atlas.web.MediaType ;
+import static org.apache.jena.riot.WebContent.* ;
+
+public class DEF
+{
+    public static final MediaType acceptRDFXML        = MediaType.create(contentTypeRDFXML) ;
+    public static final MediaType acceptNQuads        = MediaType.create(contentTypeNQuads) ;
+    public static final MediaType acceptRSXML         = MediaType.create(contentTypeResultsXML) ;
+    public static final MediaType acceptJSON          = MediaType.create(contentTypeJSON) ;
+    
+    public static final AcceptList jsonOffer          = AcceptList.create(contentTypeJSON) ;
+
+    public static final AcceptList rdfOffer           = AcceptList.create(contentTypeTurtle, 
+                                                                          contentTypeTurtleAlt1,
+                                                                          contentTypeTurtleAlt2,
+                                                                          contentTypeNTriples,
+                                                                          contentTypeNTriplesAlt,
+                                                                          contentTypeRDFXML,
+                                                                          contentTypeJSONLD,
+                                                                          contentTypeRDFJSON,
+                                                                          contentTypeRDFThrift
+                                                                          ) ;
+    
+    public static final AcceptList quadsOffer         = AcceptList.create(contentTypeTriG,
+                                                                          contentTypeTriGAlt1,
+                                                                          contentTypeTriGAlt2,
+                                                                          contentTypeJSONLD,
+                                                                          contentTypeNQuads,
+                                                                          contentTypeNQuadsAlt1,
+                                                                          contentTypeNQuadsAlt2 
+                                                                          ) ;
+    
+    // Offer for SELECT
+    public static final AcceptList rsOfferTable       = AcceptList.create(contentTypeResultsJSON,
+                                                                          contentTypeTextCSV,
+                                                                          contentTypeTextTSV,
+                                                                          contentTypeResultsXML,
+                                                                          contentTypeResultsThrift,
+                                                                          contentTypeTextPlain
+                                                                          ) ;
+         
+    // Offer for ASK
+    public static final AcceptList rsOfferBoolean      = AcceptList.create(contentTypeResultsJSON,
+                                                                           contentTypeTextCSV,
+                                                                           contentTypeTextTSV,
+                                                                           contentTypeResultsXML,
+                                                                           contentTypeTextPlain
+                                                                           ) ;
+
+    
+    // Names for services in the default configuration
+    public static final String ServiceQuery         = "query" ;
+    public static final String ServiceQueryAlt      = "sparql" ;
+    public static final String ServiceUpdate        = "update" ;
+    public static final String ServiceData          = "data" ;
+    public static final String ServiceUpload        = "upload" ;
+    public static final String ServiceGeneralQuery  = "/sparql" ;
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
new file mode 100644
index 0000000..0f42219
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
@@ -0,0 +1,227 @@
+/*
+ * 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.jena.fuseki ;
+
+import java.util.Calendar ;
+import java.util.TimeZone ;
+import java.util.concurrent.TimeUnit ;
+
+import org.apache.jena.riot.RIOT ;
+import org.apache.jena.riot.system.stream.LocatorFTP ;
+import org.apache.jena.riot.system.stream.LocatorHTTP ;
+import org.apache.jena.riot.system.stream.StreamManager ;
+import org.slf4j.Logger ;
+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.SystemInfo ;
+import com.hp.hpl.jena.sparql.util.Context ;
+import com.hp.hpl.jena.sparql.util.MappingRegistry ;
+import com.hp.hpl.jena.sparql.util.Utils ;
+import com.hp.hpl.jena.tdb.TDB ;
+import com.hp.hpl.jena.tdb.transaction.TransactionManager ;
+
+public class Fuseki {
+    // General fixed constants.
+    // See also FusekiServer for the naming on the filesystem
+    
+    /** Path to ??? */
+    static public String    PATH                         = "org.apache.jena.fuseki" ;
+
+    /** a unique IRI for the Fuseki namespace */
+    static public String    FusekiIRI                    = "http://jena.apache.org/Fuseki" ;
+
+    /**
+     * a unique IRI including the symbol notation for which properties should be
+     * appended
+     */
+    static public String    FusekiSymbolIRI              = "http://jena.apache.org/fuseki#" ;
+
+    /** Default location of the pages for the Fuseki UI  */
+    static public String    PagesStatic                  = "pages" ;
+    
+    /** Dummy base URi string for parsing SPARQL Query and Update requests */
+    static public final String BaseParserSPARQL          = "http://server/unset-base/" ;
+    
+    /** Dummy base URi string for parsing SPARQL Query and Update requests */
+    static public final String BaseUpload                = "http://server/unset-base/" ;
+
+    /**
+     * A relative resources path to the location of 
+     * <code>fuseki-properties.xml</code> file.
+     */
+    static private String   metadataLocation             = "org/apache/jena/fuseki/fuseki-properties.xml" ;
+
+    /**
+     * Object which holds metadata specified within
+     * {@link Fuseki#metadataLocation}
+     */
+    static private Metadata metadata                     = initMetadata() ;
+
+    private static Metadata initMetadata() {
+        Metadata m = new Metadata() ;
+        // m.addMetadata(metadataDevLocation) ;
+        m.addMetadata(metadataLocation) ;
+        return m ;
+    }
+
+    /** The name of the Fuseki server. Set to the string <code>Fuseki</code> by default. */
+    static public final String        NAME              = "Fuseki" ;
+
+    /** Version of this Fuseki instance */
+    static public final String        VERSION           = metadata.get(PATH + ".version", "development") ;
+
+    /** Date when Fuseki was built */
+    static public final String        BUILD_DATE        = metadata.get(PATH + ".build.datetime", "unknown") ;
+
+    /** An identifier for the HTTP Fuseki server instance */
+    static public final String        serverHttpName    = NAME + " (" + VERSION + ")" ;
+
+    /** Loger name for operations */
+    public static final String        actionLogName     = PATH + ".Fuseki" ;
+
+    /** Instance of log for operations */
+    public static final Logger        actionLog         = LoggerFactory.getLogger(actionLogName) ;
+
+    /** Logger name for standard webserver log file request log */
+    public static final String        requestLogName    = PATH + ".Request" ;
+
+    // See HttpAction.finishRequest.
+    // Normally OFF
+    /** Instance of a log for requests: format is NCSA. */
+    public static final Logger        requestLog        = LoggerFactory.getLogger(requestLogName) ;
+    
+    /** Admin log file for operations. */
+    public static final String        adminLogName      = PATH + ".Admin" ;
+
+    /** Instance of log for operations. */
+    public static final Logger        adminLog          = LoggerFactory.getLogger(adminLogName) ;
+
+    /** Admin log file for operations. */
+    public static final String        builderLogName    = PATH + ".Builder" ;
+
+    /** Instance of log for operations. */
+    public static final Logger        builderLog        = LoggerFactory.getLogger(builderLogName) ;
+
+    /** Validation log file for operations. */
+    public static final String        validationLogName = PATH + ".Validate" ;
+
+    /** Instance of log for validation. */
+    public static final Logger        validationLog     = LoggerFactory.getLogger(adminLogName) ;
+
+    /** Actual log file for general server messages. */
+    public static final String        serverLogName     = PATH + ".Server" ;
+
+    /** Instance of log for general server messages. */
+    public static final Logger        serverLog         = LoggerFactory.getLogger(serverLogName) ;
+
+    /** Logger used for the servletContent.log operations (if settable -- depends on environment) */
+    public static final String        servletRequestLogName     = PATH + ".Servlet" ;
+
+    /** Actual log file for config server messages. */
+    public static final String        configLogName     = PATH + ".Config" ;
+
+    /** Instance of log for config server messages. */
+    public static final Logger        configLog         = LoggerFactory.getLogger(configLogName) ;
+
+    /** Instance of log for config server message s */
+    public static boolean             verboseLogging    = false ;
+
+    /**
+     * An instance of management for stream opening, including redirecting
+     * through a location mapper whereby a name (e.g. URL) is redirected to
+     * another name (e.g. local file).
+     * */
+    public static final StreamManager webStreamManager ;
+    static {
+        webStreamManager = new StreamManager() ;
+        // Only know how to handle http URLs
+        webStreamManager.addLocator(new LocatorHTTP()) ;
+        webStreamManager.addLocator(new LocatorFTP()) ;
+    }
+
+    /** Default (and development) root of the Fuseki installation for fixed files. */ 
+    public static String DFT_FUSEKI_HOME = "." ;
+    /** Default (and development) root of the varying files in this deployment. */ 
+    public static String DFT_FUSEKI_BASE = "." ;
+    
+    private static boolean            initialized       = false ;
+    
+    // Serevr start time and uptime.
+    private static final long startMillis = System.currentTimeMillis() ;
+    // Hide server locale
+    private static final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("00:00")) ; 
+    static { cal.setTimeInMillis(startMillis) ; }  // Exactly the same start point!
+    
+    private static final String startDateTime = Utils.calendarToXSDDateTimeString(cal) ; 
+    
+    /** Return the number of milliseconds since the server started */  
+    public static long serverUptimeMillis() {
+        return System.currentTimeMillis() - startMillis ;
+    }
+    
+    /** Server uptime in seconds */ 
+    public static long serverUptimeSeconds() {
+        long x = System.currentTimeMillis() - startMillis ;
+        return TimeUnit.MILLISECONDS.toSeconds(x) ;
+    }
+    
+    /** XSD DateTime for when the server started */
+    public static String serverStartedAt() {
+        return startDateTime ;
+    }
+
+    /**
+     * Initialize an instance of the Fuseki server stack.
+     */
+    public synchronized static void init() {
+        if ( initialized )
+            return ;
+        initialized = true ;
+        // FusekiEnv.setEnvironment() ;
+        FusekiLogging.setLogging() ;
+        ARQ.init() ;
+        SystemInfo sysInfo = new SystemInfo(FusekiIRI, PATH, VERSION, BUILD_DATE) ;
+        SystemARQ.registerSubSystem(sysInfo) ;
+        RIOT.init() ;
+        TDB.init() ;
+        MappingRegistry.addPrefixMapping("fuseki", FusekiSymbolIRI) ;
+
+        TDB.setOptimizerWarningFlag(false) ;
+        // Don't set TDB batch commits.
+        // This can be slower, but it less memory hungry and more predictable.
+        TransactionManager.QueueBatchSize = 0 ;
+    }
+    
+    /**
+     * Get server global {@link com.hp.hpl.jena.sparql.util.Context}.
+     * 
+     * @return {@link com.hp.hpl.jena.query.ARQ#getContext()}
+     */
+    public static Context getContext() {
+        return ARQ.getContext() ;
+    }
+
+    // Force a call to init.
+    static {
+        init() ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
new file mode 100644
index 0000000..5746394
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
@@ -0,0 +1,49 @@
+/**
+ * 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.jena.fuseki;
+
+import java.lang.reflect.Method ;
+
+public class FusekiCmd {
+    public static void main(String[] args) {
+        // Must NOT use any logging.  The command processor sets that up.
+        System.err.println("Deprecated: Use org.apache.jena.fuseki.cmd.FusekiCmd") ;
+        try {
+            // A
+            callByRefection("org.apache.jena.fuseki.cmd.FusekiCmd", "main", args) ;
+        } catch (ClassNotFoundException | NoSuchMethodException ex) {
+            System.err.println("Failed to find the command processor: "+ ex.getMessage()) ;
+        } catch (Exception ex) {
+            System.err.println("Failed to invoke the command processor: "+ ex.getMessage()) ;
+            ex.printStackTrace(System.err) ;
+        }
+    }
+
+    // Call a static of no arguments by reflection.
+    private static void callByRefection(String className, String staticMethod, String[] args) 
+        throws Exception
+    {
+        Class<? > cls = Class.forName(className) ;
+        // Pass up : ClassNotFoundException
+
+        Method m = cls.getMethod(staticMethod, String[].class) ;
+        m.invoke(null, (Object)args) ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiConfigException.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiConfigException.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiConfigException.java
new file mode 100644
index 0000000..5e1b018
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiConfigException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jena.fuseki;
+
+
+public class FusekiConfigException extends FusekiException
+{
+    public FusekiConfigException(String msg, Throwable cause)    { super(msg, cause) ; }
+    public FusekiConfigException(String msg)                     { super(msg) ; }
+    public FusekiConfigException(Throwable cause)                { super(cause) ; }
+    public FusekiConfigException()                               { super() ; }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiException.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiException.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiException.java
new file mode 100644
index 0000000..04953ce
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiException.java
@@ -0,0 +1,29 @@
+/*
+ * 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.jena.fuseki;
+
+import com.hp.hpl.jena.sparql.ARQException ;
+
+public class FusekiException extends ARQException
+{
+    public FusekiException(String msg, Throwable cause)    { super(msg, cause) ; }
+    public FusekiException(String msg)                     { super(msg) ; }
+    public FusekiException(Throwable cause)                { super(cause) ; }
+    public FusekiException()                               { super() ; }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLib.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLib.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLib.java
new file mode 100644
index 0000000..52024d4
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLib.java
@@ -0,0 +1,258 @@
+/*
+ * 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.jena.fuseki;
+
+import java.util.Iterator ;
+
+import javax.servlet.http.HttpServletRequest ;
+
+import org.apache.jena.atlas.lib.MultiMap ;
+import org.apache.jena.atlas.lib.MultiMapToList ;
+import org.apache.jena.atlas.web.ContentType ;
+import org.apache.jena.fuseki.server.SystemState ;
+import org.apache.jena.fuseki.servlets.HttpAction ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFLanguages ;
+
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.query.* ;
+import com.hp.hpl.jena.rdf.model.Literal ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.RDFNode ;
+import com.hp.hpl.jena.rdf.model.Resource ;
+import com.hp.hpl.jena.shared.PrefixMapping ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.Quad ;
+import com.hp.hpl.jena.sparql.util.Convert ;
+import com.hp.hpl.jena.vocabulary.RDFS ;
+
+public class FusekiLib {
+    // ==> ActionLib
+    
+    /** Get the content type of an action or return the default.
+     * @param  action
+     * @return ContentType
+     */
+    public static ContentType getContentType(HttpAction action) {
+        return getContentType(action.request) ;
+    }
+    
+    /** Get the content type of an action or return the default.
+     * @param  request
+     * @return ContentType
+     */
+    public static ContentType getContentType(HttpServletRequest request) {
+        String contentTypeHeader = request.getContentType() ;
+        if ( contentTypeHeader == null ) 
+            return null ;
+        return ContentType.create(contentTypeHeader) ;
+    }
+    
+    /** Get the incoming Lang based on Content-Type of an action.
+     * @param  action
+     * @param  dft Default if no "Content-Type:" found. 
+     * @return ContentType
+     */
+    public static Lang getLangFromAction(HttpAction action, Lang dft) {
+        String contentTypeHeader = action.request.getContentType() ;
+        if ( contentTypeHeader == null )
+            return dft ;
+        return RDFLanguages.contentTypeToLang(contentTypeHeader) ;
+    }
+
+    static String fmtRequest(HttpServletRequest request) {
+        StringBuffer sbuff = new StringBuffer() ;
+        sbuff.append(request.getMethod()) ;
+        sbuff.append(" ") ;
+        sbuff.append(Convert.decWWWForm(request.getRequestURL())) ;
+
+        String qs = request.getQueryString() ;
+        if ( qs != null ) {
+            String tmp = request.getQueryString() ;
+            tmp = Convert.decWWWForm(tmp) ;
+            tmp = tmp.replace('\n', ' ') ;
+            tmp = tmp.replace('\r', ' ') ;
+            sbuff.append("?").append(tmp) ;
+        }
+        return sbuff.toString() ;
+    }
+
+    /** Parse the query string - do not process the body even for a form */
+    public static MultiMap<String, String> parseQueryString(HttpServletRequest req) {
+        MultiMap<String, String> map = MultiMapToList.create() ;
+
+        // Don't use ServletRequest.getParameter or getParamterNames
+        // as that reads form data. This code parses just the query string.
+        if ( req.getQueryString() != null ) {
+            String[] params = req.getQueryString().split("&") ;
+            for (int i = 0; i < params.length; i++) {
+                String p = params[i] ;
+                String[] x = p.split("=", 2) ;
+                String name = null ;
+                String value = null ;
+
+                if ( x.length == 0 ) { // No "="
+                    name = p ;
+                    value = "" ;
+                } else if ( x.length == 1 ) { // param=
+                    name = x[0] ;
+                    value = "" ;
+                } else { // param=value
+                    name = x[0] ;
+                    value = x[1] ;
+                }
+                map.put(name, value) ;
+            }
+        }
+        return map ;
+    }
+    
+    public static String safeParameter(HttpServletRequest request, String pName) {
+        String value = request.getParameter(pName) ;
+        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?
+        if ( graphName == null )
+            graphName = Quad.defaultGraphNodeGenerated ;
+
+        Iterator<Triple> iter = data.find(Node.ANY, Node.ANY, Node.ANY) ;
+        for (; iter.hasNext();) {
+            Triple t = iter.next() ;
+            dsg.add(graphName, t.getSubject(), t.getPredicate(), t.getObject()) ;
+        }
+
+        PrefixMapping pmapSrc = data.getPrefixMapping() ;
+        PrefixMapping pmapDest = dsg.getDefaultGraph().getPrefixMapping() ;
+        pmapDest.setNsPrefixes(pmapSrc) ;
+    }
+    
+    public static void addDataInto(DatasetGraph src, DatasetGraph dest) {
+        Iterator<Quad> iter = src.find(Node.ANY, Node.ANY, Node.ANY, Node.ANY) ;
+        for (; iter.hasNext();) {
+            Quad q = iter.next() ;
+            dest.add(q) ;
+        }
+
+        PrefixMapping pmapSrc = src.getDefaultGraph().getPrefixMapping() ;
+        PrefixMapping pmapDest = dest.getDefaultGraph().getPrefixMapping() ;
+        pmapDest.withDefaultMappings(pmapSrc) ;
+    }
+
+    // ---- Helper code
+    public static ResultSet query(String string, Model m) {
+        return query(string, m, null, null) ;
+    }
+
+    public static ResultSet query(String string, Dataset ds) {
+        return query(string, ds, null, null) ;
+    }
+
+    public static ResultSet query(String string, Model m, String varName, RDFNode value) {
+        Query query = QueryFactory.create(SystemState.PREFIXES + string) ;
+        QuerySolutionMap initValues = null ;
+        if ( varName != null )
+            initValues = querySolution(varName, value) ;
+        try ( QueryExecution qExec = QueryExecutionFactory.create(query, m, initValues) ) {
+            return ResultSetFactory.copyResults(qExec.execSelect()) ;
+        }
+    }
+
+    public static ResultSet query(String string, Dataset ds, String varName, RDFNode value) {
+        Query query = QueryFactory.create(SystemState.PREFIXES + string) ;
+        QuerySolutionMap initValues = null ;
+        if ( varName != null )
+            initValues = querySolution(varName, value) ;
+        try ( QueryExecution qExec = QueryExecutionFactory.create(query, ds, initValues) ) {
+            return ResultSetFactory.copyResults(qExec.execSelect()) ;
+        }
+    }
+
+    private static QuerySolutionMap querySolution(String varName, RDFNode value) {
+        QuerySolutionMap qsm = new QuerySolutionMap() ;
+        querySolution(qsm, varName, value) ;
+        return qsm ;
+    }
+
+    public static QuerySolutionMap querySolution(QuerySolutionMap qsm, String varName, RDFNode value) {
+        qsm.add(varName, value) ;
+        return qsm ;
+    }
+    
+    public static RDFNode getOne(Resource svc, String property) {
+        ResultSet rs = FusekiLib.query("SELECT * { ?svc " + property + " ?x}", svc.getModel(), "svc", svc) ;
+        if ( !rs.hasNext() )
+            throw new FusekiConfigException("No property '" + property + "' for service " + FusekiLib.nodeLabel(svc)) ;
+        RDFNode x = rs.next().get("x") ;
+        if ( rs.hasNext() )
+            throw new FusekiConfigException("Multiple properties '" + property + "' for service " + FusekiLib.nodeLabel(svc)) ;
+        return x ;
+    }
+    
+    // Node presentation
+    public static String nodeLabel(RDFNode n) {
+        if ( n == null )
+            return "<null>" ;
+        if ( n instanceof Resource )
+            return strForResource((Resource)n) ;
+    
+        Literal lit = (Literal)n ;
+        return lit.getLexicalForm() ;
+    }
+
+    // XXX Lib
+    public static String strForResource(Resource r) {
+        return strForResource(r, r.getModel()) ;
+    }
+
+    // XXX Lib
+    public static String strForResource(Resource r, PrefixMapping pm) {
+        if ( r == null )
+            return "NULL " ;
+        if ( r.hasProperty(RDFS.label) ) {
+            RDFNode n = r.getProperty(RDFS.label).getObject() ;
+            if ( n instanceof Literal )
+                return ((Literal)n).getString() ;
+        }
+    
+        if ( r.isAnon() )
+            return "<<blank node>>" ;
+    
+        if ( pm == null )
+            pm = r.getModel() ;
+    
+        return strForURI(r.getURI(), pm) ;
+    }
+
+    public static String strForURI(String uri, PrefixMapping pm) {
+        if ( pm != null ) {
+            String x = pm.shortForm(uri) ;
+    
+            if ( !x.equals(uri) )
+                return x ;
+        }
+        return "<" + uri + ">" ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLogging.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLogging.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLogging.java
new file mode 100644
index 0000000..1add2b2
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiLogging.java
@@ -0,0 +1,171 @@
+/**
+ * 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.jena.fuseki;
+
+import java.io.File ;
+import java.net.URL ;
+
+import org.apache.jena.atlas.lib.StrUtils ;
+import org.apache.jena.atlas.logging.LogCtl ;
+import org.apache.jena.fuseki.server.FusekiEnv ;
+import org.apache.jena.riot.SysRIOT ;
+import org.apache.log4j.PropertyConfigurator ;
+import org.apache.log4j.helpers.Loader ;
+
+public class FusekiLogging
+{
+    // This class must not have static constants, or otherwise not use "Fuseki.*"
+    // or any class else where that might kick off logging.  Otherwise, the 
+    // setLogging is poiintless (it's already set).
+    // PlanB - reinitialize logging regardless on first call. 
+    
+    // Set logging.
+    // 1/ Use log4j.configuration if defined.
+    // 2/ Use file:log4j.properties if exists
+    // 3/ Use log4j.properties on the classpath.
+    // 4/ Use built-in org/apache/jena/fuseki/log4j.properties on the classpath.
+    // 5/ Use Built in string
+
+    /** Places for the log4j properties file at (3) */ 
+    private static final String[] resourcesForLog4jProperties = { 
+        "log4j.properties",
+        "org/apache/jena/fuseki/log4j.properties"
+    } ;
+    
+    private static final boolean LogLogging     = false ;
+    private static boolean loggingInitialized   = false ;
+    
+    public static synchronized void setLogging() {
+        if ( loggingInitialized )
+            return ;
+        loggingInitialized = true ;
+        FusekiEnv.setEnvironment() ;
+        
+        logLogging("Fuseki logging") ;
+        // No loggers have been created but configuration may have been set up.
+        String x = System.getProperty("log4j.configuration", null) ;
+        logLogging("log4j.configuration = %s", x) ;
+
+        if ( x != null ) { 
+            // log4j wil initialize in the usual way. This includes avalue of
+            // "set", which indicates that logging was set before by some other Jena code.
+            if ( x.equals("set") )
+                Fuseki.serverLog.warn("Fuseki logging: Unexpected: Log4j was setup by someother part of Jena") ;
+            return ;
+        }
+        logLogging("Fuseki logging - setup") ;
+        // Look for a log4j.properties in the current working directory
+        // and an existing FUSEKI_BASE for easy customization.
+        String fn1 = "log4j.properties" ;
+        String fn2 = null ;
+        
+        if ( FusekiEnv.FUSEKI_BASE != null ) 
+            fn2 = FusekiEnv.FUSEKI_BASE.toString()+"/log4j.properties" ;
+        if ( attempt(fn1) ) return ; 
+        if ( attempt(fn2) ) return ;
+        
+        // Try classpath
+        for ( String resourceName : resourcesForLog4jProperties ) {
+            // The log4j general initialization is done in a class static
+            // in LogManager so it can't be called again in any sensible manner.
+            // Instead, we include the same basic mechanism ...
+            logLogging("Fuseki logging - classpath %s", resourceName) ;
+            URL url = Loader.getResource(resourceName) ;
+            if ( url != null ) {
+                PropertyConfigurator.configure(url) ;
+                logLogging("Fuseki logging - found via classpath %s", url) ;
+                System.setProperty("log4j.configuration", url.toString()) ;
+                return ;
+            }
+        }
+        // Use builtin.
+        logLogging("Fuseki logging - Fallback log4j.properties string") ;
+        String dftLog4j = log4JsetupFallback() ;
+        LogCtl.resetLogging(dftLog4j);
+        // Stop anything attempting to do it again.
+        System.setProperty("log4j.configuration", "set") ;
+    }
+
+    private static boolean attempt(String fn) {
+        try {
+            File f = new File(fn) ;
+            if ( f.exists() ) {
+                logLogging("Fuseki logging - found file:log4j.properties") ;
+                PropertyConfigurator.configure(fn) ;
+                System.setProperty("log4j.configuration", "file:" + fn) ;
+                return true ;
+            }
+        }
+        catch (Throwable th) {}
+        return false ;
+    }
+
+    private static void logLogging(String fmt, Object ... args) {
+        if ( LogLogging ) {
+            System.out.printf(fmt, args) ; 
+            System.out.println() ;
+        }
+    }
+
+    private static String log4JsetupFallback() {
+        return StrUtils.strjoinNL
+            // Preferred: classes/log4j.properties, from src/main/resources/log4j.properties
+            // Keep these in-step.  Different usages cause different logging initalizations;
+            // if the jar is rebundled, it may loose the associated log4.properties file.
+            ("## Plain output to stdout",
+             "log4j.appender.jena.plainstdout=org.apache.log4j.ConsoleAppender",
+             "log4j.appender.jena.plainstdout.target=System.out",
+             "log4j.appender.jena.plainstdout.layout=org.apache.log4j.PatternLayout",
+             "log4j.appender.jena.plainstdout.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %-10c{1} %-5p %m%n",
+             //"log4j.appender.jena.plainstdout.layout.ConversionPattern=%d{HH:mm:ss} %-10c{1} %-5p %m%n",
+
+             "# Unadorned, for the requests log.",
+             "log4j.appender.fuseki.plain=org.apache.log4j.ConsoleAppender",
+             "log4j.appender.fuseki.plain.target=System.out",
+             "log4j.appender.fuseki.plain.layout=org.apache.log4j.PatternLayout",
+             "log4j.appender.fuseki.plain.layout.ConversionPattern=%m%n",
+             
+             "## Most things", 
+             "log4j.rootLogger=INFO, jena.plainstdout",
+             "log4j.logger.com.hp.hpl.jena=WARN",
+             "log4j.logger.org.openjena=WARN",
+             "log4j.logger.org.apache.jena=WARN",
+
+             "# Fuseki System logs.",
+             "log4j.logger." + Fuseki.serverLogName     + "=INFO",
+             "log4j.logger." + Fuseki.actionLogName     + "=INFO",
+             "log4j.logger." + Fuseki.adminLogName      + "=INFO",
+             "log4j.logger." + Fuseki.validationLogName + "=INFO",
+             "log4j.logger." + Fuseki.configLogName     + "=INFO",
+
+             "log4j.logger.org.apache.jena.tdb.loader=INFO",
+             "log4j.logger.org.eclipse.jetty=WARN" ,
+             "log4j.logger.org.apache.shiro=WARN",
+
+             "# NCSA Request Access log",
+             "log4j.additivity."+Fuseki.requestLogName   + "=false",
+             "log4j.logger."+Fuseki.requestLogName       + "=OFF, fuseki.plain",
+
+             "## Parser output", 
+             "log4j.additivity" + SysRIOT.riotLoggerName + "=false",
+             "log4j.logger." + SysRIOT.riotLoggerName + "=INFO, plainstdout"
+                ) ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiNotFoundException.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiNotFoundException.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiNotFoundException.java
new file mode 100644
index 0000000..be9be90
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiNotFoundException.java
@@ -0,0 +1,26 @@
+/*
+ * 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.jena.fuseki;
+
+import org.apache.jena.web.HttpSC ;
+
+public class FusekiNotFoundException extends FusekiRequestException
+{
+    public FusekiNotFoundException(String msg)    { super(HttpSC.NOT_FOUND_404, msg) ; }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiRequestException.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiRequestException.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiRequestException.java
new file mode 100644
index 0000000..e197be2
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiRequestException.java
@@ -0,0 +1,57 @@
+/*
+ * 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.jena.fuseki;
+
+import org.apache.jena.web.HttpSC ;
+
+
+public class FusekiRequestException extends FusekiException
+{
+    public static FusekiRequestException create(int code, String msg)
+    {
+        if ( code == HttpSC.NOT_FOUND_404 )
+            return new FusekiNotFoundException(msg) ;
+        return new FusekiRequestException(code, msg) ;
+    }
+    
+    private final int statusCode ;
+    private final String responseMessage ;
+    protected FusekiRequestException(int code, String msg)
+    {
+        super(msg) ;
+        this.statusCode = code ;
+        responseMessage = msg ;
+    }
+    
+    public int getStatusCode()
+    {
+        return statusCode ;
+    }
+
+    public String getResponseMessage()
+    {
+        return responseMessage ;
+    }
+
+    @Override
+    public String toString()
+    {
+        return "HTTP: "+statusCode+" "+getMessage() ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/async/AsyncPool.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/async/AsyncPool.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/async/AsyncPool.java
new file mode 100644
index 0000000..1d98ff2
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/async/AsyncPool.java
@@ -0,0 +1,97 @@
+/**
+ * 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.jena.fuseki.async;
+
+import static java.lang.String.format ;
+
+import java.util.* ;
+import java.util.concurrent.* ;
+
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.server.DataService ;
+
+/** The set of currently active async tasks */
+public class AsyncPool
+{
+    private static int nMaxThreads = 4 ;
+    private static int MAX_FINISHED = 20 ;
+    
+    // See Executors.newCachedThreadPool and Executors.newFixedThreadPool 
+    private ExecutorService executor = new ThreadPoolExecutor(0, nMaxThreads,
+                                                              120L, TimeUnit.SECONDS,
+                                                              new LinkedBlockingQueue<Runnable>()) ;
+    private final Object mutex = new Object() ; 
+    private long counter = 0 ;
+    private Map<String, AsyncTask> runningTasks = new LinkedHashMap<>() ; 
+    private Map<String, AsyncTask> finishedTasks = new LinkedHashMap<>() ;
+    
+    private static AsyncPool instance = new AsyncPool() ;
+    public static AsyncPool get() 
+    { return instance ; }
+
+    private AsyncPool() { }
+    
+    public AsyncTask submit(Runnable task, String displayName, DataService dataService) { 
+        synchronized(mutex) {
+            String taskId = Long.toString(++counter) ;
+            Fuseki.serverLog.info(format("Task : %s : %s",taskId, displayName)) ;
+            Callable<Object> c = Executors.callable(task) ;
+            AsyncTask asyncTask = new AsyncTask(c, this, taskId, displayName, dataService) ;
+            Future<Object> x = executor.submit(asyncTask) ;
+            runningTasks.put(taskId, asyncTask) ;
+            return asyncTask ;
+        }
+    }
+    
+    public Collection<AsyncTask> tasks() {
+        synchronized(mutex) {
+            List<AsyncTask> x = new ArrayList<>(runningTasks.size()+finishedTasks.size()) ;
+            x.addAll(runningTasks.values()) ;
+            x.addAll(finishedTasks.values()) ;
+            return x ;
+        }
+    }
+    
+    public void finished(AsyncTask task) { 
+        synchronized(mutex) {
+            String id = task.getTaskId() ;
+            runningTasks.remove(id) ;
+            while ( finishedTasks.size() >= MAX_FINISHED )
+                finishedTasks.remove(task.getTaskId()) ;
+            finishedTasks.put(id, task) ;
+        }
+    }
+
+    public AsyncTask getRunningTask(String taskId) {
+        synchronized(mutex) {
+            return runningTasks.get(taskId) ;
+        }
+    }
+
+    /** Get for any state */
+    public AsyncTask getTask(String taskId) {
+        synchronized(mutex) {
+            AsyncTask task = runningTasks.get(taskId) ;
+            if ( task != null )
+                return task ;
+            return finishedTasks.get(taskId) ;
+        }
+    }
+}
+


[50/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/bin/s-head
----------------------------------------------------------------------
diff --git a/jena-fuseki2/bin/s-head b/jena-fuseki2/bin/s-head
deleted file mode 100755
index 0e3a807..0000000
--- a/jena-fuseki2/bin/s-head
+++ /dev/null
@@ -1,707 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: 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.
-
-# SPARQL HTTP Update, client.
-
-require 'optparse'
-require 'net/http'
-require 'uri'
-require 'cgi'
-require 'pp'
-require 'ostruct'
-
-# ToDo
-#  Allow a choice of media type for GET
-#   --accept "content-type" (and abbreviations)
-#   --header "Add:this"
-#   --user, --password
-#  Basic authentication: request.basic_auth("username", "password")
-#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
-
-SOH_NAME="SOH"
-SOH_VERSION="0.0.0"
-
-$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
-
-# What about direct naming?
-
-# Names
-$mtTurtle           = 'text/turtle;charset=utf-8'
-$mtRDF              = 'application/rdf+xml'
-$mtText             = 'text/plain'
-$mtNQuads           = 'text/n-quads'
-$mtTriG             = 'application/trig'
-$mtSparqlResultsX   = 'application/sparql-results+xml'
-$mtSparqlResultsJ   = 'application/sparql-results+json'
-$mtAppJSON          = 'application/json'
-$mtAppXML           = 'application/xml'
-$mtSparqlResultsTSV = 'application/sparql-results+tsv'
-$mtSparqlResultsCSV = 'application/sparql-results+csv'
-$mtSparqlUpdate     = 'application/sparql-update'
-$mtWWWForm          = 'application/x-www-form-urlencoded'
-$mtSparqlQuery      = "application/sparql-query" ;
-
-# Global media type table.
-$fileMediaTypes = {}
-$fileMediaTypes['ttl']   = $mtTurtle
-$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
-$fileMediaTypes['nt']    = $mtText
-$fileMediaTypes['rdf']   = $mtRDF
-$fileMediaTypes['owl']   = $mtRDF
-$fileMediaTypes['nq']    = $mtNQuads
-$fileMediaTypes['trig']  = $mtTriG
-
-# Global charset : no entry means "don't set"
-$charsetUTF8      = 'utf-8'
-$charset = {}
-$charset[$mtTurtle]   = 'utf-8'
-$charset[$mtText]     = 'ascii'
-$charset[$mtTriG]     = 'utf-8'
-$charset[$mtNQuads]   = 'ascii'
-
-# Headers
-
-$hContentType         = 'Content-Type'
-# $hContentEncoding     = 'Content-Encoding'
-$hContentLength       = 'Content-Length'
-# $hContentLocation     = 'Content-Location'
-# $hContentRange        = 'Content-Range'
-
-$hAccept              = 'Accept'
-$hAcceptCharset       = 'Accept-Charset'
-$hAcceptEncoding      = 'Accept-Encoding'
-$hAcceptRanges        = 'Accept-Ranges' 
-
-$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
-$print_http = false
-
-# Default for GET
-# At least allow anythign (and hope!)
-$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
-# For SPARQL query
-$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
-
-# Accept any in case of trouble.
-$accept_rdf="#{$accept_rdf} , */*;q=0.1"
-$accept_results="#{$accept_results} , */*;q=0.1" 
-
-# The media type usually forces the charset.
-$accept_charset=nil
-
-## Who we are.
-## Two styles:
-##    s-query .....
-##    soh query .....
-
-$cmd = File.basename($0)
-if $cmd == 'soh'
-then
-  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
-end
-
-if ! $cmd.start_with?('s-') && $cmd != 'soh'
-  $cmd = 's-'+$cmd
-end
-
-## -------- 
-
-def GET(dataset, graph)
-  print "GET #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  get_worker(requestURI, headers)
-end
-
-def get_worker(requestURI, headers)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Get.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-def HEAD(dataset, graph)
-  print "HEAD #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Head.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def PUT(dataset, graph, file)
-  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Put)
-end
-
-def POST(dataset, graph, file)
-  print "POST #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Post)
-end
-
-def DELETE(dataset, graph)
-  print "DELETE #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Delete.new(uri.request_uri)
-  headers = {}
-  headers.merge!($headers)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def uri_escape(string)
-  CGI.escape(string)
-end
-
-def target(dataset, graph)
-  return dataset+"?default" if graph == "default"
-  return dataset+"?graph="+uri_escape(graph)
-end
-
-def send_body(dataset, graph, file, method)
-  mt = content_type(file)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hContentType] = mt
-  headers[$hContentLength] = File.size(file).to_s
-  ## p headers
-
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  
-  request = method.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  request.body_stream = File.open(file)
-  response_no_body(uri, request)
-end
-
-def response_no_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue Exception => e  
-    # puts e.message  
-    #puts e.backtrace.inspect  
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-  response = http.request(request)
-  print_http_response(response)
-  case response
-  when Net::HTTPSuccess, Net::HTTPRedirection
-    # OK
-  when Net::HTTPNotFound
-    warn_exit "404 Not found: #{uri}", 9
-    #print response.body
-  else
-    warn_exit "#{response.code} #{response.message} #{uri}", 9
-    # Unreachable
-      response.error!
-  end
-  # NO BODY IN RESPONSE
-end
-
-def response_print_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue => e  
-    #puts e.backtrace.inspect  
-    #print e.class
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-
-  # Add a blank line if headers were output.
-  print "\n" if $http_print ;
-
-  begin
-    response = http.request(request) { |res| 
-      print_http_response(res)
-      #puts res.code
-      res.read_body do |segment|
-        print segment
-      end
-    }
-    case response
-    when Net::HTTPSuccess, Net::HTTPRedirection
-      # OK
-    when Net::HTTPNotFound
-      warn_exit "404 Not found: #{uri}", 9
-      #print response.body
-    else
-      warn_exit "#{response.code}: #{uri}", 9
-      # Unreachable
-      response.error!
-    end
-  rescue EOFError => e
-    warn_exit "IO Error: "+e.message, 3
-  end
-end
-
-def print_http_request(uri, request)
-  return unless $print_http
-  #print "Request\n"
-  print request.method," ",uri, "\n"
-  print_headers("  ",request)
-end
-
-def print_http_response(response)
-  return unless $print_http
-  #print "Response\n"
-  print response.code, " ", response.message, "\n"
-  print_headers("  ",response)
-end
-
-def print_headers(marker, headers)
-  headers.each do |k,v| 
-    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
-    printf "%s%-20s %s\n",marker,k,v
-  end
-end
-
-def content_type(file)
-  file =~ /\.([^.]*)$/
-  ext = $1
-  mt = $fileMediaTypes[ext]
-  cs = $charset[mt]
-  mt = mt+';charset='+cs if ! cs.nil?
-  return mt
-end
-
-def charset(content_type)
-  return $charset[content_type]
-end
-
-def warn_exit(msg, rc)
-    warn msg
-    exit rc ;
-end
-
-def parseURI(uri_string)
-  begin
-    return URI.parse(uri_string).to_s
-  rescue URI::InvalidURIError => err
-    warn_exit "Bad URI: <#{uri_string}>", 2
-  end
-end
-
-## ---- Command
-
-def cmd_soh(command=nil)
-  ## Command line
-  options = {}
-  optparse = OptionParser.new do |opts|
-    # Set a banner, displayed at the top
-    # of the help screen.
-    case $cmd
-    when "s-http", "sparql-http", "soh"
-      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
-    when "s-get", "s-head", "s-delete"
-      banner="$cmd  datasetURI graph"
-    end
-
-    opts.banner = $banner
-    # Define the options, and what they do
-    
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    
-    options[:version] = false
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end
-    
-    # This displays the help screen, all programs are
-    # assumed to have this option.
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  if command.nil?
-    if ARGV.size == 0
-      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
-      exit 1
-    end
-    cmdPrint=ARGV.shift
-    command=cmdPrint.upcase
-  else
-    cmdPrint=command
-  end
-
-  case command
-  when "HEAD", "GET", "DELETE"
-    requiredFile=false
-  when "PUT", "POST"
-    requiredFile=true
-  when "QUERY"
-    cmd_sparql_query
-  when "UPDATE"
-    cmd_sparql_update
-  else
-    warn_exit "Unknown command: #{command}", 2
-  end
-
-  if requiredFile 
-  then
-    if ARGV.size != 3
-      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
-    end
-  else
-    if ARGV.size != 2
-      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
-    end
-  end
-
-  dataset=parseURI(ARGV.shift)
-  # Relative URI?
-  graph=parseURI(ARGV.shift)
-  file=""
-  if requiredFile
-  then
-    file = ARGV.shift if requiredFile
-    if ! File.exist?(file)
-      warn_exit "No such file: "+file, 3
-    end
-    if File.directory?(file)
-      warn_exit "File is a directory: "+file, 3
-    end
-  end
-
-  case command
-  when "GET"
-    GET(dataset, graph)
-  when "HEAD"
-    HEAD(dataset, graph)
-  when "PUT"
-    PUT(dataset, graph, file)
-  when "DELETE"
-    DELETE(dataset, graph)
-  when "POST"
-    POST(dataset, graph, file)
-  else
-    warn_exit "Internal error: Unknown command: #{cmd}", 2
-  end
-  exit 0
-end
-
-## --------
-def string_or_file(arg)
-  return arg if ! arg.match(/^@/)
-  a=(arg[1..-1])
-  open(a, 'rb'){|f| f.read}
-end
-
-## -------- SPARQL Query
-
-## Choose method
-def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
-   if ! query_file.nil?
-    query = open(query_file, 'rb'){|f| f.read}
-  end
-  if forcePOST || query.length >= 2*1024 
-    SPARQL_query_POST(service, query, args2)
-  else
-    SPARQL_query_GET(service, query, args2)
-  end
-end
-
-## By GET
-
-def SPARQL_query_GET(service, query, args2)
-  args = { "query" => query }
-  args.merge!(args2)
-  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  action="#{service}?#{qs}"
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  get_worker(action, headers)
-end
-
-## By POST
-
-def SPARQL_query_POST(service, query, args2)
-  # DRY - body/no body for each of request and response.
-  post_params={ "query" => query }
-  post_params.merge!(args2)
-  uri = URI.parse(service)
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  execute_post_form_body(uri, headers, post_params)
-end
-
-def execute_post_form_body(uri, headers, post_params)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = qs.length.to_s
-  request.initialize_http_header(headers)
-  request.body = qs
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-# Usage: -v --help --file= --query=
-def cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
-      options[:file]=file
-    end
-    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
-            'Set the output argument') do |type|
-      options[:output]=type
-    end
-    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
-            'Set the accept header type') do |type|
-      options[:accept]=type
-    end
-    options[:verbose] = false
-    opts.on( '--post', 'Force use of POST' ) do
-      options[:post] = true
-    end
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
-    warn e
-    exit 1
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-  usePOST = options[:post]
-
-  service = options[:service]
-  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
-
-  # Query
-  query=nil
-  query_file=options[:file]
-  if query_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No query specified.',1
-    end
-  if query_file.nil?
-    query = ARGV.shift
-    if query.match(/^@/)
-      query_file = query[1..-1]
-      query = nil
-    end
-  end
-
-  # --output ==> output= (non-standard)
-  args={}
-  case options[:output]
-  when nil
-  when  "json","xml","text","csv","tsv"
-    args['output'] = options[:output]
-  when :json,:xml,:text,:csv,:tsv
-    args['output'] = options[:output].to_s
-  else
-    warn_exit "Unrecognized output type: "+options[:output],2
-  end
-
-  # --accept
-  # options[:accept]
-
-  print "SPARQL #{service}\n" if $verbose
-  #args={"output"=>"text"}
-  SPARQL_query(service, query, query_file, usePOST, args)
-  exit(0)
-end
-
-## -------- SPARQL Update
-
-# Update sent as a WWW form.
-def SPARQL_update_by_form(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  # args? encode?
-  body="update="+uri_escape(update)
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = body.length.to_s
-  uri = URI.parse(service)
-  execute_post_form(uri, headers, body)
-end
-
-# DRY - query form.
-def execute_post_form(uri, headers, body)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = body
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def SPARQL_update(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  headers[$hContentType] = $mtSparqlUpdate
-  uri = URI.parse(service)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = update
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def cmd_sparql_update(by_raw_post=true)
-  # Share with cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
-      options[:file]=file
-    end
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  service = options[:service]
-  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
-  
-  update=nil
-  update_file=options[:file]
-
-  if update_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No update specified.',1
-    end
-  if update_file.nil?
-    update = ARGV.shift
-    if update.match(/^@/)
-      update_file = update[1..-1]
-      update = nil
-    end
-  end
-  
-  print "SPARQL-Update #{service}\n" if $verbose
-  args={}
-
-  # Reads in the file :-(
-  if update.nil?
-  then
-    update = open(update_file, 'rb'){|f| f.read}
-  else
-    update = string_or_file(update)
-  end
-
-  if by_raw_post
-    SPARQL_update(service, update, args)
-  else
-    SPARQL_update_by_form(service, update, args)
-  end
-  exit(0)
-end
-
-## -------
-
-case $cmd
-when "s-http", "sparql-http", "soh"
-  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
-  cmd_soh
-when "s-get", "s-head", "s-put", "s-delete", "s-post"
-
-  case $cmd
-  when "s-get", "s-head", "s-delete"
-    $banner="#{$cmd} datasetURI graph"
-  when "s-put", "s-post"
-    $banner="#{$cmd} datasetURI graph file"
-  end
-  cmd2 = $cmd.sub(/^s-/, '').upcase
-  cmd_soh cmd2
-
-when "s-query", "sparql-query"
-  cmd_sparql_query
-when "s-update", "sparql-update"
-  cmd_sparql_update true
-when "s-update-form", "sparql-update-form"
-  cmd_sparql_update false
-else 
-  warn_exit "Unknown: "+$cmd, 1
-end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/bin/s-post
----------------------------------------------------------------------
diff --git a/jena-fuseki2/bin/s-post b/jena-fuseki2/bin/s-post
deleted file mode 100755
index 0e3a807..0000000
--- a/jena-fuseki2/bin/s-post
+++ /dev/null
@@ -1,707 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: 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.
-
-# SPARQL HTTP Update, client.
-
-require 'optparse'
-require 'net/http'
-require 'uri'
-require 'cgi'
-require 'pp'
-require 'ostruct'
-
-# ToDo
-#  Allow a choice of media type for GET
-#   --accept "content-type" (and abbreviations)
-#   --header "Add:this"
-#   --user, --password
-#  Basic authentication: request.basic_auth("username", "password")
-#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
-
-SOH_NAME="SOH"
-SOH_VERSION="0.0.0"
-
-$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
-
-# What about direct naming?
-
-# Names
-$mtTurtle           = 'text/turtle;charset=utf-8'
-$mtRDF              = 'application/rdf+xml'
-$mtText             = 'text/plain'
-$mtNQuads           = 'text/n-quads'
-$mtTriG             = 'application/trig'
-$mtSparqlResultsX   = 'application/sparql-results+xml'
-$mtSparqlResultsJ   = 'application/sparql-results+json'
-$mtAppJSON          = 'application/json'
-$mtAppXML           = 'application/xml'
-$mtSparqlResultsTSV = 'application/sparql-results+tsv'
-$mtSparqlResultsCSV = 'application/sparql-results+csv'
-$mtSparqlUpdate     = 'application/sparql-update'
-$mtWWWForm          = 'application/x-www-form-urlencoded'
-$mtSparqlQuery      = "application/sparql-query" ;
-
-# Global media type table.
-$fileMediaTypes = {}
-$fileMediaTypes['ttl']   = $mtTurtle
-$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
-$fileMediaTypes['nt']    = $mtText
-$fileMediaTypes['rdf']   = $mtRDF
-$fileMediaTypes['owl']   = $mtRDF
-$fileMediaTypes['nq']    = $mtNQuads
-$fileMediaTypes['trig']  = $mtTriG
-
-# Global charset : no entry means "don't set"
-$charsetUTF8      = 'utf-8'
-$charset = {}
-$charset[$mtTurtle]   = 'utf-8'
-$charset[$mtText]     = 'ascii'
-$charset[$mtTriG]     = 'utf-8'
-$charset[$mtNQuads]   = 'ascii'
-
-# Headers
-
-$hContentType         = 'Content-Type'
-# $hContentEncoding     = 'Content-Encoding'
-$hContentLength       = 'Content-Length'
-# $hContentLocation     = 'Content-Location'
-# $hContentRange        = 'Content-Range'
-
-$hAccept              = 'Accept'
-$hAcceptCharset       = 'Accept-Charset'
-$hAcceptEncoding      = 'Accept-Encoding'
-$hAcceptRanges        = 'Accept-Ranges' 
-
-$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
-$print_http = false
-
-# Default for GET
-# At least allow anythign (and hope!)
-$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
-# For SPARQL query
-$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
-
-# Accept any in case of trouble.
-$accept_rdf="#{$accept_rdf} , */*;q=0.1"
-$accept_results="#{$accept_results} , */*;q=0.1" 
-
-# The media type usually forces the charset.
-$accept_charset=nil
-
-## Who we are.
-## Two styles:
-##    s-query .....
-##    soh query .....
-
-$cmd = File.basename($0)
-if $cmd == 'soh'
-then
-  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
-end
-
-if ! $cmd.start_with?('s-') && $cmd != 'soh'
-  $cmd = 's-'+$cmd
-end
-
-## -------- 
-
-def GET(dataset, graph)
-  print "GET #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  get_worker(requestURI, headers)
-end
-
-def get_worker(requestURI, headers)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Get.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-def HEAD(dataset, graph)
-  print "HEAD #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Head.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def PUT(dataset, graph, file)
-  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Put)
-end
-
-def POST(dataset, graph, file)
-  print "POST #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Post)
-end
-
-def DELETE(dataset, graph)
-  print "DELETE #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Delete.new(uri.request_uri)
-  headers = {}
-  headers.merge!($headers)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def uri_escape(string)
-  CGI.escape(string)
-end
-
-def target(dataset, graph)
-  return dataset+"?default" if graph == "default"
-  return dataset+"?graph="+uri_escape(graph)
-end
-
-def send_body(dataset, graph, file, method)
-  mt = content_type(file)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hContentType] = mt
-  headers[$hContentLength] = File.size(file).to_s
-  ## p headers
-
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  
-  request = method.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  request.body_stream = File.open(file)
-  response_no_body(uri, request)
-end
-
-def response_no_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue Exception => e  
-    # puts e.message  
-    #puts e.backtrace.inspect  
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-  response = http.request(request)
-  print_http_response(response)
-  case response
-  when Net::HTTPSuccess, Net::HTTPRedirection
-    # OK
-  when Net::HTTPNotFound
-    warn_exit "404 Not found: #{uri}", 9
-    #print response.body
-  else
-    warn_exit "#{response.code} #{response.message} #{uri}", 9
-    # Unreachable
-      response.error!
-  end
-  # NO BODY IN RESPONSE
-end
-
-def response_print_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue => e  
-    #puts e.backtrace.inspect  
-    #print e.class
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-
-  # Add a blank line if headers were output.
-  print "\n" if $http_print ;
-
-  begin
-    response = http.request(request) { |res| 
-      print_http_response(res)
-      #puts res.code
-      res.read_body do |segment|
-        print segment
-      end
-    }
-    case response
-    when Net::HTTPSuccess, Net::HTTPRedirection
-      # OK
-    when Net::HTTPNotFound
-      warn_exit "404 Not found: #{uri}", 9
-      #print response.body
-    else
-      warn_exit "#{response.code}: #{uri}", 9
-      # Unreachable
-      response.error!
-    end
-  rescue EOFError => e
-    warn_exit "IO Error: "+e.message, 3
-  end
-end
-
-def print_http_request(uri, request)
-  return unless $print_http
-  #print "Request\n"
-  print request.method," ",uri, "\n"
-  print_headers("  ",request)
-end
-
-def print_http_response(response)
-  return unless $print_http
-  #print "Response\n"
-  print response.code, " ", response.message, "\n"
-  print_headers("  ",response)
-end
-
-def print_headers(marker, headers)
-  headers.each do |k,v| 
-    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
-    printf "%s%-20s %s\n",marker,k,v
-  end
-end
-
-def content_type(file)
-  file =~ /\.([^.]*)$/
-  ext = $1
-  mt = $fileMediaTypes[ext]
-  cs = $charset[mt]
-  mt = mt+';charset='+cs if ! cs.nil?
-  return mt
-end
-
-def charset(content_type)
-  return $charset[content_type]
-end
-
-def warn_exit(msg, rc)
-    warn msg
-    exit rc ;
-end
-
-def parseURI(uri_string)
-  begin
-    return URI.parse(uri_string).to_s
-  rescue URI::InvalidURIError => err
-    warn_exit "Bad URI: <#{uri_string}>", 2
-  end
-end
-
-## ---- Command
-
-def cmd_soh(command=nil)
-  ## Command line
-  options = {}
-  optparse = OptionParser.new do |opts|
-    # Set a banner, displayed at the top
-    # of the help screen.
-    case $cmd
-    when "s-http", "sparql-http", "soh"
-      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
-    when "s-get", "s-head", "s-delete"
-      banner="$cmd  datasetURI graph"
-    end
-
-    opts.banner = $banner
-    # Define the options, and what they do
-    
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    
-    options[:version] = false
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end
-    
-    # This displays the help screen, all programs are
-    # assumed to have this option.
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  if command.nil?
-    if ARGV.size == 0
-      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
-      exit 1
-    end
-    cmdPrint=ARGV.shift
-    command=cmdPrint.upcase
-  else
-    cmdPrint=command
-  end
-
-  case command
-  when "HEAD", "GET", "DELETE"
-    requiredFile=false
-  when "PUT", "POST"
-    requiredFile=true
-  when "QUERY"
-    cmd_sparql_query
-  when "UPDATE"
-    cmd_sparql_update
-  else
-    warn_exit "Unknown command: #{command}", 2
-  end
-
-  if requiredFile 
-  then
-    if ARGV.size != 3
-      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
-    end
-  else
-    if ARGV.size != 2
-      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
-    end
-  end
-
-  dataset=parseURI(ARGV.shift)
-  # Relative URI?
-  graph=parseURI(ARGV.shift)
-  file=""
-  if requiredFile
-  then
-    file = ARGV.shift if requiredFile
-    if ! File.exist?(file)
-      warn_exit "No such file: "+file, 3
-    end
-    if File.directory?(file)
-      warn_exit "File is a directory: "+file, 3
-    end
-  end
-
-  case command
-  when "GET"
-    GET(dataset, graph)
-  when "HEAD"
-    HEAD(dataset, graph)
-  when "PUT"
-    PUT(dataset, graph, file)
-  when "DELETE"
-    DELETE(dataset, graph)
-  when "POST"
-    POST(dataset, graph, file)
-  else
-    warn_exit "Internal error: Unknown command: #{cmd}", 2
-  end
-  exit 0
-end
-
-## --------
-def string_or_file(arg)
-  return arg if ! arg.match(/^@/)
-  a=(arg[1..-1])
-  open(a, 'rb'){|f| f.read}
-end
-
-## -------- SPARQL Query
-
-## Choose method
-def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
-   if ! query_file.nil?
-    query = open(query_file, 'rb'){|f| f.read}
-  end
-  if forcePOST || query.length >= 2*1024 
-    SPARQL_query_POST(service, query, args2)
-  else
-    SPARQL_query_GET(service, query, args2)
-  end
-end
-
-## By GET
-
-def SPARQL_query_GET(service, query, args2)
-  args = { "query" => query }
-  args.merge!(args2)
-  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  action="#{service}?#{qs}"
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  get_worker(action, headers)
-end
-
-## By POST
-
-def SPARQL_query_POST(service, query, args2)
-  # DRY - body/no body for each of request and response.
-  post_params={ "query" => query }
-  post_params.merge!(args2)
-  uri = URI.parse(service)
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  execute_post_form_body(uri, headers, post_params)
-end
-
-def execute_post_form_body(uri, headers, post_params)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = qs.length.to_s
-  request.initialize_http_header(headers)
-  request.body = qs
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-# Usage: -v --help --file= --query=
-def cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
-      options[:file]=file
-    end
-    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
-            'Set the output argument') do |type|
-      options[:output]=type
-    end
-    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
-            'Set the accept header type') do |type|
-      options[:accept]=type
-    end
-    options[:verbose] = false
-    opts.on( '--post', 'Force use of POST' ) do
-      options[:post] = true
-    end
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
-    warn e
-    exit 1
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-  usePOST = options[:post]
-
-  service = options[:service]
-  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
-
-  # Query
-  query=nil
-  query_file=options[:file]
-  if query_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No query specified.',1
-    end
-  if query_file.nil?
-    query = ARGV.shift
-    if query.match(/^@/)
-      query_file = query[1..-1]
-      query = nil
-    end
-  end
-
-  # --output ==> output= (non-standard)
-  args={}
-  case options[:output]
-  when nil
-  when  "json","xml","text","csv","tsv"
-    args['output'] = options[:output]
-  when :json,:xml,:text,:csv,:tsv
-    args['output'] = options[:output].to_s
-  else
-    warn_exit "Unrecognized output type: "+options[:output],2
-  end
-
-  # --accept
-  # options[:accept]
-
-  print "SPARQL #{service}\n" if $verbose
-  #args={"output"=>"text"}
-  SPARQL_query(service, query, query_file, usePOST, args)
-  exit(0)
-end
-
-## -------- SPARQL Update
-
-# Update sent as a WWW form.
-def SPARQL_update_by_form(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  # args? encode?
-  body="update="+uri_escape(update)
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = body.length.to_s
-  uri = URI.parse(service)
-  execute_post_form(uri, headers, body)
-end
-
-# DRY - query form.
-def execute_post_form(uri, headers, body)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = body
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def SPARQL_update(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  headers[$hContentType] = $mtSparqlUpdate
-  uri = URI.parse(service)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = update
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def cmd_sparql_update(by_raw_post=true)
-  # Share with cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
-      options[:file]=file
-    end
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  service = options[:service]
-  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
-  
-  update=nil
-  update_file=options[:file]
-
-  if update_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No update specified.',1
-    end
-  if update_file.nil?
-    update = ARGV.shift
-    if update.match(/^@/)
-      update_file = update[1..-1]
-      update = nil
-    end
-  end
-  
-  print "SPARQL-Update #{service}\n" if $verbose
-  args={}
-
-  # Reads in the file :-(
-  if update.nil?
-  then
-    update = open(update_file, 'rb'){|f| f.read}
-  else
-    update = string_or_file(update)
-  end
-
-  if by_raw_post
-    SPARQL_update(service, update, args)
-  else
-    SPARQL_update_by_form(service, update, args)
-  end
-  exit(0)
-end
-
-## -------
-
-case $cmd
-when "s-http", "sparql-http", "soh"
-  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
-  cmd_soh
-when "s-get", "s-head", "s-put", "s-delete", "s-post"
-
-  case $cmd
-  when "s-get", "s-head", "s-delete"
-    $banner="#{$cmd} datasetURI graph"
-  when "s-put", "s-post"
-    $banner="#{$cmd} datasetURI graph file"
-  end
-  cmd2 = $cmd.sub(/^s-/, '').upcase
-  cmd_soh cmd2
-
-when "s-query", "sparql-query"
-  cmd_sparql_query
-when "s-update", "sparql-update"
-  cmd_sparql_update true
-when "s-update-form", "sparql-update-form"
-  cmd_sparql_update false
-else 
-  warn_exit "Unknown: "+$cmd, 1
-end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/bin/s-put
----------------------------------------------------------------------
diff --git a/jena-fuseki2/bin/s-put b/jena-fuseki2/bin/s-put
deleted file mode 100755
index 0e3a807..0000000
--- a/jena-fuseki2/bin/s-put
+++ /dev/null
@@ -1,707 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: 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.
-
-# SPARQL HTTP Update, client.
-
-require 'optparse'
-require 'net/http'
-require 'uri'
-require 'cgi'
-require 'pp'
-require 'ostruct'
-
-# ToDo
-#  Allow a choice of media type for GET
-#   --accept "content-type" (and abbreviations)
-#   --header "Add:this"
-#   --user, --password
-#  Basic authentication: request.basic_auth("username", "password")
-#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
-
-SOH_NAME="SOH"
-SOH_VERSION="0.0.0"
-
-$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
-
-# What about direct naming?
-
-# Names
-$mtTurtle           = 'text/turtle;charset=utf-8'
-$mtRDF              = 'application/rdf+xml'
-$mtText             = 'text/plain'
-$mtNQuads           = 'text/n-quads'
-$mtTriG             = 'application/trig'
-$mtSparqlResultsX   = 'application/sparql-results+xml'
-$mtSparqlResultsJ   = 'application/sparql-results+json'
-$mtAppJSON          = 'application/json'
-$mtAppXML           = 'application/xml'
-$mtSparqlResultsTSV = 'application/sparql-results+tsv'
-$mtSparqlResultsCSV = 'application/sparql-results+csv'
-$mtSparqlUpdate     = 'application/sparql-update'
-$mtWWWForm          = 'application/x-www-form-urlencoded'
-$mtSparqlQuery      = "application/sparql-query" ;
-
-# Global media type table.
-$fileMediaTypes = {}
-$fileMediaTypes['ttl']   = $mtTurtle
-$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
-$fileMediaTypes['nt']    = $mtText
-$fileMediaTypes['rdf']   = $mtRDF
-$fileMediaTypes['owl']   = $mtRDF
-$fileMediaTypes['nq']    = $mtNQuads
-$fileMediaTypes['trig']  = $mtTriG
-
-# Global charset : no entry means "don't set"
-$charsetUTF8      = 'utf-8'
-$charset = {}
-$charset[$mtTurtle]   = 'utf-8'
-$charset[$mtText]     = 'ascii'
-$charset[$mtTriG]     = 'utf-8'
-$charset[$mtNQuads]   = 'ascii'
-
-# Headers
-
-$hContentType         = 'Content-Type'
-# $hContentEncoding     = 'Content-Encoding'
-$hContentLength       = 'Content-Length'
-# $hContentLocation     = 'Content-Location'
-# $hContentRange        = 'Content-Range'
-
-$hAccept              = 'Accept'
-$hAcceptCharset       = 'Accept-Charset'
-$hAcceptEncoding      = 'Accept-Encoding'
-$hAcceptRanges        = 'Accept-Ranges' 
-
-$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
-$print_http = false
-
-# Default for GET
-# At least allow anythign (and hope!)
-$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
-# For SPARQL query
-$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
-
-# Accept any in case of trouble.
-$accept_rdf="#{$accept_rdf} , */*;q=0.1"
-$accept_results="#{$accept_results} , */*;q=0.1" 
-
-# The media type usually forces the charset.
-$accept_charset=nil
-
-## Who we are.
-## Two styles:
-##    s-query .....
-##    soh query .....
-
-$cmd = File.basename($0)
-if $cmd == 'soh'
-then
-  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
-end
-
-if ! $cmd.start_with?('s-') && $cmd != 'soh'
-  $cmd = 's-'+$cmd
-end
-
-## -------- 
-
-def GET(dataset, graph)
-  print "GET #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  get_worker(requestURI, headers)
-end
-
-def get_worker(requestURI, headers)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Get.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-def HEAD(dataset, graph)
-  print "HEAD #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Head.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def PUT(dataset, graph, file)
-  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Put)
-end
-
-def POST(dataset, graph, file)
-  print "POST #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Post)
-end
-
-def DELETE(dataset, graph)
-  print "DELETE #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Delete.new(uri.request_uri)
-  headers = {}
-  headers.merge!($headers)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def uri_escape(string)
-  CGI.escape(string)
-end
-
-def target(dataset, graph)
-  return dataset+"?default" if graph == "default"
-  return dataset+"?graph="+uri_escape(graph)
-end
-
-def send_body(dataset, graph, file, method)
-  mt = content_type(file)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hContentType] = mt
-  headers[$hContentLength] = File.size(file).to_s
-  ## p headers
-
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  
-  request = method.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  request.body_stream = File.open(file)
-  response_no_body(uri, request)
-end
-
-def response_no_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue Exception => e  
-    # puts e.message  
-    #puts e.backtrace.inspect  
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-  response = http.request(request)
-  print_http_response(response)
-  case response
-  when Net::HTTPSuccess, Net::HTTPRedirection
-    # OK
-  when Net::HTTPNotFound
-    warn_exit "404 Not found: #{uri}", 9
-    #print response.body
-  else
-    warn_exit "#{response.code} #{response.message} #{uri}", 9
-    # Unreachable
-      response.error!
-  end
-  # NO BODY IN RESPONSE
-end
-
-def response_print_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue => e  
-    #puts e.backtrace.inspect  
-    #print e.class
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-
-  # Add a blank line if headers were output.
-  print "\n" if $http_print ;
-
-  begin
-    response = http.request(request) { |res| 
-      print_http_response(res)
-      #puts res.code
-      res.read_body do |segment|
-        print segment
-      end
-    }
-    case response
-    when Net::HTTPSuccess, Net::HTTPRedirection
-      # OK
-    when Net::HTTPNotFound
-      warn_exit "404 Not found: #{uri}", 9
-      #print response.body
-    else
-      warn_exit "#{response.code}: #{uri}", 9
-      # Unreachable
-      response.error!
-    end
-  rescue EOFError => e
-    warn_exit "IO Error: "+e.message, 3
-  end
-end
-
-def print_http_request(uri, request)
-  return unless $print_http
-  #print "Request\n"
-  print request.method," ",uri, "\n"
-  print_headers("  ",request)
-end
-
-def print_http_response(response)
-  return unless $print_http
-  #print "Response\n"
-  print response.code, " ", response.message, "\n"
-  print_headers("  ",response)
-end
-
-def print_headers(marker, headers)
-  headers.each do |k,v| 
-    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
-    printf "%s%-20s %s\n",marker,k,v
-  end
-end
-
-def content_type(file)
-  file =~ /\.([^.]*)$/
-  ext = $1
-  mt = $fileMediaTypes[ext]
-  cs = $charset[mt]
-  mt = mt+';charset='+cs if ! cs.nil?
-  return mt
-end
-
-def charset(content_type)
-  return $charset[content_type]
-end
-
-def warn_exit(msg, rc)
-    warn msg
-    exit rc ;
-end
-
-def parseURI(uri_string)
-  begin
-    return URI.parse(uri_string).to_s
-  rescue URI::InvalidURIError => err
-    warn_exit "Bad URI: <#{uri_string}>", 2
-  end
-end
-
-## ---- Command
-
-def cmd_soh(command=nil)
-  ## Command line
-  options = {}
-  optparse = OptionParser.new do |opts|
-    # Set a banner, displayed at the top
-    # of the help screen.
-    case $cmd
-    when "s-http", "sparql-http", "soh"
-      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
-    when "s-get", "s-head", "s-delete"
-      banner="$cmd  datasetURI graph"
-    end
-
-    opts.banner = $banner
-    # Define the options, and what they do
-    
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    
-    options[:version] = false
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end
-    
-    # This displays the help screen, all programs are
-    # assumed to have this option.
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  if command.nil?
-    if ARGV.size == 0
-      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
-      exit 1
-    end
-    cmdPrint=ARGV.shift
-    command=cmdPrint.upcase
-  else
-    cmdPrint=command
-  end
-
-  case command
-  when "HEAD", "GET", "DELETE"
-    requiredFile=false
-  when "PUT", "POST"
-    requiredFile=true
-  when "QUERY"
-    cmd_sparql_query
-  when "UPDATE"
-    cmd_sparql_update
-  else
-    warn_exit "Unknown command: #{command}", 2
-  end
-
-  if requiredFile 
-  then
-    if ARGV.size != 3
-      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
-    end
-  else
-    if ARGV.size != 2
-      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
-    end
-  end
-
-  dataset=parseURI(ARGV.shift)
-  # Relative URI?
-  graph=parseURI(ARGV.shift)
-  file=""
-  if requiredFile
-  then
-    file = ARGV.shift if requiredFile
-    if ! File.exist?(file)
-      warn_exit "No such file: "+file, 3
-    end
-    if File.directory?(file)
-      warn_exit "File is a directory: "+file, 3
-    end
-  end
-
-  case command
-  when "GET"
-    GET(dataset, graph)
-  when "HEAD"
-    HEAD(dataset, graph)
-  when "PUT"
-    PUT(dataset, graph, file)
-  when "DELETE"
-    DELETE(dataset, graph)
-  when "POST"
-    POST(dataset, graph, file)
-  else
-    warn_exit "Internal error: Unknown command: #{cmd}", 2
-  end
-  exit 0
-end
-
-## --------
-def string_or_file(arg)
-  return arg if ! arg.match(/^@/)
-  a=(arg[1..-1])
-  open(a, 'rb'){|f| f.read}
-end
-
-## -------- SPARQL Query
-
-## Choose method
-def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
-   if ! query_file.nil?
-    query = open(query_file, 'rb'){|f| f.read}
-  end
-  if forcePOST || query.length >= 2*1024 
-    SPARQL_query_POST(service, query, args2)
-  else
-    SPARQL_query_GET(service, query, args2)
-  end
-end
-
-## By GET
-
-def SPARQL_query_GET(service, query, args2)
-  args = { "query" => query }
-  args.merge!(args2)
-  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  action="#{service}?#{qs}"
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  get_worker(action, headers)
-end
-
-## By POST
-
-def SPARQL_query_POST(service, query, args2)
-  # DRY - body/no body for each of request and response.
-  post_params={ "query" => query }
-  post_params.merge!(args2)
-  uri = URI.parse(service)
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  execute_post_form_body(uri, headers, post_params)
-end
-
-def execute_post_form_body(uri, headers, post_params)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = qs.length.to_s
-  request.initialize_http_header(headers)
-  request.body = qs
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-# Usage: -v --help --file= --query=
-def cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
-      options[:file]=file
-    end
-    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
-            'Set the output argument') do |type|
-      options[:output]=type
-    end
-    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
-            'Set the accept header type') do |type|
-      options[:accept]=type
-    end
-    options[:verbose] = false
-    opts.on( '--post', 'Force use of POST' ) do
-      options[:post] = true
-    end
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
-    warn e
-    exit 1
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-  usePOST = options[:post]
-
-  service = options[:service]
-  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
-
-  # Query
-  query=nil
-  query_file=options[:file]
-  if query_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No query specified.',1
-    end
-  if query_file.nil?
-    query = ARGV.shift
-    if query.match(/^@/)
-      query_file = query[1..-1]
-      query = nil
-    end
-  end
-
-  # --output ==> output= (non-standard)
-  args={}
-  case options[:output]
-  when nil
-  when  "json","xml","text","csv","tsv"
-    args['output'] = options[:output]
-  when :json,:xml,:text,:csv,:tsv
-    args['output'] = options[:output].to_s
-  else
-    warn_exit "Unrecognized output type: "+options[:output],2
-  end
-
-  # --accept
-  # options[:accept]
-
-  print "SPARQL #{service}\n" if $verbose
-  #args={"output"=>"text"}
-  SPARQL_query(service, query, query_file, usePOST, args)
-  exit(0)
-end
-
-## -------- SPARQL Update
-
-# Update sent as a WWW form.
-def SPARQL_update_by_form(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  # args? encode?
-  body="update="+uri_escape(update)
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = body.length.to_s
-  uri = URI.parse(service)
-  execute_post_form(uri, headers, body)
-end
-
-# DRY - query form.
-def execute_post_form(uri, headers, body)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = body
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def SPARQL_update(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  headers[$hContentType] = $mtSparqlUpdate
-  uri = URI.parse(service)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = update
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def cmd_sparql_update(by_raw_post=true)
-  # Share with cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
-      options[:file]=file
-    end
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  service = options[:service]
-  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
-  
-  update=nil
-  update_file=options[:file]
-
-  if update_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No update specified.',1
-    end
-  if update_file.nil?
-    update = ARGV.shift
-    if update.match(/^@/)
-      update_file = update[1..-1]
-      update = nil
-    end
-  end
-  
-  print "SPARQL-Update #{service}\n" if $verbose
-  args={}
-
-  # Reads in the file :-(
-  if update.nil?
-  then
-    update = open(update_file, 'rb'){|f| f.read}
-  else
-    update = string_or_file(update)
-  end
-
-  if by_raw_post
-    SPARQL_update(service, update, args)
-  else
-    SPARQL_update_by_form(service, update, args)
-  end
-  exit(0)
-end
-
-## -------
-
-case $cmd
-when "s-http", "sparql-http", "soh"
-  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
-  cmd_soh
-when "s-get", "s-head", "s-put", "s-delete", "s-post"
-
-  case $cmd
-  when "s-get", "s-head", "s-delete"
-    $banner="#{$cmd} datasetURI graph"
-  when "s-put", "s-post"
-    $banner="#{$cmd} datasetURI graph file"
-  end
-  cmd2 = $cmd.sub(/^s-/, '').upcase
-  cmd_soh cmd2
-
-when "s-query", "sparql-query"
-  cmd_sparql_query
-when "s-update", "sparql-update"
-  cmd_sparql_update true
-when "s-update-form", "sparql-update-form"
-  cmd_sparql_update false
-else 
-  warn_exit "Unknown: "+$cmd, 1
-end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/bin/s-query
----------------------------------------------------------------------
diff --git a/jena-fuseki2/bin/s-query b/jena-fuseki2/bin/s-query
deleted file mode 100755
index 0e3a807..0000000
--- a/jena-fuseki2/bin/s-query
+++ /dev/null
@@ -1,707 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: 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.
-
-# SPARQL HTTP Update, client.
-
-require 'optparse'
-require 'net/http'
-require 'uri'
-require 'cgi'
-require 'pp'
-require 'ostruct'
-
-# ToDo
-#  Allow a choice of media type for GET
-#   --accept "content-type" (and abbreviations)
-#   --header "Add:this"
-#   --user, --password
-#  Basic authentication: request.basic_auth("username", "password")
-#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
-
-SOH_NAME="SOH"
-SOH_VERSION="0.0.0"
-
-$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
-
-# What about direct naming?
-
-# Names
-$mtTurtle           = 'text/turtle;charset=utf-8'
-$mtRDF              = 'application/rdf+xml'
-$mtText             = 'text/plain'
-$mtNQuads           = 'text/n-quads'
-$mtTriG             = 'application/trig'
-$mtSparqlResultsX   = 'application/sparql-results+xml'
-$mtSparqlResultsJ   = 'application/sparql-results+json'
-$mtAppJSON          = 'application/json'
-$mtAppXML           = 'application/xml'
-$mtSparqlResultsTSV = 'application/sparql-results+tsv'
-$mtSparqlResultsCSV = 'application/sparql-results+csv'
-$mtSparqlUpdate     = 'application/sparql-update'
-$mtWWWForm          = 'application/x-www-form-urlencoded'
-$mtSparqlQuery      = "application/sparql-query" ;
-
-# Global media type table.
-$fileMediaTypes = {}
-$fileMediaTypes['ttl']   = $mtTurtle
-$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
-$fileMediaTypes['nt']    = $mtText
-$fileMediaTypes['rdf']   = $mtRDF
-$fileMediaTypes['owl']   = $mtRDF
-$fileMediaTypes['nq']    = $mtNQuads
-$fileMediaTypes['trig']  = $mtTriG
-
-# Global charset : no entry means "don't set"
-$charsetUTF8      = 'utf-8'
-$charset = {}
-$charset[$mtTurtle]   = 'utf-8'
-$charset[$mtText]     = 'ascii'
-$charset[$mtTriG]     = 'utf-8'
-$charset[$mtNQuads]   = 'ascii'
-
-# Headers
-
-$hContentType         = 'Content-Type'
-# $hContentEncoding     = 'Content-Encoding'
-$hContentLength       = 'Content-Length'
-# $hContentLocation     = 'Content-Location'
-# $hContentRange        = 'Content-Range'
-
-$hAccept              = 'Accept'
-$hAcceptCharset       = 'Accept-Charset'
-$hAcceptEncoding      = 'Accept-Encoding'
-$hAcceptRanges        = 'Accept-Ranges' 
-
-$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
-$print_http = false
-
-# Default for GET
-# At least allow anythign (and hope!)
-$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
-# For SPARQL query
-$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
-
-# Accept any in case of trouble.
-$accept_rdf="#{$accept_rdf} , */*;q=0.1"
-$accept_results="#{$accept_results} , */*;q=0.1" 
-
-# The media type usually forces the charset.
-$accept_charset=nil
-
-## Who we are.
-## Two styles:
-##    s-query .....
-##    soh query .....
-
-$cmd = File.basename($0)
-if $cmd == 'soh'
-then
-  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
-end
-
-if ! $cmd.start_with?('s-') && $cmd != 'soh'
-  $cmd = 's-'+$cmd
-end
-
-## -------- 
-
-def GET(dataset, graph)
-  print "GET #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  get_worker(requestURI, headers)
-end
-
-def get_worker(requestURI, headers)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Get.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-def HEAD(dataset, graph)
-  print "HEAD #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hAccept] = $accept_rdf
-  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Head.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def PUT(dataset, graph, file)
-  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Put)
-end
-
-def POST(dataset, graph, file)
-  print "POST #{dataset} #{graph} #{file}\n" if $verbose
-  send_body(dataset, graph, file, Net::HTTP::Post)
-end
-
-def DELETE(dataset, graph)
-  print "DELETE #{dataset} #{graph}\n" if $verbose
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  request = Net::HTTP::Delete.new(uri.request_uri)
-  headers = {}
-  headers.merge!($headers)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def uri_escape(string)
-  CGI.escape(string)
-end
-
-def target(dataset, graph)
-  return dataset+"?default" if graph == "default"
-  return dataset+"?graph="+uri_escape(graph)
-end
-
-def send_body(dataset, graph, file, method)
-  mt = content_type(file)
-  headers = {}
-  headers.merge!($headers)
-  headers[$hContentType] = mt
-  headers[$hContentLength] = File.size(file).to_s
-  ## p headers
-
-  requestURI = target(dataset, graph)
-  uri = URI.parse(requestURI)
-  
-  request = method.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  print_http_request(uri, request)
-  request.body_stream = File.open(file)
-  response_no_body(uri, request)
-end
-
-def response_no_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue Exception => e  
-    # puts e.message  
-    #puts e.backtrace.inspect  
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-  response = http.request(request)
-  print_http_response(response)
-  case response
-  when Net::HTTPSuccess, Net::HTTPRedirection
-    # OK
-  when Net::HTTPNotFound
-    warn_exit "404 Not found: #{uri}", 9
-    #print response.body
-  else
-    warn_exit "#{response.code} #{response.message} #{uri}", 9
-    # Unreachable
-      response.error!
-  end
-  # NO BODY IN RESPONSE
-end
-
-def response_print_body(uri, request)
-  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
-  http.read_timeout = nil
-  # check we can connect.
-  begin http.start
-  rescue => e  
-    #puts e.backtrace.inspect  
-    #print e.class
-    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
-  end
-
-  # Add a blank line if headers were output.
-  print "\n" if $http_print ;
-
-  begin
-    response = http.request(request) { |res| 
-      print_http_response(res)
-      #puts res.code
-      res.read_body do |segment|
-        print segment
-      end
-    }
-    case response
-    when Net::HTTPSuccess, Net::HTTPRedirection
-      # OK
-    when Net::HTTPNotFound
-      warn_exit "404 Not found: #{uri}", 9
-      #print response.body
-    else
-      warn_exit "#{response.code}: #{uri}", 9
-      # Unreachable
-      response.error!
-    end
-  rescue EOFError => e
-    warn_exit "IO Error: "+e.message, 3
-  end
-end
-
-def print_http_request(uri, request)
-  return unless $print_http
-  #print "Request\n"
-  print request.method," ",uri, "\n"
-  print_headers("  ",request)
-end
-
-def print_http_response(response)
-  return unless $print_http
-  #print "Response\n"
-  print response.code, " ", response.message, "\n"
-  print_headers("  ",response)
-end
-
-def print_headers(marker, headers)
-  headers.each do |k,v| 
-    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
-    printf "%s%-20s %s\n",marker,k,v
-  end
-end
-
-def content_type(file)
-  file =~ /\.([^.]*)$/
-  ext = $1
-  mt = $fileMediaTypes[ext]
-  cs = $charset[mt]
-  mt = mt+';charset='+cs if ! cs.nil?
-  return mt
-end
-
-def charset(content_type)
-  return $charset[content_type]
-end
-
-def warn_exit(msg, rc)
-    warn msg
-    exit rc ;
-end
-
-def parseURI(uri_string)
-  begin
-    return URI.parse(uri_string).to_s
-  rescue URI::InvalidURIError => err
-    warn_exit "Bad URI: <#{uri_string}>", 2
-  end
-end
-
-## ---- Command
-
-def cmd_soh(command=nil)
-  ## Command line
-  options = {}
-  optparse = OptionParser.new do |opts|
-    # Set a banner, displayed at the top
-    # of the help screen.
-    case $cmd
-    when "s-http", "sparql-http", "soh"
-      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
-    when "s-get", "s-head", "s-delete"
-      banner="$cmd  datasetURI graph"
-    end
-
-    opts.banner = $banner
-    # Define the options, and what they do
-    
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    
-    options[:version] = false
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end
-    
-    # This displays the help screen, all programs are
-    # assumed to have this option.
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  if command.nil?
-    if ARGV.size == 0
-      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
-      exit 1
-    end
-    cmdPrint=ARGV.shift
-    command=cmdPrint.upcase
-  else
-    cmdPrint=command
-  end
-
-  case command
-  when "HEAD", "GET", "DELETE"
-    requiredFile=false
-  when "PUT", "POST"
-    requiredFile=true
-  when "QUERY"
-    cmd_sparql_query
-  when "UPDATE"
-    cmd_sparql_update
-  else
-    warn_exit "Unknown command: #{command}", 2
-  end
-
-  if requiredFile 
-  then
-    if ARGV.size != 3
-      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
-    end
-  else
-    if ARGV.size != 2
-      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
-    end
-  end
-
-  dataset=parseURI(ARGV.shift)
-  # Relative URI?
-  graph=parseURI(ARGV.shift)
-  file=""
-  if requiredFile
-  then
-    file = ARGV.shift if requiredFile
-    if ! File.exist?(file)
-      warn_exit "No such file: "+file, 3
-    end
-    if File.directory?(file)
-      warn_exit "File is a directory: "+file, 3
-    end
-  end
-
-  case command
-  when "GET"
-    GET(dataset, graph)
-  when "HEAD"
-    HEAD(dataset, graph)
-  when "PUT"
-    PUT(dataset, graph, file)
-  when "DELETE"
-    DELETE(dataset, graph)
-  when "POST"
-    POST(dataset, graph, file)
-  else
-    warn_exit "Internal error: Unknown command: #{cmd}", 2
-  end
-  exit 0
-end
-
-## --------
-def string_or_file(arg)
-  return arg if ! arg.match(/^@/)
-  a=(arg[1..-1])
-  open(a, 'rb'){|f| f.read}
-end
-
-## -------- SPARQL Query
-
-## Choose method
-def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
-   if ! query_file.nil?
-    query = open(query_file, 'rb'){|f| f.read}
-  end
-  if forcePOST || query.length >= 2*1024 
-    SPARQL_query_POST(service, query, args2)
-  else
-    SPARQL_query_GET(service, query, args2)
-  end
-end
-
-## By GET
-
-def SPARQL_query_GET(service, query, args2)
-  args = { "query" => query }
-  args.merge!(args2)
-  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  action="#{service}?#{qs}"
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  get_worker(action, headers)
-end
-
-## By POST
-
-def SPARQL_query_POST(service, query, args2)
-  # DRY - body/no body for each of request and response.
-  post_params={ "query" => query }
-  post_params.merge!(args2)
-  uri = URI.parse(service)
-  headers={}
-  headers.merge!($headers)
-  headers[$hAccept]=$accept_results
-  execute_post_form_body(uri, headers, post_params)
-end
-
-def execute_post_form_body(uri, headers, post_params)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = qs.length.to_s
-  request.initialize_http_header(headers)
-  request.body = qs
-  print_http_request(uri, request)
-  response_print_body(uri, request)
-end
-
-# Usage: -v --help --file= --query=
-def cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
-      options[:file]=file
-    end
-    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
-            'Set the output argument') do |type|
-      options[:output]=type
-    end
-    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
-            'Set the accept header type') do |type|
-      options[:accept]=type
-    end
-    options[:verbose] = false
-    opts.on( '--post', 'Force use of POST' ) do
-      options[:post] = true
-    end
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
-    warn e
-    exit 1
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-  usePOST = options[:post]
-
-  service = options[:service]
-  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
-
-  # Query
-  query=nil
-  query_file=options[:file]
-  if query_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No query specified.',1
-    end
-  if query_file.nil?
-    query = ARGV.shift
-    if query.match(/^@/)
-      query_file = query[1..-1]
-      query = nil
-    end
-  end
-
-  # --output ==> output= (non-standard)
-  args={}
-  case options[:output]
-  when nil
-  when  "json","xml","text","csv","tsv"
-    args['output'] = options[:output]
-  when :json,:xml,:text,:csv,:tsv
-    args['output'] = options[:output].to_s
-  else
-    warn_exit "Unrecognized output type: "+options[:output],2
-  end
-
-  # --accept
-  # options[:accept]
-
-  print "SPARQL #{service}\n" if $verbose
-  #args={"output"=>"text"}
-  SPARQL_query(service, query, query_file, usePOST, args)
-  exit(0)
-end
-
-## -------- SPARQL Update
-
-# Update sent as a WWW form.
-def SPARQL_update_by_form(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  # args? encode?
-  body="update="+uri_escape(update)
-  headers[$hContentType] = $mtWWWForm
-  headers[$hContentLength] = body.length.to_s
-  uri = URI.parse(service)
-  execute_post_form(uri, headers, body)
-end
-
-# DRY - query form.
-def execute_post_form(uri, headers, body)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = body
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def SPARQL_update(service, update, args2={})
-  args = {}
-  args.merge!(args2)
-  headers={}
-  headers.merge!($headers)
-  headers[$hContentType] = $mtSparqlUpdate
-  uri = URI.parse(service)
-  request = Net::HTTP::Post.new(uri.request_uri)
-  request.initialize_http_header(headers)
-  request.body = update
-  print_http_request(uri, request)
-  response_no_body(uri, request)
-end
-
-def cmd_sparql_update(by_raw_post=true)
-  # Share with cmd_sparql_query
-  options={}
-  optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
-    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
-      options[:service]=uri
-    end
-    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
-      options[:file]=file
-    end
-    options[:verbose] = false
-    opts.on( '-v', '--verbose', 'Verbose' ) do
-      options[:verbose] = true
-    end
-    opts.on( '--version', 'Print version and exit' ) do
-      print "#{SOH_NAME} #{SOH_VERSION}\n"
-      exit
-    end 
-    opts.on( '-h', '--help', 'Display this screen and exit' ) do
-      puts opts
-      exit
-    end
-  end
-
-  begin optparse.parse!    
-  rescue OptionParser::InvalidArgument => e
-    warn e
-    exit
-  end
-
-  $verbose = options[:verbose]
-  $print_http = $verbose
-
-  service = options[:service]
-  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
-  
-  update=nil
-  update_file=options[:file]
-
-  if update_file.nil? && ARGV.size == 0
-  then
-    warn_exit 'No update specified.',1
-    end
-  if update_file.nil?
-    update = ARGV.shift
-    if update.match(/^@/)
-      update_file = update[1..-1]
-      update = nil
-    end
-  end
-  
-  print "SPARQL-Update #{service}\n" if $verbose
-  args={}
-
-  # Reads in the file :-(
-  if update.nil?
-  then
-    update = open(update_file, 'rb'){|f| f.read}
-  else
-    update = string_or_file(update)
-  end
-
-  if by_raw_post
-    SPARQL_update(service, update, args)
-  else
-    SPARQL_update_by_form(service, update, args)
-  end
-  exit(0)
-end
-
-## -------
-
-case $cmd
-when "s-http", "sparql-http", "soh"
-  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
-  cmd_soh
-when "s-get", "s-head", "s-put", "s-delete", "s-post"
-
-  case $cmd
-  when "s-get", "s-head", "s-delete"
-    $banner="#{$cmd} datasetURI graph"
-  when "s-put", "s-post"
-    $banner="#{$cmd} datasetURI graph file"
-  end
-  cmd2 = $cmd.sub(/^s-/, '').upcase
-  cmd_soh cmd2
-
-when "s-query", "sparql-query"
-  cmd_sparql_query
-when "s-update", "sparql-update"
-  cmd_sparql_update true
-when "s-update-form", "sparql-update-form"
-  cmd_sparql_update false
-else 
-  warn_exit "Unknown: "+$cmd, 1
-end


[38/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap.min.css b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap.min.css
new file mode 100644
index 0000000..679272d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/css/bootstrap.min.css
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:
 inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!
 important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-we
 bkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-onl
 y{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font
 -size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{backgroun
 d-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}bl
 ockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px
 ;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col
 -xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.co
 l-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-x
 s-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{r
 ight:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-
 offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md
 -push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667
 %}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.co
 l-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-chi
 ld>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;flo
 at:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tb
 ody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}
 .table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsiv
 e>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last
 -child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color
 :#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webki
 t-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .
 checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .for
 m-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-e
 rror .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio
 ,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 1
 2px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disa
 bled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[dis
 abled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[dis
 abled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info
 .disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#
 f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:
 400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:10
 0%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:
 "\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:befor
 e{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:
 before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward
 :before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"
 }.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{con
 tent:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"
 \e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.g
 lyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-
 video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background
 -color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTrans
 form.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>
 .btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radi
 us:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-gro
 up>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:
 table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn
 >.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-
 control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.inp
 ut-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>
 li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.n
 av-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a
 {text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-head
 er{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;bo
 rder-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-
 width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px so
 lid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-w
 ebkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navb
 ar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-
 default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar
 -nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu
  .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";paddi
 ng:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;
 cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:
 inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{backg
 round-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{
 margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .ale
 rt-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{back
 ground-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear
  infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f
 0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block
 }.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.act
 ive:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.activ
 e,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a
 94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:la
 st-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.
 panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius
 :3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.ta
 ble:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsi
 ve>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.
 table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel
 >.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-col
 or:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:
 #ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:
 1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-

<TRUNCATED>

[72/93] [abbrv] jena git commit: Tidy formatting and comments.

Posted by rv...@apache.org.
Tidy formatting and comments.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/19fc55cc
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/19fc55cc
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/19fc55cc

Branch: refs/heads/hadoop-rdf
Commit: 19fc55cc0ae38f6a590650ae2b09cf21e1a2e2cf
Parents: 6a121ca
Author: Andy Seaborne <an...@apache.org>
Authored: Wed Jan 7 12:11:13 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Wed Jan 7 12:11:13 2015 +0000

----------------------------------------------------------------------
 .../org/apache/jena/riot/system/IRILib.java     | 54 ++++++++------------
 1 file changed, 20 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/19fc55cc/jena-arq/src/main/java/org/apache/jena/riot/system/IRILib.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/IRILib.java b/jena-arq/src/main/java/org/apache/jena/riot/system/IRILib.java
index 8a7331d..49c03f3 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/IRILib.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/IRILib.java
@@ -41,9 +41,8 @@ public class IRILib
      */
     
     private static char uri_reserved[] = 
-    { 
-      '!', '*', '"', '\'', '(', ')', ';', ':', '@', '&', 
-      '=', '+', '$', ',', '/', '?', '%', '#', '[', ']'} ;
+    { '!', '*', '"', '\'', '(', ')', ';', ':', '@', '&', 
+      '=', '+', '$', ',', '/', '?', '%', '#', '[', ']' } ;
 
     // No allowed in URIs
     private static char uri_non_chars[] = { '<', '>', '{', '}', '|', '\\', '`', '^', ' ',  '\n', '\r', '\t', '£' } ;
@@ -70,10 +69,7 @@ public class IRILib
           '~'} ;
 
     private static char[] charsPath =  
-    {
-        // Reserved except leave the separators alone. 
-        // Leave the path separator alone.
-        // Leave the drive separator alone.
+    {   // Reserved except leave the separators alone. 
         '!', '*', '"', '\'', '(', ')', ';', /*':',*/ '@', '&',
         '=', '+', '$', ',', /*'/',*/ '?', '%', '#', '[', ']',
         '{', '}', '|', '\\', '`', '^',
@@ -95,18 +91,17 @@ public class IRILib
     
     // See also IRIResolver
     /** Return a string that is an IRI for the filename.*/
-    public static String fileToIRI(File f)
-    {
+    public static String fileToIRI(File f) {
         return filenameToIRI(f.getAbsolutePath()) ;
     }
     
     /** Create a string that is a IRI for the filename.
-     *  The file name may already have file:.
-     *  The file name may be relative. 
-     *  Encode using the rules for a path (e.g. ':' and'/' do not get encoded)
+     *  <li>The file name may already have {@code file:}.
+     *  <li>The file name may be relative. 
+     *  <li>Encode using the rules for a path (e.g. ':' and'/' do not get encoded)
+     *  <li>Non-IRI characters get %-encoded. 
      */
-    public static String filenameToIRI(String fn)
-    {
+    public static String filenameToIRI(String fn) {
         if ( fn == null ) return cwdURL ;
         
         if ( fn.length() == 0 ) return cwdURL ;
@@ -116,9 +111,8 @@ public class IRILib
         return plainFilenameToURL(fn) ;
     }
     
-    /** Convert an IRI to a filename */
-    public static String IRIToFilename(String iri)
-    {
+    /** Convert a file: IRI to a filename */
+    public static String IRIToFilename(String iri) {
         if ( ! iri.startsWith("file:") )
             throw new AtlasException("Not a file: URI: "+iri) ; 
         
@@ -131,8 +125,7 @@ public class IRILib
     }
     
     /** Convert a plain file name (no file:) to a file: URL */
-    private static String plainFilenameToURL(String fn)
-    {
+    private static String plainFilenameToURL(String fn) {
         // No "file:"
         // Make Absolute filename.
         boolean trailingSlash = fn.endsWith("/") ;
@@ -162,8 +155,7 @@ public class IRILib
     
     
     /** Sanitize a "file:" URL. Must start "file:" */
-    private static String normalizeFilenameURI(String fn)
-    {
+    private static String normalizeFilenameURI(String fn) {
         if ( ! fn.startsWith("file:/") )
         {
             // Relative path.
@@ -173,7 +165,7 @@ public class IRILib
         
         // Starts file:///
         if ( fn.startsWith("file:///") )
-            // Assume it's good as return as-is.
+            // Assume it's good and return as-is.
             return fn ;
 
         if ( fn.startsWith("file://") )
@@ -190,8 +182,7 @@ public class IRILib
     /** Encode using the rules for a component (e.g. ':' and '/' get encoded) 
      * Does not encode non-ASCII characters 
      */
-    public static String encodeUriComponent(String string)
-    {
+    public static String encodeUriComponent(String string) {
         String encStr = StrUtils.encodeHex(string,'%', charsComponent) ;
         return encStr ;
     }
@@ -199,15 +190,13 @@ public class IRILib
     /** Encode using the rules for a file: URL.  
      *  Does not encode non-ASCII characters
      */
-    public static String encodeFileURL(String string)
-    {
+    public static String encodeFileURL(String string) {
         String encStr = StrUtils.encodeHex(string,'%', charsFilename) ;
         return encStr ;
     }
 
     /** Encode using the rules for a path (e.g. ':' and '/' do not get encoded) */
-    public static String encodeUriPath(String uri)
-    {
+    public static String encodeUriPath(String uri) {
         // Not perfect.
         // Encode path.
         // %-encode chars.
@@ -215,13 +204,11 @@ public class IRILib
         return uri ;
     }
 
-    public static String decode(String string)
-    {
+    public static String decode(String string) {
         return StrUtils.decodeHex(string, '%') ;
     }
 
-    public static String encodeNonASCII(String string)
-    {
+    public static String encodeNonASCII(String string) {
         if ( ! containsNonASCII(string) )
             return string ;
         
@@ -245,8 +232,7 @@ public class IRILib
         return sw.toString() ;
     }
 
-    public static boolean containsNonASCII(String string)
-    {
+    public static boolean containsNonASCII(String string){
         boolean clean = true ;
         for ( int i = 0 ; i < string.length() ; i++ )
         {


[69/93] [abbrv] jena git commit: Update copyright statements to 2015

Posted by rv...@apache.org.
Update copyright statements to 2015


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/10296ff7
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/10296ff7
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/10296ff7

Branch: refs/heads/hadoop-rdf
Commit: 10296ff7462f5c3abf3984845c191998b05f2d97
Parents: e58b48b
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Jan 6 13:07:27 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Jan 6 13:07:27 2015 +0000

----------------------------------------------------------------------
 NOTICE                                          |   2 +-
 apache-jena/NOTICE                              |   2 +-
 jena-arq/NOTICE                                 |   2 +-
 jena-arq/src/main/resources/META-INF/NOTICE     |   2 +-
 jena-core/NOTICE                                |   2 +-
 jena-core/src/main/resources/META-INF/NOTICE    |   2 +-
 jena-csv/NOTICE                                 |   2 +-
 jena-csv/src/main/resources/META-INF/NOTICE     |   5 +
 jena-fuseki/NOTICE                              |   2 +-
 jena-fuseki/dist/NOTICE                         |   2 +-
 jena-fuseki/src/main/resources/META-INF/NOTICE  |   2 +-
 jena-fuseki2/NOTICE                             |   2 +-
 .../src/main/resources/META-INF/NOTICE          |   2 +-
 jena-fuseki2/jena-fuseki-dist/dist/NOTICE       |   2 +-
 jena-iri/NOTICE                                 |   2 +-
 jena-iri/src/main/resources/META-INF/NOTICE     |   2 +-
 jena-jdbc/NOTICE                                |   2 +-
 jena-jdbc/jena-jdbc-core/NOTICE                 |   2 +-
 jena-jdbc/jena-jdbc-driver-bundle/NOTICE        |   2 +-
 jena-jdbc/jena-jdbc-driver-mem/NOTICE           |   2 +-
 jena-jdbc/jena-jdbc-driver-remote/NOTICE        |   2 +-
 jena-jdbc/jena-jdbc-driver-tdb/NOTICE           |   2 +-
 jena-parent/NOTICE                              |   2 +-
 jena-sdb/NOTICE                                 |   2 +-
 jena-sdb/dist/NOTICE                            |   2 +-
 jena-sdb/src/main/resources/META-INF/NOTICE     |   2 +-
 jena-security/NOTICE                            |   2 +-
 jena-spatial/NOTICE                             |   2 +-
 jena-spatial/src/main/resources/META-INF/NOTICE |   5 +
 jena-tdb/NOTICE                                 |   2 +-
 jena-tdb/src/main/resources/META-INF/NOTICE     |   2 +-
 jena-text/NOTICE                                |   2 +-
 jena-text/src/main/resources/LICENSE            | 202 -------------------
 jena-text/src/main/resources/META-INF/LICENSE   | 202 +++++++++++++++++++
 jena-text/src/main/resources/META-INF/NOTICE    |   2 +-
 35 files changed, 243 insertions(+), 233 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
index f5b2381..7a81067 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/apache-jena/NOTICE
----------------------------------------------------------------------
diff --git a/apache-jena/NOTICE b/apache-jena/NOTICE
index 4a5cbb8..8176b31 100644
--- a/apache-jena/NOTICE
+++ b/apache-jena/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-arq/NOTICE
----------------------------------------------------------------------
diff --git a/jena-arq/NOTICE b/jena-arq/NOTICE
index 8e499f6..e1c6497 100644
--- a/jena-arq/NOTICE
+++ b/jena-arq/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - ARQ module
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-arq/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/resources/META-INF/NOTICE b/jena-arq/src/main/resources/META-INF/NOTICE
index 8e499f6..e1c6497 100644
--- a/jena-arq/src/main/resources/META-INF/NOTICE
+++ b/jena-arq/src/main/resources/META-INF/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - ARQ module
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-core/NOTICE
----------------------------------------------------------------------
diff --git a/jena-core/NOTICE b/jena-core/NOTICE
index 96a9cd0..068edfd 100644
--- a/jena-core/NOTICE
+++ b/jena-core/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module jena-core
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-core/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-core/src/main/resources/META-INF/NOTICE b/jena-core/src/main/resources/META-INF/NOTICE
index 96a9cd0..068edfd 100644
--- a/jena-core/src/main/resources/META-INF/NOTICE
+++ b/jena-core/src/main/resources/META-INF/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module jena-core
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-csv/NOTICE
----------------------------------------------------------------------
diff --git a/jena-csv/NOTICE b/jena-csv/NOTICE
index ca5166a..52c5510 100644
--- a/jena-csv/NOTICE
+++ b/jena-csv/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - Data Tables for RDF and SPARQL
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-csv/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-csv/src/main/resources/META-INF/NOTICE b/jena-csv/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..52c5510
--- /dev/null
+++ b/jena-csv/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,5 @@
+Apache Jena - Data Tables for RDF and SPARQL
+Copyright 2014, 2015 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-fuseki/NOTICE
----------------------------------------------------------------------
diff --git a/jena-fuseki/NOTICE b/jena-fuseki/NOTICE
index 9e0e009..1bf7fa8 100644
--- a/jena-fuseki/NOTICE
+++ b/jena-fuseki/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module Fuseki
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-fuseki/dist/NOTICE
----------------------------------------------------------------------
diff --git a/jena-fuseki/dist/NOTICE b/jena-fuseki/dist/NOTICE
index be02354..33231f9 100644
--- a/jena-fuseki/dist/NOTICE
+++ b/jena-fuseki/dist/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module Fuseki
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-fuseki/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-fuseki/src/main/resources/META-INF/NOTICE b/jena-fuseki/src/main/resources/META-INF/NOTICE
index 9e0e009..1bf7fa8 100644
--- a/jena-fuseki/src/main/resources/META-INF/NOTICE
+++ b/jena-fuseki/src/main/resources/META-INF/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module Fuseki
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-fuseki2/NOTICE
----------------------------------------------------------------------
diff --git a/jena-fuseki2/NOTICE b/jena-fuseki2/NOTICE
index 6c51c3c..1bf7fa8 100644
--- a/jena-fuseki2/NOTICE
+++ b/jena-fuseki2/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module Fuseki
-Copyright 2011-2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/NOTICE b/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/NOTICE
index 6c51c3c..1bf7fa8 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/NOTICE
+++ b/jena-fuseki2/jena-fuseki-core/src/main/resources/META-INF/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module Fuseki
-Copyright 2011-2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-fuseki2/jena-fuseki-dist/dist/NOTICE
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/dist/NOTICE b/jena-fuseki2/jena-fuseki-dist/dist/NOTICE
index a840c0b..33231f9 100644
--- a/jena-fuseki2/jena-fuseki-dist/dist/NOTICE
+++ b/jena-fuseki2/jena-fuseki-dist/dist/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module Fuseki
-Copyright 2011-2013 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-iri/NOTICE
----------------------------------------------------------------------
diff --git a/jena-iri/NOTICE b/jena-iri/NOTICE
index e87f3af..08d5381 100644
--- a/jena-iri/NOTICE
+++ b/jena-iri/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - IRI module
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-iri/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-iri/src/main/resources/META-INF/NOTICE b/jena-iri/src/main/resources/META-INF/NOTICE
index e87f3af..08d5381 100644
--- a/jena-iri/src/main/resources/META-INF/NOTICE
+++ b/jena-iri/src/main/resources/META-INF/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - IRI module
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-jdbc/NOTICE
----------------------------------------------------------------------
diff --git a/jena-jdbc/NOTICE b/jena-jdbc/NOTICE
index 4099c81..8264f6d 100644
--- a/jena-jdbc/NOTICE
+++ b/jena-jdbc/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - Jena JDBC module
-Copyright 2013, 2014 The Apache Software Foundation
+Copyright 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-jdbc/jena-jdbc-core/NOTICE
----------------------------------------------------------------------
diff --git a/jena-jdbc/jena-jdbc-core/NOTICE b/jena-jdbc/jena-jdbc-core/NOTICE
index 4099c81..8264f6d 100644
--- a/jena-jdbc/jena-jdbc-core/NOTICE
+++ b/jena-jdbc/jena-jdbc-core/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - Jena JDBC module
-Copyright 2013, 2014 The Apache Software Foundation
+Copyright 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-jdbc/jena-jdbc-driver-bundle/NOTICE
----------------------------------------------------------------------
diff --git a/jena-jdbc/jena-jdbc-driver-bundle/NOTICE b/jena-jdbc/jena-jdbc-driver-bundle/NOTICE
index 4099c81..8264f6d 100644
--- a/jena-jdbc/jena-jdbc-driver-bundle/NOTICE
+++ b/jena-jdbc/jena-jdbc-driver-bundle/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - Jena JDBC module
-Copyright 2013, 2014 The Apache Software Foundation
+Copyright 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-jdbc/jena-jdbc-driver-mem/NOTICE
----------------------------------------------------------------------
diff --git a/jena-jdbc/jena-jdbc-driver-mem/NOTICE b/jena-jdbc/jena-jdbc-driver-mem/NOTICE
index 4099c81..8264f6d 100644
--- a/jena-jdbc/jena-jdbc-driver-mem/NOTICE
+++ b/jena-jdbc/jena-jdbc-driver-mem/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - Jena JDBC module
-Copyright 2013, 2014 The Apache Software Foundation
+Copyright 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-jdbc/jena-jdbc-driver-remote/NOTICE
----------------------------------------------------------------------
diff --git a/jena-jdbc/jena-jdbc-driver-remote/NOTICE b/jena-jdbc/jena-jdbc-driver-remote/NOTICE
index 4099c81..8264f6d 100644
--- a/jena-jdbc/jena-jdbc-driver-remote/NOTICE
+++ b/jena-jdbc/jena-jdbc-driver-remote/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - Jena JDBC module
-Copyright 2013, 2014 The Apache Software Foundation
+Copyright 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-jdbc/jena-jdbc-driver-tdb/NOTICE
----------------------------------------------------------------------
diff --git a/jena-jdbc/jena-jdbc-driver-tdb/NOTICE b/jena-jdbc/jena-jdbc-driver-tdb/NOTICE
index 4099c81..8264f6d 100644
--- a/jena-jdbc/jena-jdbc-driver-tdb/NOTICE
+++ b/jena-jdbc/jena-jdbc-driver-tdb/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - Jena JDBC module
-Copyright 2013, 2014 The Apache Software Foundation
+Copyright 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-parent/NOTICE
----------------------------------------------------------------------
diff --git a/jena-parent/NOTICE b/jena-parent/NOTICE
index 5bed377..8a23446 100644
--- a/jena-parent/NOTICE
+++ b/jena-parent/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-sdb/NOTICE
----------------------------------------------------------------------
diff --git a/jena-sdb/NOTICE b/jena-sdb/NOTICE
index 69b4836..b354ec0 100644
--- a/jena-sdb/NOTICE
+++ b/jena-sdb/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module SDB
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-sdb/dist/NOTICE
----------------------------------------------------------------------
diff --git a/jena-sdb/dist/NOTICE b/jena-sdb/dist/NOTICE
index f95705c..9b986ad 100644
--- a/jena-sdb/dist/NOTICE
+++ b/jena-sdb/dist/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module SDB
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-sdb/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-sdb/src/main/resources/META-INF/NOTICE b/jena-sdb/src/main/resources/META-INF/NOTICE
index 69b4836..b354ec0 100644
--- a/jena-sdb/src/main/resources/META-INF/NOTICE
+++ b/jena-sdb/src/main/resources/META-INF/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module SDB
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-security/NOTICE
----------------------------------------------------------------------
diff --git a/jena-security/NOTICE b/jena-security/NOTICE
index fa6d3dd..d4e11ad 100644
--- a/jena-security/NOTICE
+++ b/jena-security/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - Security module
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-spatial/NOTICE
----------------------------------------------------------------------
diff --git a/jena-spatial/NOTICE b/jena-spatial/NOTICE
index eb1afe5..95ad01d 100644
--- a/jena-spatial/NOTICE
+++ b/jena-spatial/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - jena-spatial module
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-spatial/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-spatial/src/main/resources/META-INF/NOTICE b/jena-spatial/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..95ad01d
--- /dev/null
+++ b/jena-spatial/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,5 @@
+Apache Jena - jena-spatial module
+Copyright 2012, 2013, 2014, 2015 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-tdb/NOTICE
----------------------------------------------------------------------
diff --git a/jena-tdb/NOTICE b/jena-tdb/NOTICE
index c9da6b8..1e06e88 100644
--- a/jena-tdb/NOTICE
+++ b/jena-tdb/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module TDB
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-tdb/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/resources/META-INF/NOTICE b/jena-tdb/src/main/resources/META-INF/NOTICE
index c9da6b8..1e06e88 100644
--- a/jena-tdb/src/main/resources/META-INF/NOTICE
+++ b/jena-tdb/src/main/resources/META-INF/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - module TDB
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-text/NOTICE
----------------------------------------------------------------------
diff --git a/jena-text/NOTICE b/jena-text/NOTICE
index ecd86b3..cccf107 100644
--- a/jena-text/NOTICE
+++ b/jena-text/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - jena-text module
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-text/src/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/jena-text/src/main/resources/LICENSE b/jena-text/src/main/resources/LICENSE
deleted file mode 100644
index d645695..0000000
--- a/jena-text/src/main/resources/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-text/src/main/resources/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/jena-text/src/main/resources/META-INF/LICENSE b/jena-text/src/main/resources/META-INF/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/jena-text/src/main/resources/META-INF/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/jena/blob/10296ff7/jena-text/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-text/src/main/resources/META-INF/NOTICE b/jena-text/src/main/resources/META-INF/NOTICE
index ecd86b3..cccf107 100644
--- a/jena-text/src/main/resources/META-INF/NOTICE
+++ b/jena-text/src/main/resources/META-INF/NOTICE
@@ -1,5 +1,5 @@
 Apache Jena - jena-text module
-Copyright 2011, 2012, 2013, 2014 The Apache Software Foundation
+Copyright 2011, 2012, 2013, 2014, 2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).


[84/93] [abbrv] jena git commit: Add a "mode" setting for environment setup default values.

Posted by rv...@apache.org.
Add a "mode" setting for environment setup default values.

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

Branch: refs/heads/hadoop-rdf
Commit: ecdcd0d9c3d3da30841aabf27c3d62d093e204c7
Parents: 612c1bc
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 12 13:55:32 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 12 13:55:32 2015 +0000

----------------------------------------------------------------------
 .../org/apache/jena/fuseki/cmd/FusekiCmd.java   |  2 +
 .../apache/jena/fuseki/server/FusekiEnv.java    | 78 ++++++++++++++++----
 .../apache/jena/fuseki/server/FusekiServer.java |  2 +-
 3 files changed, 67 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/ecdcd0d9/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
index a7cb0d4..243bf2e 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
@@ -26,6 +26,7 @@ import org.apache.jena.fuseki.FusekiLogging ;
 import org.apache.jena.fuseki.build.Template ;
 import org.apache.jena.fuseki.jetty.JettyServerConfig ;
 import org.apache.jena.fuseki.jetty.JettyFuseki ;
+import org.apache.jena.fuseki.server.FusekiEnv ;
 import org.apache.jena.fuseki.server.FusekiServerListener ;
 import org.apache.jena.fuseki.server.ServerInitialConfig ;
 import org.apache.jena.riot.Lang ;
@@ -51,6 +52,7 @@ public class FusekiCmd {
     // statics of a class are run.
 
     static {
+        FusekiEnv.mode = FusekiEnv.INIT.STANDALONE ;
         FusekiLogging.setLogging() ;
     }
 

http://git-wip-us.apache.org/repos/asf/jena/blob/ecdcd0d9/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java
index a76be11..70889ea 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiEnv.java
@@ -29,6 +29,51 @@ import java.nio.file.Paths ;
  * @See FusekiServer 
  */ 
 public class FusekiEnv {
+    // Initialization logging happens via stdout/stderr directly.
+    // Fuseki logging is not initialized to avoid going in circles.
+    
+    private static final boolean LogInit         = false ;
+    
+    /** Unused */
+    // public static final String DFT_FUSEKI_HOME = isWindows 
+    //        ? /*What's correct here?*/ "/usr/share/fuseki"
+    //        : "/usr/share/fuseki" ;
+    static final boolean isWindows = determineIfWindows() ;
+    static final String  DFT_FUSEKI_BASE = isWindows ? /* What's correct here? */"/etc/fuseki" : "/etc/fuseki" ;
+    
+    /** Initialization mode, depending on the way Fuseki is started:
+        <ul>
+        <li>{@code WAR} - Running as a WAR file.</li>
+        <li>{@code EMBEDDED}</li>
+        <li>{@code STANDALONE} - Running as the standalone server in Jetty</li>
+        <li>{@code TEST} - Running inside maven/JUnit and as the standalone server</li>
+        <li>{@code UNSET} - Initial state.</li>
+        </ul>
+        <p> 
+        If at server initialization, the MODE is UNSET, then assume WAR setup.
+        A WAR file does not have the opportunity to set the mode.
+        <p>
+        TEST:  (better to set FUSEKI_HOME, FUSEKI_BASE from the test environment</li>
+    */
+    public enum INIT {
+        // Default values of FUSEKI_HOME, and FUSEKI_BASE. 
+        WAR         (null, "/etc/fuseki") , 
+        EMBEDDED    (".", "run") ,
+        STANDALONE  (".", "run") ,
+        TEST        ("src/main/webapp", "target/run") ,
+        UNSET       (null, null) ;
+        
+        final String dftFusekiHome ;
+        final String dftFusekiBase ;
+        
+        INIT(String home, String base) {
+            this.dftFusekiHome = home ;
+            this.dftFusekiBase = base ;
+        }
+    }
+    
+    public static INIT mode = INIT.UNSET ;
+    
     /** Root of the Fuseki installation for fixed files. 
      *  This may be null (e.g. running inside a web application container) */ 
     public static Path FUSEKI_HOME = null ;
@@ -38,8 +83,6 @@ public class FusekiEnv {
      */ 
     public static Path FUSEKI_BASE = null ;
     
-    static final boolean isWindows = determineIfWindows() ;
-    
     // Copied from SystemTDB to avoid dependency.
     // This code must not touch Jena.  
     private static boolean determineIfWindows() {
@@ -49,41 +92,43 @@ public class FusekiEnv {
         return s.startsWith("Windows ") ;
     }
  
-    /** Unused */
-    // public static final String DFT_FUSEKI_HOME = isWindows 
-    //        ? /*What's correct here?*/ "/usr/share/fuseki"
-    //        : "/usr/share/fuseki" ;
-    static final String  DFT_FUSEKI_BASE = isWindows ? /* What's correct here? */"/etc/fuseki" : "/etc/fuseki" ;
-
     public static final String   ENV_runArea     = "run" ;
 
     private static boolean       initialized     = false ;
-    private static final boolean LogInit         = false ;
-    
     public static synchronized void setEnvironment() {
         if ( initialized )
             return ;
         initialized = true ;
-        logInit("FusekiInitEnv") ;
-        logInit("Start: ENV_FUSEKI_HOME = %s : ENV_FUSEKI_BASE = %s", FUSEKI_HOME, FUSEKI_BASE) ;
         
+        logInit("FusekiEnv:Start: ENV_FUSEKI_HOME = %s : ENV_FUSEKI_BASE = %s : MODE = %s", FUSEKI_HOME, FUSEKI_BASE, mode) ;
+        
+        if ( mode == null || mode == INIT.UNSET )
+            mode = INIT.WAR ;
+
         if ( FUSEKI_HOME == null ) {
             // Make absolute
             String x1 = getenv("FUSEKI_HOME") ;
+            if ( x1 == null )
+                x1 = mode.dftFusekiHome ;
             if ( x1 != null )
                 FUSEKI_HOME = Paths.get(x1) ;
         }
 
         if ( FUSEKI_BASE == null ) {
             String x2 = getenv("FUSEKI_BASE") ;
+            if ( x2 == null )
+                x2 = mode.dftFusekiBase ;
             if ( x2 != null )
                 FUSEKI_BASE = Paths.get(x2) ;
             else {
                 if ( FUSEKI_HOME != null )
                     FUSEKI_BASE = FUSEKI_HOME.resolve(ENV_runArea) ;
-                else
+                else {
+                    // This is bad - there should have been a default by now.
+                    logInitError("Can't find a setting for FUSEKI_BASE - guessing wildy") ;
                     // Neither FUSEKI_HOME nor FUSEKI_BASE set.
                     FUSEKI_BASE = Paths.get(DFT_FUSEKI_BASE) ;
+                }
             }
         }
 
@@ -92,7 +137,7 @@ public class FusekiEnv {
 
         FUSEKI_BASE = FUSEKI_BASE.toAbsolutePath() ;
 
-        logInit("Finish: ENV_FUSEKI_HOME = %s : ENV_FUSEKI_BASE = %s", FUSEKI_HOME, FUSEKI_BASE) ;
+        logInit("FusekiEnv:Finish: ENV_FUSEKI_HOME = %s : ENV_FUSEKI_BASE = %s", FUSEKI_HOME, FUSEKI_BASE) ;
     }
     
     private static void logInit(String fmt, Object ... args) {
@@ -102,6 +147,11 @@ public class FusekiEnv {
         }
     }
     
+    private static void logInitError(String fmt, Object ... args) {
+        System.err.printf(fmt, args) ; 
+        System.err.println() ;
+    }
+
     /** Get environment variable value (maybe in system properties) */
     public static String getenv(String name) {
         String x = System.getenv(name) ;

http://git-wip-us.apache.org/repos/asf/jena/blob/ecdcd0d9/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
index a466b8b..b125fbe 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
@@ -53,7 +53,7 @@ import com.hp.hpl.jena.tdb.sys.Names ;
 
 public class FusekiServer
 {
-    // Initialization of FUSEKI_HOME and FUSEKI_BASE is done in FusekiEnvInit
+    // Initialization of FUSEKI_HOME and FUSEKI_BASE is done in FusekiEnv.setEnvironment()
     // so that the code is independent of any logging.  FusekiLogging can use
     // initialized values of FUSEKI_BASE while looking forlog4j configuration.
     


[68/93] [abbrv] jena git commit: Make the module name style the same as the rest of Jena

Posted by rv...@apache.org.
Make the module name style the same as the rest of Jena


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

Branch: refs/heads/hadoop-rdf
Commit: e58b48b1cf67eb585a35f374b761b1061365a2da
Parents: 3d9cdd5
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Jan 6 12:29:30 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Jan 6 12:29:30 2015 +0000

----------------------------------------------------------------------
 jena-fuseki2/jena-fuseki-core/pom.xml   | 2 +-
 jena-fuseki2/jena-fuseki-dist/pom.xml   | 2 +-
 jena-fuseki2/jena-fuseki-server/pom.xml | 2 +-
 jena-fuseki2/jena-fuseki-war/pom.xml    | 2 +-
 jena-fuseki2/pom.xml                    | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/e58b48b1/jena-fuseki2/jena-fuseki-core/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/pom.xml b/jena-fuseki2/jena-fuseki-core/pom.xml
index a8bfec5..9a9a936 100644
--- a/jena-fuseki2/jena-fuseki-core/pom.xml
+++ b/jena-fuseki2/jena-fuseki-core/pom.xml
@@ -25,7 +25,7 @@
     <relativePath>../</relativePath>
   </parent> 
   
-  <name>Apache Jena Fuseki - Server engine</name>
+  <name>Apache Jena - Fuseki Server Engine</name>
   <artifactId>jena-fuseki-core</artifactId>
 
   <!-- We make the JAR file so that the shade plugin includes it.

http://git-wip-us.apache.org/repos/asf/jena/blob/e58b48b1/jena-fuseki2/jena-fuseki-dist/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/pom.xml b/jena-fuseki2/jena-fuseki-dist/pom.xml
index c72f1ed..9f12875 100644
--- a/jena-fuseki2/jena-fuseki-dist/pom.xml
+++ b/jena-fuseki2/jena-fuseki-dist/pom.xml
@@ -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>
 
-  <name>Apache Jena Fuseki - Binary distribution</name>
+  <name>Apache Jena - Fuseki Binary Distribution</name>
   <artifactId>jena-fuseki-dist</artifactId>
   <version>2.0.0-SNAPSHOT</version>
   <packaging>pom</packaging>

http://git-wip-us.apache.org/repos/asf/jena/blob/e58b48b1/jena-fuseki2/jena-fuseki-server/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-server/pom.xml b/jena-fuseki2/jena-fuseki-server/pom.xml
index 7ee5d2b..33deeb5 100644
--- a/jena-fuseki2/jena-fuseki-server/pom.xml
+++ b/jena-fuseki2/jena-fuseki-server/pom.xml
@@ -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>
 
-  <name>Apache Jena Fuseki - Server Standalone Jar</name>
+  <name>Apache Jena - Fuseki Server Standalone Jar</name>
   <artifactId>jena-fuseki-server</artifactId>
 
   <parent>

http://git-wip-us.apache.org/repos/asf/jena/blob/e58b48b1/jena-fuseki2/jena-fuseki-war/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-war/pom.xml b/jena-fuseki2/jena-fuseki-war/pom.xml
index 3c80e05..4b0cc37 100644
--- a/jena-fuseki2/jena-fuseki-war/pom.xml
+++ b/jena-fuseki2/jena-fuseki-war/pom.xml
@@ -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>
 
-  <name>Apache Jena Fuseki - WAR file</name>
+  <name>Apache Jena - Fuseki WAR File</name>
   <artifactId>jena-fuseki-war</artifactId>
   <version>2.0.0-SNAPSHOT</version>
 

http://git-wip-us.apache.org/repos/asf/jena/blob/e58b48b1/jena-fuseki2/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/pom.xml b/jena-fuseki2/pom.xml
index a951f3d..33c6a30 100644
--- a/jena-fuseki2/pom.xml
+++ b/jena-fuseki2/pom.xml
@@ -25,7 +25,7 @@
     <relativePath>../jena-parent</relativePath>
   </parent> 
 
-  <name>Apache Jena Fuseki - SPARQL 1.1 Server</name>
+  <name>Apache Jena - Fuseki, SPARQL 1.1 Server</name>
   <artifactId>jena-fuseki</artifactId>
   <version>2.0.0-SNAPSHOT</version>
 


[43/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads.java
new file mode 100644
index 0000000..578447e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads.java
@@ -0,0 +1,68 @@
+/**
+ * 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.jena.fuseki.servlets ;
+
+
+/**
+ * Servlet for operations directly on a dataset - REST(ish) behaviour on the
+ * dataset URI.
+ */
+
+public abstract class REST_Quads extends SPARQL_GSP {
+    // Not supported: GSP direct naming.
+
+    public REST_Quads() {
+        super() ;
+    }
+
+    @Override
+    protected void validate(HttpAction action) {
+        // Check in the operations itself.
+    }
+
+    @Override
+    protected void doOptions(HttpAction action) {
+        ServletOps.errorMethodNotAllowed("OPTIONS") ;
+    }
+
+    @Override
+    protected void doHead(HttpAction action) {
+        ServletOps.errorMethodNotAllowed("HEAD") ;
+    }
+
+    @Override
+    protected void doPost(HttpAction action) {
+        ServletOps.errorMethodNotAllowed("POST") ;
+    }
+
+    @Override
+    protected void doPut(HttpAction action) {
+        ServletOps.errorMethodNotAllowed("PUT") ;
+    }
+
+    @Override
+    protected void doDelete(HttpAction action) {
+        ServletOps.errorMethodNotAllowed("DELETE") ;
+    }
+
+    @Override
+    protected void doPatch(HttpAction action) {
+        ServletOps.errorMethodNotAllowed("PATCH") ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_R.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_R.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_R.java
new file mode 100644
index 0000000..ca25b06
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_R.java
@@ -0,0 +1,99 @@
+/**
+ * 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.jena.fuseki.servlets ;
+
+import static java.lang.String.format ;
+
+import java.io.IOException ;
+
+import javax.servlet.ServletOutputStream ;
+
+import org.apache.jena.atlas.web.MediaType ;
+import org.apache.jena.atlas.web.TypedOutputStream ;
+import org.apache.jena.riot.web.HttpNames ;
+import org.apache.jena.riot.* ;
+
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+
+/**
+ * Servlet for operations directly on a dataset - REST(ish) behaviour on the
+ * dataset URI.
+ */
+
+public class REST_Quads_R extends REST_Quads {
+    public REST_Quads_R() {
+        super() ;
+    }
+
+    @Override
+    protected void validate(HttpAction action) { }
+
+    @Override
+    protected void doGet(HttpAction action) {
+        MediaType mediaType = ActionLib.contentNegotationQuads(action) ;
+        ServletOutputStream output ;
+        try {
+            output = action.response.getOutputStream() ;
+        } catch (IOException ex) {
+            ServletOps.errorOccurred(ex) ;
+            output = null ;
+        }
+
+        TypedOutputStream out = new TypedOutputStream(output, mediaType) ;
+        Lang lang = RDFLanguages.contentTypeToLang(mediaType.getContentType()) ;
+        if ( lang == null )
+            lang = RDFLanguages.TRIG ;
+
+        if ( action.verbose )
+            action.log.info(format("[%d]   Get: Content-Type=%s, Charset=%s => %s", action.id,
+                                   mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ;
+        if ( !RDFLanguages.isQuads(lang) )
+            ServletOps.errorBadRequest("Not a quads format: " + mediaType) ;
+
+        action.beginRead() ;
+        try {
+            DatasetGraph dsg = action.getActiveDSG() ;
+            action.response.setHeader("Content-type", lang.getContentType().toHeaderString());
+            RDFFormat fmt =
+                ( lang == Lang.RDFXML ) ? RDFFormat.RDFXML_PLAIN : RDFWriterRegistry.defaultSerialization(lang) ; 
+            RDFDataMgr.write(out, dsg, fmt) ;
+            ServletOps.success(action) ;
+        } finally {
+            action.endRead() ;
+        }
+    }
+
+    @Override
+    protected void doOptions(HttpAction action) {
+        action.response.setHeader(HttpNames.hAllow, "GET, HEAD, OPTIONS") ;
+        action.response.setHeader(HttpNames.hContentLengh, "0") ;
+        ServletOps.success(action) ;
+    }
+
+    @Override
+    protected void doHead(HttpAction action) {
+        action.beginRead() ;
+        try {
+            MediaType mediaType = ActionLib.contentNegotationQuads(action) ;
+            ServletOps.success(action) ;
+        } finally {
+            action.endRead() ;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_RW.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_RW.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_RW.java
new file mode 100644
index 0000000..dfc87ab
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/REST_Quads_RW.java
@@ -0,0 +1,136 @@
+/**
+ * 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.jena.fuseki.servlets ;
+
+import org.apache.jena.fuseki.FusekiLib ;
+import org.apache.jena.riot.RiotException ;
+import org.apache.jena.riot.system.StreamRDF ;
+import org.apache.jena.riot.system.StreamRDFLib ;
+
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
+
+/**
+ * Servlet for operations directly on a dataset - REST(ish) behaviour on the
+ * dataset URI.
+ */
+
+public class REST_Quads_RW extends REST_Quads_R {
+
+    public REST_Quads_RW() {
+        super() ;
+    }
+
+    @Override
+    protected void validate(HttpAction action) { }
+
+    @Override
+    protected void doPost(HttpAction action) {
+        if ( !action.getDataService().allowUpdate() )
+            ServletOps.errorMethodNotAllowed("POST") ;
+
+        if ( action.isTransactional() )
+            doPutPostTxn(action, false) ;
+        else
+            doPutPostNonTxn(action, false) ;
+    }
+
+    @Override
+    protected void doPut(HttpAction action) {
+        if ( !action.getDataService().allowUpdate() )
+            ServletOps.errorMethodNotAllowed("POST") ;
+
+        if ( action.isTransactional() )
+            doPutPostTxn(action, true) ;
+        else
+            doPutPostNonTxn(action, true) ;
+    }
+
+    // These are very similar to SPARQL_REST_RW.addDataIntoTxn/nonTxn
+    // Maybe can be usually DRYed.
+
+    @Override
+    protected void doDelete(HttpAction action) {
+        ServletOps.errorMethodNotAllowed("DELETE") ;
+    }
+
+    @Override
+    protected void doPatch(HttpAction action) {
+        ServletOps.errorMethodNotAllowed("PATCH") ;
+    }
+
+    private void doPutPostTxn(HttpAction action, boolean clearFirst) {
+        UploadDetails details = null ;
+        action.beginWrite() ;
+        try {
+            DatasetGraph dsg = action.getActiveDSG() ;
+            if ( clearFirst )
+                dsg.clear() ;
+            StreamRDF dest = StreamRDFLib.dataset(dsg) ;
+            details = Upload.incomingData(action, dest) ;
+            action.commit() ;
+            ServletOps.success(action) ;
+        } catch (RiotException ex) {
+            // Parse error
+            action.abort() ;
+            ServletOps.errorBadRequest(ex.getMessage()) ;
+        } catch (Exception ex) {
+            // Something else went wrong. Backout.
+            action.abort() ;
+            ServletOps.errorOccurred(ex.getMessage()) ;
+        } finally {
+            action.endWrite() ;
+        }
+        ServletOps.uploadResponse(action, details) ;
+    }
+    
+    private void doPutPostNonTxn(HttpAction action, boolean clearFirst) {
+        DatasetGraph dsgTmp = DatasetGraphFactory.createMem() ;
+        StreamRDF dest = StreamRDFLib.dataset(dsgTmp) ;
+
+        UploadDetails details ;
+        try {
+            details = Upload.incomingData(action, dest) ;
+        } catch (RiotException ex) {
+            ServletOps.errorBadRequest(ex.getMessage()) ;
+            return ;
+        }
+        // Now insert into dataset
+        action.beginWrite() ;
+        try {
+            DatasetGraph dsg = action.getActiveDSG() ;
+            if ( clearFirst )
+                dsg.clear() ;
+            FusekiLib.addDataInto(dsgTmp, dsg) ;
+            action.commit() ;
+            ServletOps.success(action) ;
+        } catch (Exception ex) {
+            // We're in the non-transactional branch, this probably will not
+            // work
+            // but it might and there is no harm safely trying.
+            try {
+                action.abort() ;
+            } catch (Exception ex2) {}
+            ServletOps.errorOccurred(ex.getMessage()) ;
+        } finally {
+            action.endWrite() ;
+        }
+        ServletOps.uploadResponse(action, details) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseCallback.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseCallback.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseCallback.java
new file mode 100644
index 0000000..1a78627
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseCallback.java
@@ -0,0 +1,24 @@
+/*
+ * 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.jena.fuseki.servlets ;
+
+public interface ResponseCallback
+{
+    public void callback(boolean successfulOperation) ;
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseModel.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseModel.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseModel.java
new file mode 100644
index 0000000..65eb1e5
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseModel.java
@@ -0,0 +1,136 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import java.util.HashMap ;
+import java.util.Map ;
+
+import javax.servlet.ServletOutputStream ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.web.MediaType ;
+import org.apache.jena.fuseki.DEF ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.conneg.ConNeg ;
+import org.apache.jena.fuseki.conneg.WebLib ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.RDFLanguages ;
+import static org.apache.jena.riot.WebContent.* ;
+import org.apache.jena.web.HttpSC ;
+
+import com.hp.hpl.jena.rdf.model.Model ;
+
+public class ResponseModel
+{
+    // Short names for "output="
+    private static final String contentOutputJSONLD        = "json-ld" ;
+    private static final String contentOutputJSONRDF       = "json-rdf" ;
+    private static final String contentOutputJSON          = "json" ;
+    private static final String contentOutputXML           = "xml" ;
+    private static final String contentOutputText          = "text" ;
+    private static final String contentOutputTTL           = "ttl" ;
+    private static final String contentOutputNT            = "nt" ;
+
+    public static Map<String,String> shortNamesModel = new HashMap<String, String>() ;
+    static {
+
+        // Some short names.  keys are lowercase.
+        ResponseOps.put(shortNamesModel, contentOutputJSONLD,   contentTypeJSONLD) ;
+        ResponseOps.put(shortNamesModel, contentOutputJSONRDF,  contentTypeRDFJSON) ;
+        ResponseOps.put(shortNamesModel, contentOutputJSON,     contentTypeJSONLD) ;
+        ResponseOps.put(shortNamesModel, contentOutputXML,      contentTypeRDFXML) ;
+        ResponseOps.put(shortNamesModel, contentOutputText,     contentTypeTurtle) ;
+        ResponseOps.put(shortNamesModel, contentOutputTTL,      contentTypeTurtle) ;
+        ResponseOps.put(shortNamesModel, contentOutputNT,       contentTypeNTriples) ;
+    }
+
+    public static void doResponseModel(HttpAction action, Model model) 
+    {
+        HttpServletRequest request = action.request ;
+        HttpServletResponse response = action.response ;
+        
+        String mimeType = null ;        // Header request type 
+
+        // TODO Use MediaType throughout.
+        MediaType i = ConNeg.chooseContentType(request, DEF.rdfOffer, DEF.acceptRDFXML) ;
+        if ( i != null )
+            mimeType = i.getContentType() ;
+
+        String outputField = ResponseOps.paramOutput(request, shortNamesModel) ;
+        if ( outputField != null )
+            mimeType = outputField ;
+
+        String writerMimeType = mimeType ;
+
+        if ( mimeType == null )
+        {
+            Fuseki.actionLog.warn("Can't find MIME type for response") ;
+            String x = WebLib.getAccept(request) ;
+            String msg ;
+            if ( x == null )
+                msg = "No Accept: header" ;
+            else
+                msg = "Accept: "+x+" : Not understood" ;
+            ServletOps.error(HttpSC.NOT_ACCEPTABLE_406, msg) ;
+        }
+
+        String contentType = mimeType ;
+        String charset =     charsetUTF8 ;
+
+        String forceAccept = ResponseOps.paramForceAccept(request) ;
+        if ( forceAccept != null )
+        {
+            contentType = forceAccept ;
+            charset = charsetUTF8 ;
+        }
+
+        Lang lang = RDFLanguages.contentTypeToLang(contentType) ;
+        if ( lang == null )
+            ServletOps.errorBadRequest("Can't determine output content type: "+contentType) ;
+        
+//        if ( rdfw instanceof RDFXMLWriterI )
+//            rdfw.setProperty("showXmlDeclaration", "true") ;
+
+    //        // Write locally to check it's possible.
+    //        // Time/space tradeoff.
+    //        try {
+    //            OutputStream out = new NullOutputStream() ;
+    //            RDFDataMgr.write(out, model, lang) ;
+    //            IO.flush(out) ;
+    //        } catch (JenaException ex)
+    //        {
+    //            SPARQL_ServletBase.errorOccurred(ex) ;
+    //        }
+
+        try {
+            ResponseResultSet.setHttpResponse(action, contentType, charset) ; 
+            response.setStatus(HttpSC.OK_200) ;
+            ServletOutputStream out = response.getOutputStream() ;
+            RDFDataMgr.write(out, model, lang) ;
+            out.flush() ;
+        }
+        catch (Exception ex) { 
+            action.log.info("Exception while writing the response model: "+ex.getMessage(), ex) ;
+            ServletOps.errorOccurred("Exception while writing the response model: "+ex.getMessage(), ex) ;
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseOps.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseOps.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseOps.java
new file mode 100644
index 0000000..8a3a1c9
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseOps.java
@@ -0,0 +1,94 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import java.io.IOException ;
+import java.util.Locale ;
+import java.util.Map ;
+
+import javax.servlet.http.HttpServletRequest ;
+
+import org.apache.jena.riot.web.HttpNames ;
+
+public class ResponseOps
+{
+    // Helpers
+    public static void put(Map<String, String> map, String key, String value)
+    {
+        map.put(key.toLowerCase(Locale.ROOT), value) ;
+    }
+    
+    public static boolean isEOFexception(IOException ioEx)
+    {
+        if ( ioEx.getClass().getName().equals("org.mortbay.jetty.EofException eofEx") )
+            return true ;
+        if ( ioEx instanceof java.io.EOFException )
+            return true ;
+        return false ;
+    }
+
+    public static String paramForceAccept(HttpServletRequest request)
+    {
+        String x = fetchParam(request, HttpNames.paramForceAccept) ;
+        return x ; 
+    }
+
+    public static String paramStylesheet(HttpServletRequest request)
+    { return fetchParam(request, HttpNames.paramStyleSheet) ; }
+
+    public static String paramOutput(HttpServletRequest request, Map<String,String> map)
+    {
+        // Two names.
+        String x = fetchParam(request, HttpNames.paramOutput1) ;
+        if ( x == null )
+            x = fetchParam(request, HttpNames.paramOutput2) ;
+        return expandShortName(x, map) ;
+    }
+
+    public static String expandShortName(String str, Map<String,String> map)
+    {
+        if ( str == null )
+            return null ;
+        // Force keys to lower case. See put() above.
+        String key = str.toLowerCase(Locale.ROOT) ;
+        String str2 = map.get(key) ;
+        if ( str2 == null )
+            return str ;
+        return str2 ;
+    }
+
+    public static String paramCallback(HttpServletRequest request)
+    { 
+        return fetchParam(request, HttpNames.paramCallback) ;
+    }
+
+    public static String fetchParam(HttpServletRequest request, String parameterName)
+    {
+        String value = request.getParameter(parameterName) ;
+        if ( value != null )
+        {
+            value = value.trim() ;
+            if ( value.length() == 0 )
+                value = null ;
+        }
+        return value ;
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseResultSet.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseResultSet.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseResultSet.java
new file mode 100644
index 0000000..f87e56b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseResultSet.java
@@ -0,0 +1,322 @@
+/*
+ * 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.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.charsetUTF8 ;
+import static org.apache.jena.riot.WebContent.contentTypeRDFXML ;
+import static org.apache.jena.riot.WebContent.contentTypeResultsJSON ;
+import static org.apache.jena.riot.WebContent.contentTypeResultsThrift ;
+import static org.apache.jena.riot.WebContent.contentTypeResultsXML ;
+import static org.apache.jena.riot.WebContent.contentTypeTextCSV ;
+import static org.apache.jena.riot.WebContent.contentTypeTextPlain ;
+import static org.apache.jena.riot.WebContent.contentTypeTextTSV ;
+import static org.apache.jena.riot.WebContent.contentTypeXML ;
+
+import java.io.IOException ;
+import java.util.HashMap ;
+import java.util.Map ;
+
+import javax.servlet.ServletOutputStream ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.io.IO ;
+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 org.apache.jena.riot.ResultSetMgr ;
+import org.apache.jena.riot.WebContent ;
+import org.apache.jena.riot.resultset.ResultSetLang ;
+import org.apache.jena.web.HttpSC ;
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
+
+import com.hp.hpl.jena.query.QueryCancelledException ;
+import com.hp.hpl.jena.query.ResultSet ;
+import com.hp.hpl.jena.query.ResultSetFormatter ;
+import com.hp.hpl.jena.sparql.core.Prologue ;
+
+/** This is the content negotiation for each kind of SPARQL query result */ 
+public class ResponseResultSet
+{
+    private static Logger xlog = LoggerFactory.getLogger(ResponseResultSet.class) ;
+
+    // Short names for "output="
+    private static final String contentOutputJSON          = "json" ;
+    private static final String contentOutputXML           = "xml" ;
+    private static final String contentOutputSPARQL        = "sparql" ;
+    private static final String contentOutputText          = "text" ;
+    private static final String contentOutputCSV           = "csv" ;
+    private static final String contentOutputTSV           = "tsv" ;
+    private static final String contentOutputThrift        = "thrift" ;
+    
+    public static Map<String,String> shortNamesResultSet = new HashMap<>() ;
+    static {
+        // Some short names.  keys are lowercase.
+        ResponseOps.put(shortNamesResultSet, contentOutputJSON,   contentTypeResultsJSON) ;
+        ResponseOps.put(shortNamesResultSet, contentOutputSPARQL, contentTypeResultsXML) ;
+        ResponseOps.put(shortNamesResultSet, contentOutputXML,    contentTypeResultsXML) ;
+        ResponseOps.put(shortNamesResultSet, contentOutputText,   contentTypeTextPlain) ;
+        ResponseOps.put(shortNamesResultSet, contentOutputCSV,    contentTypeTextCSV) ;
+        ResponseOps.put(shortNamesResultSet, contentOutputTSV,    contentTypeTextTSV) ;
+        ResponseOps.put(shortNamesResultSet, contentOutputThrift, contentTypeResultsThrift) ;
+    }
+    
+    interface OutputContent { void output(ServletOutputStream out) ; }
+
+    public static void doResponseResultSet(HttpAction action, Boolean booleanResult)
+    {
+        doResponseResultSet$(action, null, booleanResult, null, DEF.rsOfferBoolean) ;
+    }
+
+    public static void doResponseResultSet(HttpAction action, ResultSet resultSet, Prologue qPrologue)
+    {
+        doResponseResultSet$(action, resultSet, null, qPrologue, DEF.rsOfferTable) ;
+    }
+    
+    // If we refactor the conneg into a single function, we can split boolean and result set handling. 
+    
+    // One or the other argument must be null
+    private static void doResponseResultSet$(HttpAction action,
+                                             ResultSet resultSet, Boolean booleanResult, 
+                                             Prologue qPrologue, 
+                                             AcceptList contentTypeOffer) 
+    {
+        HttpServletRequest request = action.request ;
+        HttpServletResponse response = action.response ;
+        long id = action.id ;
+        
+        if ( resultSet == null && booleanResult == null )
+        {
+            xlog.warn("doResponseResult: Both result set and boolean result are null") ; 
+            throw new FusekiException("Both result set and boolean result are null") ;
+        }
+        
+        if ( resultSet != null && booleanResult != null )
+        {
+            xlog.warn("doResponseResult: Both result set and boolean result are set") ; 
+            throw new FusekiException("Both result set and boolean result are set") ;
+        }
+
+        String mimeType = null ; 
+        MediaType i = ConNeg.chooseContentType(request, contentTypeOffer, DEF.acceptRSXML) ;
+        if ( i != null )
+            mimeType = i.getContentType() ;
+        
+        // Override content type
+        // Does &output= override?
+        // Requested output type by the web form or &output= in the request.
+        String outputField = ResponseOps.paramOutput(request, shortNamesResultSet) ;    // Expands short names
+        if ( outputField != null )
+            mimeType = outputField ;
+        
+        String serializationType = mimeType ;           // Choose the serializer based on this.
+        String contentType = mimeType ;                 // Set the HTTP respose header to this.
+             
+        // Stylesheet - change to application/xml.
+        final String stylesheetURL = ResponseOps.paramStylesheet(request) ;
+        if ( stylesheetURL != null && equal(serializationType,contentTypeResultsXML) )
+            contentType = contentTypeXML ;
+        
+        // Force to text/plain?
+        String forceAccept = ResponseOps.paramForceAccept(request) ;
+        if ( forceAccept != null )
+            contentType = contentTypeTextPlain ;
+
+        // Better : dispatch on MediaType
+        if ( equal(serializationType, contentTypeResultsXML) )
+            sparqlXMLOutput(action, contentType, resultSet, stylesheetURL, booleanResult) ;
+        else if ( equal(serializationType, contentTypeResultsJSON) )
+            jsonOutput(action, contentType, resultSet, booleanResult) ;
+        else if ( equal(serializationType, contentTypeTextPlain) )
+            textOutput(action, contentType, resultSet, qPrologue, booleanResult) ;
+        else if ( equal(serializationType, contentTypeTextCSV) ) 
+            csvOutput(action, contentType, resultSet, booleanResult) ;
+        else if (equal(serializationType, contentTypeTextTSV) )
+            tsvOutput(action, contentType, resultSet, booleanResult) ;
+        else if (equal(serializationType, WebContent.contentTypeResultsThrift) )
+            thriftOutput(action, contentType, resultSet, booleanResult) ;
+        else
+            ServletOps.errorBadRequest("Can't determine output serialization: "+serializationType) ;
+    }
+    
+    
+    public static void setHttpResponse(HttpAction action, 
+//                                       HttpServletRequest httpRequest,
+//                                       HttpServletResponse httpResponse,
+                                       String contentType, String charset) 
+    {
+        // ---- Set up HTTP Response
+        // Stop caching (not that ?queryString URLs are cached anyway)
+        if ( true )
+            ServletOps.setNoCache(action) ;
+        // See: http://www.w3.org/International/O-HTTP-charset.html
+        if ( contentType != null )
+        {
+            if ( charset != null && ! isXML(contentType) )
+                contentType = contentType+"; charset="+charset ;
+            action.log.trace("Content-Type for response: "+contentType) ;
+            action.response.setContentType(contentType) ;
+        }
+    }
+
+    private static boolean isXML(String contentType)
+    {
+        return contentType.equals(contentTypeRDFXML)
+            || contentType.equals(contentTypeResultsXML)
+            || contentType.equals(contentTypeXML) ; 
+    }
+
+    private static void sparqlXMLOutput(HttpAction action, String contentType, final ResultSet resultSet, final String stylesheetURL, final Boolean booleanResult)
+    {
+        OutputContent proc = 
+            new OutputContent(){
+            @Override
+            public void output(ServletOutputStream out)
+            {
+                if ( resultSet != null )
+                    ResultSetFormatter.outputAsXML(out, resultSet, stylesheetURL) ;
+                if ( booleanResult != null )
+                    ResultSetFormatter.outputAsXML(out, booleanResult.booleanValue(), stylesheetURL) ;
+            }} ;
+            output(action, contentType, null, proc) ;
+        }
+    
+    private static void jsonOutput(HttpAction action, String contentType, final ResultSet resultSet, final Boolean booleanResult)
+    {
+        OutputContent proc = new OutputContent(){
+            @Override
+            public void output(ServletOutputStream out)
+            {
+                if ( resultSet != null )
+                    ResultSetFormatter.outputAsJSON(out, resultSet) ;
+                if (  booleanResult != null )
+                    ResultSetFormatter.outputAsJSON(out, booleanResult.booleanValue()) ;
+            }
+        } ;
+        
+        try {
+            String callback = ResponseOps.paramCallback(action.request) ;
+            ServletOutputStream out = action.response.getOutputStream() ;
+
+            if ( callback != null )
+            {
+                callback = callback.replace("\r", "") ;
+                callback = callback.replace("\n", "") ;
+                out.print(callback) ;
+                out.println("(") ;
+            }
+
+            output(action, contentType, charsetUTF8, proc) ;
+
+            if ( callback != null )
+                out.println(")") ;
+        } catch (IOException ex) { IO.exception(ex) ; }
+    }
+    
+    private static void textOutput(HttpAction action, String contentType, final ResultSet resultSet, final Prologue qPrologue, final Boolean booleanResult)
+    {
+        // Text is not streaming.
+        OutputContent proc =  new OutputContent(){
+            @Override
+            public void output(ServletOutputStream out)
+            {
+                if ( resultSet != null )
+                    ResultSetFormatter.out(out, resultSet, qPrologue) ;
+                if (  booleanResult != null )
+                    ResultSetFormatter.out(out, booleanResult.booleanValue()) ;
+            }
+        };
+
+        output(action, contentType, charsetUTF8, proc) ;
+    }
+
+    private static void csvOutput(HttpAction action, String contentType, final ResultSet resultSet, final Boolean booleanResult) {
+        OutputContent proc = new OutputContent(){
+            @Override
+            public void output(ServletOutputStream out)
+            {
+                if ( resultSet != null )
+                    ResultSetFormatter.outputAsCSV(out, resultSet) ;
+                if (  booleanResult != null )
+                    ResultSetFormatter.outputAsCSV(out, booleanResult.booleanValue()) ;
+            }
+        } ;
+        output(action, contentType, charsetUTF8, proc) ; 
+    }
+
+    private static void tsvOutput(HttpAction action, String contentType, final ResultSet resultSet, final Boolean booleanResult) {
+        OutputContent proc = new OutputContent(){
+            @Override
+            public void output(ServletOutputStream out)
+            {
+                if ( resultSet != null )
+                    ResultSetFormatter.outputAsTSV(out, resultSet) ;
+                if (  booleanResult != null )
+                    ResultSetFormatter.outputAsTSV(out, booleanResult.booleanValue()) ;
+            }
+        } ;
+        output(action, contentType, charsetUTF8, proc) ; 
+    }
+    
+    private static void thriftOutput(HttpAction action, String contentType, final ResultSet resultSet, final Boolean booleanResult) {
+        OutputContent proc = new OutputContent(){
+            @Override
+            public void output(ServletOutputStream out)
+            {
+                if ( resultSet != null )
+                    ResultSetMgr.write(out, resultSet, ResultSetLang.SPARQLResultSetThrift) ;
+                if ( booleanResult != null )
+                    xlog.error("Can't write boolen result in thrift") ;
+            }
+        } ;
+        output(action, contentType, WebContent.charsetUTF8, proc) ; 
+    }
+
+    private static void output(HttpAction action, String contentType, String charset, OutputContent proc) 
+    {
+        try {
+            setHttpResponse(action, contentType, charset) ; 
+            action.response.setStatus(HttpSC.OK_200) ;
+            ServletOutputStream out = action.response.getOutputStream() ;
+            try
+            {
+                proc.output(out) ;
+                out.flush() ;
+            } catch (QueryCancelledException ex) {
+                // Bother.  Status code 200 already sent.
+                action.log.info(format("[%d] Query Cancelled - results truncated (but 200 already sent)", action.id)) ;
+                out.println() ;
+                out.println("##  Query cancelled due to timeout during execution   ##") ;
+                out.println("##  ****          Incomplete results           ****   ##") ;
+                out.flush() ;
+                // No point raising an exception - 200 was sent already.  
+                //errorOccurred(ex) ;
+            }
+        // Includes client gone.
+        } catch (IOException ex) 
+        { ServletOps.errorOccurred(ex) ; }
+        // Do not call httpResponse.flushBuffer(); here - Jetty closes the stream if it is a gzip stream
+        // then the JSON callback closing details can't be added. 
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP.java
new file mode 100644
index 0000000..3f6a3b4
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP.java
@@ -0,0 +1,214 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import java.util.Enumeration ;
+
+import javax.servlet.http.HttpServletRequest ;
+
+import org.apache.jena.riot.web.HttpNames ;
+import org.apache.jena.riot.system.IRIResolver ;
+
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.NodeFactory ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+
+public abstract class SPARQL_GSP extends ActionREST
+{
+    protected final static Target determineTarget(HttpAction action) {
+        // Delayed until inside a transaction.
+        if ( action.getActiveDSG() == null )
+            ServletOps.errorOccurred("Internal error : No action graph (not in a transaction?)") ;
+        
+        boolean dftGraph = getOneOnly(action.request, HttpNames.paramGraphDefault) != null ;
+        String uri = getOneOnly(action.request, HttpNames.paramGraph) ;
+        
+        if ( !dftGraph && uri == null ) {
+            ServletOps.errorBadRequest("Neither default graph nor named graph specified; no direct name") ;
+            
+            // Direct naming or error.
+            uri = action.request.getRequestURL().toString() ;
+            if ( action.request.getRequestURI().equals(action.getDatasetName()) )
+                // No name 
+                ServletOps.errorBadRequest("Neither default graph nor named graph specified; no direct name") ;
+        }
+        
+        String dsTarget = action.getDatasetName() ;
+        
+        if ( dftGraph )
+            return Target.createDefault(action.getActiveDSG()) ;
+        
+        // Named graph
+        if ( uri.equals(HttpNames.valueDefault ) )
+            // But "named" default
+            return Target.createDefault(action.getActiveDSG()) ;
+        
+        // Strictly, a bit naughty on the URI resolution.  But more sensible. 
+        // Base is dataset.
+        
+        // XXX Remove any service.
+        
+        String base = action.request.getRequestURL().toString() ; //wholeRequestURL(request) ;
+        // Make sure it ends in "/", ie. dataset as container.
+        if ( action.request.getQueryString() != null && ! base.endsWith("/") )
+            base = base + "/" ;
+        
+        String absUri = IRIResolver.resolveString(uri, base) ;
+        Node gn = NodeFactory.createURI(absUri) ;
+        return Target.createNamed(action.getActiveDSG(), absUri, gn) ;
+    }
+
+    // struct for target
+    protected static final class Target
+    {
+        final boolean isDefault ;
+        final DatasetGraph dsg ;
+        private Graph _graph ;
+        final String name ;
+        final Node graphName ;
+
+        static Target createNamed(DatasetGraph dsg, String name, Node graphName) {
+            return new Target(false, dsg, name, graphName) ;
+        }
+
+        static Target createDefault(DatasetGraph dsg) {
+            return new Target(true, dsg, null, null) ;
+        }
+
+        /** Create a new Target which is like the original but aimed at a different DatasetGraph */
+        static Target retarget(Target target, DatasetGraph dsg) {
+            Target target2 = new Target(target, dsg) ;
+            target2._graph = null ;
+            return target2 ;
+        }
+        
+        private Target(boolean isDefault, DatasetGraph dsg, String name, Node graphName) {
+            this.isDefault = isDefault ;
+            this.dsg = dsg ;
+            this._graph = null ;
+            this.name  = name ;
+            this.graphName = graphName ;
+
+            if ( isDefault )
+            {
+                if ( name != null || graphName != null )
+                    throw new IllegalArgumentException("Inconsistent: default and a graph name/node") ;       
+            }
+            else
+            {
+                if ( name == null || graphName == null )
+                    throw new IllegalArgumentException("Inconsistent: not default and/or no graph name/node") ;
+            }                
+        }
+
+        private Target(Target other, DatasetGraph dsg) {
+            this.isDefault  = other.isDefault ;
+            this.dsg        = dsg ; //other.dsg ;
+            this._graph     = other._graph ;
+            this.name       = other.name ;
+            this.graphName  = other.graphName ;
+        }
+        
+        /** Get a graph for the action - this may create a graph in the dataset - this is not a test for graph existence */
+        public Graph graph() {
+            if ( ! isGraphSet() )
+            {
+                if ( isDefault ) 
+                    _graph = dsg.getDefaultGraph() ;
+                else
+                    _graph = dsg.getGraph(graphName) ;
+            }
+            return _graph ;
+        }
+
+        public boolean exists()
+        {
+            if ( isDefault ) return true ;
+            return dsg.containsGraph(graphName) ;
+        }
+
+        public boolean isGraphSet()
+        {
+            return _graph != null ;
+        }
+
+        @Override    
+//      protected static ErrorHandler errorHandler = ErrorHandlerFactory.errorHandlerStd(log) ;
+
+        public String toString()
+        {
+            if ( isDefault ) return "default" ;
+            return name ;
+        }
+    }
+
+    public SPARQL_GSP()
+    { super() ; }
+
+    @Override
+    protected void validate(HttpAction action)
+    {
+        HttpServletRequest request = action.request ;
+        if ( request.getQueryString() == null ) {
+            //errorBadRequest("No query string") ;
+            return ;
+        }
+        
+        String g = request.getParameter(HttpNames.paramGraph) ;
+        String d = request.getParameter(HttpNames.paramGraphDefault) ;
+        
+        if ( g != null && d !=null )
+            ServletOps.errorBadRequest("Both ?default and ?graph in the query string of the request") ;
+        
+        if ( g == null && d == null )
+            ServletOps.errorBadRequest("Neither ?default nor ?graph in the query string of the request") ;
+        
+        int x1 = SPARQL_Protocol.countParamOccurences(request, HttpNames.paramGraph) ;
+        int x2 = SPARQL_Protocol.countParamOccurences(request, HttpNames.paramGraphDefault) ;
+        
+        if ( x1 > 1 )
+            ServletOps.errorBadRequest("Multiple ?default in the query string of the request") ;
+        if ( x2 > 1 )
+            ServletOps.errorBadRequest("Multiple ?graph in the query string of the request") ;
+        
+        Enumeration<String> en = request.getParameterNames() ;
+        for ( ; en.hasMoreElements() ; )
+        {
+            String h = en.nextElement() ;
+            if ( ! HttpNames.paramGraph.equals(h) && ! HttpNames.paramGraphDefault.equals(h) )
+                ServletOps.errorBadRequest("Unknown parameter '"+h+"'") ;
+            // one of ?default and &graph
+            if ( request.getParameterValues(h).length != 1 )
+                ServletOps.errorBadRequest("Multiple parameters '"+h+"'") ;
+        }
+    }
+
+    protected static String getOneOnly(HttpServletRequest request, String name)
+    {
+        String[] values = request.getParameterValues(name) ;
+        if ( values == null )
+            return null ;
+        if ( values.length == 0 )
+            return null ;
+        if ( values.length > 1 )
+            ServletOps.errorBadRequest("Multiple occurrences of '"+name+"'") ;
+        return values[0] ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP_R.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP_R.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP_R.java
new file mode 100644
index 0000000..a706e57
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP_R.java
@@ -0,0 +1,123 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import static java.lang.String.format ;
+
+import java.io.IOException ;
+
+import javax.servlet.ServletOutputStream ;
+
+import org.apache.jena.atlas.web.MediaType ;
+import org.apache.jena.atlas.web.TypedOutputStream ;
+import org.apache.jena.riot.web.HttpNames ;
+import org.apache.jena.riot.* ;
+
+import com.hp.hpl.jena.graph.Graph ;
+
+/** Only the READ operations */
+public class SPARQL_GSP_R extends SPARQL_GSP
+{
+    public SPARQL_GSP_R()
+    { super() ; }
+    
+    @Override
+    protected String mapRequestToDataset(HttpAction action) { return ActionLib.mapRequestToDatasetLongest$(action.request.getRequestURI()) ; } 
+
+    @Override
+    protected void doGet(HttpAction action) {
+        // Assume success - do the set up before grabbing the lock.
+        // Sets content type.
+        MediaType mediaType = ActionLib.contentNegotationRDF(action) ;
+        
+        ServletOutputStream output ;
+        try { output = action.response.getOutputStream() ; }
+        catch (IOException ex) { ServletOps.errorOccurred(ex) ; output = null ; }
+        
+        TypedOutputStream out = new TypedOutputStream(output, mediaType) ;
+        Lang lang = RDFLanguages.contentTypeToLang(mediaType.getContentType()) ;
+
+        if ( action.verbose )
+            action.log.info(format("[%d]   Get: Content-Type=%s, Charset=%s => %s", 
+                            action.id, mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ;
+
+        action.beginRead() ;
+        setCommonHeaders(action.response) ;
+        try {
+            Target target = determineTarget(action) ;
+            if ( action.log.isDebugEnabled() )
+                action.log.debug("GET->"+target) ;
+            boolean exists = target.exists() ;
+            if ( ! exists )
+                ServletOps.errorNotFound("No such graph: <"+target.name+">") ;
+            // If we want to set the Content-Length, we need to buffer.
+            //response.setContentLength(??) ;
+            String ct = lang.getContentType().toHeaderString() ;
+            action.response.setContentType(ct) ;
+            Graph g = target.graph() ;
+            //Special case RDF/XML to be the plain (faster, less readable) form
+            RDFFormat fmt = 
+                ( lang == Lang.RDFXML ) ? RDFFormat.RDFXML_PLAIN : RDFWriterRegistry.defaultSerialization(lang) ;  
+            RDFDataMgr.write(out, g, fmt) ;
+            ServletOps.success(action) ;
+        } finally { action.endRead() ; }
+    }
+    
+    @Override
+    protected void doOptions(HttpAction action) {
+        setCommonHeadersForOptions(action.response) ;
+        action.response.setHeader(HttpNames.hAllow, "GET,HEAD,OPTIONS") ;
+        action.response.setHeader(HttpNames.hContentLengh, "0") ;
+        ServletOps.success(action) ;
+    }
+
+    @Override
+    protected void doHead(HttpAction action) {
+        action.beginRead() ;
+        setCommonHeaders(action.response) ;
+        try { 
+            Target target = determineTarget(action) ;
+            if ( action.log.isDebugEnabled() )
+                action.log.debug("HEAD->"+target) ;
+            if ( ! target.exists() )
+            {
+                ServletOps.successNotFound(action) ;
+                return ;
+            }
+            MediaType mediaType = ActionLib.contentNegotationRDF(action) ;
+            ServletOps.success(action) ;
+        } finally { action.endRead() ; }
+    }
+
+    @Override
+    protected void doPost(HttpAction action)
+    { ServletOps.errorMethodNotAllowed("POST") ; }
+
+    @Override
+    protected void doDelete(HttpAction action)
+    { ServletOps.errorMethodNotAllowed("DELETE") ; }
+
+    @Override
+    protected void doPut(HttpAction action)
+    { ServletOps.errorMethodNotAllowed("PUT") ; }
+
+    @Override
+    protected void doPatch(HttpAction action)
+    { ServletOps.errorMethodNotAllowed("PATCH") ; }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP_RW.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP_RW.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP_RW.java
new file mode 100644
index 0000000..d3c3179
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_GSP_RW.java
@@ -0,0 +1,208 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import static org.apache.jena.riot.WebContent.ctMultipartMixed ;
+import static org.apache.jena.riot.WebContent.matchContentType ;
+
+import java.util.Map ;
+import java.util.Map.Entry ;
+
+import org.apache.jena.atlas.web.ContentType ;
+import org.apache.jena.atlas.web.MediaType ;
+import org.apache.jena.fuseki.DEF ;
+import org.apache.jena.fuseki.FusekiLib ;
+import org.apache.jena.fuseki.conneg.ConNeg ;
+import org.apache.jena.fuseki.servlets.UploadDetails.PreState ;
+import org.apache.jena.riot.RiotException ;
+import org.apache.jena.riot.system.StreamRDF ;
+import org.apache.jena.riot.system.StreamRDFLib ;
+import org.apache.jena.riot.web.HttpNames ;
+import org.apache.jena.web.HttpSC ;
+
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.sparql.graph.GraphFactory ;
+
+/** The WRITE operations added to the READ operations */
+public class SPARQL_GSP_RW extends SPARQL_GSP_R
+{
+    public SPARQL_GSP_RW()
+    { super() ; }
+
+    @Override
+    protected void doOptions(HttpAction action) {
+        setCommonHeadersForOptions(action.response) ;
+        action.response.setHeader(HttpNames.hAllow, "GET,HEAD,OPTIONS,PUT,DELETE,POST");
+        action.response.setHeader(HttpNames.hContentLengh, "0") ;
+        ServletOps.success(action) ;
+    }
+    
+    @Override
+    protected void doDelete(HttpAction action) {
+        action.beginWrite() ;
+        try {
+            Target target = determineTarget(action) ;
+            if ( action.log.isDebugEnabled() )
+                action.log.debug("DELETE->"+target) ;
+            boolean existedBefore = target.exists() ; 
+            if ( ! existedBefore)
+            {
+                // commit, not abort, because locking "transactions" don't support abort. 
+                action.commit() ;
+                ServletOps.errorNotFound("No such graph: "+target.name) ;
+            } 
+            deleteGraph(action) ;
+            action.commit() ;
+        }
+        finally { action.endWrite() ; }
+        ServletOps.successNoContent(action) ;
+    }
+
+    @Override
+    protected void doPut(HttpAction action)         { doPutPost(action, true) ; }
+
+    @Override
+    protected void doPost(HttpAction action)        { doPutPost(action, false) ; }
+
+    private void doPutPost(HttpAction action, boolean overwrite) {
+        ContentType ct = FusekiLib.getContentType(action) ;
+        if ( ct == null )
+            ServletOps.errorBadRequest("No Content-Type:") ;
+
+        if ( matchContentType(ctMultipartMixed, ct) ) {
+            ServletOps.error(HttpSC.UNSUPPORTED_MEDIA_TYPE_415, "multipart/mixed not supported") ;
+        }
+        
+        UploadDetails details ;
+        if ( action.isTransactional() )
+            details = addDataIntoTxn(action, overwrite) ;
+        else
+            details = addDataIntoNonTxn(action, overwrite) ;
+        
+        MediaType mt = ConNeg.chooseCharset(action.request, DEF.jsonOffer, DEF.acceptJSON) ;
+        
+        if ( mt == null ) {
+            // No return body.
+            if ( details.getExistedBefore().equals(PreState.ABSENT) )
+                ServletOps.successCreated(action) ; 
+            else
+                ServletOps.successNoContent(action) ;
+            return ;
+        }
+        ServletOps.uploadResponse(action, details) ;
+    }
+
+    /** Directly add data in a transaction.
+     * Assumes recovery from parse errors by transaction abort.
+     * Return whether the target existed before.
+     * @param action
+     * @param cleanDest Whether to remove data first (true = PUT, false = POST)
+     * @return whether the target existed beforehand
+     */
+    protected static UploadDetails addDataIntoTxn(HttpAction action, boolean overwrite) {   
+        action.beginWrite();
+        Target target = determineTarget(action) ;
+        boolean existedBefore = false ;
+        try {
+            if ( action.log.isDebugEnabled() )
+                action.log.debug("  ->"+target) ;
+            existedBefore = target.exists() ;
+            Graph g = target.graph() ;
+            if ( overwrite && existedBefore )
+                clearGraph(target) ;
+            StreamRDF sink = StreamRDFLib.graph(g) ;
+            UploadDetails upload = Upload.incomingData(action, sink);
+            upload.setExistedBefore(existedBefore) ;
+            action.commit() ;
+            return upload ;
+        } catch (RiotException ex) { 
+            // Parse error
+            action.abort() ;
+            ServletOps.errorBadRequest(ex.getMessage()) ;
+            return null ;
+        } catch (Exception ex) {
+            // Something else went wrong.  Backout.
+            action.abort() ;
+            ServletOps.errorOccurred(ex.getMessage()) ;
+            return null ;
+        } finally {
+            action.endWrite() ;
+        }
+    }
+    
+    /** Add data where the destination does not support full transactions.
+     *  In particular, with no abort, and actions probably going to the real storage
+     *  parse errors can lead to partial updates.  Instead, parse to a temporary
+     *  graph, then insert that data.  
+     * @param action
+     * @param cleanDest Whether to remove data first (true = PUT, false = POST)
+     * @return whether the target existed beforehand.
+     */
+    
+    protected static UploadDetails addDataIntoNonTxn(HttpAction action, boolean overwrite) {
+        Graph graphTmp = GraphFactory.createGraphMem() ;
+        StreamRDF dest = StreamRDFLib.graph(graphTmp) ;
+
+        UploadDetails details ;
+        try { details = Upload.incomingData(action, dest); }
+        catch (RiotException ex) {
+            ServletOps.errorBadRequest(ex.getMessage()) ;
+            return null ;
+        }
+        // Now insert into dataset
+        action.beginWrite() ;
+        Target target = determineTarget(action) ;
+        boolean existedBefore = false ;
+        try {
+            if ( action.log.isDebugEnabled() )
+                action.log.debug("  ->"+target) ;
+            existedBefore = target.exists() ; 
+            if ( overwrite && existedBefore )
+                clearGraph(target) ;
+            FusekiLib.addDataInto(graphTmp, target.dsg, target.graphName) ;
+            details.setExistedBefore(existedBefore) ;
+            action.commit() ;
+            return details ;
+        } catch (Exception ex) {
+            // We parsed into a temporary graph so an exception at this point
+            // is not because of a parse error.
+            // We're in the non-transactional branch, this probably will not work
+            // but it might and there is no harm safely trying. 
+            try { action.abort() ; } catch (Exception ex2) {} 
+            ServletOps.errorOccurred(ex.getMessage()) ;
+            return null ;            
+        } finally { action.endWrite() ; }
+    }
+    
+    protected static void deleteGraph(HttpAction action) {
+        Target target = determineTarget(action) ;
+        if ( target.isDefault )
+            target.graph().clear() ;
+        else
+            action.getActiveDSG().removeGraph(target.graphName) ;
+    }
+
+    protected static void clearGraph(Target target) {
+        Graph g = target.graph() ;
+        g.clear() ;
+        Map<String, String> pm = g.getPrefixMapping().getNsPrefixMap() ;
+        for ( Entry<String, String> e : pm.entrySet() ) 
+            g.getPrefixMapping().removeNsPrefix(e.getKey()) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Protocol.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Protocol.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Protocol.java
new file mode 100644
index 0000000..87d234e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Protocol.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.jena.fuseki.servlets;
+
+import static org.apache.jena.riot.web.HttpNames.paramDefaultGraphURI ;
+import static org.apache.jena.riot.web.HttpNames.paramNamedGraphURI ;
+
+import java.util.Arrays ;
+import java.util.Collections ;
+import java.util.List ;
+
+import javax.servlet.http.HttpServletRequest ;
+
+import org.apache.jena.atlas.iterator.Filter ;
+import org.apache.jena.atlas.iterator.Iter ;
+import org.apache.jena.atlas.lib.Lib ;
+
+import com.hp.hpl.jena.query.Query ;
+import com.hp.hpl.jena.query.QueryParseException ;
+import com.hp.hpl.jena.sparql.core.DatasetDescription ;
+
+/** Support for the SPARQL protocol (SPARQL Query, SPARQL Update)
+ */
+public  abstract class SPARQL_Protocol extends ActionSPARQL
+{
+    protected SPARQL_Protocol() { super() ; }
+
+    protected static String messageForQPE(QueryParseException ex)
+    {
+        if ( ex.getMessage() != null )
+            return ex.getMessage() ;
+        if ( ex.getCause() != null )
+            return Lib.classShortName(ex.getCause().getClass()) ;
+        return null ;
+    }
+    
+    protected static DatasetDescription getDatasetDescription(HttpAction action)
+    {
+        List<String> graphURLs = toStrList(action.request.getParameterValues(paramDefaultGraphURI)) ;
+        List<String> namedGraphs = toStrList(action.request.getParameterValues(paramNamedGraphURI)) ;
+        
+        graphURLs = removeEmptyValues(graphURLs) ;
+        namedGraphs = removeEmptyValues(namedGraphs) ;
+        
+        if ( graphURLs.size() == 0 && namedGraphs.size() == 0 )
+            return null ;
+        return DatasetDescription.create(graphURLs, namedGraphs) ;
+    }
+    
+    protected static DatasetDescription getDatasetDescription(Query query)
+    {
+        return DatasetDescription.create(query) ;
+    }
+   
+    private static List<String> toStrList(String[] array)
+    {
+        if ( array == null )
+            return Collections.emptyList() ;
+        return Arrays.asList(array) ;
+    }
+
+    private static List<String> removeEmptyValues(List<String> list)
+    {
+        return Iter.iter(list).filter(acceptNonEmpty).toList() ;
+    }
+    
+    private static Filter<String> acceptNonEmpty = new Filter<String>(){ 
+        @Override
+        public boolean accept(String item)
+        {
+            return item != null && item.length() != 0 ;
+        }
+    } ;
+    
+    protected static int countParamOccurences(HttpServletRequest request, String param)
+    {
+        String[] x = request.getParameterValues(param) ;
+        if ( x == null )
+            return 0 ;
+        return x.length ;
+    }
+    
+
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
new file mode 100644
index 0000000..6ab3f71
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
@@ -0,0 +1,393 @@
+/*
+ * 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.jena.fuseki.servlets ;
+
+import static java.lang.String.format ;
+import static org.apache.jena.fuseki.server.CounterName.QueryTimeouts ;
+import static org.apache.jena.riot.WebContent.ctHTMLForm ;
+import static org.apache.jena.riot.WebContent.ctSPARQLQuery ;
+import static org.apache.jena.riot.WebContent.isHtmlForm ;
+import static org.apache.jena.riot.WebContent.matchContentType ;
+import static org.apache.jena.riot.web.HttpNames.paramAccept ;
+import static org.apache.jena.riot.web.HttpNames.paramCallback ;
+import static org.apache.jena.riot.web.HttpNames.paramDefaultGraphURI ;
+import static org.apache.jena.riot.web.HttpNames.paramForceAccept ;
+import static org.apache.jena.riot.web.HttpNames.paramNamedGraphURI ;
+import static org.apache.jena.riot.web.HttpNames.paramOutput1 ;
+import static org.apache.jena.riot.web.HttpNames.paramOutput2 ;
+import static org.apache.jena.riot.web.HttpNames.paramQuery ;
+import static org.apache.jena.riot.web.HttpNames.paramQueryRef ;
+import static org.apache.jena.riot.web.HttpNames.paramStyleSheet ;
+import static org.apache.jena.riot.web.HttpNames.paramTimeout ;
+
+import java.io.IOException ;
+import java.io.InputStream ;
+import java.util.* ;
+
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.io.IO ;
+import org.apache.jena.atlas.io.IndentedLineBuffer ;
+import org.apache.jena.atlas.web.ContentType ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.FusekiException ;
+import org.apache.jena.fuseki.FusekiLib ;
+import org.apache.jena.riot.web.HttpNames ;
+import org.apache.jena.riot.web.HttpOp ;
+import org.apache.jena.web.HttpSC ;
+
+import com.hp.hpl.jena.query.* ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.sparql.core.Prologue ;
+import com.hp.hpl.jena.sparql.resultset.SPARQLResult ;
+
+/** Handle SPARQL Query requests overt eh SPARQL Protocol. 
+ * Subclasses provide this algorithm with the actual dataset to query, whether
+ * a dataset hosted by this server ({@link SPARQL_QueryDataset}) or 
+ * speciifed in the protocol request ({@link SPARQL_QueryGeneral}).   
+ */ 
+public abstract class SPARQL_Query extends SPARQL_Protocol
+{
+    private static final String QueryParseBase = Fuseki.BaseParserSPARQL ;
+    
+    public SPARQL_Query() {
+        super() ;
+    }
+
+    // Choose REST verbs to support.
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
+        doCommon(request, response) ;
+    }
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) {
+        doCommon(request, response) ;
+    }
+
+    // HEAD
+
+    @Override
+    protected void doOptions(HttpServletRequest request, HttpServletResponse response) {
+        setCommonHeadersForOptions(response) ;
+        response.setHeader(HttpNames.hAllow, "GET,OPTIONS,POST") ;
+        response.setHeader(HttpNames.hContentLengh, "0") ;
+    }
+
+    @Override
+    protected final void perform(HttpAction action) {
+        // GET
+        if ( action.request.getMethod().equals(HttpNames.METHOD_GET) ) {
+            executeWithParameter(action) ;
+            return ;
+        }
+
+        ContentType ct = FusekiLib.getContentType(action) ;
+        String incoming = ct.getContentType() ;
+
+        // POST application/x-www-form-url
+        if ( isHtmlForm(ct) ) {
+            executeWithParameter(action) ;
+            return ;
+        }
+
+        // POST application/sparql-query
+        if ( matchContentType(ct, ctSPARQLQuery) ) {
+            executeBody(action) ;
+            return ;
+        }
+
+        ServletOps.error(HttpSC.UNSUPPORTED_MEDIA_TYPE_415, "Bad content type: " + incoming) ;
+    }
+
+    // All the params we support
+
+    protected static List<String> allParams = Arrays.asList(paramQuery, paramDefaultGraphURI, paramNamedGraphURI,
+                                                            paramQueryRef, paramStyleSheet, paramAccept, paramOutput1,
+                                                            paramOutput2, paramCallback, paramForceAccept, paramTimeout) ;
+
+    /**
+     * Validate the request, checking HTTP method and HTTP Parameters.
+     * @param action HTTP Action
+     */
+    @Override
+    protected void validate(HttpAction action) {
+        String method = action.request.getMethod().toUpperCase(Locale.ROOT) ;
+
+        if ( !HttpNames.METHOD_POST.equals(method) && !HttpNames.METHOD_GET.equals(method) )
+            ServletOps.errorMethodNotAllowed("Not a GET or POST request") ;
+
+        if ( HttpNames.METHOD_GET.equals(method) && action.request.getQueryString() == null ) {
+            ServletOps.warning(action, "Service Description / SPARQL Query / " + action.request.getRequestURI()) ;
+            ServletOps.errorNotFound("Service Description: " + action.request.getRequestURI()) ;
+        }
+
+        // Use of the dataset describing parameters is check later.
+        try {
+            validateParams(action, allParams) ;
+            validateRequest(action) ;
+        } catch (ActionErrorException ex) {
+            throw ex ;
+        }
+        // Query not yet parsed.
+    }
+
+    /**
+     * Validate the request after checking HTTP method and HTTP Parameters.
+     * @param action HTTP Action
+     */
+    protected abstract void validateRequest(HttpAction action) ;
+
+    /**
+     * Helper method for validating request.
+     * @param request HTTP request
+     * @param params parameters in a collection of Strings
+     */
+    protected void validateParams(HttpAction action, Collection<String> params) {
+        HttpServletRequest request = action.request ;
+        ContentType ct = FusekiLib.getContentType(request) ;
+        boolean mustHaveQueryParam = true ;
+        if ( ct != null ) {
+            String incoming = ct.getContentType() ;
+
+            if ( matchContentType(ctSPARQLQuery, ct) ) {
+                mustHaveQueryParam = false ;
+            } else if ( matchContentType(ctHTMLForm, ct))
+            {} 
+            else
+                ServletOps.error(HttpSC.UNSUPPORTED_MEDIA_TYPE_415, "Unsupported: " + incoming) ;
+        }
+
+        // GET/POST of a form at this point.
+
+        if ( mustHaveQueryParam ) {
+            int N = countParamOccurences(request, paramQuery) ;
+
+            if ( N == 0 )
+                ServletOps.errorBadRequest("SPARQL Query: No 'query=' parameter") ;
+            if ( N > 1 )
+                ServletOps.errorBadRequest("SPARQL Query: Multiple 'query=' parameters") ;
+
+            // application/sparql-query does not use a query param.
+            String queryStr = request.getParameter(HttpNames.paramQuery) ;
+
+            if ( queryStr == null )
+                ServletOps.errorBadRequest("SPARQL Query: No query specified (no 'query=' found)") ;
+            if ( queryStr.isEmpty() )
+                ServletOps.errorBadRequest("SPARQL Query: Empty query string") ;
+        }
+
+        if ( params != null ) {
+            Enumeration<String> en = request.getParameterNames() ;
+            for (; en.hasMoreElements();) {
+                String name = en.nextElement() ;
+                if ( !params.contains(name) )
+                    ServletOps.warning(action, "SPARQL Query: Unrecognize request parameter (ignored): " + name) ;
+            }
+        }
+    }
+
+    private void executeWithParameter(HttpAction action) {
+        String queryString = action.request.getParameter(paramQuery) ;
+        execute(queryString, action) ;
+    }
+
+    private void executeBody(HttpAction action) {
+        String queryString = null ;
+        try {
+            InputStream input = action.request.getInputStream() ;
+            queryString = IO.readWholeFileAsUTF8(input) ;
+        } catch (IOException ex) {
+            ServletOps.errorOccurred(ex) ;
+        }
+        execute(queryString, action) ;
+    }
+
+    private void execute(String queryString, HttpAction action) {
+        String queryStringLog = ServletOps.formatForLog(queryString) ;
+        if ( action.verbose )
+            action.log.info(format("[%d] Query = \n%s", action.id, queryString)) ;
+        else
+            action.log.info(format("[%d] Query = %s", action.id, queryStringLog)) ;
+
+        Query query = null ;
+        try {
+            // NB syntax is ARQ (a superset of SPARQL)
+            query = QueryFactory.create(queryString, QueryParseBase, Syntax.syntaxARQ) ;
+            queryStringLog = formatForLog(query) ;
+            validateQuery(action, query) ;
+        } catch (ActionErrorException ex) {
+            throw ex ;
+        } catch (QueryParseException ex) {
+            ServletOps.errorBadRequest("Parse error: \n" + queryString + "\n\r" + messageForQPE(ex)) ;
+        }
+        // Should not happen.
+        catch (QueryException ex) {
+            ServletOps.errorBadRequest("Error: \n" + queryString + "\n\r" + ex.getMessage()) ;
+        }
+
+        // Assumes finished whole thing by end of sendResult.
+        try {
+            action.beginRead() ;
+            Dataset dataset = decideDataset(action, query, queryStringLog) ;
+            try ( QueryExecution qExec = createQueryExecution(query, dataset) ; ) {
+                SPARQLResult result = executeQuery(action, qExec, query, queryStringLog) ;
+                // Deals with exceptions itself.
+                sendResults(action, result, query.getPrologue()) ;
+            }
+        } catch (QueryCancelledException ex) {
+            // Additional counter information.
+            incCounter(action.getEndpoint().getCounters(), QueryTimeouts) ;
+            throw ex ;
+        } finally { action.endRead() ; }
+    }
+
+    /**
+     * Check the query - if unacceptable, throw ActionErrorException or call
+     * super.error
+     * @param action HTTP Action
+     * @param query  SPARQL Query
+     */
+    protected abstract void validateQuery(HttpAction action, Query query) ;
+
+    /** Create the {@link QueryExecution} for this operation.
+     * @param query
+     * @param dataset
+     * @return QueryExecution
+     */
+    protected QueryExecution createQueryExecution(Query query, Dataset dataset) {
+        return QueryExecutionFactory.create(query, dataset) ;
+    }
+
+    /** Perform the {@link QueryExecution} once.
+     * @param action
+     * @param queryExecution
+     * @param query
+     * @param queryStringLog Informational string created from the initial query. 
+     * @return
+     */
+    protected SPARQLResult executeQuery(HttpAction action, QueryExecution queryExecution, Query query, String queryStringLog) {
+        setAnyTimeouts(queryExecution, action) ;
+
+        if ( query.isSelectType() ) {
+            ResultSet rs = queryExecution.execSelect() ;
+
+            // Force some query execution now.
+            //
+            // If the timeout-first-row goes off, the output stream has not
+            // been started so the HTTP error code is sent.
+
+            rs.hasNext() ;
+
+            // If we wanted perfect query time cancellation, we could consume
+            // the result now
+            // to see if the timeout-end-of-query goes off.
+
+            // rs = ResultSetFactory.copyResults(rs) ;
+
+            action.log.info(format("[%d] exec/select", action.id)) ;
+            return new SPARQLResult(rs) ;
+        }
+
+        if ( query.isConstructType() ) {
+            Model model = queryExecution.execConstruct() ;
+            action.log.info(format("[%d] exec/construct", action.id)) ;
+            return new SPARQLResult(model) ;
+        }
+
+        if ( query.isDescribeType() ) {
+            Model model = queryExecution.execDescribe() ;
+            action.log.info(format("[%d] exec/describe", action.id)) ;
+            return new SPARQLResult(model) ;
+        }
+
+        if ( query.isAskType() ) {
+            boolean b = queryExecution.execAsk() ;
+            action.log.info(format("[%d] exec/ask", action.id)) ;
+            return new SPARQLResult(b) ;
+        }
+
+        ServletOps.errorBadRequest("Unknown query type - " + queryStringLog) ;
+        return null ;
+    }
+
+    private void setAnyTimeouts(QueryExecution qexec, HttpAction action) {
+//        if ( !(action.getDataService().allowTimeoutOverride) )
+//            return ;
+
+        long desiredTimeout = Long.MAX_VALUE ;
+        String timeoutHeader = action.request.getHeader("Timeout") ;
+        String timeoutParameter = action.request.getParameter("timeout") ;
+        if ( timeoutHeader != null ) {
+            try {
+                desiredTimeout = (int)(Float.parseFloat(timeoutHeader) * 1000) ;
+            } catch (NumberFormatException e) {
+                throw new FusekiException("Timeout header must be a number", e) ;
+            }
+        } else if ( timeoutParameter != null ) {
+            try {
+                desiredTimeout = (int)(Float.parseFloat(timeoutParameter) * 1000) ;
+            } catch (NumberFormatException e) {
+                throw new FusekiException("timeout parameter must be a number", e) ;
+            }
+        }
+
+//        desiredTimeout = Math.min(action.getDataService().maximumTimeoutOverride, desiredTimeout) ;
+        if ( desiredTimeout != Long.MAX_VALUE )
+            qexec.setTimeout(desiredTimeout) ;
+    }
+
+    /** Choose the dataset for this SPARQL Query request. 
+     * @param action
+     * @param query
+     * @param queryStringLog 
+     * @return {@link Dataset}
+     */
+    protected abstract Dataset decideDataset(HttpAction action, Query query, String queryStringLog) ;
+
+    /** Ship the results to the remote caller.
+     * @param action
+     * @param result
+     * @param qPrologue
+     */
+    protected void sendResults(HttpAction action, SPARQLResult result, Prologue qPrologue) {
+        if ( result.isResultSet() )
+            ResponseResultSet.doResponseResultSet(action, result.getResultSet(), qPrologue) ;
+        else if ( result.isGraph() )
+            ResponseModel.doResponseModel(action, result.getModel()) ;
+        else if ( result.isBoolean() )
+            ResponseResultSet.doResponseResultSet(action, result.getBooleanResult()) ;
+        else
+            ServletOps.errorOccurred("Unknown or invalid result type") ;
+    }
+
+    private String formatForLog(Query query) {
+        IndentedLineBuffer out = new IndentedLineBuffer() ;
+        out.setFlatMode(true) ;
+        query.serialize(out) ;
+        return out.asString() ;
+    }
+
+    private String getRemoteString(String queryURI) {
+        return HttpOp.execHttpGetString(queryURI) ;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryDataset.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryDataset.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryDataset.java
new file mode 100644
index 0000000..9e9df36
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryDataset.java
@@ -0,0 +1,60 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.query.DatasetFactory ;
+import com.hp.hpl.jena.query.Query ;
+import com.hp.hpl.jena.sparql.core.DatasetDescription ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.DynamicDatasets ;
+
+public class SPARQL_QueryDataset extends SPARQL_Query
+{
+    public SPARQL_QueryDataset(boolean verbose)     { super() ; }
+
+    public SPARQL_QueryDataset()
+    { this(false) ; }
+    
+    @Override
+    protected void validateRequest(HttpAction action) 
+    { }
+
+    @Override
+    protected void validateQuery(HttpAction action, Query query) 
+    { }
+   
+    @Override
+    protected Dataset decideDataset(HttpAction action, Query query, String queryStringLog) 
+    { 
+        DatasetGraph dsg = action.getActiveDSG() ;
+        
+        // query.getDatasetDescription() ;
+        
+        // Protocol.
+        DatasetDescription dsDesc = getDatasetDescription(action) ;
+        if (dsDesc != null )
+        {
+            //errorBadRequest("SPARQL Query: Dataset description in the protocol request") ;
+            dsg = DynamicDatasets.dynamicDataset(dsDesc, dsg, false) ;
+        }
+        
+        return DatasetFactory.create(dsg) ;
+    }
+}


[70/93] [abbrv] jena git commit: Add QuadGraphCountMapper for calculating graph sizes

Posted by rv...@apache.org.
Add QuadGraphCountMapper for calculating graph sizes


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/963f9ce8
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/963f9ce8
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/963f9ce8

Branch: refs/heads/hadoop-rdf
Commit: 963f9ce892fb047ba4306cab6d8468d7994f6146
Parents: 7ca24c0
Author: Rob Vesse <rv...@apache.org>
Authored: Tue Jan 6 15:26:04 2015 +0000
Committer: Rob Vesse <rv...@apache.org>
Committed: Tue Jan 6 15:26:04 2015 +0000

----------------------------------------------------------------------
 .../count/positional/QuadGraphCountMapper.java  | 42 ++++++++++++++++++++
 1 file changed, 42 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/963f9ce8/jena-elephas/jena-elephas-mapreduce/src/main/java/org/apache/jena/hadoop/rdf/mapreduce/count/positional/QuadGraphCountMapper.java
----------------------------------------------------------------------
diff --git a/jena-elephas/jena-elephas-mapreduce/src/main/java/org/apache/jena/hadoop/rdf/mapreduce/count/positional/QuadGraphCountMapper.java b/jena-elephas/jena-elephas-mapreduce/src/main/java/org/apache/jena/hadoop/rdf/mapreduce/count/positional/QuadGraphCountMapper.java
new file mode 100644
index 0000000..4afda44
--- /dev/null
+++ b/jena-elephas/jena-elephas-mapreduce/src/main/java/org/apache/jena/hadoop/rdf/mapreduce/count/positional/QuadGraphCountMapper.java
@@ -0,0 +1,42 @@
+/*
+ * 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.jena.hadoop.rdf.mapreduce.count.positional;
+
+import org.apache.jena.hadoop.rdf.mapreduce.count.NodeCountReducer;
+import org.apache.jena.hadoop.rdf.mapreduce.count.QuadNodeCountMapper;
+import org.apache.jena.hadoop.rdf.types.NodeWritable;
+import org.apache.jena.hadoop.rdf.types.QuadWritable;
+
+/**
+ * A mapper for counting graph node usages within quads designed primarily for
+ * use in conjunction with {@link NodeCountReducer}. This can be used to
+ * calculate the size of graphs.
+ * 
+ * 
+ * 
+ * @param <TKey>
+ *            Key type
+ */
+public class QuadGraphCountMapper<TKey> extends QuadNodeCountMapper<TKey> {
+
+    @Override
+    protected NodeWritable[] getNodes(QuadWritable tuple) {
+        return new NodeWritable[] { new NodeWritable(tuple.get().getGraph()) };
+    }
+}


[27/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-1.10.2.min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-1.10.2.min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-1.10.2.min.js
new file mode 100644
index 0000000..da41706
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/jquery-1.10.2.min.js
@@ -0,0 +1,6 @@
+/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
+//@ sourceMappingURL=jquery-1.10.2.min.map
+*/
+(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;
 if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){retur
 n x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.ran
 dom()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);fo
 r(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t)
 {e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length
 =i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply
 (e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<
 <31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?
 :\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.ge
 tElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t
 .parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r
 .attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e
 ):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.
 call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);wh
 ile(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at
 .getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0]
 .slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(
 m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(
 e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"
 option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);retu
 rn e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!
 0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e
 .length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]
 ||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached
 =ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n
 ,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:functi
 on(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},
 when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.
 getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.c
 hecked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.d
 isplay="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offs
 etWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
+}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,
 embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeDat
 a(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:functi
 on(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.le
 ngth>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while
 (i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+=""
 :x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:funct
 ion(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!=
 =t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r
 )?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","c
 ontentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g
 =y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.
 test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i
 )){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.
 isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t
 =r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.tar
 get?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n
 ){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i
 ))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e)
 {this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof
  e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))
 /,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.len
 gth>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},sibl
 ings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!=
 =n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","
 </map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domMani
 p(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhites
 pace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++
 )i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.
 data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagNa
 me!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.
 nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=
 x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
+u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,
 $t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style
 &&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||
 x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.widt
 h=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i
 ||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return I
 t.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidde
 n(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURI
 Component(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return
  this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x
 .ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text
 /javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),
 this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn+
 +)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.if
 Modified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[
 0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPr
 efilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(
 o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.usernam
 e,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){v
 ar n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.dur
 ation,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[
 r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&
 (f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(th
 is),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};ret
 urn a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t

<TRUNCATED>

[85/93] [abbrv] jena git commit: Remove duplicated test package org.apache.jena.iri.test

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/resources/org/apache/jena/iri/test/uris.xml
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/resources/org/apache/jena/iri/test/uris.xml b/jena-iri/src/test/resources/org/apache/jena/iri/test/uris.xml
deleted file mode 100644
index bd7ddc1..0000000
--- a/jena-iri/src/test/resources/org/apache/jena/iri/test/uris.xml
+++ /dev/null
@@ -1,463 +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.
--->
-<uris>
-  <uri base="http://host/" relative="../foo" />
-  <uri base="http://host/xyz" relative="../foo" />
-
-  <uri base='http://www.example.org/a/b/c/d' relative='d/z?x=a'/>
-  <uri base='http://www.example.org/a/b/c/d' relative='http://example.com/A'/>
-  <uri base='http://www.example.org/a/b/c/d/' relative=''/>
-  <uri base='http://www.example.org/a/b/c/d/' relative='.'/>
-  <uri base='http://www.example.org/a/b/c/d/' relative='../../C/D'/>
-  <uri base='http://www.example.org/a/b/c/d/' relative='../../c/d/'/>
-  <uri base='http://www.example.org/a/b/c/d/' relative='../../c/d/X#bar'/>
-  <uri base='http://www.example.org/a/b/c/d/' relative='../../c/d/e/f/g/'/>
-  <uri base='http://www.example.org/a/b/c/d/' relative='../../c/d/z?x=a'/>
-  <uri base='http://www.example.org./a/b/c/d/' relative='http://ex.org/../../c/d/z?x=a'/>
-  <uri absolute='http://ex.org./../../c/d/z?x=a'/>
-
-  <uri base='http://www.example.org/a/b/c/d/' relative='http://ex.org/c/./d/z?x=a'/>
-
-  <uri absolute='http://ex.org/c/./d/z?x=a'/>
-
-
-  <uri absolute='mailto:'/>
-  <uri absolute='mailto:?subject=test'/>
-
-  <uri absolute='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'/>
-  <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf' relative='http://example.org/#André'/>
-  <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf' relative='http://example.org/#Andr%C3%A9'/>
-  <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf' relative='#Dürst'/>
-  <uri absolute='h^ttp:prop'/>
-  <uri absolute='h^ttp:title'/>
-  <uri absolute='ht#tp://jjc3.org/demo.mp3#frag'/>
-  <uri absolute='ht^tp:'/>
-  <uri absolute='ht^tp://www.w3.org/demo.mp3'/>
-  <uri absolute='ht^tp:Foo'/>
-  <uri absolute='http:'/>
-  <uri absolute='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'/>
-  <uri absolute='http://example.org/#Andre&#301;'/>
-  <uri absolute='http://example.org/#André'/>
-  <uri absolute='http://example.org/&#9;'/>
-  <uri absolute='http://example.org/&#xA;&#xA;'/>
-  <uri absolute='http://example.org/&#xD;'/>
-  <uri absolute='http://example.org/&lt;b&gt;boo'/>
-  <uri absolute='http://example.org/&quot;'/>
-  <uri absolute='http://André.example.org/foo'/>
-  <uri absolute='http://andré.example.org/foo'/>
-  <uri absolute='http://xn--andr--ep-.example.org/foo'/>
-
-
-  <uri absolute='Http://example.org/'/>
-  <uri absolute='Http://example.org/prop'/>
-  <uri absolute='NC:ispinfo'/>
-  <uri absolute='NC:trickMe'/>
-  <uri absolute='_:a'/>
-  <uri absolute='_:aa'/>
-  <uri absolute='app://calendar/event'/>
-  <uri absolute='chrome://messenger/content/mailPrefsOverlay.xul'/>
-  <uri absolute='domain:a'/>
-  <uri absolute='domain:aol.com'/>
-  <uri absolute='eh:/'/>
-  <uri absolute='eh://'/>
-  <uri absolute='eh://R'/>
-  <uri absolute='eh:/O'/>
-  <uri absolute='eh:/a'/>
-  <uri absolute='eh:/bark'/>
-  <uri absolute='file:///C:/Documents and Settings/jjchplb/Local Settings/Temp/test-load-with-41.rdf'/>
-  <uri absolute='file:///C:/eclipse/workspace/jena2/testing/ARQ/Construct/reif-result-1.rdf'/>
-  <uri absolute='file:///test01'/>
-  <uri absolute='file:///test02'/>
-  <uri absolute='file:///test03'/>
-  <uri absolute='file:///test04'/>
-  <uri absolute='file:///test05'/>
-  <uri absolute='file:///testutf8'/>
-  <uri absolute='file:/C:/a'/>
-  <uri absolute='file:/C:/orel/orel0_5.owl#'/>
-  <uri absolute='file:/C:/orel/orel0_5.owl#Agent'/>
-  <uri absolute='file:/C:/orel/orel0_5.owl'/>
-  <uri absolute='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'/>
-  <uri absolute='file:doc/inference/data/owlDemoSchema.xml'/>
-  <uri absolute='file:etc/ont-policy-test.rdf'/>
-  <uri absolute='file:testing/ontology/list5.rdf#e'/>
-  <uri absolute='file:vocabularies/rdf-schema.rdf'/>
-  <uri absolute='ftp://net.fred.org/'/>
-  <uri absolute='ftp://net.fred.org/P'/>
-  <uri absolute='ftp:ftp/'/>
-  <uri absolute='ftp:ftp/P'/>
-
-  <uri absolute='h^ttp:'/>
-  <uri absolute='h^ttp:prop'/>
-  <uri absolute='h^ttp:title'/>
-  <uri absolute='ht#tp://jjc3.org/demo.mp3#frag'/>
-  <uri absolute='ht^tp:'/>
-  <uri absolute='ht^tp://www.w3.org/demo.mp3'/>
-  <uri absolute='ht^tp:Foo'/>
-  <uri absolute='http:'/>
-  <uri absolute='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'/>
-  <uri absolute='http://NoHTML.example.org'/>
-  <uri absolute='http://a.com/ontology#'/>
-  <uri absolute='http://a.com/ontology'/>
-  <uri absolute='http://aldabaran.hpl.hp.com/rdftest/test18/'/>
-  <uri absolute='http://bar.com/irrelevant'/>
-  <uri absolute='http://decsai.ugr.es/~ontoserver/bacarex2.owl#'/>
-  <uri absolute='http://decsai.ugr.es/~ontoserver/bacarex2.owl#Importance'/>
-  <uri absolute='http://desc'/>
-  <uri absolute='http://dickinson-i-4/daml/tests/test-add-0.daml#'/>
-  <uri absolute='http://dickinson-i-4/daml/tests/test-add-0.daml#TestClass'/>
-  <uri absolute='http://domain/S'/>
-  <uri absolute='http://eg.com/'/>
-  <uri absolute='http://ex/dt'/>
-
-  <uri absolute='http://example.com/A'/>
-  <uri absolute='http://example.com/test0'/>
-  <uri absolute='http://example.org/    '/>
-  <uri absolute='http://example.org/   '/>
-  <uri absolute='http://example.org/  '/>
-  <uri absolute='http://example.org/ '/>
-  <uri absolute='http://example.org/#'/>
-  <uri absolute='http://example.org/#Andr%C3%A9'/>
-  <uri absolute='http://example.org/#Andre&#301;'/>
-  <uri absolute='http://example.org/#André'/>
-  <uri absolute='http://example.org/&#9;'/>
-  <uri absolute='http://example.org/&#xA;&#xA;'/>
-  <uri absolute='http://example.org/&#xD;'/>
-  <uri absolute='http://example.org/&lt;b&gt;boo'/>
-  <uri absolute='http://example.org/&quot;'/>
-  <uri absolute='http://example.org/2#'/>
-  <uri absolute='http://example.org/2#Class'/>
-  <uri absolute='http://example.org/Range2'/>
-  <uri absolute='http://example.org/\\'/>
-  <uri absolute='http://example.org/`'/>
-  <uri absolute='http://example.org/data#Socrates'/>
-  <uri absolute='http://example.org/data/'/>
-  <uri absolute='http://example.org/{'/>
-  <uri absolute='http://example.org/|'/>
-  <uri absolute='http://example.org/}'/>
-  <uri absolute='http://example/barfoo'/>
-  <uri absolute='http://example/q?abc=1&amp;def=2'/>
-  <uri absolute='http://foo.com/    '/>
-  <uri absolute='http://foo.com/   '/>
-  <uri absolute='http://foo.com/  '/>
-  <uri absolute='http://foo.com/ '/>
-  <uri absolute='http://foo.com/&#9;'/>
-  <uri absolute='http://foo.com/&#xA;&#xA;'/>
-  <uri absolute='http://foo.com/&#xD;'/>
-  <uri absolute='http://foo.com/&apos;'/>
-  <uri absolute='http://foo.com/&lt;b&gt;boo'/>
-  <uri absolute='http://foo.com/&quot;'/>
-  <uri absolute='http://foo.com/'/>
-  <uri absolute='http://foo.com/Hello#activation.xul'/>
-  <uri absolute='http://foo.com/Hello#bar'/>
-  <uri absolute='http://foo.com/Hello#bm-find.xul'/>
-  <uri absolute='http://foo.com/Hello#bookmarks.xul'/>
-  <uri absolute='http://foo.com/Hello#pref-appearance.xul'/>
-  <uri absolute='http://home.netscape.com/NC-rdf#'/>
-  <uri absolute='http://home.netscape.com/NC-rdf#hostName'/>
-  <uri absolute='http://jjc#3.org/demo.mp3#frag'/>
-  <uri absolute='http://jjc^3.org/demo.mp3'/>
-  <uri absolute='http://localhost:8080/Repository/QueryAgent/UserOntology/qgen-example-1#'/>
-  <uri absolute='http://localhost:8080/Repository/QueryAgent/UserOntology/qgen-example-1'/>
-  <uri absolute='http://localhost:8080/axis/daml/a.daml#'/>
-  <uri absolute='http://localhost:8080/kc2c#C1'/>
-  <uri absolute='http://localhost:8080/kc2c#i1'/>
-  <uri absolute='http://localhost:8080/kc2c#i2'/>
-  <uri absolute='http://localhost:8080/kc2c#p1'/>
-  <uri absolute='http://news.bbc.co.uk/go/click/rss/0.91/public/-/hi/arabic/news/newsid_4447000/4447211.stm'/>
-  <uri absolute='http://oiled.man.example.net/test#p1.comp'/>
-  <uri absolute='http://purl.org/dc/elements/1.0/title'/>
-  <uri absolute='http://purl.org/dc/elements/1.1/'/>
-  <uri absolute='http://purl.org/dc/elements/1.1/copyright'/>
-  <uri absolute='http://purl.org/metadata/dublin_core#Creator'/>
-  <uri absolute='http://purl.org/metadata/dublin_core#Title'/>
-  <uri absolute='http://rdf.dmoz.org/Top/World/Tamil/x'/>
-  <uri absolute='http://somewhere/JohnSmith/'/>
-  <uri absolute='http://web.resource.org/cc/'/>
-  <uri absolute='http://ww^w/'/>
-  <uri absolute='http://www.cs101.org/2003/08/07/RDF/JenaBugOntology#'/>
-  <uri absolute='http://www.daml.org/2001/03/daml+oil#Class'/>
-  <uri absolute='http://www.daml.org/2001/03/daml+oil#Datatype'/>
-  <uri absolute='http://www.daml.org/2001/03/daml+oil-ex#Adam'/>
-  <uri absolute='http://www.example.org/A/B#foo/'/>
-  <uri absolute='http://www.example.org/a/b/c/d/z?x=a'/>
-  <uri absolute='http://www.mozilla.org/rdf/chrome#dtTest'/>
-  <uri absolute='http://www.w#3.org/demo.mp3'/>
-  <uri absolute='http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq'/>
-  <uri absolute='http://www.w3.org/2000/01/rdf-schema#ConstraintProperty'/>
-  <uri absolute='http://www.w3.org/2000/01/rdf-schema#Container'/>
-  <uri absolute='http://www.w3.org/2000/03/rdf-tracking/#rdfms-duplicate-member-props'/>
-  <uri absolute='http://www.w3.org/2000/10/XMLSchema#positiveInteger'/>
-  <uri absolute='http://www.w3.org/2000/10/XMLSchema#string'/>
-  <uri absolute='http://www.w3.org/2001/XMLSchema#gYear'/>
-  <uri absolute='http://www.w3.org/2001/XMLSchema#gYearMonth'/>
-  <uri absolute='http://www.w3.org/2001/vcard-rdf/3.0#work'/>
-  <uri absolute='mailto:Jeremy_Carroll@hp.com'/>
-  <uri absolute='mailto:alice@work.example'/>
-  <uri absolute='mailto:bob@work.example'/>
-  <uri absolute='uri:urn:x-rdf:test#a'/>
-  <uri absolute='uri:urn:x-rdf:test#b'/>
-  <uri absolute='uri:urn:x-rdf:test#c'/>
-  <uri absolute='urn:foo#'/>
-  <uri absolute='urn:foo#A'/>
-  <uri absolute='urn:foo#p'/>
-  <uri absolute='urn:x-hp-jena:test#A'/>
-  <uri absolute='urn:x-hp-jena:test#a0'/>
-  <uri absolute='urn:x-hp-jena:test#a1'/>
-  <uri absolute='urn:x-hp:eg#D'/>
-  <uri absolute='urn:x-hp:eg/'/>
-  <uri absolute='urn:x-hp:eg/hasGraphics'/>
-  <uri absolute='urn:x-hp:eg/hasMotherBoard'/>
-  <uri base='urn:x-hp:eg/hasMotherBoard'  relative='#'/>
-  <uri base='base:x'  relative='#'/>
-  <uri base='file:///C:/Documents and Settings/jjchplb/Local Settings/Temp/test-load-with-41.rdf' relative=''/>
-  <uri base='file:///C:/Documents and Settings/jjchplb/Local Settings/Temp/test-load-with-41.rdf' relative='eh:/a'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/' relative='#'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/' relative=''/>
-
-  <uri base='file:///C:/eclipse/workspace/jena2/' relative='base'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/' relative='eh://R'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/' relative='eh:/O'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/' relative='file:foo.n3'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/' relative='file:model8.n3'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/' relative='rdf://test.com#'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/foo.n3' relative='z'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/ARQ/Ask/manifest.ttl' relative=''/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/ARQ/Basic/manifest.ttl' relative='r-base-prefix-3.ttl'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/ARQ/Basic/manifest.ttl' relative='r-base-prefix-4.ttl'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/ARQ/Optional/result-opt-1.ttl' relative='mailto:bert@example.net'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/ARQ/manifest-arq.ttl' relative='Bound/manifest.n3'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/ARQ/manifest-arq.ttl' relative='Construct/manifest.ttl'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/ARQ/manifest-arq.ttl' relative='Dataset/manifest.n3'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/DAWG-Approved/examples/ex2-4a.n3' relative='mailto:jlow@example.com'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/DAWG/examples/manifest.n3' relative='ex11.2.3.2_0.rq'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/RDQL-ARQ/result-0-01.n3' relative='urn:/*not_a_comment*/'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/ontology/bugs/test_hk_06/b.owl' relative='#y1'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/ontology/bugs/test_hk_06/b.owl' relative=''/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/ontology/bugs/test_hk_07A.owl' relative='foo#ClassAC'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/ontology/bugs/test_hk_07A.owl' relative='file:testing/ontology/bugs/test_hk_07A.owl'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/reasoners/bugs/sbug.rdf' relative='jason6'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/reasoners/bugs/subpropertyModel.n3' relative='urn:x-propNum100'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/reasoners/bugs/unbroken.n3' relative='eh:/V'/>
-  <uri base='file:///C:/eclipse/workspace/jena2/testing/reasoners/bugs/unbroken.n3' relative='eh:/a'/>
-  <uri base='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf' relative=''/>
-  <uri base='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf' relative='http://spoo.net/O'/>
-  <uri base='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf' relative='http://spoo.net/S'/>
-  <uri base='file:doc/inference/data/owlDemoSchema.xml' relative='urn:x-hp:eg/'/>
-  <uri base='file:testing/abbreviated/relative-uris.rdf' relative=''/>
-  <uri base='file:testing/abbreviated/relative-uris.rdf' relative='.'/>
-  <uri base='file:testing/abbreviated/relative-uris.rdf' relative='../../C/D'/>
-  <uri base='file:testing/abbreviated/relative-uris.rdf' relative='//example.com/A'/>
-  <uri base='file:testing/abbreviated/relative-uris.rdf' relative='/A/B#foo/'/>
-  <uri base='file:testing/abbreviated/relative-uris.rdf' relative='X#bar'/>
-  <uri base='file:testing/abbreviated/relative-uris.rdf' relative='e/f/g/'/>
-  <uri base='file:testing/abbreviated/relative-uris.rdf' relative='http://www.example.org/a/b/c/d/'/>
-  <uri base='file:testing/abbreviated/relative-uris.rdf' relative='z?x=a'/>
-  <uri base='file:testing/arp/error-msgs/test06.rdf' relative=''/>
-  <uri base='file:testing/arp/qname-in-ID/bug74_0.rdf' relative='#one'/>
-  <uri base='file:testing/arp/qname-in-ID/bug74_0.rdf' relative='#sw:test'/>
-  <uri base='file:testing/ontology/bugs/test_dk_01.xml' relative='http://localhost:8080/Repository/QueryAgent/UserOntology/qgen-example-1#'/>
-  <uri base='file:testing/ontology/bugs/test_dk_01.xml' relative='owl#Thing'/>
-  <uri base='file:testing/ontology/bugs/test_oh_01.owl' relative='#__rest3'/>
-  <uri base='file:testing/ontology/daml/test-instance-load.daml' relative='file:testing/ontology/daml/test-instance-load-classes.daml'/>
-  <uri base='file:testing/ontology/owl/list-syntax/test-ldp.rdf' relative='#Union2'/>
-  <uri base='file:testing/reasoners/bugs/cardFPTest.owl' relative='urn:foo'/>
-  <uri base='file:testing/reasoners/bugs/deleteBug.owl' relative='http://decsai.ugr.es/~ontoserver/bacarex2.owl'/>
-  <uri base='file:testing/reasoners/bugs/equivalentClassTest.owl' relative='#A'/>
-  <uri base='http://bar.com/irrelevant' relative='NC:ispinfo'/>
-  <uri base='http://bar.com/irrelevant' relative='NC:trickMe'/>
-  <uri base='http://bar.com/irrelevant' relative='chrome://messenger/content/mailPrefsOverlay.xul'/>
-  <uri base='http://bar.com/irrelevant' relative='domain:aol.com'/>
-  <uri base='http://bar.com/irrelevant' relative='http://foo.com/    '/>
-  <uri base='http://bar.com/irrelevant' relative='http://foo.com/   '/>
-  <uri base='http://bar.com/irrelevant' relative='http://foo.com/  '/>
-  <uri base='http://bar.com/irrelevant' relative='http://foo.com/ '/>
-  <uri base='http://bar.com/irrelevant' relative='http://foo.com/&#9;'/>
-  <uri base='http://bar.com/irrelevant' relative='http://foo.com/&#xA;&#xA;'/>
-  <uri base='http://bar.com/irrelevant' relative='http://foo.com/&#xD;'/>
-  <uri base='http://bar.com/irrelevant' relative='http://foo.com/&apos;'/>
-  <uri base='http://bar.com/irrelevant' relative='http://foo.com/&lt;b&gt;boo'/>
-  <uri base='http://bar.com/irrelevant' relative='http://foo.com/&quot;'/>
-  <uri base='http://bar.com/irrelevant' relative='http://foo.com/'/>
-
-  <!--
-    <uri base='http://bar.com/irrelevant' relative='http://foo.com/\\'/>
-    <uri base='http://bar.com/irrelevant' relative='http://foo.com/`'/>
-    <uri base='http://bar.com/irrelevant' relative='http://foo.com/{'/>
-    <uri base='http://bar.com/irrelevant' relative='http://foo.com/|'/>
-    <uri base='http://bar.com/irrelevant' relative='http://foo.com/}'/>
-    <uri base='http://example.org' relative='relfile'/>
-    <uri base='http://example.org' relative='test'/>
-    <uri base='http://example.org/' relative='#333-555-666'/>
-    <uri base='http://example.org/' relative='#?bb'/>
-    <uri base='http://example.org/' relative='#_:xx'/>
-    <uri base='http://example.org/' relative='#a/b'/>
-    <uri base='http://example.org/base/' relative='#en'/>
-    <uri base='http://example.org/base/' relative=''/>
-    <uri base='http://example.org/base/' relative='en'/>
-    <uri base='http://example.org/base/' relative='http://ex/dt'/>
-    <uri base='http://example.org/base/en' relative='#en'/>
-    <uri base='http://example.org/base/en' relative=''/>
-    <uri base='http://example.org/base/en' relative='en'/>
-    <uri base='http://example.org/bug74_0.rdf' relative='#sw:test'/>
-    <uri base='http://example.org/dir/file#frag' relative=''/>
-    <uri base='http://example.org/dir/file' relative='#foo'/>
-    <uri base='http://example.org/dir/file' relative='../relfile'/>
-    <uri base='http://example.org/dir/file' relative='//another.example.org/absfile'/>
-    <uri base='http://example.org/dir/file' relative='/absfile'/>
-    <uri base='http://example.org/foo' relative='    '/>
-    <uri base='http://example.org/foo' relative='   '/>
-    <uri base='http://example.org/foo' relative='  '/>
-    <uri base='http://example.org/foo' relative=' '/>
-    <uri base='http://example.org/foo' relative='&#9;'/>
-    <uri base='http://example.org/foo' relative='&#xA;&#xA;'/>
-    <uri base='http://example.org/foo' relative='&#xD;'/>
-    <uri base='http://example.org/foo' relative='&apos;'/>
-    <uri base='http://example.org/foo' relative='&lt;b&gt;boo'/>
-    <uri base='http://example.org/foo' relative='&quot;'/>
-    <uri base='http://example.org/foo' relative=''/>
-    <uri base='http://example.org/foo' relative='/'/>
-    <uri base='http://example.org/foo' relative='\\'/>
-    <uri base='http://example.org/foo' relative='`'/>
-    <uri base='http://example.org/foo' relative='{'/>
-    <uri base='http://example.org/foo' relative='|'/>
-    <uri base='http://example.org/foo' relative='}'/>
-    <uri base='http://example.org/ontology/list4.rdf' relative='uri:urn:x-rdf:test'/>
-    <uri base='http://example/' relative='#'/>
-    <uri base='http://example/' relative=''/>
-    <uri base='http://foo.com/Hello' relative='.'/>
-    <uri base='http://foo.com/Hello' relative='/'/>
-    <uri base='http://foo.com/Hello' relative='NC:ispinfo'/>
-    <uri base='http://foo.com/Hello' relative='NC:trickMe'/>
-    <uri base='http://foo.com/Hello' relative='\\'/>
-    <uri base='http://foo.com/Hello' relative='`'/>
-    <uri base='http://foo.com/Hello' relative='chrome://messenger/content/mailPrefsOverlay.xul'/>
-    <uri base='http://foo.com/Hello' relative='domain:aol.com'/>
-    <uri base='http://foo.com/Hello' relative='urn:foo#P1'/>
-    <uri base='http://foo.com/Hello' relative='{'/>
-    <uri base='http://foo.com/Hello' relative='|'/>
-    <uri base='http://foo.com/Hello' relative='}'/>
-    <uri base='http://host/base/' relative='#'/>
-    <uri base='http://host/base/' relative=''/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative=' '/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative='#'/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative='&#9;'/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative='&#xA;&#xA;'/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative='&#xD;'/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative='&apos;'/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative='&lt;b&gt;boo'/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative='&quot;'/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative=''/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative='/'/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative='\\'/>
-    <uri base='http://jcarroll.hpl.hp.com/arp-tests/i18n/t9000.rdf' relative='`'/>
-    <uri base='http://www.example.org/A/B#' relative=''/>
-    <uri base='http://www.example.org/A/B' relative='#foo/'/>
-    <uri base='http://www.example.org/A/B' relative='../A/B#foo/'/>
-    <uri base='http://www.example.org/A/B' relative='../a/b/C/D'/>
-    <uri base='http://www.example.org/A/B' relative='../a/b/c/d/'/>
-    <uri base='http://www.example.org/A/B' relative='../a/b/c/d/X#bar'/>
-    <uri base='http://www.example.org/A/B' relative='../a/b/c/d/e/f/g/'/>
-    <uri base='http://www.example.org/A/B' relative='../a/b/c/d/z?x=a'/>
-    <uri base='http://www.example.org/A/B' relative='//example.com/A'/>
-    <uri base='http://www.example.org/A/B' relative='//www.example.org/A/B#foo/'/>
-    <uri base='http://www.example.org/A/B' relative='//www.example.org/a/b/C/D'/>
-    <uri base='http://www.example.org/A/B' relative='//www.example.org/a/b/c/d/'/>
-    <uri base='http://www.example.org/A/B' relative='//www.example.org/a/b/c/d/X#bar'/>
-    <uri base='http://www.example.org/A/B' relative='//www.example.org/a/b/c/d/e/f/g/'/>
-    <uri base='http://www.example.org/A/B' relative='//www.example.org/a/b/c/d/z?x=a'/>
-    <uri base='http://www.example.org/A/B' relative='/A/B#foo/'/>
-    <uri base='http://www.example.org/A/B' relative='/a/b/C/D'/>
-    <uri base='http://www.example.org/A/B' relative='/a/b/c/d/'/>
-    <uri base='http://www.example.org/A/B' relative='/a/b/c/d/X#bar'/>
-    <uri base='http://www.example.org/A/B' relative='/a/b/c/d/e/f/g/'/>
-    <uri base='http://www.example.org/A/B' relative='/a/b/c/d/z?x=a'/>
-    <uri base='http://www.example.org/A/B' relative='B#foo/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='../../b/C/D'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='../../b/c/d/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='../../b/c/d/X#bar'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='../../b/c/d/e/f/g/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='../../b/c/d/z?x=a'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='../C/D'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='../c/d/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='../c/d/X#bar'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='../c/d/e/f/g/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='../c/d/z?x=a'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='//example.com/A'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='//www.example.org/A/B#foo/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='//www.example.org/a/b/C/D'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='//www.example.org/a/b/c/d/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='//www.example.org/a/b/c/d/X#bar'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='//www.example.org/a/b/c/d/e/f/g/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='//www.example.org/a/b/c/d/z?x=a'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='/A/B#foo/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='/a/b/C/D'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='/a/b/c/d/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='/a/b/c/d/X#bar'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='/a/b/c/d/e/f/g/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='/a/b/c/d/z?x=a'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='d/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='d/X#bar'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='d/e/f/g/'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='d/z?x=a'/>
-    <uri base='http://www.example.org/a/b/c/d' relative='http://example.com/A'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative=''/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='.'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='../../C/D'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='../../c/d/'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='../../c/d/X#bar'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='../../c/d/e/f/g/'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='../../c/d/z?x=a'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='../d/'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='../d/X#bar'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='../d/e/f/g/'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='../d/z?x=a'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='//example.com/A'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='//www.example.org/A/B#foo/'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='//www.example.org/a/b/C/D'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='//www.example.org/a/b/c/d/'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='//www.example.org/a/b/c/d/X#bar'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='//www.example.org/a/b/c/d/e/f/g/'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='//www.example.org/a/b/c/d/z?x=a'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='/A/B#foo/'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='/a/b/C/D'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='/a/b/c/d/'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='/a/b/c/d/X#bar'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='/a/b/c/d/e/f/g/'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='/a/b/c/d/z?x=a'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='X#bar'/>
-    <uri base='http://www.example.org/a/b/c/d/' relative='e/f/g/'/>
-    <uri base='http://www.hpl.hp.com/semweb/2003/query_tester/rdfs/data3.rdf' relative='eg;Amy'/>
-    <uri base='http://www.hpl.hp.com/semweb/2003/query_tester/rdfs/data3.rdf' relative='eg;John'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/extra-credit/conclusions002.rdf' relative='premises002#N-times-M'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf' relative='http://example.org/#André'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf' relative='http://example.org/#Andr%C3%A9'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf' relative='#Dürst'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-rdf-id/error001.rdf' relative='#333-555-666'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-rdf-id/error001.rdf' relative=''/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-rdf-id/error002.rdf' relative='#_:xx'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-rdf-id/error003.rdf' relative='#q:name'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-rdf-id/error004.rdf' relative='#a/b'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-rdf-id/error005.rdf' relative='#?bb'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/error001.rdf' relative='mailto:Jeremy_Carroll@hp.com'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test006.rdf' relative='relFile'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test007.rdf' relative=''/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test007.rdf' relative='../relfile'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test009.rdf' relative='/absfile'/>
-    <uri base='http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test010.rdf' relative='//another.example.org/absfile'/>
-    <uri base='http://www.w3.org/2002/03owlt/extra-credit/conclusions002' relative='premises002#N-times-M'/>
-  -->
-</uris>
\ No newline at end of file


[86/93] [abbrv] jena git commit: Remove duplicated test package org.apache.jena.iri.test

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/e89146d8/jena-iri/src/test/resources/org/apache/jena/iri/test/test.xml
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/resources/org/apache/jena/iri/test/test.xml b/jena-iri/src/test/resources/org/apache/jena/iri/test/test.xml
deleted file mode 100644
index e8ab386..0000000
--- a/jena-iri/src/test/resources/org/apache/jena/iri/test/test.xml
+++ /dev/null
@@ -1,9217 +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.
--->
-<UriTests>
-<Resolve>
-<IRI iri='http://host/'>
-<getRawHost value='host'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='host'/>
-<isRootless value='false'/>
-<toString value='http://host/'/>
-<toDisplayString value='‪http://host/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://host/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../foo'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../foo'/>
-<toDisplayString value='‪../foo‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../foo'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='host'/>
-<getRawPath value='/foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='host'/>
-<isRootless value='false'/>
-<toString value='http://host/foo'/>
-<toDisplayString value='‪http://host/foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://host/foo'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value='foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='foo'/>
-<toDisplayString value='‪foo‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='foo'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://host/xyz'>
-<getRawHost value='host'/>
-<getRawPath value='/xyz'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='host'/>
-<isRootless value='false'/>
-<toString value='http://host/xyz'/>
-<toDisplayString value='‪http://host/xyz‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://host/xyz'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../foo'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../foo'/>
-<toDisplayString value='‪../foo‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../foo'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='host'/>
-<getRawPath value='/foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='host'/>
-<isRootless value='false'/>
-<toString value='http://host/foo'/>
-<toDisplayString value='‪http://host/foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://host/foo'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value='foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='foo'/>
-<toDisplayString value='‪foo‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='foo'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='d/z?x=a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='d/z?x=a'/>
-<toDisplayString value='‪d/z?x=a‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='d/z?x=a'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/z?x=a'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/z?x=a'/>
-<violations>
-</violations>
-</Result>
-<Relativize same='true'/>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.com/A'>
-<getRawHost value='example.com'/>
-<getRawPath value='/A'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.com'/>
-<isRootless value='false'/>
-<toString value='http://example.com/A'/>
-<toDisplayString value='‪http://example.com/A‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.com/A'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='example.com'/>
-<getRawPath value='/A'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.com'/>
-<isRootless value='false'/>
-<toString value='http://example.com/A'/>
-<toDisplayString value='‪http://example.com/A‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.com/A'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost value='example.com'/>
-<getRawPath value='/A'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.com'/>
-<isRootless value='false'/>
-<toString value='//example.com/A'/>
-<toDisplayString value='‪//example.com/A‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='//example.com/A'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri=''>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value=''/>
-<toDisplayString value='‪‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value=''/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</Result>
-<Relativize same='true'/>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='.'>
-<getRawHost nullValue='true'/>
-<getRawPath value='.'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='.'/>
-<toDisplayString value='‪.‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='.'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value=''/>
-<toDisplayString value='‪‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value=''/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../../C/D'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../../C/D'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../../C/D'/>
-<toDisplayString value='‪../../C/D‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../../C/D'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/C/D'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/C/D'/>
-<toDisplayString value='‪http://www.example.org/a/b/C/D‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/C/D'/>
-<violations>
-</violations>
-</Result>
-<Relativize same='true'/>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../../c/d/'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../../c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../../c/d/'/>
-<toDisplayString value='‪../../c/d/‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../../c/d/'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value=''/>
-<toDisplayString value='‪‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value=''/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../../c/d/X#bar'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../../c/d/X'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='bar'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../../c/d/X#bar'/>
-<toDisplayString value='‪../../c/d/X#bar‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../../c/d/X#bar'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/X'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='bar'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/X#bar'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/X#bar‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/X#bar'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value='X'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='bar'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='X#bar'/>
-<toDisplayString value='‪X#bar‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='X#bar'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../../c/d/e/f/g/'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../../c/d/e/f/g/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../../c/d/e/f/g/'/>
-<toDisplayString value='‪../../c/d/e/f/g/‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../../c/d/e/f/g/'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/e/f/g/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/e/f/g/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/e/f/g/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/e/f/g/'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value='e/f/g/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='e/f/g/'/>
-<toDisplayString value='‪e/f/g/‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='e/f/g/'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../../c/d/z?x=a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../../c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../../c/d/z?x=a'/>
-<toDisplayString value='‪../../c/d/z?x=a‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../../c/d/z?x=a'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/z?x=a'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/z?x=a'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value='z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='z?x=a'/>
-<toDisplayString value='‪z?x=a‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='z?x=a'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org./a/b/c/d/'>
-<getRawHost value='www.example.org.'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org.'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org./a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org./a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org./a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://ex.org/../../c/d/z?x=a'>
-<getRawHost value='ex.org'/>
-<getRawPath value='/../../c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='http://ex.org/../../c/d/z?x=a'/>
-<toDisplayString value='‪http://ex.org/../../c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org/../../c/d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='http://ex.org/c/d/z?x=a'/>
-<toDisplayString value='‪http://ex.org/c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org/c/d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</Result>
-<Relativize>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='//ex.org/c/d/z?x=a'/>
-<toDisplayString value='‪//ex.org/c/d/z?x=a‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='//ex.org/c/d/z?x=a'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<IRI iri='http://ex.org./../../c/d/z?x=a'>
-<getRawHost value='ex.org.'/>
-<getRawPath value='/../../c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org.'/>
-<isRootless value='false'/>
-<toString value='http://ex.org./../../c/d/z?x=a'/>
-<toDisplayString value='‪http://ex.org./../../c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org./../../c/d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</IRI>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://ex.org/c/./d/z?x=a'>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/./d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='http://ex.org/c/./d/z?x=a'/>
-<toDisplayString value='‪http://ex.org/c/./d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org/c/./d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='http://ex.org/c/d/z?x=a'/>
-<toDisplayString value='‪http://ex.org/c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org/c/d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</Result>
-<Relativize>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='//ex.org/c/d/z?x=a'/>
-<toDisplayString value='‪//ex.org/c/d/z?x=a‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='//ex.org/c/d/z?x=a'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<IRI iri='http://ex.org/c/./d/z?x=a'>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/./d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='http://ex.org/c/./d/z?x=a'/>
-<toDisplayString value='‪http://ex.org/c/./d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org/c/./d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</IRI>
-<IRI iri='mailto:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='mailto'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='mailto:'/>
-<toDisplayString value='‪mailto:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='mailto:'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='mailto:?subject=test'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery value='subject=test'/>
-<getScheme value='mailto'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='mailto:?subject=test'/>
-<toDisplayString value='‪mailto:?subject=test‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='mailto:?subject=test'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'>
-<getRawHost nullValue='true'/>
-<getRawPath value='C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'/>
-<toDisplayString value='‪file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:C:%5CDOCUME~1%5Cjjchplb%5CLOCALS~1%5CTemp%5Chedgehog6739.rdf'/>
-<violations>
-<violation>UNWISE_CHARACTER</violation>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-<violation>SCHEME_PATTERN_MATCH_FAILED</violation>
-</violations>
-</IRI>
-<Resolve>
-<IRI iri='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf'>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf'/>
-<toDisplayString value='‪http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.org/#André'>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='André'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#André'/>
-<toDisplayString value='‪http://example.org/#André‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andr%C3%A9'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='André'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#André'/>
-<toDisplayString value='‪http://example.org/#André‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andr%C3%A9'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</Result>
-<Relativize>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='André'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='//example.org/#André'/>
-<toDisplayString value='‪//example.org/#André‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='//example.org/#Andr%C3%A9'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf'>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf'/>
-<toDisplayString value='‪http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.org/#Andr%C3%A9'>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Andr%C3%A9'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#Andr%C3%A9'/>
-<toDisplayString value='‪http://example.org/#Andr%C3%A9‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andr%C3%A9'/>
-<violations>
-<violation>PERCENT</violation>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Andr%C3%A9'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#Andr%C3%A9'/>
-<toDisplayString value='‪http://example.org/#Andr%C3%A9‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andr%C3%A9'/>
-<violations>
-<violation>PERCENT</violation>
-</violations>
-</Result>
-<Relativize>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Andr%C3%A9'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='//example.org/#Andr%C3%A9'/>
-<toDisplayString value='‪//example.org/#Andr%C3%A9‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='//example.org/#Andr%C3%A9'/>
-<violations>
-<violation>PERCENT</violation>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf'>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf'/>
-<toDisplayString value='‪http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='#Dürst'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Dürst'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='#Dürst'/>
-<toDisplayString value='‪#Dürst‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='#D%C3%BCrst'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Dürst'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf#Dürst'/>
-<toDisplayString value='‪http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf#Dürst‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf#D%C3%BCrst'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</Result>
-<Relativize same='true'/>
-</Resolve>
-<IRI iri='h^ttp:prop'>
-<getRawHost nullValue='true'/>
-<getRawPath value='prop'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='h^ttp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='h^ttp:prop'/>
-<toDisplayString value='‪h^ttp:prop‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='h%5Ettp:prop'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='h^ttp:title'>
-<getRawHost nullValue='true'/>
-<getRawPath value='title'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='h^ttp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='h^ttp:title'/>
-<toDisplayString value='‪h^ttp:title‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='h%5Ettp:title'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht#tp://jjc3.org/demo.mp3#frag'>
-<getRawHost nullValue='true'/>
-<getRawPath value='ht'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='tp://jjc3.org/demo.mp3#frag'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='ht#tp://jjc3.org/demo.mp3#frag'/>
-<toDisplayString value='‪ht#tp://jjc3.org/demo.mp3#frag‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='ht#tp://jjc3.org/demo.mp3#frag'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='ht^tp:'/>
-<toDisplayString value='‪ht^tp:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp:'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp://www.w3.org/demo.mp3'>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/demo.mp3'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='ht^tp://www.w3.org/demo.mp3'/>
-<toDisplayString value='‪ht^tp://www.w3.org/demo.mp3‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp://www.w3.org/demo.mp3'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp:Foo'>
-<getRawHost nullValue='true'/>
-<getRawPath value='Foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='ht^tp:Foo'/>
-<toDisplayString value='‪ht^tp:Foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp:Foo'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='http:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='http:'/>
-<toDisplayString value='‪http:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http:'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'>
-<getRawHost value='46229EFFE16A9BD60B9F1BE88B2DB047ADDED785'/>
-<getRawPath value='/demo.mp3'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='46229EFFE16A9BD60B9F1BE88B2DB047ADDED785'/>
-<isRootless value='false'/>
-<toString value='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'/>
-<toDisplayString value='‪http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/#Andreĭ'>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Andreĭ'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#Andreĭ'/>
-<toDisplayString value='‪http://example.org/#Andreĭ‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andre%C4%AD'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/#André'>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='André'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#André'/>
-<toDisplayString value='‪http://example.org/#André‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andr%C3%A9'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/&#9;'>
-<getRawHost value='example.org'/>
-<getRawPath value='/&#9;'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/&#9;'/>
-<toDisplayString value='‪http://example.org/&#9;‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%09'/>
-<violations>
-<violation>CONTROL_CHARACTER</violation>
-<violation>NOT_XML_SCHEMA_WHITESPACE</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/&#xA;&#xA;'>
-<getRawHost value='example.org'/>
-<getRawPath value='/&#xA;&#xA;'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/&#xA;&#xA;'/>
-<toDisplayString value='‪http://example.org/&#xA;&#xA;‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%0A%0A'/>
-<violations>
-<violation>CONTROL_CHARACTER</violation>
-<violation>NOT_XML_SCHEMA_WHITESPACE</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/&#xD;'>
-<getRawHost value='example.org'/>
-<getRawPath value='/&#xD;'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/&#xD;'/>
-<toDisplayString value='‪http://example.org/&#xD;‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%0D'/>
-<violations>
-<violation>CONTROL_CHARACTER</violation>
-<violation>NOT_XML_SCHEMA_WHITESPACE</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/&lt;b&gt;boo'>
-<getRawHost value='example.org'/>
-<getRawPath value='/&lt;b&gt;boo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/&lt;b&gt;boo'/>
-<toDisplayString value='‪http://example.org/&lt;b&gt;boo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%3Cb%3Eboo'/>
-<violations>
-<violation>UNWISE_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/&quot;'>
-<getRawHost value='example.org'/>
-<getRawPath value='/&quot;'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/&quot;'/>
-<toDisplayString value='‪http://example.org/&quot;‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%22'/>
-<violations>
-<violation>UNWISE_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://André.example.org/foo'>
-<getRawHost value='André.example.org'/>
-<getRawPath value='/foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='xn--andr-epa.example.org'/>
-<isRootless value='false'/>
-<toString value='http://André.example.org/foo'/>
-<toDisplayString value='‪http://André.example.org/foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://xn--andr-epa.example.org/foo'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://andré.example.org/foo'>
-<getRawHost value='andré.example.org'/>
-<getRawPath value='/foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='xn--andr-epa.example.org'/>
-<isRootless value='false'/>
-<toString value='http://andré.example.org/foo'/>
-<toDisplayString value='‪http://andré.example.org/foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://xn--andr-epa.example.org/foo'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://xn--andr--ep-.example.org/foo'>
-<getRawHost value='xn--andr--ep-.example.org'/>
-<getRawPath value='/foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost exception='Bad Internationalized Domain Name: Has leading or trailing hyphen'/>
-<isRootless value='false'/>
-<toString value='http://xn--andr--ep-.example.org/foo'/>
-<toDisplayString value='‪http://xn--andr--ep-.example.org/foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString exception='Bad Internationalized Domain Name: Has leading or trailing hyphen'/>
-<violations>
-<violation>DOUBLE_DASH_IN_REG_NAME</violation>
-<violation>DNS_LABEL_DASH_START_OR_END</violation>
-<violation>BAD_IDN</violation>
-</violations>
-</IRI>
-<IRI iri='Http://example.org/'>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='Http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='Http://example.org/'/>
-<toDisplayString value='‪Http://example.org/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='Http://example.org/'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='Http://example.org/prop'>
-<getRawHost value='example.org'/>
-<getRawPath value='/prop'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='Http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='Http://example.org/prop'/>
-<toDisplayString value='‪Http://example.org/prop‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='Http://example.org/prop'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='NC:ispinfo'>
-<getRawHost nullValue='true'/>
-<getRawPath value='ispinfo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='NC'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='NC:ispinfo'/>
-<toDisplayString value='‪NC:ispinfo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='NC:ispinfo'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='NC:trickMe'>
-<getRawHost nullValue='true'/>
-<getRawPath value='trickMe'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='NC'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='NC:trickMe'/>
-<toDisplayString value='‪NC:trickMe‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='NC:trickMe'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='_:a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='a'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='_'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='_:a'/>
-<toDisplayString value='‪_:a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='_:a'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='_:aa'>
-<getRawHost nullValue='true'/>
-<getRawPath value='aa'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='_'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='_:aa'/>
-<toDisplayString value='‪_:aa‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='_:aa'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='app://calendar/event'>
-<getRawHost value='calendar'/>
-<getRawPath value='/event'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='app'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='calendar'/>
-<isRootless value='false'/>
-<toString value='app://calendar/event'/>
-<toDisplayString value='‪app://calendar/event‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='app://calendar/event'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='chrome://messenger/content/mailPrefsOverlay.xul'>
-<getRawHost value='messenger'/>
-<getRawPath value='/content/mailPrefsOverlay.xul'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='chrome'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='messenger'/>
-<isRootless value='false'/>
-<toString value='chrome://messenger/content/mailPrefsOverlay.xul'/>
-<toDisplayString value='‪chrome://messenger/content/mailPrefsOverlay.xul‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='chrome://messenger/content/mailPrefsOverlay.xul'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='domain:a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='a'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='domain'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='domain:a'/>
-<toDisplayString value='‪domain:a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='domain:a'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='domain:aol.com'>
-<getRawHost nullValue='true'/>
-<getRawPath value='aol.com'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='domain'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='domain:aol.com'/>
-<toDisplayString value='‪domain:aol.com‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='domain:aol.com'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='eh:/'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='eh:/'/>
-<toDisplayString value='‪eh:/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh:/'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='eh://'>
-<getRawHost value=''/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='eh://'/>
-<toDisplayString value='‪eh://‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh://'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='eh://R'>
-<getRawHost value='R'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='R'/>
-<isRootless value='false'/>
-<toString value='eh://R'/>
-<toDisplayString value='‪eh://R‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh://R'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='eh:/O'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/O'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='eh:/O'/>
-<toDisplayString value='‪eh:/O‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh:/O'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='eh:/a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/a'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='eh:/a'/>
-<toDisplayString value='‪eh:/a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh:/a'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='eh:/bark'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/bark'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='eh:/bark'/>
-<toDisplayString value='‪eh:/bark‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh:/bark'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='file:///C:/Documents and Settings/jjchplb/Local Settings/Temp/test-load-with-41.rdf'>
-<getRawHost value=''/>
-<getRawPath value='/C:/Documents and Settings/jjchplb/Local Settings/Temp/test-load-with-41.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///C:/Documents and Settings/jjchplb/Local Settings/Temp/test-load-with-41.rdf'/>
-<toDisplayString value='‪file:///C:/Documents and Settings/jjchplb/Local Settings/Temp/test-load-with-41.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///C:/Documents%20and%20Settings/jjchplb/Local%20Settings/Temp/test-load-with-41.rdf'/>
-<violations>
-<violation>WHITESPACE</violation>
-</violations>
-</IRI>
-<IRI iri='file:///C:/eclipse/workspace/jena2/testing/ARQ/Construct/reif-result-1.rdf'>
-<getRawHost value=''/>
-<getRawPath value='/C:/eclipse/workspace/jena2/testing/ARQ/Construct/reif-result-1.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///C:/eclipse/workspace/jena2/testing/ARQ/Construct/reif-result-1.rdf'/>
-<toDisplayString value='‪file:///C:/eclipse/workspace/jena2/testing/ARQ/Construct/reif-result-1.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///C:/eclipse/workspace/jena2/testing/ARQ/Construct/reif-result-1.rdf'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///test01'>
-<getRawHost value=''/>
-<getRawPath value='/test01'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///test01'/>
-<toDisplayString value='‪file:///test01‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///test01'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///test02'>
-<getRawHost value=''/>
-<getRawPath value='/test02'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///test02'/>
-<toDisplayString value='‪file:///test02‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///test02'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///test03'>
-<getRawHost value=''/>
-<getRawPath value='/test03'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///test03'/>
-<toDisplayString value='‪file:///test03‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///test03'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///test04'>
-<getRawHost value=''/>
-<getRawPath value='/test04'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///test04'/>
-<toDisplayString value='‪file:///test04‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///test04'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///test05'>
-<getRawHost value=''/>
-<getRawPath value='/test05'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///test05'/>
-<toDisplayString value='‪file:///test05‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///test05'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///testutf8'>
-<getRawHost value=''/>
-<getRawPath value='/testutf8'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///testutf8'/>
-<toDisplayString value='‪file:///testutf8‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///testutf8'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:/C:/a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/C:/a'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='file:/C:/a'/>
-<toDisplayString value='‪file:/C:/a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:/C:/a'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:/C:/orel/orel0_5.owl#'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/C:/orel/orel0_5.owl'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value=''/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='file:/C:/orel/orel0_5.owl#'/>
-<toDisplayString value='‪file:/C:/orel/orel0_5.owl#‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:/C:/orel/orel0_5.owl#'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:/C:/orel/orel0_5.owl#Agent'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/C:/orel/orel0_5.owl'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Agent'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='file:/C:/orel/orel0_5.owl#Agent'/>
-<toDisplayString value='‪file:/C:/orel/orel0_5.owl#Agent‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:/C:/orel/orel0_5.owl#Agent'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:/C:/orel/orel0_5.owl'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/C:/orel/orel0_5.owl'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='file:/C:/orel/orel0_5.owl'/>
-<toDisplayString value='‪file:/C:/orel/orel0_5.owl‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:/C:/orel/orel0_5.owl'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'>
-<getRawHost nullValue='true'/>
-<getRawPath value='C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'/>
-<toDisplayString value='‪file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:C:%5CDOCUME~1%5Cjjchplb%5CLOCALS~1%5CTemp%5Chedgehog6739.rdf'/>
-<violations>
-<violation>UNWISE_CHARACTER</violation>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-<violation>SCHEME_PATTERN_MATCH_FAILED</violation>
-</violations>
-</IRI>
-<IRI iri='file:doc/inference/data/owlDemoSchema.xml'>
-<getRawHost nullValue='true'/>
-<getRawPath value='doc/inference/data/owlDemoSchema.xml'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:doc/inference/data/owlDemoSchema.xml'/>
-<toDisplayString value='‪file:doc/inference/data/owlDemoSchema.xml‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:doc/inference/data/owlDemoSchema.xml'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:etc/ont-policy-test.rdf'>
-<getRawHost nullValue='true'/>
-<getRawPath value='etc/ont-policy-test.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:etc/ont-policy-test.rdf'/>
-<toDisplayString value='‪file:etc/ont-policy-test.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:etc/ont-policy-test.rdf'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:testing/ontology/list5.rdf#e'>
-<getRawHost nullValue='true'/>
-<getRawPath value='testing/ontology/list5.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='e'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:testing/ontology/list5.rdf#e'/>
-<toDisplayString value='‪file:testing/ontology/list5.rdf#e‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:testing/ontology/list5.rdf#e'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:vocabularies/rdf-schema.rdf'>
-<getRawHost nullValue='true'/>
-<getRawPath value='vocabularies/rdf-schema.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:vocabularies/rdf-schema.rdf'/>
-<toDisplayString value='‪file:vocabularies/rdf-schema.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:vocabularies/rdf-schema.rdf'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='ftp://net.fred.org/'>
-<getRawHost value='net.fred.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ftp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='net.fred.org'/>
-<isRootless value='false'/>
-<toString value='ftp://net.fred.org/'/>
-<toDisplayString value='‪ftp://net.fred.org/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ftp://net.fred.org/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='ftp://net.fred.org/P'>
-<getRawHost value='net.fred.org'/>
-<getRawPath value='/P'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ftp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='net.fred.org'/>
-<isRootless value='false'/>
-<toString value='ftp://net.fred.org/P'/>
-<toDisplayString value='‪ftp://net.fred.org/P‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ftp://net.fred.org/P'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='ftp:ftp/'>
-<getRawHost nullValue='true'/>
-<getRawPath value='ftp/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ftp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='ftp:ftp/'/>
-<toDisplayString value='‪ftp:ftp/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ftp:ftp/'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='ftp:ftp/P'>
-<getRawHost nullValue='true'/>
-<getRawPath value='ftp/P'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ftp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='ftp:ftp/P'/>
-<toDisplayString value='‪ftp:ftp/P‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ftp:ftp/P'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='h^ttp:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='h^ttp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='h^ttp:'/>
-<toDisplayString value='‪h^ttp:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='h%5Ettp:'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='h^ttp:prop'>
-<getRawHost nullValue='true'/>
-<getRawPath value='prop'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='h^ttp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='h^ttp:prop'/>
-<toDisplayString value='‪h^ttp:prop‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='h%5Ettp:prop'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='h^ttp:title'>
-<getRawHost nullValue='true'/>
-<getRawPath value='title'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='h^ttp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='h^ttp:title'/>
-<toDisplayString value='‪h^ttp:title‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='h%5Ettp:title'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht#tp://jjc3.org/demo.mp3#frag'>
-<getRawHost nullValue='true'/>
-<getRawPath value='ht'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='tp://jjc3.org/demo.mp3#frag'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='ht#tp://jjc3.org/demo.mp3#frag'/>
-<toDisplayString value='‪ht#tp://jjc3.org/demo.mp3#frag‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='ht#tp://jjc3.org/demo.mp3#frag'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='ht^tp:'/>
-<toDisplayString value='‪ht^tp:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp:'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp://www.w3.org/demo.mp3'>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/demo.mp3'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='ht^tp://www.w3.org/demo.mp3'/>
-<toDisplayString value='‪ht^tp://www.w3.org/demo.mp3‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp://www.w3.org/demo.mp3'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp:Foo'>
-<getRawHost nullValue='true'/>
-<getRawPath value='Foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='ht^tp:Foo'/>
-<toDisplayString value='‪ht^tp:Foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp:Foo'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='http:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='http:'/>
-<toDisplayString value='‪http:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http:'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'>
-<getRawHost value='46229EFFE16A9BD60B9F1BE88B2DB047ADDED785'/>
-<getRawPath value='/demo.mp3'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='46229EFFE16A9BD60B9F1BE88B2DB047ADDED785'/>
-<isRootless value='false'/>
-<toString value='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'/>
-<toDisplayString value='‪http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='http://NoHTML.example.org'>
-<getRawHost value='NoHTML.example.org'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='NoHTML.example.org'/>
-<isRootless value='false'/>
-<toString value='http://NoHTML.example.org'/>
-<toDisplayString value='‪http://NoHTML.example.org‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://NoHTML.example.org'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='http://a.com/ontology#'>
-<getRawHost value='a.com'/>
-<getRawPath value='/ontology'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value=''/>
-<getASCIIHost value='a.com'/>
-<isRootless value='false'/>
-<toString value='http://a.com/ontology#'/>
-<toDisplayString value='‪http://a.com/ontology#‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://a.com/ontology#'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://a.com/ontology'>
-<getRawHost value='a.com'/>
-<getRawPath value='/ontology'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='a.com'/>
-<isRootless value='false'/>
-<toString value='http://a.com/ontology'/>
-<toDisplayString value='‪http://a.com/ontology‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://a.com/ontology'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://aldabaran.hpl.hp.com/rdftest/test18/'>
-<getRawHost value='aldabaran.hpl.hp.com'/>
-<getRawPath value='/rdftest/test18/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='aldabaran.hpl.hp.com'/>
-<isRootless value='false'/>
-<toString value='http://aldabaran.hpl.hp.com/rdftest/test18/'/>
-<toDisplayString value='‪http://aldabaran.hpl.hp.com/rdftest/test18/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://aldabaran.hpl.hp.com/rdftest/test18/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://bar.com/irrelevant'>
-<getRawHost value='bar.com'/>
-<getRawPath value='/irrelevant'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='bar.com'/>
-<isRootless value='false'/>
-<toString value='http://bar.com/irrelevant'/>
-<toDisplayString value='‪http://bar.com/irrelevant‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://bar.com/irrelevant'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://decsai.ugr.es/~ontoserver/bacarex2.owl#'>
-<getRawHost value='decsai.ugr.es'/>
-<getRawPath value='/~ontoserver/bacarex2.owl'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value=''/>
-<getASCIIHost value='decsai.ugr.es'/>
-<isRootless value='false'/>
-<toString value='http://decsai.ugr.es/~ontoserver/bacarex2.owl#'/>
-<toDisplayString value='‪http://decsai.ugr.es/~ontoserver/bacarex2.owl#‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://decsai.ugr.es/~ontoserver/bacarex2.owl#'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://decsai.ugr.es/~ontoserver/bacarex2.owl#Importance'>
-<getRawHost value='decsai.ugr.es'/>
-<getRawPath value='/~ontoserver/bacarex2.owl'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Importance'/>
-<getASCIIHost value='decsai.ugr.es'/>
-<isRootless value='false'/>
-<toString value='http://decsai.ugr.es/~ontoserver/bacarex2.owl#Importance'/>
-<toDisplayString value='‪http://decsai.ugr.es/~ontoserver/bacarex2.owl#Importance‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://decsai.ugr.es/~ontoserver/bacarex2.owl#Importance'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://desc'>
-<getRawHost value='desc'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='desc'/>
-<isRootless value='false'/>
-<toString value='http://desc'/>
-<toDisplayString value='‪http://desc‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://desc'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://dickinson-i-4/daml/tests/test-add-0.daml#'>
-<getRawHost value='dickinson-i-4'/>
-<getRawPath value='/daml/tests/test-add-0.daml'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value=''/>
-<getASCIIHost value='dickinson-i-4'/>
-<isRootless value='false'/>
-<toString value='http://dickinson-i-4/daml/tests/test-add-0.daml#'/>
-<toDisplayString value='‪http://dickinson-i-4/daml/tests/test-add-0.daml#‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://dickinson-i-4/daml/tests/test-add-0.daml#'/>
-<violations>
-<violation>DOUBLE_DASH_IN_REG_NAME</violation>
-</violations>
-</IRI>
-<IRI iri='http://dickinson-i-4/daml/tests/test-add-0.daml#TestClass'>
-<getRawHost value='dickinson-i-4'/>
-<getRawPath value='/daml/tests/test-add-0.daml'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='TestClass'/>
-<getASCIIHost value='dickinson-i-4'/>
-<isRootless value='false'/>
-<toString value='http://dickinson-i-4/daml/tests/test-add-0.daml#TestClass'/>
-<toDisplayString value='‪http://dickinson-i-4/daml/tests/test-add-0.daml#TestClass‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://dickinson-i-4/daml/tests/test-add-0.daml#TestClass'/>
-<violations>
-<violation>DOUBLE_DASH_IN_REG_NAME</violation>
-</violations>
-</IRI>
-<IRI iri='http://domain/S'>
-<getRawHost value='domain'/>
-<getRawPath value='/S'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='domain'/>
-<isRootless value='false'/>
-<toString value='http://domain/S'/>
-<toDisplayString value='‪http://domain/S‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://domain/S'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://eg.com/'>
-<getRawHost value='eg.com'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='eg.com'/>
-<isRootless value='false'/>
-<toString value='http://eg.com/'/>
-<toDisplayString value='‪http://eg.com/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://eg.com/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://ex/dt'>
-<getRawHost value='ex'/>
-<getRawPath value='/dt'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex'/>
-<isRootless value='false'/>
-<toString value='http://ex/dt'/>
-<toDisplayString value='‪http://ex/dt‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex/dt'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.com/A'>
-<getRawHost value='example.com'/>
-<getRawPath value='/A'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.com'/>
-<isRootless value='false'/>
-<toString value='http://example.com/A'/>
-<toDisplayString value='‪http://example.com/A‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.com/A'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.com/test0'>
-<getRawHost value='example.com'/>
-<getRawPath value='/test0'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.com'/>
-<isRootless value='false'/>
-<toString value='http://example.com/test0'/>
-<toDisplayString value='‪http://example.com/test0‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.com/test0'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.org/    '>
-<getRawHost value='example.org'/>
-<getRawPath value='/    '/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/    '/>
-<toDisplayString value='‪http://example.org/    ‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%20%20%20%20'/>
-<violations>
-<violation>DOUBLE_WHITESPACE</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/   '>
-<getRawHost value='example.org'/>
-<getRawPath value='/   '/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/   '/>
-<toDisplayString value='‪http://example.org/   ‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%20%20%20'/>
-<violations>
-<violation>DOUBLE_WHITESPACE</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/  '>
-<getRawHost value='example.org'/>
-<getRawPath value='/  '/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/  '/>
-<

<TRUNCATED>

[65/93] [abbrv] jena git commit: Tidy up distribution packaging

Posted by rv...@apache.org.
Tidy up distribution packaging


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/986d2dcf
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/986d2dcf
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/986d2dcf

Branch: refs/heads/hadoop-rdf
Commit: 986d2dcf9b992d668dca1a581d918b555f731cb5
Parents: 4e6da04
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 20:45:04 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 20:45:04 2015 +0000

----------------------------------------------------------------------
 jena-fuseki2/jena-fuseki-dist/fuseki-server | 3 ++-
 jena-fuseki2/jena-fuseki-dist/pom.xml       | 1 +
 jena-fuseki2/jena-fuseki-server/pom.xml     | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/986d2dcf/jena-fuseki2/jena-fuseki-dist/fuseki-server
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/fuseki-server b/jena-fuseki2/jena-fuseki-dist/fuseki-server
index 679b3bd..6ed1ece 100755
--- a/jena-fuseki2/jena-fuseki-dist/fuseki-server
+++ b/jena-fuseki2/jena-fuseki-dist/fuseki-server
@@ -26,13 +26,14 @@ then
     fi
 
 JAR1="$FUSEKI_HOME/fuseki-server.jar"
-JAR2="$FUSEKI_HOME/jena-fuseki-*-server.jar"
+JAR2="$FUSEKI_HOME/jena-fuseki-server-*.jar"
 JAR=""
 
 for J in "$JAR1" "$JAR2"
 do
     # Expand
     J="$(echo $J)"
+    echo $J
     if [ -e "$J" ]
     then
 	JAR="$J"

http://git-wip-us.apache.org/repos/asf/jena/blob/986d2dcf/jena-fuseki2/jena-fuseki-dist/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/pom.xml b/jena-fuseki2/jena-fuseki-dist/pom.xml
index 6da0ca9..c72f1ed 100644
--- a/jena-fuseki2/jena-fuseki-dist/pom.xml
+++ b/jena-fuseki2/jena-fuseki-dist/pom.xml
@@ -79,6 +79,7 @@
 	    <!--<phase/>-->
             <goals><goal>single</goal></goals>
             <configuration>
+	      <appendAssemblyId>false</appendAssemblyId>
               <descriptors>
                 <descriptor>assembly-dist.xml</descriptor>
               </descriptors>

http://git-wip-us.apache.org/repos/asf/jena/blob/986d2dcf/jena-fuseki2/jena-fuseki-server/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-server/pom.xml b/jena-fuseki2/jena-fuseki-server/pom.xml
index b809285..7ee5d2b 100644
--- a/jena-fuseki2/jena-fuseki-server/pom.xml
+++ b/jena-fuseki2/jena-fuseki-server/pom.xml
@@ -87,7 +87,7 @@
 	  -->
           <transformers>
             <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-              <mainClass>org.apache.jena.fuseki.FusekiCmd</mainClass>
+              <mainClass>org.apache.jena.fuseki.cmd.FusekiCmd</mainClass>
             </transformer>
             <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
             <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />


[60/93] [abbrv] jena git commit: Move to core module

Posted by rv...@apache.org.
Move to core module


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/35ef84f1
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/35ef84f1
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/35ef84f1

Branch: refs/heads/hadoop-rdf
Commit: 35ef84f1b1e36ccffb18996c7338a93fbb946e29
Parents: c06e720
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 20:15:40 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 20:15:40 2015 +0000

----------------------------------------------------------------------
 jena-fuseki2/fuseki-dev                   | 77 --------------------------
 jena-fuseki2/jena-fuseki-core/fuseki-dev  | 77 ++++++++++++++++++++++++++
 jena-fuseki2/jena-fuseki-core/make_cp_mvn | 50 +++++++++++++++++
 jena-fuseki2/make_cp_mvn                  | 50 -----------------
 4 files changed, 127 insertions(+), 127 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/35ef84f1/jena-fuseki2/fuseki-dev
----------------------------------------------------------------------
diff --git a/jena-fuseki2/fuseki-dev b/jena-fuseki2/fuseki-dev
deleted file mode 100755
index d82c726..0000000
--- a/jena-fuseki2/fuseki-dev
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-## Run Fuseki, include development code if it looks like it's available.
-
-function check_dir() {
-    local NAME="$1"
-    local DIR="$2"
-    if [ ! -e "$DIR" ]
-    then
-	echo "$NAME: '$DIR' does not exist" 1>&2
-	exit 1
-    fi
-    if [ ! -d "$DIR" ]
-    then
-	echo "$NAME: '$DIR' exists but is not a directory" 1>&2
-    exit 1
-    fi
-}
-
-export FUSEKI_HOME="${FUSEKI_HOME:-$PWD}"
-check_dir "FUSEKI_HOME" "$FUSEKI_HOME"
-
-export FUSEKI_BASE="${FUSEKI_BASE:-$FUSEKI_HOME/run}"
-check_dir "FUSEKI_BASE" "$FUSEKI_BASE"
-
-CPF="$FUSEKI_HOME/fuseki.classpath"
-
-if [ ! -e "$CPF" ]; then
-    echo "Need to create Fuseki classpath file"
-    exit 1
-fi
-
-CP="$(. $CPF)"
-
-# Add development directories.
-if [ -e "$FUSEKI_HOME/classes" ]
-then
-    CP="$FUSEKI_HOME/classes:$CP"
-elif [ -e "$FUSEKI_HOME/target/classes" ]
-then
-    CP="$FUSEKI_HOME/target/classes:$CP"
-fi
-
-# Prepend any development directories here
-DEVDIRS="jena-core jena-tdb jena-arq jena-text"
-for X in $DEVDIRS
-do
-    CPX="$FUSEKI_HOME/../$X/target/classes"
-    if [ -e "$CPX" ]
-    then
-	CP="$CPX:$CP"
-    fi
-done
-
-FUSEKI_LOG="" #${FUSEKI_LOG:-}
-JVM_ARGS="${JVM_ARGS:--Xmx1200M}"
-
-exec java -cp "$CP" $JVM_ARGS $FUSEKI_LOG org.apache.jena.fuseki.cmd.FusekiCmd "$@"
-
-# Run as war file.
-# java -jar jetty-runner.jar fuseki-server.war

http://git-wip-us.apache.org/repos/asf/jena/blob/35ef84f1/jena-fuseki2/jena-fuseki-core/fuseki-dev
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/fuseki-dev b/jena-fuseki2/jena-fuseki-core/fuseki-dev
new file mode 100755
index 0000000..d82c726
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/fuseki-dev
@@ -0,0 +1,77 @@
+#!/usr/bin/env bash
+
+# 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.
+
+## Run Fuseki, include development code if it looks like it's available.
+
+function check_dir() {
+    local NAME="$1"
+    local DIR="$2"
+    if [ ! -e "$DIR" ]
+    then
+	echo "$NAME: '$DIR' does not exist" 1>&2
+	exit 1
+    fi
+    if [ ! -d "$DIR" ]
+    then
+	echo "$NAME: '$DIR' exists but is not a directory" 1>&2
+    exit 1
+    fi
+}
+
+export FUSEKI_HOME="${FUSEKI_HOME:-$PWD}"
+check_dir "FUSEKI_HOME" "$FUSEKI_HOME"
+
+export FUSEKI_BASE="${FUSEKI_BASE:-$FUSEKI_HOME/run}"
+check_dir "FUSEKI_BASE" "$FUSEKI_BASE"
+
+CPF="$FUSEKI_HOME/fuseki.classpath"
+
+if [ ! -e "$CPF" ]; then
+    echo "Need to create Fuseki classpath file"
+    exit 1
+fi
+
+CP="$(. $CPF)"
+
+# Add development directories.
+if [ -e "$FUSEKI_HOME/classes" ]
+then
+    CP="$FUSEKI_HOME/classes:$CP"
+elif [ -e "$FUSEKI_HOME/target/classes" ]
+then
+    CP="$FUSEKI_HOME/target/classes:$CP"
+fi
+
+# Prepend any development directories here
+DEVDIRS="jena-core jena-tdb jena-arq jena-text"
+for X in $DEVDIRS
+do
+    CPX="$FUSEKI_HOME/../$X/target/classes"
+    if [ -e "$CPX" ]
+    then
+	CP="$CPX:$CP"
+    fi
+done
+
+FUSEKI_LOG="" #${FUSEKI_LOG:-}
+JVM_ARGS="${JVM_ARGS:--Xmx1200M}"
+
+exec java -cp "$CP" $JVM_ARGS $FUSEKI_LOG org.apache.jena.fuseki.cmd.FusekiCmd "$@"
+
+# Run as war file.
+# java -jar jetty-runner.jar fuseki-server.war

http://git-wip-us.apache.org/repos/asf/jena/blob/35ef84f1/jena-fuseki2/jena-fuseki-core/make_cp_mvn
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/make_cp_mvn b/jena-fuseki2/jena-fuseki-core/make_cp_mvn
new file mode 100755
index 0000000..193876b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/make_cp_mvn
@@ -0,0 +1,50 @@
+#!/usr/bin/env perl
+# 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.
+
+# Make the maven classpath
+
+$POM="pom.xml" ;
+$POM = @ARGV[0] if ( defined(@ARGV[0]) ) ;
+
+if ( ! -e "$POM" )
+{
+    print STDERR "No POM file: $POM\n" ;
+    exit 1 ;
+}
+$M2=$ENV{'M2_REPO'} ;
+print "#!/bin/bash\n" ;
+print "\n" ;
+print 'XCP="' ;
+
+open(X, "mvn -f $POM dependency:build-classpath -DincludeScope=runtime |") ;
+while(<X>)
+{
+    next if /\[INFO\]/ ;
+    next if /^Download/ ;
+    chop ;
+    #s!$M2/org/apache/jena/jena-[^/]*/[^/]*/[^/]*.jar:!!g ;
+    print "$_" ;
+}
+print "\"\n" ;
+print "\n" ;
+
+print "if [ \"\$CP\" != \'\' ]\n" ;
+print "then\n" ;
+print "   XCP=\"\$CP:\$XCP\"\n" ;
+print "fi\n" ;
+print "\n" ;
+print "echo \"\$XCP\"\n"

http://git-wip-us.apache.org/repos/asf/jena/blob/35ef84f1/jena-fuseki2/make_cp_mvn
----------------------------------------------------------------------
diff --git a/jena-fuseki2/make_cp_mvn b/jena-fuseki2/make_cp_mvn
deleted file mode 100755
index 193876b..0000000
--- a/jena-fuseki2/make_cp_mvn
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env perl
-# 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.
-
-# Make the maven classpath
-
-$POM="pom.xml" ;
-$POM = @ARGV[0] if ( defined(@ARGV[0]) ) ;
-
-if ( ! -e "$POM" )
-{
-    print STDERR "No POM file: $POM\n" ;
-    exit 1 ;
-}
-$M2=$ENV{'M2_REPO'} ;
-print "#!/bin/bash\n" ;
-print "\n" ;
-print 'XCP="' ;
-
-open(X, "mvn -f $POM dependency:build-classpath -DincludeScope=runtime |") ;
-while(<X>)
-{
-    next if /\[INFO\]/ ;
-    next if /^Download/ ;
-    chop ;
-    #s!$M2/org/apache/jena/jena-[^/]*/[^/]*/[^/]*.jar:!!g ;
-    print "$_" ;
-}
-print "\"\n" ;
-print "\n" ;
-
-print "if [ \"\$CP\" != \'\' ]\n" ;
-print "then\n" ;
-print "   XCP=\"\$CP:\$XCP\"\n" ;
-print "fi\n" ;
-print "\n" ;
-print "echo \"\$XCP\"\n"


[34/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.ttf
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.ttf b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.ttf
new file mode 100755
index 0000000..5cd6cff
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.ttf differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.woff
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.woff b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.woff
new file mode 100755
index 0000000..9eaecb3
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/fontawesome-webfont.woff differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.eot
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.eot b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.eot
new file mode 100644
index 0000000..4a4ca86
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.eot differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.svg
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.svg b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.svg
new file mode 100644
index 0000000..e3e2dc7
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.svg
@@ -0,0 +1,229 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
+<font-face units-per-em="1200" ascent="960" descent="-240" />
+<missing-glyph horiz-adv-x="500" />
+<glyph />
+<glyph />
+<glyph unicode="&#xd;" />
+<glyph unicode=" " />
+<glyph unicode="*" d="M100 500v200h259l-183 183l141 141l183 -183v259h200v-259l183 183l141 -141l-183 -183h259v-200h-259l183 -183l-141 -141l-183 183v-259h-200v259l-183 -183l-141 141l183 183h-259z" />
+<glyph unicode="+" d="M0 400v300h400v400h300v-400h400v-300h-400v-400h-300v400h-400z" />
+<glyph unicode="&#xa0;" />
+<glyph unicode="&#x2000;" horiz-adv-x="652" />
+<glyph unicode="&#x2001;" horiz-adv-x="1304" />
+<glyph unicode="&#x2002;" horiz-adv-x="652" />
+<glyph unicode="&#x2003;" horiz-adv-x="1304" />
+<glyph unicode="&#x2004;" horiz-adv-x="434" />
+<glyph unicode="&#x2005;" horiz-adv-x="326" />
+<glyph unicode="&#x2006;" horiz-adv-x="217" />
+<glyph unicode="&#x2007;" horiz-adv-x="217" />
+<glyph unicode="&#x2008;" horiz-adv-x="163" />
+<glyph unicode="&#x2009;" horiz-adv-x="260" />
+<glyph unicode="&#x200a;" horiz-adv-x="72" />
+<glyph unicode="&#x202f;" horiz-adv-x="260" />
+<glyph unicode="&#x205f;" horiz-adv-x="326" />
+<glyph unicode="&#x20ac;" d="M100 500l100 100h113q0 47 5 100h-218l100 100h135q37 167 112 257q117 141 297 141q242 0 354 -189q60 -103 66 -209h-181q0 55 -25.5 99t-63.5 68t-75 36.5t-67 12.5q-24 0 -52.5 -10t-62.5 -32t-65.5 -67t-50.5 -107h379l-100 -100h-300q-6 -46 -6 -100h406l-100 -100 h-300q9 -74 33 -132t52.5 -91t62 -54.5t59 -29t46.5 -7.5q29 0 66 13t75 37t63.5 67.5t25.5 96.5h174q-31 -172 -128 -278q-107 -117 -274 -117q-205 0 -324 158q-36 46 -69 131.5t-45 205.5h-217z" />
+<glyph unicode="&#x2212;" d="M200 400h900v300h-900v-300z" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#x2601;" d="M-14 494q0 -80 56.5 -137t135.5 -57h750q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5z" />
+<glyph unicode="&#x2709;" d="M0 100l400 400l200 -200l200 200l400 -400h-1200zM0 300v600l300 -300zM0 1100l600 -603l600 603h-1200zM900 600l300 300v-600z" />
+<glyph unicode="&#x270f;" d="M-13 -13l333 112l-223 223zM187 403l214 -214l614 614l-214 214zM887 1103l214 -214l99 92q13 13 13 32.5t-13 33.5l-153 153q-15 13 -33 13t-33 -13z" />
+<glyph unicode="&#xe001;" d="M0 1200h1200l-500 -550v-550h300v-100h-800v100h300v550z" />
+<glyph unicode="&#xe002;" d="M14 84q18 -55 86 -75.5t147 5.5q65 21 109 69t44 90v606l600 155v-521q-64 16 -138 -7q-79 -26 -122.5 -83t-25.5 -111q18 -55 86 -75.5t147 4.5q70 23 111.5 63.5t41.5 95.5v881q0 10 -7 15.5t-17 2.5l-752 -193q-10 -3 -17 -12.5t-7 -19.5v-689q-64 17 -138 -7 q-79 -25 -122.5 -82t-25.5 -112z" />
+<glyph unicode="&#xe003;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233z" />
+<glyph unicode="&#xe005;" d="M100 784q0 64 28 123t73 100.5t104.5 64t119 20.5t120 -38.5t104.5 -104.5q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-149.5 152.5t-126.5 127.5 t-94 124.5t-33.5 117.5z" />
+<glyph unicode="&#xe006;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1z" />
+<glyph unicode="&#xe007;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1zM237 700l196 -142l-73 -226l192 140l195 -141l-74 229l193 140h-235l-77 211l-78 -211h-239z" />
+<glyph unicode="&#xe008;" d="M0 0v143l400 257v100q-37 0 -68.5 74.5t-31.5 125.5v200q0 124 88 212t212 88t212 -88t88 -212v-200q0 -51 -31.5 -125.5t-68.5 -74.5v-100l400 -257v-143h-1200z" />
+<glyph unicode="&#xe009;" d="M0 0v1100h1200v-1100h-1200zM100 100h100v100h-100v-100zM100 300h100v100h-100v-100zM100 500h100v100h-100v-100zM100 700h100v100h-100v-100zM100 900h100v100h-100v-100zM300 100h600v400h-600v-400zM300 600h600v400h-600v-400zM1000 100h100v100h-100v-100z M1000 300h100v100h-100v-100zM1000 500h100v100h-100v-100zM1000 700h100v100h-100v-100zM1000 900h100v100h-100v-100z" />
+<glyph unicode="&#xe010;" d="M0 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM0 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5zM600 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM600 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe011;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 450v200q0 
 21 14.5 35.5t35.5 14.5h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe012;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v200q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5 t-14.5 -35.5v-200zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe013;" d="M29 454l419 -420l818 820l-212 212l-607 -607l-206 207z" />
+<glyph unicode="&#xe014;" d="M106 318l282 282l-282 282l212 212l282 -282l282 282l212 -212l-282 -282l282 -282l-212 -212l-282 282l-282 -282z" />
+<glyph unicode="&#xe015;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233zM300 600v200h100v100h200v-100h100v-200h-100v-100h-200v100h-100z" />
+<glyph unicode="&#xe016;" d="M23 694q0 200 142 342t342 142t342 -142t142 -342q0 -141 -78 -262l300 -299q7 -7 7 -18t-7 -18l-109 -109q-8 -8 -18 -8t-18 8l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 694q0 -136 97 -233t234 -97t233.5 97t96.5 233t-96.5 233t-233.5 97t-234 -97 t-97 -233zM300 601h400v200h-400v-200z" />
+<glyph unicode="&#xe017;" d="M23 600q0 183 105 331t272 210v-166q-103 -55 -165 -155t-62 -220q0 -177 125 -302t302 -125t302 125t125 302q0 120 -62 220t-165 155v166q167 -62 272 -210t105 -331q0 -118 -45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5 zM500 750q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v400q0 21 -14.5 35.5t-35.5 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-400z" />
+<glyph unicode="&#xe018;" d="M100 1h200v300h-200v-300zM400 1v500h200v-500h-200zM700 1v800h200v-800h-200zM1000 1v1200h200v-1200h-200z" />
+<glyph unicode="&#xe019;" d="M26 601q0 -33 6 -74l151 -38l2 -6q14 -49 38 -93l3 -5l-80 -134q45 -59 105 -105l133 81l5 -3q45 -26 94 -39l5 -2l38 -151q40 -5 74 -5q27 0 74 5l38 151l6 2q46 13 93 39l5 3l134 -81q56 44 104 105l-80 134l3 5q24 44 39 93l1 6l152 38q5 40 5 74q0 28 -5 73l-152 38 l-1 6q-16 51 -39 93l-3 5l80 134q-44 58 -104 105l-134 -81l-5 3q-45 25 -93 39l-6 1l-38 152q-40 5 -74 5q-27 0 -74 -5l-38 -152l-5 -1q-50 -14 -94 -39l-5 -3l-133 81q-59 -47 -105 -105l80 -134l-3 -5q-25 -47 -38 -93l-2 -6l-151 -38q-6 -48 -6 -73zM385 601 q0 88 63 151t152 63t152 -63t63 -151q0 -89 -63 -152t-152 -63t-152 63t-63 152z" />
+<glyph unicode="&#xe020;" d="M100 1025v50q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-50q0 -11 -7 -18t-18 -7h-1050q-11 0 -18 7t-7 18zM200 100v800h900v-800q0 -41 -29.5 -71t-70.5 -30h-700q-41 0 -70.5 30 t-29.5 71zM300 100h100v700h-100v-700zM500 100h100v700h-100v-700zM500 1100h300v100h-300v-100zM700 100h100v700h-100v-700zM900 100h100v700h-100v-700z" />
+<glyph unicode="&#xe021;" d="M1 601l656 644l644 -644h-200v-600h-300v400h-300v-400h-300v600h-200z" />
+<glyph unicode="&#xe022;" d="M100 25v1150q0 11 7 18t18 7h475v-500h400v-675q0 -11 -7 -18t-18 -7h-850q-11 0 -18 7t-7 18zM700 800v300l300 -300h-300z" />
+<glyph unicode="&#xe023;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 500v400h100 v-300h200v-100h-300z" />
+<glyph unicode="&#xe024;" d="M-100 0l431 1200h209l-21 -300h162l-20 300h208l431 -1200h-538l-41 400h-242l-40 -400h-539zM488 500h224l-27 300h-170z" />
+<glyph unicode="&#xe025;" d="M0 0v400h490l-290 300h200v500h300v-500h200l-290 -300h490v-400h-1100zM813 200h175v100h-175v-100z" />
+<glyph unicode="&#xe026;" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM188 600q0 -170 121 -291t291 -121t291 121t121 291t-121 291t-291 121 t-291 -121t-121 -291zM350 600h150v300h200v-300h150l-250 -300z" />
+<glyph unicode="&#xe027;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM350 600l250 300 l250 -300h-150v-300h-200v300h-150z" />
+<glyph unicode="&#xe028;" d="M0 25v475l200 700h800l199 -700l1 -475q0 -11 -7 -18t-18 -7h-1150q-11 0 -18 7t-7 18zM200 500h200l50 -200h300l50 200h200l-97 500h-606z" />
+<glyph unicode="&#xe029;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 397v401 l297 -200z" />
+<glyph unicode="&#xe030;" d="M23 600q0 -118 45.5 -224.5t123 -184t184 -123t224.5 -45.5t224.5 45.5t184 123t123 184t45.5 224.5h-150q0 -177 -125 -302t-302 -125t-302 125t-125 302t125 302t302 125q136 0 246 -81l-146 -146h400v400l-145 -145q-157 122 -355 122q-118 0 -224.5 -45.5t-184 -123 t-123 -184t-45.5 -224.5z" />
+<glyph unicode="&#xe031;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5q198 0 355 -122l145 145v-400h-400l147 147q-112 80 -247 80q-177 0 -302 -125t-125 -302h-150zM100 0v400h400l-147 -147q112 -80 247 -80q177 0 302 125t125 302h150q0 -118 -45.5 -224.5t-123 -184t-184 -123 t-224.5 -45.5q-198 0 -355 122z" />
+<glyph unicode="&#xe032;" d="M100 0h1100v1200h-1100v-1200zM200 100v900h900v-900h-900zM300 200v100h100v-100h-100zM300 400v100h100v-100h-100zM300 600v100h100v-100h-100zM300 800v100h100v-100h-100zM500 200h500v100h-500v-100zM500 400v100h500v-100h-500zM500 600v100h500v-100h-500z M500 800v100h500v-100h-500z" />
+<glyph unicode="&#xe033;" d="M0 100v600q0 41 29.5 70.5t70.5 29.5h100v200q0 82 59 141t141 59h300q82 0 141 -59t59 -141v-200h100q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-900q-41 0 -70.5 29.5t-29.5 70.5zM400 800h300v150q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-150z" />
+<glyph unicode="&#xe034;" d="M100 0v1100h100v-1100h-100zM300 400q60 60 127.5 84t127.5 17.5t122 -23t119 -30t110 -11t103 42t91 120.5v500q-40 -81 -101.5 -115.5t-127.5 -29.5t-138 25t-139.5 40t-125.5 25t-103 -29.5t-65 -115.5v-500z" />
+<glyph unicode="&#xe035;" d="M0 275q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 127 70.5 231.5t184.5 161.5t245 57t245 -57t184.5 -161.5t70.5 -231.5v-300q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 116 -49.5 227t-131 192.5t-192.5 131t-227 49.5t-227 -49.5t-192.5 -131t-131 -192.5 t-49.5 -227v-300zM200 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14zM800 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14z" />
+<glyph unicode="&#xe036;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM688 459l141 141l-141 141l71 71l141 -141l141 141l71 -71l-141 -141l141 -141l-71 -71l-141 141l-141 -141z" />
+<glyph unicode="&#xe037;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM700 857l69 53q111 -135 111 -310q0 -169 -106 -302l-67 54q86 110 86 248q0 146 -93 257z" />
+<glyph unicode="&#xe038;" d="M0 401v400h300l300 200v-800l-300 200h-300zM702 858l69 53q111 -135 111 -310q0 -170 -106 -303l-67 55q86 110 86 248q0 145 -93 257zM889 951l7 -8q123 -151 123 -344q0 -189 -119 -339l-7 -8l81 -66l6 8q142 178 142 405q0 230 -144 408l-6 8z" />
+<glyph unicode="&#xe039;" d="M0 0h500v500h-200v100h-100v-100h-200v-500zM0 600h100v100h400v100h100v100h-100v300h-500v-600zM100 100v300h300v-300h-300zM100 800v300h300v-300h-300zM200 200v100h100v-100h-100zM200 900h100v100h-100v-100zM500 500v100h300v-300h200v-100h-100v-100h-200v100 h-100v100h100v200h-200zM600 0v100h100v-100h-100zM600 1000h100v-300h200v-300h300v200h-200v100h200v500h-600v-200zM800 800v300h300v-300h-300zM900 0v100h300v-100h-300zM900 900v100h100v-100h-100zM1100 200v100h100v-100h-100z" />
+<glyph unicode="&#xe040;" d="M0 200h100v1000h-100v-1000zM100 0v100h300v-100h-300zM200 200v1000h100v-1000h-100zM500 0v91h100v-91h-100zM500 200v1000h200v-1000h-200zM700 0v91h100v-91h-100zM800 200v1000h100v-1000h-100zM900 0v91h200v-91h-200zM1000 200v1000h200v-1000h-200z" />
+<glyph unicode="&#xe041;" d="M0 700l1 475q0 10 7.5 17.5t17.5 7.5h474l700 -700l-500 -500zM148 953q0 -42 29 -71q30 -30 71.5 -30t71.5 30q29 29 29 71t-29 71q-30 30 -71.5 30t-71.5 -30q-29 -29 -29 -71z" />
+<glyph unicode="&#xe042;" d="M1 700l1 475q0 11 7 18t18 7h474l700 -700l-500 -500zM148 953q0 -42 30 -71q29 -30 71 -30t71 30q30 29 30 71t-30 71q-29 30 -71 30t-71 -30q-30 -29 -30 -71zM701 1200h100l700 -700l-500 -500l-50 50l450 450z" />
+<glyph unicode="&#xe043;" d="M100 0v1025l175 175h925v-1000l-100 -100v1000h-750l-100 -100h750v-1000h-900z" />
+<glyph unicode="&#xe044;" d="M200 0l450 444l450 -443v1150q0 20 -14.5 35t-35.5 15h-800q-21 0 -35.5 -15t-14.5 -35v-1151z" />
+<glyph unicode="&#xe045;" d="M0 100v700h200l100 -200h600l100 200h200v-700h-200v200h-800v-200h-200zM253 829l40 -124h592l62 124l-94 346q-2 11 -10 18t-18 7h-450q-10 0 -18 -7t-10 -18zM281 24l38 152q2 10 11.5 17t19.5 7h500q10 0 19.5 -7t11.5 -17l38 -152q2 -10 -3.5 -17t-15.5 -7h-600 q-10 0 -15.5 7t-3.5 17z" />
+<glyph unicode="&#xe046;" d="M0 200q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-150q-4 8 -11.5 21.5t-33 48t-53 61t-69 48t-83.5 21.5h-200q-41 0 -82 -20.5t-70 -50t-52 -59t-34 -50.5l-12 -20h-150q-41 0 -70.5 -29.5t-29.5 -70.5v-600z M356 500q0 100 72 172t172 72t172 -72t72 -172t-72 -172t-172 -72t-172 72t-72 172zM494 500q0 -44 31 -75t75 -31t75 31t31 75t-31 75t-75 31t-75 -31t-31 -75zM900 700v100h100v-100h-100z" />
+<glyph unicode="&#xe047;" d="M53 0h365v66q-41 0 -72 11t-49 38t1 71l92 234h391l82 -222q16 -45 -5.5 -88.5t-74.5 -43.5v-66h417v66q-34 1 -74 43q-18 19 -33 42t-21 37l-6 13l-385 998h-93l-399 -1006q-24 -48 -52 -75q-12 -12 -33 -25t-36 -20l-15 -7v-66zM416 521l178 457l46 -140l116 -317h-340 z" />
+<glyph unicode="&#xe048;" d="M100 0v89q41 7 70.5 32.5t29.5 65.5v827q0 28 -1 39.5t-5.5 26t-15.5 21t-29 14t-49 14.5v71l471 -1q120 0 213 -88t93 -228q0 -55 -11.5 -101.5t-28 -74t-33.5 -47.5t-28 -28l-12 -7q8 -3 21.5 -9t48 -31.5t60.5 -58t47.5 -91.5t21.5 -129q0 -84 -59 -156.5t-142 -111 t-162 -38.5h-500zM400 200h161q89 0 153 48.5t64 132.5q0 90 -62.5 154.5t-156.5 64.5h-159v-400zM400 700h139q76 0 130 61.5t54 138.5q0 82 -84 130.5t-239 48.5v-379z" />
+<glyph unicode="&#xe049;" d="M200 0v57q77 7 134.5 40.5t65.5 80.5l173 849q10 56 -10 74t-91 37q-6 1 -10.5 2.5t-9.5 2.5v57h425l2 -57q-33 -8 -62 -25.5t-46 -37t-29.5 -38t-17.5 -30.5l-5 -12l-128 -825q-10 -52 14 -82t95 -36v-57h-500z" />
+<glyph unicode="&#xe050;" d="M-75 200h75v800h-75l125 167l125 -167h-75v-800h75l-125 -167zM300 900v300h150h700h150v-300h-50q0 29 -8 48.5t-18.5 30t-33.5 15t-39.5 5.5t-50.5 1h-200v-850l100 -50v-100h-400v100l100 50v850h-200q-34 0 -50.5 -1t-40 -5.5t-33.5 -15t-18.5 -30t-8.5 -48.5h-49z " />
+<glyph unicode="&#xe051;" d="M33 51l167 125v-75h800v75l167 -125l-167 -125v75h-800v-75zM100 901v300h150h700h150v-300h-50q0 29 -8 48.5t-18 30t-33.5 15t-40 5.5t-50.5 1h-200v-650l100 -50v-100h-400v100l100 50v650h-200q-34 0 -50.5 -1t-39.5 -5.5t-33.5 -15t-18.5 -30t-8 -48.5h-50z" />
+<glyph unicode="&#xe052;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 350q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM0 650q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1000q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 950q0 -20 14.5 -35t35.5 -15h600q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-600q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
+<glyph unicode="&#xe053;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 650q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM200 350q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM200 950q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
+<glyph unicode="&#xe054;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1000q-21 0 -35.5 15 t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-600 q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe055;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe056;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM300 50v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800 q-21 0 -35.5 15t-14.5 35zM300 650v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 950v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-10
 0q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe057;" d="M-101 500v100h201v75l166 -125l-166 -125v75h-201zM300 0h100v1100h-100v-1100zM500 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35 v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 650q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100 q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100z" />
+<glyph unicode="&#xe058;" d="M1 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 650 q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM801 0v1100h100v-1100 h-100zM934 550l167 -125v75h200v100h-200v75z" />
+<glyph unicode="&#xe059;" d="M0 275v650q0 31 22 53t53 22h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53zM900 600l300 300v-600z" />
+<glyph unicode="&#xe060;" d="M0 44v1012q0 18 13 31t31 13h1112q19 0 31.5 -13t12.5 -31v-1012q0 -18 -12.5 -31t-31.5 -13h-1112q-18 0 -31 13t-13 31zM100 263l247 182l298 -131l-74 156l293 318l236 -288v500h-1000v-737zM208 750q0 56 39 95t95 39t95 -39t39 -95t-39 -95t-95 -39t-95 39t-39 95z " />
+<glyph unicode="&#xe062;" d="M148 745q0 124 60.5 231.5t165 172t226.5 64.5q123 0 227 -63t164.5 -169.5t60.5 -229.5t-73 -272q-73 -114 -166.5 -237t-150.5 -189l-57 -66q-10 9 -27 26t-66.5 70.5t-96 109t-104 135.5t-100.5 155q-63 139 -63 262zM342 772q0 -107 75.5 -182.5t181.5 -75.5 q107 0 182.5 75.5t75.5 182.5t-75.5 182t-182.5 75t-182 -75.5t-75 -181.5z" />
+<glyph unicode="&#xe063;" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM173 600q0 -177 125.5 -302t301.5 -125v854q-176 0 -301.5 -125 t-125.5 -302z" />
+<glyph unicode="&#xe064;" d="M117 406q0 94 34 186t88.5 172.5t112 159t115 177t87.5 194.5q21 -71 57.5 -142.5t76 -130.5t83 -118.5t82 -117t70 -116t50 -125.5t18.5 -136q0 -89 -39 -165.5t-102 -126.5t-140 -79.5t-156 -33.5q-114 6 -211.5 53t-161.5 139t-64 210zM243 414q14 -82 59.5 -136 t136.5 -80l16 98q-7 6 -18 17t-34 48t-33 77q-15 73 -14 143.5t10 122.5l9 51q-92 -110 -119.5 -185t-12.5 -156z" />
+<glyph unicode="&#xe065;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5q366 -6 397 -14l-186 -186h-311q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v125l200 200v-225q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM436 341l161 50l412 412l-114 113l-405 -405zM995 1015l113 -113l113 113l-21 85l-92 28z" />
+<glyph unicode="&#xe066;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h261l2 -80q-133 -32 -218 -120h-145q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-53q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5 zM423 524q30 38 81.5 64t103 35.5t99 14t77.5 3.5l29 -1v-209l360 324l-359 318v-216q-7 0 -19 -1t-48 -8t-69.5 -18.5t-76.5 -37t-76.5 -59t-62 -88t-39.5 -121.5z" />
+<glyph unicode="&#xe067;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q61 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-169q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM342 632l283 -284l567 567l-137 137l-430 -431l-146 147z" />
+<glyph unicode="&#xe068;" d="M0 603l300 296v-198h200v200h-200l300 300l295 -300h-195v-200h200v198l300 -296l-300 -300v198h-200v-200h195l-295 -300l-300 300h200v200h-200v-198z" />
+<glyph unicode="&#xe069;" d="M200 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-1100l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe070;" d="M0 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-487l500 487v-1100l-500 488v-488l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe071;" d="M136 550l564 550v-487l500 487v-1100l-500 488v-488z" />
+<glyph unicode="&#xe072;" d="M200 0l900 550l-900 550v-1100z" />
+<glyph unicode="&#xe073;" d="M200 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800zM600 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
+<glyph unicode="&#xe074;" d="M200 150q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v800q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
+<glyph unicode="&#xe075;" d="M0 0v1100l500 -487v487l564 -550l-564 -550v488z" />
+<glyph unicode="&#xe076;" d="M0 0v1100l500 -487v487l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v488z" />
+<glyph unicode="&#xe077;" d="M300 0v1100l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438z" />
+<glyph unicode="&#xe078;" d="M100 250v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5zM100 500h1100l-550 564z" />
+<glyph unicode="&#xe079;" d="M185 599l592 -592l240 240l-353 353l353 353l-240 240z" />
+<glyph unicode="&#xe080;" d="M272 194l353 353l-353 353l241 240l572 -571l21 -22l-1 -1v-1l-592 -591z" />
+<glyph unicode="&#xe081;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h200v-200h200v200h200v200h-200v200h-200v-200h-200v-200z" />
+<glyph unicode="&#xe082;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h600v200h-600v-200z" />
+<glyph unicode="&#xe083;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM246 459l213 -213l141 142l141 -142l213 213l-142 141l142 141l-213 212l-141 -141l-141 142l-212 -213l141 -141 z" />
+<glyph unicode="&#xe084;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM270 551l276 -277l411 411l-175 174l-236 -236l-102 102z" />
+<glyph unicode="&#xe085;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM364 700h143q4 0 11.5 -1t11 -1t6.5 3t3 9t1 11t3.5 8.5t3.5 6t5.5 4t6.5 2.5t9 1.5t9 0.5h11.5h12.5 q19 0 30 -10t11 -26q0 -22 -4 -28t-27 -22q-5 -1 -12.5 -3t-27 -13.5t-34 -27t-26.5 -46t-11 -68.5h200q5 3 14 8t31.5 25.5t39.5 45.5t31 69t14 94q0 51 -17.5 89t-42 58t-58.5 32t-58.5 15t-51.5 3q-50 0 -90.5 -12t-75 -38.5t-53.5 -74.5t-19 -114zM500 300h200v100h-200 v-100z" />
+<glyph unicode="&#xe086;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM400 300h400v100h-100v300h-300v-100h100v-200h-100v-100zM500 800h200v100h-200v-100z" />
+<glyph unicode="&#xe087;" d="M0 500v200h195q31 125 98.5 199.5t206.5 100.5v200h200v-200q54 -20 113 -60t112.5 -105.5t71.5 -134.5h203v-200h-203q-25 -102 -116.5 -186t-180.5 -117v-197h-200v197q-140 27 -208 102.5t-98 200.5h-194zM290 500q24 -73 79.5 -127.5t130.5 -78.5v206h200v-206 q149 48 201 206h-201v200h200q-25 74 -75.5 127t-124.5 77v-204h-200v203q-75 -23 -130 -77t-79 -126h209v-200h-210z" />
+<glyph unicode="&#xe088;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM356 465l135 135 l-135 135l109 109l135 -135l135 135l109 -109l-135 -135l135 -135l-109 -109l-135 135l-135 -135z" />
+<glyph unicode="&#xe089;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM322 537l141 141 l87 -87l204 205l142 -142l-346 -345z" />
+<glyph unicode="&#xe090;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -115 62 -215l568 567q-100 62 -216 62q-171 0 -292.5 -121.5t-121.5 -292.5zM391 245q97 -59 209 -59q171 0 292.5 121.5t121.5 292.5 q0 112 -59 209z" />
+<glyph unicode="&#xe091;" d="M0 547l600 453v-300h600v-300h-600v-301z" />
+<glyph unicode="&#xe092;" d="M0 400v300h600v300l600 -453l-600 -448v301h-600z" />
+<glyph unicode="&#xe093;" d="M204 600l450 600l444 -600h-298v-600h-300v600h-296z" />
+<glyph unicode="&#xe094;" d="M104 600h296v600h300v-600h298l-449 -600z" />
+<glyph unicode="&#xe095;" d="M0 200q6 132 41 238.5t103.5 193t184 138t271.5 59.5v271l600 -453l-600 -448v301q-95 -2 -183 -20t-170 -52t-147 -92.5t-100 -135.5z" />
+<glyph unicode="&#xe096;" d="M0 0v400l129 -129l294 294l142 -142l-294 -294l129 -129h-400zM635 777l142 -142l294 294l129 -129v400h-400l129 -129z" />
+<glyph unicode="&#xe097;" d="M34 176l295 295l-129 129h400v-400l-129 130l-295 -295zM600 600v400l129 -129l295 295l142 -141l-295 -295l129 -130h-400z" />
+<glyph unicode="&#xe101;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM456 851l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5 t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5h-207q-21 0 -33 -14.5t-8 -34.5zM500 300h200v100h-200v-100z" />
+<glyph unicode="&#xe102;" d="M0 800h100v-200h400v300h200v-300h400v200h100v100h-111q1 1 1 6.5t-1.5 15t-3.5 17.5l-34 172q-11 39 -41.5 63t-69.5 24q-32 0 -61 -17l-239 -144q-22 -13 -40 -35q-19 24 -40 36l-238 144q-33 18 -62 18q-39 0 -69.5 -23t-40.5 -61l-35 -177q-2 -8 -3 -18t-1 -15v-6 h-111v-100zM100 0h400v400h-400v-400zM200 900q-3 0 14 48t36 96l18 47l213 -191h-281zM700 0v400h400v-400h-400zM731 900l202 197q5 -12 12 -32.5t23 -64t25 -72t7 -28.5h-269z" />
+<glyph unicode="&#xe103;" d="M0 -22v143l216 193q-9 53 -13 83t-5.5 94t9 113t38.5 114t74 124q47 60 99.5 102.5t103 68t127.5 48t145.5 37.5t184.5 43.5t220 58.5q0 -189 -22 -343t-59 -258t-89 -181.5t-108.5 -120t-122 -68t-125.5 -30t-121.5 -1.5t-107.5 12.5t-87.5 17t-56.5 7.5l-99 -55z M238.5 300.5q19.5 -6.5 86.5 76.5q55 66 367 234q70 38 118.5 69.5t102 79t99 111.5t86.5 148q22 50 24 60t-6 19q-7 5 -17 5t-26.5 -14.5t-33.5 -39.5q-35 -51 -113.5 -108.5t-139.5 -89.5l-61 -32q-369 -197 -458 -401q-48 -111 -28.5 -117.5z" />
+<glyph unicode="&#xe104;" d="M111 408q0 -33 5 -63q9 -56 44 -119.5t105 -108.5q31 -21 64 -16t62 23.5t57 49.5t48 61.5t35 60.5q32 66 39 184.5t-13 157.5q79 -80 122 -164t26 -184q-5 -33 -20.5 -69.5t-37.5 -80.5q-10 -19 -14.5 -29t-12 -26t-9 -23.5t-3 -19t2.5 -15.5t11 -9.5t19.5 -5t30.5 2.5 t42 8q57 20 91 34t87.5 44.5t87 64t65.5 88.5t47 122q38 172 -44.5 341.5t-246.5 278.5q22 -44 43 -129q39 -159 -32 -154q-15 2 -33 9q-79 33 -120.5 100t-44 175.5t48.5 257.5q-13 -8 -34 -23.5t-72.5 -66.5t-88.5 -105.5t-60 -138t-8 -166.5q2 -12 8 -41.5t8 -43t6 -39.5 t3.5 -39.5t-1 -33.5t-6 -31.5t-13.5 -24t-21 -20.5t-31 -12q-38 -10 -67 13t-40.5 61.5t-15 81.5t10.5 75q-52 -46 -83.5 -101t-39 -107t-7.5 -85z" />
+<glyph unicode="&#xe105;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5t145.5 -23.5t132.5 -59t116.5 -83.5t97 -90t74.5 -85.5t49 -63.5t20 -30l26 -40l-26 -40q-6 -10 -20 -30t-49 -63.5t-74.5 -85.5t-97 -90t-116.5 -83.5t-132.5 -59t-145.5 -23.5 t-145.5 23.5t-132.5 59t-116.5 83.5t-97 90t-74.5 85.5t-49 63.5t-20 30zM120 600q7 -10 40.5 -58t56 -78.5t68 -77.5t87.5 -75t103 -49.5t125 -21.5t123.5 20t100.5 45.5t85.5 71.5t66.5 75.5t58 81.5t47 66q-1 1 -28.5 37.5t-42 55t-43.5 53t-57.5 63.5t-58.5 54 q49 -74 49 -163q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l105 105q-37 24 -75 72t-57 84l-20 36z" />
+<glyph unicode="&#xe106;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5q61 0 121 -17l37 142h148l-314 -1200h-148l37 143q-82 21 -165 71.5t-140 102t-109.5 112t-72 88.5t-29.5 43zM120 600q210 -282 393 -336l37 141q-107 18 -178.5 101.5t-71.5 193.5 q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l47 47l23 87q-30 28 -59 69t-44 68l-14 26zM780 161l38 145q22 15 44.5 34t46 44t40.5 44t41 50.5t33.5 43.5t33 44t24.5 34q-97 127 -140 175l39 146q67 -54 131.5 -125.5t87.5 -103.5t36 -52l26 -40l-26 -40 q-7 -12 -25.5 -38t-63.5 -79.5t-95.5 -102.5t-124 -100t-146.5 -79z" />
+<glyph unicode="&#xe107;" d="M-97.5 34q13.5 -34 50.5 -34h1294q37 0 50.5 35.5t-7.5 67.5l-642 1056q-20 34 -48 36.5t-48 -29.5l-642 -1066q-21 -32 -7.5 -66zM155 200l445 723l445 -723h-345v100h-200v-100h-345zM500 600l100 -300l100 300v100h-200v-100z" />
+<glyph unicode="&#xe108;" d="M100 262v41q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44t106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -91 100 -113v-64q0 -20 -13 -28.5t-32 0.5l-94 78h-222l-94 -78q-19 -9 -32 -0.5t-13 28.5 v64q0 22 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5z" />
+<glyph unicode="&#xe109;" d="M0 50q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v750h-1100v-750zM0 900h1100v150q0 21 -14.5 35.5t-35.5 14.5h-150v100h-100v-100h-500v100h-100v-100h-150q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 100v100h100v-100h-100zM100 300v100h100v-100h-100z M100 500v100h100v-100h-100zM300 100v100h100v-100h-100zM300 300v100h100v-100h-100zM300 500v100h100v-100h-100zM500 100v100h100v-100h-100zM500 300v100h100v-100h-100zM500 500v100h100v-100h-100zM700 100v100h100v-100h-100zM700 300v100h100v-100h-100zM700 500 v100h100v-100h-100zM900 100v100h100v-100h-100zM900 300v100h100v-100h-100zM900 500v100h100v-100h-100z" />
+<glyph unicode="&#xe110;" d="M0 200v200h259l600 600h241v198l300 -295l-300 -300v197h-159l-600 -600h-341zM0 800h259l122 -122l141 142l-181 180h-341v-200zM678 381l141 142l122 -123h159v198l300 -295l-300 -300v197h-241z" />
+<glyph unicode="&#xe111;" d="M0 400v600q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5z" />
+<glyph unicode="&#xe112;" d="M100 600v200h300v-250q0 -113 6 -145q17 -92 102 -117q39 -11 92 -11q37 0 66.5 5.5t50 15.5t36 24t24 31.5t14 37.5t7 42t2.5 45t0 47v25v250h300v-200q0 -42 -3 -83t-15 -104t-31.5 -116t-58 -109.5t-89 -96.5t-129 -65.5t-174.5 -25.5t-174.5 25.5t-129 65.5t-89 96.5 t-58 109.5t-31.5 116t-15 104t-3 83zM100 900v300h300v-300h-300zM800 900v300h300v-300h-300z" />
+<glyph unicode="&#xe113;" d="M-30 411l227 -227l352 353l353 -353l226 227l-578 579z" />
+<glyph unicode="&#xe114;" d="M70 797l580 -579l578 579l-226 227l-353 -353l-352 353z" />
+<glyph unicode="&#xe115;" d="M-198 700l299 283l300 -283h-203v-400h385l215 -200h-800v600h-196zM402 1000l215 -200h381v-400h-198l299 -283l299 283h-200v600h-796z" />
+<glyph unicode="&#xe116;" d="M18 939q-5 24 10 42q14 19 39 19h896l38 162q5 17 18.5 27.5t30.5 10.5h94q20 0 35 -14.5t15 -35.5t-15 -35.5t-35 -14.5h-54l-201 -961q-2 -4 -6 -10.5t-19 -17.5t-33 -11h-31v-50q0 -20 -14.5 -35t-35.5 -15t-35.5 15t-14.5 35v50h-300v-50q0 -20 -14.5 -35t-35.5 -15 t-35.5 15t-14.5 35v50h-50q-21 0 -35.5 15t-14.5 35q0 21 14.5 35.5t35.5 14.5h535l48 200h-633q-32 0 -54.5 21t-27.5 43z" />
+<glyph unicode="&#xe117;" d="M0 0v800h1200v-800h-1200zM0 900v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-100h-1200z" />
+<glyph unicode="&#xe118;" d="M1 0l300 700h1200l-300 -700h-1200zM1 400v600h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-200h-1000z" />
+<glyph unicode="&#xe119;" d="M302 300h198v600h-198l298 300l298 -300h-198v-600h198l-298 -300z" />
+<glyph unicode="&#xe120;" d="M0 600l300 298v-198h600v198l300 -298l-300 -297v197h-600v-197z" />
+<glyph unicode="&#xe121;" d="M0 100v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM31 400l172 739q5 22 23 41.5t38 19.5h672q19 0 37.5 -22.5t23.5 -45.5l172 -732h-1138zM800 100h100v100h-100v-100z M1000 100h100v100h-100v-100z" />
+<glyph unicode="&#xe122;" d="M-101 600v50q0 24 25 49t50 38l25 13v-250l-11 5.5t-24 14t-30 21.5t-24 27.5t-11 31.5zM100 500v250v8v8v7t0.5 7t1.5 5.5t2 5t3 4t4.5 3.5t6 1.5t7.5 0.5h200l675 250v-850l-675 200h-38l47 -276q2 -12 -3 -17.5t-11 -6t-21 -0.5h-8h-83q-20 0 -34.5 14t-18.5 35 q-55 337 -55 351zM1100 200v850q0 21 14.5 35.5t35.5 14.5q20 0 35 -14.5t15 -35.5v-850q0 -20 -15 -35t-35 -15q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe123;" d="M74 350q0 21 13.5 35.5t33.5 14.5h18l117 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3 32t29 13h94q20 0 29 -10.5t3 -29.5q-18 -36 -18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q20 0 33.5 -14.5t13.5 -35.5q0 -20 -13 -40t-31 -27q-8 -3 -23 -8.5 t-65 -20t-103 -25t-132.5 -19.5t-158.5 -9q-125 0 -245.5 20.5t-178.5 40.5l-58 20q-18 7 -31 27.5t-13 40.5zM497 110q12 -49 40 -79.5t63 -30.5t63 30.5t39 79.5q-48 -6 -102 -6t-103 6z" />
+<glyph unicode="&#xe124;" d="M21 445l233 -45l-78 -224l224 78l45 -233l155 179l155 -179l45 233l224 -78l-78 224l234 45l-180 155l180 156l-234 44l78 225l-224 -78l-45 233l-155 -180l-155 180l-45 -233l-224 78l78 -225l-233 -44l179 -156z" />
+<glyph unicode="&#xe125;" d="M0 200h200v600h-200v-600zM300 275q0 -75 100 -75h61q124 -100 139 -100h250q46 0 83 57l238 344q29 31 29 74v100q0 44 -30.5 84.5t-69.5 40.5h-328q28 118 28 125v150q0 44 -30.5 84.5t-69.5 40.5h-50q-27 0 -51 -20t-38 -48l-96 -198l-145 -196q-20 -26 -20 -63v-400z M400 300v375l150 213l100 212h50v-175l-50 -225h450v-125l-250 -375h-214l-136 100h-100z" />
+<glyph unicode="&#xe126;" d="M0 400v600h200v-600h-200zM300 525v400q0 75 100 75h61q124 100 139 100h250q46 0 83 -57l238 -344q29 -31 29 -74v-100q0 -44 -30.5 -84.5t-69.5 -40.5h-328q28 -118 28 -125v-150q0 -44 -30.5 -84.5t-69.5 -40.5h-50q-27 0 -51 20t-38 48l-96 198l-145 196 q-20 26 -20 63zM400 525l150 -212l100 -213h50v175l-50 225h450v125l-250 375h-214l-136 -100h-100v-375z" />
+<glyph unicode="&#xe127;" d="M8 200v600h200v-600h-200zM308 275v525q0 17 14 35.5t28 28.5l14 9l362 230q14 6 25 6q17 0 29 -12l109 -112q14 -14 14 -34q0 -18 -11 -32l-85 -121h302q85 0 138.5 -38t53.5 -110t-54.5 -111t-138.5 -39h-107l-130 -339q-7 -22 -20.5 -41.5t-28.5 -19.5h-341 q-7 0 -90 81t-83 94zM408 289l100 -89h293l131 339q6 21 19.5 41t28.5 20h203q16 0 25 15t9 36q0 20 -9 34.5t-25 14.5h-457h-6.5h-7.5t-6.5 0.5t-6 1t-5 1.5t-5.5 2.5t-4 4t-4 5.5q-5 12 -5 20q0 14 10 27l147 183l-86 83l-339 -236v-503z" />
+<glyph unicode="&#xe128;" d="M-101 651q0 72 54 110t139 38l302 -1l-85 121q-11 16 -11 32q0 21 14 34l109 113q13 12 29 12q11 0 25 -6l365 -230q7 -4 17 -10.5t26.5 -26t16.5 -36.5v-526q0 -13 -86 -93.5t-94 -80.5h-341q-16 0 -29.5 20t-19.5 41l-130 339h-107q-84 0 -139 39t-55 111zM-1 601h222 q15 0 28.5 -20.5t19.5 -40.5l131 -339h293l107 89v502l-343 237l-87 -83l145 -184q10 -11 10 -26q0 -11 -5 -20q-1 -3 -3.5 -5.5l-4 -4t-5 -2.5t-5.5 -1.5t-6.5 -1t-6.5 -0.5h-7.5h-6.5h-476v-100zM1000 201v600h200v-600h-200z" />
+<glyph unicode="&#xe129;" d="M97 719l230 -363q4 -6 10.5 -15.5t26 -25t36.5 -15.5h525q13 0 94 83t81 90v342q0 15 -20 28.5t-41 19.5l-339 131v106q0 84 -39 139t-111 55t-110 -53.5t-38 -138.5v-302l-121 84q-15 12 -33.5 11.5t-32.5 -13.5l-112 -110q-22 -22 -6 -53zM172 739l83 86l183 -146 q22 -18 47 -5q3 1 5.5 3.5l4 4t2.5 5t1.5 5.5t1 6.5t0.5 6.5v7.5v6.5v456q0 22 25 31t50 -0.5t25 -30.5v-202q0 -16 20 -29.5t41 -19.5l339 -130v-294l-89 -100h-503zM400 0v200h600v-200h-600z" />
+<glyph unicode="&#xe130;" d="M2 585q-16 -31 6 -53l112 -110q13 -13 32 -13.5t34 10.5l121 85q0 -51 -0.5 -153.5t-0.5 -148.5q0 -84 38.5 -138t110.5 -54t111 55t39 139v106l339 131q20 6 40.5 19.5t20.5 28.5v342q0 7 -81 90t-94 83h-525q-17 0 -35.5 -14t-28.5 -28l-10 -15zM77 565l236 339h503 l89 -100v-294l-340 -130q-20 -6 -40 -20t-20 -29v-202q0 -22 -25 -31t-50 0t-25 31v456v14.5t-1.5 11.5t-5 12t-9.5 7q-24 13 -46 -5l-184 -146zM305 1104v200h600v-200h-600z" />
+<glyph unicode="&#xe131;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM298 701l2 -201h300l-2 -194l402 294l-402 298v-197h-300z" />
+<glyph unicode="&#xe132;" d="M0 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t231.5 47.5q122 0 232.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-218 -217.5t-300 -80t-299.5 80t-217.5 217.5t-80 299.5zM200 600l402 -294l-2 194h300l2 201h-300v197z" />
+<glyph unicode="&#xe133;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600h200v-300h200v300h200l-300 400z" />
+<glyph unicode="&#xe134;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600l300 -400l300 400h-200v300h-200v-300h-200z" />
+<glyph unicode="&#xe135;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM254 780q-8 -33 5.5 -92.5t7.5 -87.5q0 -9 17 -44t16 -60 q12 0 23 -5.5t23 -15t20 -13.5q24 -12 108 -42q22 -8 53 -31.5t59.5 -38.5t57.5 -11q8 -18 -15 -55t-20 -57q42 -71 87 -80q0 -6 -3 -15.5t-3.5 -14.5t4.5 -17q104 -3 221 112q30 29 47 47t34.5 49t20.5 62q-14 9 -37 9.5t-36 7.5q-14 7 -49 15t-52 19q-9 0 -39.5 -0.5 t-46.5 -1.5t-39 -6.5t-39 -16.5q-50 -35 -66 -12q-4 2 -3.5 25.5t0.5 25.5q-6 13 -26.5 17t-24.5 7q2 22 -2 41t-16.5 28t-38.5 -20q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q12 -19 32 -37.5t34 -27.5l14 -8q0 3 9.5 39.5t5.5 57.5 q-4 23 14.5 44.5t22.5 31.5q5 14 10 35t8.5 31t15.5 22.5t34 21.5q-6 18 10 37q8 0 23.5 -1.5t24.5 -1.5t20.5 4.5t20.5 15.5q-10 23 -30.5 42.5t-38 30t-49 26.5t-43.5 23q11 39 2 44q31 -13 58 -14.5t39 3.5l11 4q7 36 -16.5 53.5t-64.5 28.5t-5
 6 23q-19 -3 -37 0 q-15 -12 -36.5 -21t-34.5 -12t-44 -8t-39 -6q-15 -3 -45.5 0.5t-45.5 -2.5q-21 -7 -52 -26.5t-34 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -90.5t-29.5 -79.5zM518 916q3 12 16 30t16 25q10 -10 18.5 -10t14 6t14.5 14.5t16 12.5q0 -24 17 -66.5t17 -43.5 q-9 2 -31 5t-36 5t-32 8t-30 14zM692 1003h1h-1z" />
+<glyph unicode="&#xe136;" d="M0 164.5q0 21.5 15 37.5l600 599q-33 101 6 201.5t135 154.5q164 92 306 -9l-259 -138l145 -232l251 126q13 -175 -151 -267q-123 -70 -253 -23l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5z" />
+<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M0 196v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 596v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5zM0 996v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM600 596h500v100h-500v-100zM800 196h300v100h-300v-100zM900 996h200v100h-200v-100z" />
+<glyph unicode="&#xe138;" d="M100 1100v100h1000v-100h-1000zM150 1000h900l-350 -500v-300l-200 -200v500z" />
+<glyph unicode="&#xe139;" d="M0 200v200h1200v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500z M500 1000h200v100h-200v-100z" />
+<glyph unicode="&#xe140;" d="M0 0v400l129 -129l200 200l142 -142l-200 -200l129 -129h-400zM0 800l129 129l200 -200l142 142l-200 200l129 129h-400v-400zM729 329l142 142l200 -200l129 129v-400h-400l129 129zM729 871l200 200l-129 129h400v-400l-129 129l-200 -200z" />
+<glyph unicode="&#xe141;" d="M0 596q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 596q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM291 655 q0 23 15.5 38.5t38.5 15.5t39 -16t16 -38q0 -23 -16 -39t-39 -16q-22 0 -38 16t-16 39zM400 850q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16.5t-16 38.5zM514 609q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 22 16 38.5t39 16.5 q22 0 38 -16t16 -39t-16 -39t-38 -16q-14 0 -29 10l-55 -145q17 -22 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5zM800 655q0 22 16 38t39 16t38.5 -15.5t15.5 -38.5t-16 -39t-38 -16q-23 0 -39 16t-16 39z" />
+<glyph unicode="&#xe142;" d="M-40 375q-13 -95 35 -173q35 -57 94 -89t129 -32q63 0 119 28q33 16 65 40.5t52.5 45.5t59.5 64q40 44 57 61l394 394q35 35 47 84t-3 96q-27 87 -117 104q-20 2 -29 2q-46 0 -78.5 -16.5t-67.5 -51.5l-389 -396l-7 -7l69 -67l377 373q20 22 39 38q23 23 50 23 q38 0 53 -36q16 -39 -20 -75l-547 -547q-52 -52 -125 -52q-55 0 -100 33t-54 96q-5 35 2.5 66t31.5 63t42 50t56 54q24 21 44 41l348 348q52 52 82.5 79.5t84 54t107.5 26.5q25 0 48 -4q95 -17 154 -94.5t51 -175.5q-7 -101 -98 -192l-252 -249l-253 -256l7 -7l69 -60 l517 511q67 67 95 157t11 183q-16 87 -67 154t-130 103q-69 33 -152 33q-107 0 -197 -55q-40 -24 -111 -95l-512 -512q-68 -68 -81 -163z" />
+<glyph unicode="&#xe143;" d="M80 784q0 131 98.5 229.5t230.5 98.5q143 0 241 -129q103 129 246 129q129 0 226 -98.5t97 -229.5q0 -46 -17.5 -91t-61 -99t-77 -89.5t-104.5 -105.5q-197 -191 -293 -322l-17 -23l-16 23q-43 58 -100 122.5t-92 99.5t-101 100q-71 70 -104.5 105.5t-77 89.5t-61 99 t-17.5 91zM250 784q0 -27 30.5 -70t61.5 -75.5t95 -94.5l22 -22q93 -90 190 -201q82 92 195 203l12 12q64 62 97.5 97t64.5 79t31 72q0 71 -48 119.5t-105 48.5q-74 0 -132 -83l-118 -171l-114 174q-51 80 -123 80q-60 0 -109.5 -49.5t-49.5 -118.5z" />
+<glyph unicode="&#xe144;" d="M57 353q0 -95 66 -159l141 -142q68 -66 159 -66q93 0 159 66l283 283q66 66 66 159t-66 159l-141 141q-8 9 -19 17l-105 -105l212 -212l-389 -389l-247 248l95 95l-18 18q-46 45 -75 101l-55 -55q-66 -66 -66 -159zM269 706q0 -93 66 -159l141 -141q7 -7 19 -17l105 105 l-212 212l389 389l247 -247l-95 -96l18 -17q47 -49 77 -100l29 29q35 35 62.5 88t27.5 96q0 93 -66 159l-141 141q-66 66 -159 66q-95 0 -159 -66l-283 -283q-66 -64 -66 -159z" />
+<glyph unicode="&#xe145;" d="M200 100v953q0 21 30 46t81 48t129 38t163 15t162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5zM300 300h600v700h-600v-700zM496 150q0 -43 30.5 -73.5t73.5 -30.5t73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5 t-73.5 -30.5t-30.5 -73.5z" />
+<glyph unicode="&#xe146;" d="M0 0l303 380l207 208l-210 212h300l267 279l-35 36q-15 14 -15 35t15 35q14 15 35 15t35 -15l283 -282q15 -15 15 -36t-15 -35q-14 -15 -35 -15t-35 15l-36 35l-279 -267v-300l-212 210l-208 -207z" />
+<glyph unicode="&#xe148;" d="M295 433h139q5 -77 48.5 -126.5t117.5 -64.5v335q-6 1 -15.5 4t-11.5 3q-46 14 -79 26.5t-72 36t-62.5 52t-40 72.5t-16.5 99q0 92 44 159.5t109 101t144 40.5v78h100v-79q38 -4 72.5 -13.5t75.5 -31.5t71 -53.5t51.5 -84t24.5 -118.5h-159q-8 72 -35 109.5t-101 50.5 v-307l64 -14q34 -7 64 -16.5t70 -31.5t67.5 -52t47.5 -80.5t20 -112.5q0 -139 -89 -224t-244 -96v-77h-100v78q-152 17 -237 104q-40 40 -52.5 93.5t-15.5 139.5zM466 889q0 -29 8 -51t16.5 -34t29.5 -22.5t31 -13.5t38 -10q7 -2 11 -3v274q-61 -8 -97.5 -37.5t-36.5 -102.5 zM700 237q170 18 170 151q0 64 -44 99.5t-126 60.5v-311z" />
+<glyph unicode="&#xe149;" d="M100 600v100h166q-24 49 -44 104q-10 26 -14.5 55.5t-3 72.5t25 90t68.5 87q97 88 263 88q129 0 230 -89t101 -208h-153q0 52 -34 89.5t-74 51.5t-76 14q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -28 16.5 -69.5t28 -62.5t41.5 -72h241v-100h-197q8 -50 -2.5 -115 t-31.5 -94q-41 -59 -99 -113q35 11 84 18t70 7q33 1 103 -16t103 -17q76 0 136 30l50 -147q-41 -25 -80.5 -36.5t-59 -13t-61.5 -1.5q-23 0 -128 33t-155 29q-39 -4 -82 -17t-66 -25l-24 -11l-55 145l16.5 11t15.5 10t13.5 9.5t14.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221z" />
+<glyph unicode="&#xe150;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM602 900l298 300l298 -300h-198v-900h-200v900h-198z" />
+<glyph unicode="&#xe151;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v200h100v-100h200v-100h-300zM700 400v100h300v-200h-99v-100h-100v100h99v100h-200zM700 700v500h300v-500h-100v100h-100v-100h-100zM801 900h100v200h-100v-200z" />
+<glyph unicode="&#xe152;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v500h300v-500h-100v100h-100v-100h-100zM700 700v200h100v-100h200v-100h-300zM700 1100v100h300v-200h-99v-100h-100v100h99v100h-200zM801 200h100v200h-100v-200z" />
+<glyph unicode="&#xe153;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 100v400h300v-500h-100v100h-200zM800 1100v100h200v-500h-100v400h-100zM901 200h100v200h-100v-200z" />
+<glyph unicode="&#xe154;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 400v100h200v-500h-100v400h-100zM800 800v400h300v-500h-100v100h-200zM901 900h100v200h-100v-200z" />
+<glyph unicode="&#xe155;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h500v-200h-500zM700 400v200h400v-200h-400zM700 700v200h300v-200h-300zM700 1000v200h200v-200h-200z" />
+<glyph unicode="&#xe156;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h200v-200h-200zM700 400v200h300v-200h-300zM700 700v200h400v-200h-400zM700 1000v200h500v-200h-500z" />
+<glyph unicode="&#xe157;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q162 0 281 -118.5t119 -281.5v-300q0 -165 -118.5 -282.5t-281.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500z" />
+<glyph unicode="&#xe158;" d="M0 400v300q0 163 119 281.5t281 118.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-163 0 -281.5 117.5t-118.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM400 300l333 250l-333 250v-500z" />
+<glyph unicode="&#xe159;" d="M0 400v300q0 163 117.5 281.5t282.5 118.5h300q163 0 281.5 -119t118.5 -281v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 700l250 -333l250 333h-500z" />
+<glyph unicode="&#xe160;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -162 -118.5 -281t-281.5 -119h-300q-165 0 -282.5 118.5t-117.5 281.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 400h500l-250 333z" />
+<glyph unicode="&#xe161;" d="M0 400v300h300v200l400 -350l-400 -350v200h-300zM500 0v200h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-500v200h400q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-400z" />
+<glyph unicode="&#xe162;" d="M217 519q8 -19 31 -19h302q-155 -438 -160 -458q-5 -21 4 -32l9 -8h9q14 0 26 15q11 13 274.5 321.5t264.5 308.5q14 19 5 36q-8 17 -31 17l-301 -1q1 4 78 219.5t79 227.5q2 15 -5 27l-9 9h-9q-15 0 -25 -16q-4 -6 -98 -111.5t-228.5 -257t-209.5 -237.5q-16 -19 -6 -41 z" />
+<glyph unicode="&#xe163;" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q47 0 100 15v185h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h500v185q-14 4 -114 7.5t-193 5.5l-93 2q-165 0 -282.5 -117.5t-117.5 -282.5v-300zM600 400v300h300v200l400 -350l-400 -350v200h-300z " />
+<glyph unicode="&#xe164;" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q163 0 281.5 117.5t118.5 282.5v98l-78 73l-122 -123v-148q0 -41 -29.5 -70.5t-70.5 -29.5h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h156l118 122l-74 78h-100q-165 0 -282.5 -117.5t-117.5 -282.5 v-300zM496 709l353 342l-149 149h500v-500l-149 149l-342 -353z" />
+<glyph unicode="&#xe165;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM406 600 q0 80 57 137t137 57t137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137z" />
+<glyph unicode="&#xe166;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 800l445 -500l450 500h-295v400h-300v-400h-300zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe167;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 700h300v-300h300v300h295l-445 500zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe168;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 705l305 -305l596 596l-154 155l-442 -442l-150 151zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe169;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 988l97 -98l212 213l-97 97zM200 400l697 1l3 699l-250 -239l-149 149l-212 -212l149 -149zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe170;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM200 612l212 -212l98 97l-213 212zM300 1200l239 -250l-149 -149l212 -212l149 148l249 -237l-1 697zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe171;" d="M23 415l1177 784v-1079l-475 272l-310 -393v416h-392zM494 210l672 938l-672 -712v-226z" />
+<glyph unicode="&#xe172;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-850q0 -21 -15 -35.5t-35 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200z" />
+<glyph unicode="&#xe173;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-218l-276 -275l-120 120l-126 -127h-378v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM581 306l123 123l120 -120l353 352l123 -123l-475 -476zM600 1000h100v200h-100v-200z" />
+<glyph unicode="&#xe174;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-269l-103 -103l-170 170l-298 -298h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200zM700 133l170 170l-170 170l127 127l170 -170l170 170l127 -128l-170 -169l170 -170 l-127 -127l-170 170l-170 -170z" />
+<glyph unicode="&#xe175;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-300h-400v-200h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300l300 -300l300 300h-200v300h-200v-300h-200zM600 1000v200h100v-200h-100z" />
+<glyph unicode="&#xe176;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-402l-200 200l-298 -298h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300h200v-300h200v300h200l-300 300zM600 1000v200h100v-200h-100z" />
+<glyph unicode="&#xe177;" d="M0 250q0 -21 14.5 -35.5t35.5 -14.5h1100q21 0 35.5 14.5t14.5 35.5v550h-1200v-550zM0 900h1200v150q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 300v200h400v-200h-400z" />
+<glyph unicode="&#xe178;" d="M0 400l300 298v-198h400v-200h-400v-198zM100 800v200h100v-200h-100zM300 800v200h100v-200h-100zM500 800v200h400v198l300 -298l-300 -298v198h-400zM800 300v200h100v-200h-100zM1000 300h100v200h-100v-200z" />
+<glyph unicode="&#xe179;" d="M100 700v400l50 100l50 -100v-300h100v300l50 100l50 -100v-300h100v300l50 100l50 -100v-400l-100 -203v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447zM800 597q0 -29 10.5 -55.5t25 -43t29 -28.5t25.5 -18l10 -5v-397q0 -21 14.5 -35.5 t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v1106q0 31 -18 40.5t-44 -7.5l-276 -116q-25 -17 -43.5 -51.5t-18.5 -65.5v-359z" />
+<glyph unicode="&#xe180;" d="M100 0h400v56q-75 0 -87.5 6t-12.5 44v394h500v-394q0 -38 -12.5 -44t-87.5 -6v-56h400v56q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v888q0 22 25 34.5t50 13.5l25 2v56h-400v-56q75 0 87.5 -6t12.5 -44v-394h-500v394q0 38 12.5 44t87.5 6v56h-400v-56q4 0 11 -0.5 t24 -3t30 -7t24 -15t11 -24.5v-888q0 -22 -25 -34.5t-50 -13.5l-25 -2v-56z" />
+<glyph unicode="&#xe181;" d="M0 300q0 -41 29.5 -70.5t70.5 -29.5h300q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-300q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM100 100h400l200 200h105l295 98v-298h-425l-100 -100h-375zM100 300v200h300v-200h-300zM100 600v200h300v-200h-300z M100 1000h400l200 -200v-98l295 98h105v200h-425l-100 100h-375zM700 402v163l400 133v-163z" />
+<glyph unicode="&#xe182;" d="M16.5 974.5q0.5 -21.5 16 -90t46.5 -140t104 -177.5t175 -208q103 -103 207.5 -176t180 -103.5t137 -47t92.5 -16.5l31 1l163 162q17 18 13.5 41t-22.5 37l-192 136q-19 14 -45 12t-42 -19l-118 -118q-142 101 -268 227t-227 268l118 118q17 17 20 41.5t-11 44.5 l-139 194q-14 19 -36.5 22t-40.5 -14l-162 -162q-1 -11 -0.5 -32.5z" />
+<glyph unicode="&#xe183;" d="M0 50v212q0 20 10.5 45.5t24.5 39.5l365 303v50q0 4 1 10.5t12 22.5t30 28.5t60 23t97 10.5t97 -10t60 -23.5t30 -27.5t12 -24l1 -10v-50l365 -303q14 -14 24.5 -39.5t10.5 -45.5v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-20 0 -35 14.5t-15 35.5zM0 712 q0 -21 14.5 -33.5t34.5 -8.5l202 33q20 4 34.5 21t14.5 38v146q141 24 300 24t300 -24v-146q0 -21 14.5 -38t34.5 -21l202 -33q20 -4 34.5 8.5t14.5 33.5v200q-6 8 -19 20.5t-63 45t-112 57t-171 45t-235 20.5q-92 0 -175 -10.5t-141.5 -27t-108.5 -36.5t-81.5 -40 t-53.5 -36.5t-31 -27.5l-9 -10v-200z" />
+<glyph unicode="&#xe184;" d="M100 0v100h1100v-100h-1100zM175 200h950l-125 150v250l100 100v400h-100v-200h-100v200h-200v-200h-100v200h-200v-200h-100v200h-100v-400l100 -100v-250z" />
+<glyph unicode="&#xe185;" d="M100 0h300v400q0 41 -29.5 70.5t-70.5 29.5h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-400zM500 0v1000q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-1000h-300zM900 0v700q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-700h-300z" />
+<glyph unicode="&#xe186;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
+<glyph unicode="&#xe187;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h100v200h100v-200h100v500h-100v-200h-100v200h-100v-500zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
+<glyph unicode="&#xe188;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v100h-200v300h200v100h-300v-500zM600 300h300v100h-200v300h200v100h-300v-500z" />
+<glyph unicode="&#xe189;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 550l300 -150v300zM600 400l300 150l-300 150v-300z" />
+<glyph unicode="&#xe190;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300v500h700v-500h-700zM300 400h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130v-300zM575 549 q0 -65 27 -107t68 -42h130v300h-130q-38 0 -66.5 -43t-28.5 -108z" />
+<glyph unicode="&#xe191;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
+<glyph unicode="&#xe192;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v400h-200v100h-100v-500zM301 400v200h100v-200h-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
+<glyph unicode="&#xe193;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 700v100h300v-300h-99v-100h-100v100h99v200h-200zM201 300v100h100v-100h-100zM601 300v100h100v-100h-100z M700 700v100h200v-500h-100v400h-100z" />
+<glyph unicode="&#xe194;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 500v200 l100 100h300v-100h-300v-200h300v-100h-300z" />
+<glyph unicode="&#xe195;" d="M0 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 400v400h300 l100 -100v-100h-100v100h-200v-100h200v-100h-200v-100h-100zM700 400v100h100v-100h-100z" />
+<glyph unicode="&#xe197;" d="M-14 494q0 -80 56.5 -137t135.5 -57h222v300h400v-300h128q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200h200v300h200v-300h200 l-300 -300z" />
+<glyph unicode="&#xe198;" d="M-14 494q0 -80 56.5 -137t135.5 -57h8l414 414l403 -403q94 26 154.5 104.5t60.5 178.5q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200l300 300 l300 -300h-200v-300h-200v300h-200z" />
+<glyph unicode="&#xe199;" d="M100 200h400v-155l-75 -45h350l-75 45v155h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170z" />
+<glyph unicode="&#xe200;" d="M121 700q0 -53 28.5 -97t75.5 -65q-4 -16 -4 -38q0 -74 52.5 -126.5t126.5 -52.5q56 0 100 30v-306l-75 -45h350l-75 45v306q46 -30 100 -30q74 0 126.5 52.5t52.5 126.5q0 24 -9 55q50 32 79.5 83t29.5 112q0 90 -61.5 155.5t-150.5 71.5q-26 89 -99.5 145.5 t-167.5 56.5q-116 0 -197.5 -81.5t-81.5 -197.5q0 -4 1 -11.5t1 -11.5q-14 2 -23 2q-74 0 -126.5 -52.5t-52.5 -126.5z" />
+</font>
+</defs></svg> 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.ttf
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.ttf b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.ttf
new file mode 100644
index 0000000..67fa00b
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.ttf differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.woff
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.woff b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.woff
new file mode 100644
index 0000000..8c54182
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/fonts/glyphicons-halflings-regular.woff differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_disabled.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_disabled.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_disabled.png
new file mode 100644
index 0000000..881de79
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_disabled.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_enabled.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_enabled.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_enabled.png
new file mode 100644
index 0000000..c608682
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_enabled.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_enabled_hover.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_enabled_hover.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_enabled_hover.png
new file mode 100644
index 0000000..d300f10
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/back_enabled_hover.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/favicon.ico
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/favicon.ico b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/favicon.ico
new file mode 100644
index 0000000..f5d685e
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/favicon.ico differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_disabled.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_disabled.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_disabled.png
new file mode 100644
index 0000000..6a6ded7
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_disabled.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_enabled.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_enabled.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_enabled.png
new file mode 100644
index 0000000..a4e6b53
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_enabled.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_enabled_hover.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_enabled_hover.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_enabled_hover.png
new file mode 100644
index 0000000..fc46c5e
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/forward_enabled_hover.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/jena-logo-notext-small.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/jena-logo-notext-small.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/jena-logo-notext-small.png
new file mode 100644
index 0000000..2990c2d
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/jena-logo-notext-small.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_asc.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_asc.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_asc.png
new file mode 100644
index 0000000..a88d797
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_asc.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_asc_disabled.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_asc_disabled.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_asc_disabled.png
new file mode 100644
index 0000000..4e144cf
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_asc_disabled.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_both.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_both.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_both.png
new file mode 100644
index 0000000..1867040
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_both.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_desc.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_desc.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_desc.png
new file mode 100644
index 0000000..def071e
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_desc.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_desc_disabled.png
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_desc_disabled.png b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_desc_disabled.png
new file mode 100644
index 0000000..7824973
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/sort_desc_disabled.png differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/wait30.gif
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/wait30.gif b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/wait30.gif
new file mode 100644
index 0000000..9337ee2
Binary files /dev/null and b/jena-fuseki2/jena-fuseki-core/src/main/webapp/images/wait30.gif differ

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/index.html b/jena-fuseki2/jena-fuseki-core/src/main/webapp/index.html
new file mode 100644
index 0000000..4f300d1
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/index.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Apache Jena Fuseki</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
+    <link href="css/font-awesome.min.css" rel="stylesheet" media="screen">
+    <link href="css/codemirror.css" rel="stylesheet" media="screen">
+    <link href="css/qonsole.css" rel="stylesheet" media="screen">
+    <link href="css/jquery.dataTables.css" rel="stylesheet" media="screen">
+    <link href="css/fui.css" rel="stylesheet" media="screen">
+
+    <script data-main="js/app/main.index.js" src="js/lib/require.min.js"></script>
+
+    <!--[if lt IE 9]>
+      <script src="js/lib/html5shiv.js"></script>
+      <script src="js/lib/respond.min.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <nav class="navbar navbar-default" role="navigation">
+      <div class="container">
+        <div class="row">
+          <!-- Brand and toggle get grouped for better mobile display -->
+          <div class="navbar-header">
+            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
+              <span class="sr-only">Toggle navigation</span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+              <span class="icon-bar"></span>
+            </button>
+            <a class="navbar-brand" href="index.html">
+              <img src="images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" />
+              <div>Apache<br />Jena<br /><strong>Fuseki</strong></div>
+            </a>
+          </div>
+
+          <!-- Collect the nav links, forms, and other content for toggling -->
+          <div class="collapse navbar-collapse navbar-ex1-collapse">
+            <ul class="nav navbar-nav">
+              <li class="active"><a href="index.html"><i class="fa fa-home"></i></a></li>
+              <li class=""><a href="dataset.html"><i class="fa fa-database"></i> dataset</a></li>
+              <li class=""><a href="manage.html"><i class="fa fa-cogs"></i> manage datasets</a></li>
+              <li class=""><a href="service.html"><i class="fa fa-wrench"></i> services</a></li>
+              <li class=""><a href="documentation.html"><i class="fa fa-info-circle"></i> help</a></li>
+            </ul>
+            <ul class="nav navbar-nav navbar-right">
+              <li class="status-indicator">
+                <div>Server<br />status:</div>
+              </li>
+              <li class="status-indicator">
+                <a class="" href="admin/server-log.html" id="server-status-light" title="current server status">
+                  <span class="server-up"></span>
+                </a>
+              </li>
+            </ul>
+          </div><!-- /.navbar-collapse -->
+        </div><!-- /row -->
+      </div><!-- /container -->
+    </nav>
+
+    <div class="container">
+      <div class="row">
+        <div class="col-md-12">
+          <h1 class="text-center">Apache Jena Fuseki</h1>
+          <div class="text-muted text-center">
+            <small class='host-details'></small>
+          </div>
+        </div>
+      </div>
+
+      <div class="row current-datasets">
+        <div class="col-md-12">
+          <h2>
+            Datasets on this server
+          </h2>
+          <div id="dataset-selection-list"></div>
+        </div>
+      </div>
+
+      <div class="row">
+        <div class="bg-info col-md-12">
+          <p><i class="fa fa-info-circle"></i> Use the following pages to perform actions or tasks on this server:</p>
+          <dl class="dl-horizontal">
+            <dt><a href="query.html">SPARQL query form</a></dt>
+            <dd>to run a SPARQL query against one of the active datasets hosted by this server</dd>
+            <dt><a href="validation.html">validate</a></dt>
+            <dd>to validate SPARQL query syntax, or RDF data syntax</dd>
+            <dt><a href="admin/index.html">administer</a></dt>
+            <dd>to administer the datasets on this server, including adding and removing datasets,
+                enabling data services, uploading data and performing backups. </dd>
+            <dt><a href="documentation.html">logs</a></dt>
+            <dd>to view server log files</dd>
+            <dt><a href="documentation.html">help</a></dt>
+            <dd>for a summary of commands, and links to online documentation</dd>
+
+          </dl>
+        </div>
+      </div>
+    </div>
+
+  </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/.svnkeep
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/.svnkeep b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/.svnkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/dataset-controller.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/dataset-controller.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/dataset-controller.js
new file mode 100644
index 0000000..4080c84
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/dataset-controller.js
@@ -0,0 +1,69 @@
+/** Controller for the dataset.html page */
+
+define(
+  function( require ) {
+
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        DatasetSelectorView = require( "app/views/dataset-selector" ),
+        TabbedViewManagerView = require( "app/views/tabbed-view-manager" ),
+        FileUploadView = require( "app/views/file-upload" ),
+        DatasetInfoView = require( "app/views/dataset-info" ),
+        DatasetEditView = require( "app/views/dataset-edit" ),
+        QueryController = require( "app/controllers/query-controller" ),
+        UploadController = require( "app/controllers/upload-controller" );
+
+    var DatasetController = function() {
+      this.initEvents();
+    };
+
+    // add the behaviours defined on the controller
+    _.extend( DatasetController.prototype, {
+
+      initEvents: function() {
+        _.bindAll( this, "onServerModelReady", "onDatasetChanged" );
+
+        if (fui.models.fusekiServer && fui.models.fusekiServer.get( "ready" )) {
+          this.onServerModelReady();
+        }
+        else {
+          fui.vent.on( "models.fuseki-server.ready", this.onServerModelReady );
+        }
+
+        fui.vent.on( "dataset.changed", this.onDatasetChanged );
+      },
+
+      /**
+       * When the fuseki server is ready, we can list the initial datasets, and
+       * start the tab manager to manage the tabbed content.
+       **/
+      onServerModelReady: function() {
+        fui.views.datasetSelectorView = new DatasetSelectorView( {model: fui.models.fusekiServer} )
+        fui.views.datasetSelectorView.render();
+
+        fui.views.tabbedViewManagerView = new TabbedViewManagerView();
+        fui.views.tabbedViewManagerView.render();
+
+        fui.controllers.queryController = new QueryController();
+        fui.controllers.uploadController = new UploadController();
+
+      },
+
+      /** Dataset has changed */
+      onDatasetChanged: function( dsName ) {
+        var dataset = fui.models.fusekiServer.dataset( dsName );
+        fui.views.datasetInfoView = new DatasetInfoView( {model: dataset} );
+        fui.views.datasetInfoView.render();
+
+        fui.views.datasetEditView = new DatasetEditView( {model: dataset} );
+        fui.views.datasetEditView.render();
+      }
+
+    } );
+
+    return DatasetController;
+
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/index-controller.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/index-controller.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/index-controller.js
new file mode 100644
index 0000000..8dba423
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/index-controller.js
@@ -0,0 +1,50 @@
+/** Controller for the main index.html page */
+define(
+  function( require ) {
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        sprintf = require( "sprintf" ),
+        DatasetSelectionListView = require( "app/views/dataset-selection-list" );
+
+    var IndexController = function() {
+      this.initEvents();
+    };
+
+    // add the behaviours defined on the controller
+    _.extend( IndexController.prototype, {
+
+      initEvents: function() {
+        _.bindAll( this, "onServerModelReady" );
+        fui.vent.on( "models.fuseki-server.ready", this.onServerModelReady );
+      },
+
+      onServerModelReady: function() {
+        new DatasetSelectionListView( {model: fui.models.fusekiServer} ).render();
+        this.displayVersion();
+      },
+
+      /** Display the fuseki software version */
+      displayVersion: function() {
+        var sd = fui.models.fusekiServer.get( "serverDescription" );
+        var version = sd.version;
+        var uptime = sd.uptime;
+        var s = uptime % 60;
+        var m = Math.floor( (uptime / 60) % 60 );
+        var h = Math.floor( (uptime / (60 * 60)) % 24 );
+        var d = Math.floor( (uptime / (60 * 60 * 24)) );
+
+        var status = sprintf( "Version %s. Uptime: %s %s %dm %02ds",
+                              version,
+                              (d > 0 ? d + "d" : ""),
+                              (h > 0 ? h + "h" : ""),
+                              m, s );
+        $('.host-details').html( status );
+      }
+
+    } );
+
+    return IndexController;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/manage-controller.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/manage-controller.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/manage-controller.js
new file mode 100644
index 0000000..e789844
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/manage-controller.js
@@ -0,0 +1,39 @@
+/** Controller for the admin/data-management.html page */
+define(
+  function( require ) {
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        TabbedViewManagerView = require( "app/views/tabbed-view-manager" ),
+        DatasetSimpleCreateView = require( "app/views/dataset-simple-create" ),
+        DatasetManagementView = require( "app/views/dataset-management" );
+
+    var ManageController = function() {
+      this.initEvents();
+    };
+
+    _.extend( ManageController.prototype, {
+
+      initEvents: function() {
+        _.bindAll( this, "onServerModelReady" );
+        fui.vent.on( "models.fuseki-server.ready", this.onServerModelReady );
+      },
+
+      /** When the fuseki server is ready, we can list the initial datasets */
+      onServerModelReady: function( event ) {
+        fui.views.datasetManagement = new DatasetManagementView( {model: fui.models.fusekiServer} );
+        fui.views.datasetManagement.render();
+
+        fui.views.tabbedViewManagerView = new TabbedViewManagerView();
+        fui.views.tabbedViewManagerView.render();
+
+        fui.views.datasetSimpleCreate = new DatasetSimpleCreateView();
+        fui.views.datasetSimpleCreate.render();
+      }
+
+    } );
+
+    return ManageController;
+  }
+);

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/query-controller.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/query-controller.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/query-controller.js
new file mode 100644
index 0000000..d2fd11b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/controllers/query-controller.js
@@ -0,0 +1,72 @@
+/**
+ * Controller for the embedded Qonsole component.
+ *
+ * Note: unlike some Qonsole installations, the endpoint URL selector dropdown
+ * has been removed in favour of the dataset selector control higher up the page.
+ **/
+
+define(
+  function( require ) {
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "app/fui" ),
+        qonsole = require( "qonsole" ),
+        pageUtils = require( "app/util/page-utils" );
+
+    var QueryController = function() {
+      this.initEvents();
+    };
+
+    // add the behaviours defined on the controller
+    _.extend( QueryController.prototype, {
+
+      initEvents: function() {
+        _.bindAll( this, "onServerModelReady", "onDatasetChanged" );
+
+        if (fui.models.fusekiServer && fui.models.fusekiServer.get( "ready" )) {
+          this.onServerModelReady();
+        }
+        else {
+          fui.vent.on( "models.fuseki-server.ready", this.onServerModelReady );
+        }
+
+        fui.vent.on( "dataset.changed", this.onDatasetChanged );
+      },
+
+      /** Initialise the qonsole component */
+      initQonsole: function( datasetsConfig ) {
+        var qonfig = require( "app/qonsole-config" );
+        qonsole.init( qonfig );
+
+        var dsName = fui.models.fusekiServer.selectedDatasetName();
+        if (dsName) {
+          this.setEndpointURL( dsName );
+        }
+      },
+
+      /** When the fuseki server is ready, we can init the qonsole */
+      onServerModelReady: function( event ) {
+        var fusekiServer = fui.models.fusekiServer;
+        var endpoints = {};
+        var datasets = fusekiServer.datasets();
+
+        this.initQonsole( {} );
+      },
+
+      /** When notified that the selected dataset name has changed, update the endpoint URL */
+      onDatasetChanged: function( dsName ) {
+        this.setEndpointURL( dsName );
+      },
+
+      /** Set the endpoint URL based on the selected dataset name */
+      setEndpointURL: function( dsName ) {
+        var dataset = fui.models.fusekiServer.dataset( dsName );
+        qonsole.setCurrentEndpoint( dataset.queryURL() );
+      }
+
+    } );
+
+    return QueryController;
+  }
+);


[90/93] [abbrv] jena git commit: Format XML.

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/7e256560/jena-iri/src/test/resources/org/apache/jena/iri/test.xml
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/resources/org/apache/jena/iri/test.xml b/jena-iri/src/test/resources/org/apache/jena/iri/test.xml
index e8ab386..62fbe06 100644
--- a/jena-iri/src/test/resources/org/apache/jena/iri/test.xml
+++ b/jena-iri/src/test/resources/org/apache/jena/iri/test.xml
@@ -1,9217 +1,9217 @@
 <!--
-   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
+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
+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.
+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.
 -->
 <UriTests>
-<Resolve>
-<IRI iri='http://host/'>
-<getRawHost value='host'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='host'/>
-<isRootless value='false'/>
-<toString value='http://host/'/>
-<toDisplayString value='‪http://host/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://host/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../foo'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../foo'/>
-<toDisplayString value='‪../foo‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../foo'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='host'/>
-<getRawPath value='/foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='host'/>
-<isRootless value='false'/>
-<toString value='http://host/foo'/>
-<toDisplayString value='‪http://host/foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://host/foo'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value='foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='foo'/>
-<toDisplayString value='‪foo‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='foo'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://host/xyz'>
-<getRawHost value='host'/>
-<getRawPath value='/xyz'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='host'/>
-<isRootless value='false'/>
-<toString value='http://host/xyz'/>
-<toDisplayString value='‪http://host/xyz‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://host/xyz'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../foo'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../foo'/>
-<toDisplayString value='‪../foo‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../foo'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='host'/>
-<getRawPath value='/foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='host'/>
-<isRootless value='false'/>
-<toString value='http://host/foo'/>
-<toDisplayString value='‪http://host/foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://host/foo'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value='foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='foo'/>
-<toDisplayString value='‪foo‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='foo'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='d/z?x=a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='d/z?x=a'/>
-<toDisplayString value='‪d/z?x=a‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='d/z?x=a'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/z?x=a'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/z?x=a'/>
-<violations>
-</violations>
-</Result>
-<Relativize same='true'/>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.com/A'>
-<getRawHost value='example.com'/>
-<getRawPath value='/A'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.com'/>
-<isRootless value='false'/>
-<toString value='http://example.com/A'/>
-<toDisplayString value='‪http://example.com/A‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.com/A'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='example.com'/>
-<getRawPath value='/A'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.com'/>
-<isRootless value='false'/>
-<toString value='http://example.com/A'/>
-<toDisplayString value='‪http://example.com/A‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.com/A'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost value='example.com'/>
-<getRawPath value='/A'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.com'/>
-<isRootless value='false'/>
-<toString value='//example.com/A'/>
-<toDisplayString value='‪//example.com/A‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='//example.com/A'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri=''>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value=''/>
-<toDisplayString value='‪‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value=''/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</Result>
-<Relativize same='true'/>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='.'>
-<getRawHost nullValue='true'/>
-<getRawPath value='.'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='.'/>
-<toDisplayString value='‪.‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='.'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value=''/>
-<toDisplayString value='‪‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value=''/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../../C/D'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../../C/D'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../../C/D'/>
-<toDisplayString value='‪../../C/D‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../../C/D'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/C/D'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/C/D'/>
-<toDisplayString value='‪http://www.example.org/a/b/C/D‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/C/D'/>
-<violations>
-</violations>
-</Result>
-<Relativize same='true'/>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../../c/d/'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../../c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../../c/d/'/>
-<toDisplayString value='‪../../c/d/‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../../c/d/'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value=''/>
-<toDisplayString value='‪‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value=''/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../../c/d/X#bar'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../../c/d/X'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='bar'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../../c/d/X#bar'/>
-<toDisplayString value='‪../../c/d/X#bar‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../../c/d/X#bar'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/X'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='bar'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/X#bar'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/X#bar‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/X#bar'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value='X'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='bar'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='X#bar'/>
-<toDisplayString value='‪X#bar‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='X#bar'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../../c/d/e/f/g/'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../../c/d/e/f/g/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../../c/d/e/f/g/'/>
-<toDisplayString value='‪../../c/d/e/f/g/‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../../c/d/e/f/g/'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/e/f/g/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/e/f/g/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/e/f/g/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/e/f/g/'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value='e/f/g/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='e/f/g/'/>
-<toDisplayString value='‪e/f/g/‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='e/f/g/'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='../../c/d/z?x=a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='../../c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='../../c/d/z?x=a'/>
-<toDisplayString value='‪../../c/d/z?x=a‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='../../c/d/z?x=a'/>
-<violations>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/z?x=a'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/z?x=a'/>
-<violations>
-</violations>
-</Result>
-<Relativize>
-<getRawHost nullValue='true'/>
-<getRawPath value='z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='z?x=a'/>
-<toDisplayString value='‪z?x=a‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='z?x=a'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.example.org./a/b/c/d/'>
-<getRawHost value='www.example.org.'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org.'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org./a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org./a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org./a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://ex.org/../../c/d/z?x=a'>
-<getRawHost value='ex.org'/>
-<getRawPath value='/../../c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='http://ex.org/../../c/d/z?x=a'/>
-<toDisplayString value='‪http://ex.org/../../c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org/../../c/d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='http://ex.org/c/d/z?x=a'/>
-<toDisplayString value='‪http://ex.org/c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org/c/d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</Result>
-<Relativize>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='//ex.org/c/d/z?x=a'/>
-<toDisplayString value='‪//ex.org/c/d/z?x=a‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='//ex.org/c/d/z?x=a'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<IRI iri='http://ex.org./../../c/d/z?x=a'>
-<getRawHost value='ex.org.'/>
-<getRawPath value='/../../c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org.'/>
-<isRootless value='false'/>
-<toString value='http://ex.org./../../c/d/z?x=a'/>
-<toDisplayString value='‪http://ex.org./../../c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org./../../c/d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</IRI>
-<Resolve>
-<IRI iri='http://www.example.org/a/b/c/d/'>
-<getRawHost value='www.example.org'/>
-<getRawPath value='/a/b/c/d/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.example.org'/>
-<isRootless value='false'/>
-<toString value='http://www.example.org/a/b/c/d/'/>
-<toDisplayString value='‪http://www.example.org/a/b/c/d/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.example.org/a/b/c/d/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://ex.org/c/./d/z?x=a'>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/./d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='http://ex.org/c/./d/z?x=a'/>
-<toDisplayString value='‪http://ex.org/c/./d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org/c/./d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='http://ex.org/c/d/z?x=a'/>
-<toDisplayString value='‪http://ex.org/c/d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org/c/d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</Result>
-<Relativize>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='//ex.org/c/d/z?x=a'/>
-<toDisplayString value='‪//ex.org/c/d/z?x=a‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='//ex.org/c/d/z?x=a'/>
-<violations>
-</violations>
-</Relativize>
-</Resolve>
-<IRI iri='http://ex.org/c/./d/z?x=a'>
-<getRawHost value='ex.org'/>
-<getRawPath value='/c/./d/z'/>
-<getPort value='-1'/>
-<getRawQuery value='x=a'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex.org'/>
-<isRootless value='false'/>
-<toString value='http://ex.org/c/./d/z?x=a'/>
-<toDisplayString value='‪http://ex.org/c/./d/z?x=a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex.org/c/./d/z?x=a'/>
-<violations>
-<violation>NON_INITIAL_DOT_SEGMENT</violation>
-</violations>
-</IRI>
-<IRI iri='mailto:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='mailto'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='mailto:'/>
-<toDisplayString value='‪mailto:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='mailto:'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='mailto:?subject=test'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery value='subject=test'/>
-<getScheme value='mailto'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='mailto:?subject=test'/>
-<toDisplayString value='‪mailto:?subject=test‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='mailto:?subject=test'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'>
-<getRawHost nullValue='true'/>
-<getRawPath value='C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'/>
-<toDisplayString value='‪file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:C:%5CDOCUME~1%5Cjjchplb%5CLOCALS~1%5CTemp%5Chedgehog6739.rdf'/>
-<violations>
-<violation>UNWISE_CHARACTER</violation>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-<violation>SCHEME_PATTERN_MATCH_FAILED</violation>
-</violations>
-</IRI>
-<Resolve>
-<IRI iri='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf'>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf'/>
-<toDisplayString value='‪http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test001.rdf'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.org/#André'>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='André'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#André'/>
-<toDisplayString value='‪http://example.org/#André‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andr%C3%A9'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='André'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#André'/>
-<toDisplayString value='‪http://example.org/#André‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andr%C3%A9'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</Result>
-<Relativize>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='André'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='//example.org/#André'/>
-<toDisplayString value='‪//example.org/#André‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='//example.org/#Andr%C3%A9'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf'>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf'/>
-<toDisplayString value='‪http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-charmod-uris/test002.rdf'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.org/#Andr%C3%A9'>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Andr%C3%A9'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#Andr%C3%A9'/>
-<toDisplayString value='‪http://example.org/#Andr%C3%A9‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andr%C3%A9'/>
-<violations>
-<violation>PERCENT</violation>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Andr%C3%A9'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#Andr%C3%A9'/>
-<toDisplayString value='‪http://example.org/#Andr%C3%A9‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andr%C3%A9'/>
-<violations>
-<violation>PERCENT</violation>
-</violations>
-</Result>
-<Relativize>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Andr%C3%A9'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='//example.org/#Andr%C3%A9'/>
-<toDisplayString value='‪//example.org/#Andr%C3%A9‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='//example.org/#Andr%C3%A9'/>
-<violations>
-<violation>PERCENT</violation>
-</violations>
-</Relativize>
-</Resolve>
-<Resolve>
-<IRI iri='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf'>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf'/>
-<toDisplayString value='‪http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='#Dürst'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Dürst'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='#Dürst'/>
-<toDisplayString value='‪#Dürst‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='#D%C3%BCrst'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<Result>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Dürst'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf#Dürst'/>
-<toDisplayString value='‪http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf#Dürst‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf#D%C3%BCrst'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</Result>
-<Relativize same='true'/>
-</Resolve>
-<IRI iri='h^ttp:prop'>
-<getRawHost nullValue='true'/>
-<getRawPath value='prop'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='h^ttp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='h^ttp:prop'/>
-<toDisplayString value='‪h^ttp:prop‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='h%5Ettp:prop'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='h^ttp:title'>
-<getRawHost nullValue='true'/>
-<getRawPath value='title'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='h^ttp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='h^ttp:title'/>
-<toDisplayString value='‪h^ttp:title‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='h%5Ettp:title'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht#tp://jjc3.org/demo.mp3#frag'>
-<getRawHost nullValue='true'/>
-<getRawPath value='ht'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='tp://jjc3.org/demo.mp3#frag'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='ht#tp://jjc3.org/demo.mp3#frag'/>
-<toDisplayString value='‪ht#tp://jjc3.org/demo.mp3#frag‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='ht#tp://jjc3.org/demo.mp3#frag'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='ht^tp:'/>
-<toDisplayString value='‪ht^tp:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp:'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp://www.w3.org/demo.mp3'>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/demo.mp3'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='ht^tp://www.w3.org/demo.mp3'/>
-<toDisplayString value='‪ht^tp://www.w3.org/demo.mp3‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp://www.w3.org/demo.mp3'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp:Foo'>
-<getRawHost nullValue='true'/>
-<getRawPath value='Foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='ht^tp:Foo'/>
-<toDisplayString value='‪ht^tp:Foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp:Foo'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='http:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='http:'/>
-<toDisplayString value='‪http:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http:'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'>
-<getRawHost value='46229EFFE16A9BD60B9F1BE88B2DB047ADDED785'/>
-<getRawPath value='/demo.mp3'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='46229EFFE16A9BD60B9F1BE88B2DB047ADDED785'/>
-<isRootless value='false'/>
-<toString value='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'/>
-<toDisplayString value='‪http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/#Andreĭ'>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Andreĭ'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#Andreĭ'/>
-<toDisplayString value='‪http://example.org/#Andreĭ‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andre%C4%AD'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/#André'>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='André'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/#André'/>
-<toDisplayString value='‪http://example.org/#André‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/#Andr%C3%A9'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/&#9;'>
-<getRawHost value='example.org'/>
-<getRawPath value='/&#9;'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/&#9;'/>
-<toDisplayString value='‪http://example.org/&#9;‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%09'/>
-<violations>
-<violation>CONTROL_CHARACTER</violation>
-<violation>NOT_XML_SCHEMA_WHITESPACE</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/&#xA;&#xA;'>
-<getRawHost value='example.org'/>
-<getRawPath value='/&#xA;&#xA;'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/&#xA;&#xA;'/>
-<toDisplayString value='‪http://example.org/&#xA;&#xA;‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%0A%0A'/>
-<violations>
-<violation>CONTROL_CHARACTER</violation>
-<violation>NOT_XML_SCHEMA_WHITESPACE</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/&#xD;'>
-<getRawHost value='example.org'/>
-<getRawPath value='/&#xD;'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/&#xD;'/>
-<toDisplayString value='‪http://example.org/&#xD;‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%0D'/>
-<violations>
-<violation>CONTROL_CHARACTER</violation>
-<violation>NOT_XML_SCHEMA_WHITESPACE</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/&lt;b&gt;boo'>
-<getRawHost value='example.org'/>
-<getRawPath value='/&lt;b&gt;boo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/&lt;b&gt;boo'/>
-<toDisplayString value='‪http://example.org/&lt;b&gt;boo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%3Cb%3Eboo'/>
-<violations>
-<violation>UNWISE_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/&quot;'>
-<getRawHost value='example.org'/>
-<getRawPath value='/&quot;'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/&quot;'/>
-<toDisplayString value='‪http://example.org/&quot;‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%22'/>
-<violations>
-<violation>UNWISE_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://André.example.org/foo'>
-<getRawHost value='André.example.org'/>
-<getRawPath value='/foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='xn--andr-epa.example.org'/>
-<isRootless value='false'/>
-<toString value='http://André.example.org/foo'/>
-<toDisplayString value='‪http://André.example.org/foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://xn--andr-epa.example.org/foo'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://andré.example.org/foo'>
-<getRawHost value='andré.example.org'/>
-<getRawPath value='/foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='xn--andr-epa.example.org'/>
-<isRootless value='false'/>
-<toString value='http://andré.example.org/foo'/>
-<toDisplayString value='‪http://andré.example.org/foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://xn--andr-epa.example.org/foo'/>
-<violations>
-<violation>NON_URI_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='http://xn--andr--ep-.example.org/foo'>
-<getRawHost value='xn--andr--ep-.example.org'/>
-<getRawPath value='/foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost exception='Bad Internationalized Domain Name: Has leading or trailing hyphen'/>
-<isRootless value='false'/>
-<toString value='http://xn--andr--ep-.example.org/foo'/>
-<toDisplayString value='‪http://xn--andr--ep-.example.org/foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString exception='Bad Internationalized Domain Name: Has leading or trailing hyphen'/>
-<violations>
-<violation>DOUBLE_DASH_IN_REG_NAME</violation>
-<violation>DNS_LABEL_DASH_START_OR_END</violation>
-<violation>BAD_IDN</violation>
-</violations>
-</IRI>
-<IRI iri='Http://example.org/'>
-<getRawHost value='example.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='Http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='Http://example.org/'/>
-<toDisplayString value='‪Http://example.org/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='Http://example.org/'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='Http://example.org/prop'>
-<getRawHost value='example.org'/>
-<getRawPath value='/prop'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='Http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='Http://example.org/prop'/>
-<toDisplayString value='‪Http://example.org/prop‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='Http://example.org/prop'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='NC:ispinfo'>
-<getRawHost nullValue='true'/>
-<getRawPath value='ispinfo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='NC'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='NC:ispinfo'/>
-<toDisplayString value='‪NC:ispinfo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='NC:ispinfo'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='NC:trickMe'>
-<getRawHost nullValue='true'/>
-<getRawPath value='trickMe'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='NC'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='NC:trickMe'/>
-<toDisplayString value='‪NC:trickMe‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='NC:trickMe'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='_:a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='a'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='_'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='_:a'/>
-<toDisplayString value='‪_:a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='_:a'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='_:aa'>
-<getRawHost nullValue='true'/>
-<getRawPath value='aa'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='_'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='_:aa'/>
-<toDisplayString value='‪_:aa‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='_:aa'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='app://calendar/event'>
-<getRawHost value='calendar'/>
-<getRawPath value='/event'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='app'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='calendar'/>
-<isRootless value='false'/>
-<toString value='app://calendar/event'/>
-<toDisplayString value='‪app://calendar/event‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='app://calendar/event'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='chrome://messenger/content/mailPrefsOverlay.xul'>
-<getRawHost value='messenger'/>
-<getRawPath value='/content/mailPrefsOverlay.xul'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='chrome'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='messenger'/>
-<isRootless value='false'/>
-<toString value='chrome://messenger/content/mailPrefsOverlay.xul'/>
-<toDisplayString value='‪chrome://messenger/content/mailPrefsOverlay.xul‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='chrome://messenger/content/mailPrefsOverlay.xul'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='domain:a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='a'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='domain'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='domain:a'/>
-<toDisplayString value='‪domain:a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='domain:a'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='domain:aol.com'>
-<getRawHost nullValue='true'/>
-<getRawPath value='aol.com'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='domain'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='domain:aol.com'/>
-<toDisplayString value='‪domain:aol.com‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='domain:aol.com'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='eh:/'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='eh:/'/>
-<toDisplayString value='‪eh:/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh:/'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='eh://'>
-<getRawHost value=''/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='eh://'/>
-<toDisplayString value='‪eh://‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh://'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='eh://R'>
-<getRawHost value='R'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='R'/>
-<isRootless value='false'/>
-<toString value='eh://R'/>
-<toDisplayString value='‪eh://R‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh://R'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='eh:/O'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/O'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='eh:/O'/>
-<toDisplayString value='‪eh:/O‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh:/O'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='eh:/a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/a'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='eh:/a'/>
-<toDisplayString value='‪eh:/a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh:/a'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='eh:/bark'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/bark'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='eh'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='eh:/bark'/>
-<toDisplayString value='‪eh:/bark‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='eh:/bark'/>
-<violations>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='file:///C:/Documents and Settings/jjchplb/Local Settings/Temp/test-load-with-41.rdf'>
-<getRawHost value=''/>
-<getRawPath value='/C:/Documents and Settings/jjchplb/Local Settings/Temp/test-load-with-41.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///C:/Documents and Settings/jjchplb/Local Settings/Temp/test-load-with-41.rdf'/>
-<toDisplayString value='‪file:///C:/Documents and Settings/jjchplb/Local Settings/Temp/test-load-with-41.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///C:/Documents%20and%20Settings/jjchplb/Local%20Settings/Temp/test-load-with-41.rdf'/>
-<violations>
-<violation>WHITESPACE</violation>
-</violations>
-</IRI>
-<IRI iri='file:///C:/eclipse/workspace/jena2/testing/ARQ/Construct/reif-result-1.rdf'>
-<getRawHost value=''/>
-<getRawPath value='/C:/eclipse/workspace/jena2/testing/ARQ/Construct/reif-result-1.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///C:/eclipse/workspace/jena2/testing/ARQ/Construct/reif-result-1.rdf'/>
-<toDisplayString value='‪file:///C:/eclipse/workspace/jena2/testing/ARQ/Construct/reif-result-1.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///C:/eclipse/workspace/jena2/testing/ARQ/Construct/reif-result-1.rdf'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///test01'>
-<getRawHost value=''/>
-<getRawPath value='/test01'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///test01'/>
-<toDisplayString value='‪file:///test01‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///test01'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///test02'>
-<getRawHost value=''/>
-<getRawPath value='/test02'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///test02'/>
-<toDisplayString value='‪file:///test02‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///test02'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///test03'>
-<getRawHost value=''/>
-<getRawPath value='/test03'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///test03'/>
-<toDisplayString value='‪file:///test03‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///test03'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///test04'>
-<getRawHost value=''/>
-<getRawPath value='/test04'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///test04'/>
-<toDisplayString value='‪file:///test04‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///test04'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///test05'>
-<getRawHost value=''/>
-<getRawPath value='/test05'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///test05'/>
-<toDisplayString value='‪file:///test05‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///test05'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:///testutf8'>
-<getRawHost value=''/>
-<getRawPath value='/testutf8'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value=''/>
-<isRootless value='false'/>
-<toString value='file:///testutf8'/>
-<toDisplayString value='‪file:///testutf8‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:///testutf8'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='file:/C:/a'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/C:/a'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='file:/C:/a'/>
-<toDisplayString value='‪file:/C:/a‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:/C:/a'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:/C:/orel/orel0_5.owl#'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/C:/orel/orel0_5.owl'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value=''/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='file:/C:/orel/orel0_5.owl#'/>
-<toDisplayString value='‪file:/C:/orel/orel0_5.owl#‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:/C:/orel/orel0_5.owl#'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:/C:/orel/orel0_5.owl#Agent'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/C:/orel/orel0_5.owl'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Agent'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='file:/C:/orel/orel0_5.owl#Agent'/>
-<toDisplayString value='‪file:/C:/orel/orel0_5.owl#Agent‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:/C:/orel/orel0_5.owl#Agent'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:/C:/orel/orel0_5.owl'>
-<getRawHost nullValue='true'/>
-<getRawPath value='/C:/orel/orel0_5.owl'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='file:/C:/orel/orel0_5.owl'/>
-<toDisplayString value='‪file:/C:/orel/orel0_5.owl‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:/C:/orel/orel0_5.owl'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'>
-<getRawHost nullValue='true'/>
-<getRawPath value='C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf'/>
-<toDisplayString value='‪file:C:\DOCUME~1\jjchplb\LOCALS~1\Temp\hedgehog6739.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:C:%5CDOCUME~1%5Cjjchplb%5CLOCALS~1%5CTemp%5Chedgehog6739.rdf'/>
-<violations>
-<violation>UNWISE_CHARACTER</violation>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-<violation>SCHEME_PATTERN_MATCH_FAILED</violation>
-</violations>
-</IRI>
-<IRI iri='file:doc/inference/data/owlDemoSchema.xml'>
-<getRawHost nullValue='true'/>
-<getRawPath value='doc/inference/data/owlDemoSchema.xml'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:doc/inference/data/owlDemoSchema.xml'/>
-<toDisplayString value='‪file:doc/inference/data/owlDemoSchema.xml‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:doc/inference/data/owlDemoSchema.xml'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:etc/ont-policy-test.rdf'>
-<getRawHost nullValue='true'/>
-<getRawPath value='etc/ont-policy-test.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:etc/ont-policy-test.rdf'/>
-<toDisplayString value='‪file:etc/ont-policy-test.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:etc/ont-policy-test.rdf'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:testing/ontology/list5.rdf#e'>
-<getRawHost nullValue='true'/>
-<getRawPath value='testing/ontology/list5.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='e'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:testing/ontology/list5.rdf#e'/>
-<toDisplayString value='‪file:testing/ontology/list5.rdf#e‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:testing/ontology/list5.rdf#e'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='file:vocabularies/rdf-schema.rdf'>
-<getRawHost nullValue='true'/>
-<getRawPath value='vocabularies/rdf-schema.rdf'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='file'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='file:vocabularies/rdf-schema.rdf'/>
-<toDisplayString value='‪file:vocabularies/rdf-schema.rdf‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='file:vocabularies/rdf-schema.rdf'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='ftp://net.fred.org/'>
-<getRawHost value='net.fred.org'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ftp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='net.fred.org'/>
-<isRootless value='false'/>
-<toString value='ftp://net.fred.org/'/>
-<toDisplayString value='‪ftp://net.fred.org/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ftp://net.fred.org/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='ftp://net.fred.org/P'>
-<getRawHost value='net.fred.org'/>
-<getRawPath value='/P'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ftp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='net.fred.org'/>
-<isRootless value='false'/>
-<toString value='ftp://net.fred.org/P'/>
-<toDisplayString value='‪ftp://net.fred.org/P‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ftp://net.fred.org/P'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='ftp:ftp/'>
-<getRawHost nullValue='true'/>
-<getRawPath value='ftp/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ftp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='ftp:ftp/'/>
-<toDisplayString value='‪ftp:ftp/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ftp:ftp/'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='ftp:ftp/P'>
-<getRawHost nullValue='true'/>
-<getRawPath value='ftp/P'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ftp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='ftp:ftp/P'/>
-<toDisplayString value='‪ftp:ftp/P‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ftp:ftp/P'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='h^ttp:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='h^ttp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='h^ttp:'/>
-<toDisplayString value='‪h^ttp:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='h%5Ettp:'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='h^ttp:prop'>
-<getRawHost nullValue='true'/>
-<getRawPath value='prop'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='h^ttp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='h^ttp:prop'/>
-<toDisplayString value='‪h^ttp:prop‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='h%5Ettp:prop'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='h^ttp:title'>
-<getRawHost nullValue='true'/>
-<getRawPath value='title'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='h^ttp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='h^ttp:title'/>
-<toDisplayString value='‪h^ttp:title‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='h%5Ettp:title'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht#tp://jjc3.org/demo.mp3#frag'>
-<getRawHost nullValue='true'/>
-<getRawPath value='ht'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme nullValue='true'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='tp://jjc3.org/demo.mp3#frag'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='ht#tp://jjc3.org/demo.mp3#frag'/>
-<toDisplayString value='‪ht#tp://jjc3.org/demo.mp3#frag‬'/>
-<isAbsolute value='false'/>
-<isRelative value='true'/>
-<toASCIIString value='ht#tp://jjc3.org/demo.mp3#frag'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='ht^tp:'/>
-<toDisplayString value='‪ht^tp:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp:'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp://www.w3.org/demo.mp3'>
-<getRawHost value='www.w3.org'/>
-<getRawPath value='/demo.mp3'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='www.w3.org'/>
-<isRootless value='false'/>
-<toString value='ht^tp://www.w3.org/demo.mp3'/>
-<toDisplayString value='‪ht^tp://www.w3.org/demo.mp3‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp://www.w3.org/demo.mp3'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='ht^tp:Foo'>
-<getRawHost nullValue='true'/>
-<getRawPath value='Foo'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='ht^tp'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='true'/>
-<toString value='ht^tp:Foo'/>
-<toDisplayString value='‪ht^tp:Foo‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='ht%5Etp:Foo'/>
-<violations>
-<violation>ILLEGAL_CHARACTER</violation>
-<violation>UNREGISTERED_IANA_SCHEME</violation>
-</violations>
-</IRI>
-<IRI iri='http:'>
-<getRawHost nullValue='true'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost nullValue='true'/>
-<isRootless value='false'/>
-<toString value='http:'/>
-<toDisplayString value='‪http:‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http:'/>
-<violations>
-<violation>REQUIRED_COMPONENT_MISSING</violation>
-</violations>
-</IRI>
-<IRI iri='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'>
-<getRawHost value='46229EFFE16A9BD60B9F1BE88B2DB047ADDED785'/>
-<getRawPath value='/demo.mp3'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='46229EFFE16A9BD60B9F1BE88B2DB047ADDED785'/>
-<isRootless value='false'/>
-<toString value='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'/>
-<toDisplayString value='‪http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://46229EFFE16A9BD60B9F1BE88B2DB047ADDED785/demo.mp3'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='http://NoHTML.example.org'>
-<getRawHost value='NoHTML.example.org'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='NoHTML.example.org'/>
-<isRootless value='false'/>
-<toString value='http://NoHTML.example.org'/>
-<toDisplayString value='‪http://NoHTML.example.org‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://NoHTML.example.org'/>
-<violations>
-<violation>LOWERCASE_PREFERRED</violation>
-</violations>
-</IRI>
-<IRI iri='http://a.com/ontology#'>
-<getRawHost value='a.com'/>
-<getRawPath value='/ontology'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value=''/>
-<getASCIIHost value='a.com'/>
-<isRootless value='false'/>
-<toString value='http://a.com/ontology#'/>
-<toDisplayString value='‪http://a.com/ontology#‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://a.com/ontology#'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://a.com/ontology'>
-<getRawHost value='a.com'/>
-<getRawPath value='/ontology'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='a.com'/>
-<isRootless value='false'/>
-<toString value='http://a.com/ontology'/>
-<toDisplayString value='‪http://a.com/ontology‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://a.com/ontology'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://aldabaran.hpl.hp.com/rdftest/test18/'>
-<getRawHost value='aldabaran.hpl.hp.com'/>
-<getRawPath value='/rdftest/test18/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='aldabaran.hpl.hp.com'/>
-<isRootless value='false'/>
-<toString value='http://aldabaran.hpl.hp.com/rdftest/test18/'/>
-<toDisplayString value='‪http://aldabaran.hpl.hp.com/rdftest/test18/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://aldabaran.hpl.hp.com/rdftest/test18/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://bar.com/irrelevant'>
-<getRawHost value='bar.com'/>
-<getRawPath value='/irrelevant'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='bar.com'/>
-<isRootless value='false'/>
-<toString value='http://bar.com/irrelevant'/>
-<toDisplayString value='‪http://bar.com/irrelevant‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://bar.com/irrelevant'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://decsai.ugr.es/~ontoserver/bacarex2.owl#'>
-<getRawHost value='decsai.ugr.es'/>
-<getRawPath value='/~ontoserver/bacarex2.owl'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value=''/>
-<getASCIIHost value='decsai.ugr.es'/>
-<isRootless value='false'/>
-<toString value='http://decsai.ugr.es/~ontoserver/bacarex2.owl#'/>
-<toDisplayString value='‪http://decsai.ugr.es/~ontoserver/bacarex2.owl#‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://decsai.ugr.es/~ontoserver/bacarex2.owl#'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://decsai.ugr.es/~ontoserver/bacarex2.owl#Importance'>
-<getRawHost value='decsai.ugr.es'/>
-<getRawPath value='/~ontoserver/bacarex2.owl'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='Importance'/>
-<getASCIIHost value='decsai.ugr.es'/>
-<isRootless value='false'/>
-<toString value='http://decsai.ugr.es/~ontoserver/bacarex2.owl#Importance'/>
-<toDisplayString value='‪http://decsai.ugr.es/~ontoserver/bacarex2.owl#Importance‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://decsai.ugr.es/~ontoserver/bacarex2.owl#Importance'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://desc'>
-<getRawHost value='desc'/>
-<getRawPath value=''/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='desc'/>
-<isRootless value='false'/>
-<toString value='http://desc'/>
-<toDisplayString value='‪http://desc‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://desc'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://dickinson-i-4/daml/tests/test-add-0.daml#'>
-<getRawHost value='dickinson-i-4'/>
-<getRawPath value='/daml/tests/test-add-0.daml'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value=''/>
-<getASCIIHost value='dickinson-i-4'/>
-<isRootless value='false'/>
-<toString value='http://dickinson-i-4/daml/tests/test-add-0.daml#'/>
-<toDisplayString value='‪http://dickinson-i-4/daml/tests/test-add-0.daml#‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://dickinson-i-4/daml/tests/test-add-0.daml#'/>
-<violations>
-<violation>DOUBLE_DASH_IN_REG_NAME</violation>
-</violations>
-</IRI>
-<IRI iri='http://dickinson-i-4/daml/tests/test-add-0.daml#TestClass'>
-<getRawHost value='dickinson-i-4'/>
-<getRawPath value='/daml/tests/test-add-0.daml'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment value='TestClass'/>
-<getASCIIHost value='dickinson-i-4'/>
-<isRootless value='false'/>
-<toString value='http://dickinson-i-4/daml/tests/test-add-0.daml#TestClass'/>
-<toDisplayString value='‪http://dickinson-i-4/daml/tests/test-add-0.daml#TestClass‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://dickinson-i-4/daml/tests/test-add-0.daml#TestClass'/>
-<violations>
-<violation>DOUBLE_DASH_IN_REG_NAME</violation>
-</violations>
-</IRI>
-<IRI iri='http://domain/S'>
-<getRawHost value='domain'/>
-<getRawPath value='/S'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='domain'/>
-<isRootless value='false'/>
-<toString value='http://domain/S'/>
-<toDisplayString value='‪http://domain/S‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://domain/S'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://eg.com/'>
-<getRawHost value='eg.com'/>
-<getRawPath value='/'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='eg.com'/>
-<isRootless value='false'/>
-<toString value='http://eg.com/'/>
-<toDisplayString value='‪http://eg.com/‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://eg.com/'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://ex/dt'>
-<getRawHost value='ex'/>
-<getRawPath value='/dt'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='ex'/>
-<isRootless value='false'/>
-<toString value='http://ex/dt'/>
-<toDisplayString value='‪http://ex/dt‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://ex/dt'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.com/A'>
-<getRawHost value='example.com'/>
-<getRawPath value='/A'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.com'/>
-<isRootless value='false'/>
-<toString value='http://example.com/A'/>
-<toDisplayString value='‪http://example.com/A‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.com/A'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.com/test0'>
-<getRawHost value='example.com'/>
-<getRawPath value='/test0'/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.com'/>
-<isRootless value='false'/>
-<toString value='http://example.com/test0'/>
-<toDisplayString value='‪http://example.com/test0‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.com/test0'/>
-<violations>
-</violations>
-</IRI>
-<IRI iri='http://example.org/    '>
-<getRawHost value='example.org'/>
-<getRawPath value='/    '/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserinfo nullValue='true'/>
-<getRawFragment nullValue='true'/>
-<getASCIIHost value='example.org'/>
-<isRootless value='false'/>
-<toString value='http://example.org/    '/>
-<toDisplayString value='‪http://example.org/    ‬'/>
-<isAbsolute value='true'/>
-<isRelative value='false'/>
-<toASCIIString value='http://example.org/%20%20%20%20'/>
-<violations>
-<violation>DOUBLE_WHITESPACE</violation>
-</violations>
-</IRI>
-<IRI iri='http://example.org/   '>
-<getRawHost value='example.org'/>
-<getRawPath value='/   '/>
-<getPort value='-1'/>
-<getRawQuery nullValue='true'/>
-<getScheme value='http'/>
-<getRawUserin

<TRUNCATED>

[14/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js
new file mode 100644
index 0000000..6cf3527
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/yasqe.min.js
@@ -0,0 +1,5 @@
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i;"undefined"!=typeof window?i=window:"undefined"!=typeof global?i=global:"undefined"!=typeof self&&(i=self),i.YASQE=e()}}(function(){var e;return function i(e,r,n){function o(s,a){if(!r[s]){if(!e[s]){var p="function"==typeof require&&require;if(!a&&p)return p(s,!0);if(t)return t(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var E=r[s]={exports:{}};e[s][0].call(E.exports,function(i){var r=e[s][1][i];return o(r?r:i)},E,E.exports,i,e,r,n)}return r[s].exports}for(var t="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,i){i.exports=e("./main.js")},{"./main.js":28}],2:[function(e){"use strict";var i=function(){try{return e("jquery")}catch(i){return window.jQuery}}();i.deparam=function(e,r){var n={},o={"true":!0,"false":!1,"null":null};i.each(e.replace(/\+/g,
 " ").split("&"),function(e,t){var s,a=t.split("="),p=decodeURIComponent(a[0]),l=n,E=0,u=p.split("]["),c=u.length-1;if(/\[/.test(u[0])&&/\]$/.test(u[c])){u[c]=u[c].replace(/\]$/,"");u=u.shift().split("[").concat(u);c=u.length-1}else c=0;if(2===a.length){s=decodeURIComponent(a[1]);r&&(s=s&&!isNaN(s)?+s:"undefined"===s?void 0:void 0!==o[s]?o[s]:s);if(c)for(;c>=E;E++){p=""===u[E]?l.length:u[E];l=l[p]=c>E?l[p]||(u[E+1]&&isNaN(u[E+1])?{}:[]):s}else i.isArray(n[p])?n[p].push(s):n[p]=void 0!==n[p]?[n[p],s]:s}else p&&(n[p]=r?void 0:"")});return n}},{jquery:void 0}],3:[function(i,r,n){(function(o){"object"==typeof n&&"object"==typeof r?o(function(){try{return i("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["codemirror"],o):o(CodeMirror)})(function(e){"use strict";e.defineMode("sparql11",function(e){function i(){var e,i,r="<[^<>\"'|{}^\\\x00- ]*>",n="[A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\
 u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]",o=n+"|_",t="("+o+"|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])",s="("+o+"|[0-9])("+o+"|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])*",a="\\?"+s,p="\\$"+s,E="("+n+")((("+t+")|\\.)*("+t+"))?",u="[0-9A-Fa-f]",c="(%"+u+u+")",d="(\\\\[_~\\.\\-!\\$&'\\(\\)\\*\\+,;=/\\?#@%])",N="("+c+"|"+d+")";if("sparql11"==l){e="("+o+"|:|[0-9]|"+N+")(("+t+"|\\.|:|"+N+")*("+t+"|:|"+N+"))?";i="_:("+o+"|[0-9])(("+t+"|\\.)*"+t+")?"}else{e="("+o+"|[0-9])((("+t+")|\\.)*("+t+"))?";i="_:"+e}var I="("+E+")?:",x=I+e,m="@[a-zA-Z]+(-[a-zA-Z0-9]+)*",L="[eE][\\+-]?[0-9]+",T="[0-9]+",A="(([0-9]+\\.[0-9]*)|(\\.[0-9]+))",g="(([0-9]+\\.[0-9]*"+L+")|(\\.[0-9]+"+L+")|([0-9]+"+L+"))",S="\\+"+T,R="\\+"+A,v="\\+"+g,h="-"+T,C="-"+A,f="-"+g,O="\\\\[tbnrf\\\\\"']",y="'(([^\\x27\\x5C\\x0A\\x0D])|"+O+")*'",P='"(([^\\x22\\x5C\\x0A\\x0D])|'+O+')*"',_="'''(('|'')?([^'\\\\]|"+O+"))*'''",D='"""(("|"")?([^"\\\\]|'+O+'))*"""',G="[\\x20\\x09\\x0D\\x0A]",b="#([^\\n\\r]*[\\
 n\\r]|[^\\n\\r]*$)",M="("+G+"|("+b+"))*",U="\\("+M+"\\)",V="\\["+M+"\\]",B={terminal:[{name:"WS",regex:new RegExp("^"+G+"+"),style:"ws"},{name:"COMMENT",regex:new RegExp("^"+b),style:"comment"},{name:"IRI_REF",regex:new RegExp("^"+r),style:"variable-3"},{name:"VAR1",regex:new RegExp("^"+a),style:"atom"},{name:"VAR2",regex:new RegExp("^"+p),style:"atom"},{name:"LANGTAG",regex:new RegExp("^"+m),style:"meta"},{name:"DOUBLE",regex:new RegExp("^"+g),style:"number"},{name:"DECIMAL",regex:new RegExp("^"+A),style:"number"},{name:"INTEGER",regex:new RegExp("^"+T),style:"number"},{name:"DOUBLE_POSITIVE",regex:new RegExp("^"+v),style:"number"},{name:"DECIMAL_POSITIVE",regex:new RegExp("^"+R),style:"number"},{name:"INTEGER_POSITIVE",regex:new RegExp("^"+S),style:"number"},{name:"DOUBLE_NEGATIVE",regex:new RegExp("^"+f),style:"number"},{name:"DECIMAL_NEGATIVE",regex:new RegExp("^"+C),style:"number"},{name:"INTEGER_NEGATIVE",regex:new RegExp("^"+h),style:"number"},{name:"STRING_LITERAL_LONG1",reg
 ex:new RegExp("^"+_),style:"string"},{name:"STRING_LITERAL_LONG2",regex:new RegExp("^"+D),style:"string"},{name:"STRING_LITERAL1",regex:new RegExp("^"+y),style:"string"},{name:"STRING_LITERAL2",regex:new RegExp("^"+P),style:"string"},{name:"NIL",regex:new RegExp("^"+U),style:"punc"},{name:"ANON",regex:new RegExp("^"+V),style:"punc"},{name:"PNAME_LN",regex:new RegExp("^"+x),style:"string-2"},{name:"PNAME_NS",regex:new RegExp("^"+I),style:"string-2"},{name:"BLANK_NODE_LABEL",regex:new RegExp("^"+i),style:"string-2"}]};return B}function r(e){var i=[],r=t[e];if(void 0!=r)for(var n in r)i.push(n.toString());else i.push(e);return i}function n(e,i){function n(){for(var i=null,r=0;r<d.length;++r){i=e.match(d[r].regex,!0,!1);if(i)return{cat:d[r].name,style:d[r].style,text:i[0]}}i=e.match(s,!0,!1);if(i)return{cat:e.current().toUpperCase(),style:"keyword",text:i[0]};i=e.match(a,!0,!1);if(i)return{cat:e.current(),style:"punc",text:i[0]};i=e.match(/^.[A-Za-z0-9]*/,!0,!1);return{cat:"<invalid_tok
 en>",style:"error",text:i[0]}}function o(){var r=e.column();i.errorStartPos=r;i.errorEndPos=r+u.text.length}function p(e){null==i.queryType&&("SELECT"==e||"CONSTRUCT"==e||"ASK"==e||"DESCRIBE"==e||"INSERT"==e||"DELETE"==e||"LOAD"==e||"CLEAR"==e||"CREATE"==e||"DROP"==e||"COPY"==e||"MOVE"==e||"ADD"==e)&&(i.queryType=e)}function l(e){"disallowVars"==e?i.allowVars=!1:"allowVars"==e?i.allowVars=!0:"disallowBnodes"==e?i.allowBnodes=!1:"allowBnodes"==e?i.allowBnodes=!0:"storeProperty"==e&&(i.storeProperty=!0)}function E(e){return(i.allowVars||"var"!=e)&&(i.allowBnodes||"blankNode"!=e&&"blankNodePropertyList"!=e&&"blankNodePropertyListPath"!=e)}0==e.pos&&(i.possibleCurrent=i.possibleNext);var u=n();if("<invalid_token>"==u.cat){if(1==i.OK){i.OK=!1;o()}i.complete=!1;return u.style}if("WS"==u.cat||"COMMENT"==u.cat){i.possibleCurrent=i.possibleNext;return u.style}for(var c,N=!1,I=u.cat;i.stack.length>0&&I&&i.OK&&!N;){c=i.stack.pop();if(t[c]){var x=t[c][I];if(void 0!=x&&E(c)){for(var m=x.length-1
 ;m>=0;--m)i.stack.push(x[m]);l(c)}else{i.OK=!1;i.complete=!1;o();i.stack.push(c)}}else if(c==I){N=!0;p(c);for(var L=!0,T=i.stack.length;T>0;--T){var A=t[i.stack[T-1]];A&&A.$||(L=!1)}i.complete=L;if(i.storeProperty&&"punc"!=I.cat){i.lastProperty=u.text;i.storeProperty=!1}}else{i.OK=!1;i.complete=!1;o()}}if(!N&&i.OK){i.OK=!1;i.complete=!1;o()}i.possibleCurrent=i.possibleNext;i.possibleNext=r(i.stack[i.stack.length-1]);return u.style}function o(i,r){var n=0,o=i.stack.length-1;if(/^[\}\]\)]/.test(r)){for(var t=r.substr(0,1);o>=0;--o)if(i.stack[o]==t){--o;break}}else{var s=N[i.stack[o]];if(s){n+=s;--o}}for(;o>=0;--o){var s=I[i.stack[o]];s&&(n+=s)}return n*e.indentUnit}var t=(e.indentUnit,{"*[&&,valueLogical]":{"&&":["[&&,valueLogical]","*[&&,valueLogical]"],AS:[],")":[],",":[],"||":[],";":[]},"*[,,expression]":{",":["[,,expression]","*[,,expression]"],")":[]},"*[,,objectPath]":{",":["[,,objectPath]","*[,,objectPath]"],".":[],";":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],F
 ILTER:[],BIND:[],VALUES:[],"}":[]},"*[,,object]":{",":["[,,object]","*[,,object]"],".":[],";":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[/,pathEltOrInverse]":{"/":["[/,pathEltOrInverse]","*[/,pathEltOrInverse]"],"|":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[;,?[or([verbPath,verbSimple]),objectList]]":{";":["[;,?[or([verbPath,verbSimple]),objectList]]","*[;,?[or([verbPath,verbSimple]),objectList]]"],".":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[;,?[verb,objectList]]":{";":["[;,?[verb,objectList]]","*[;,?[verb,objectList]]"],".":[],"]":[],"}":[],GRAPH:[],"{":
 [],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[UNION,groupGraphPattern]":{UNION:["[UNION,groupGraphPattern]","*[UNION,groupGraphPattern]"],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[graphPatternNotTriples,?.,?triplesBlock]":{"{":["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["[graphPatternNotTriples,?.,?triplesBlock]","*[gr
 aphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":[]},"*[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["[quadsNotTriples,?.,?triplesTemplate]","*[quadsNotTriples,?.,?triplesTemplate]"],"}":[]},"*[|,pathOneInPropertySet]":{"|":["[|,pathOneInPropertySet]","*[|,pathOneInPropertySet]"],")":[]},"*[|,pathSequence]":{"|":["[|,pathSequence]","*[|,pathSequence]"],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSI
 TIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[||,conditionalAndExpression]":{"||":["[||,conditionalAndExpression]","*[||,conditionalAndExpression]"],AS:[],")":[],",":[],";":[]},"*dataBlockValue":{UNDEF:["dataBlockValue","*dataBlockValue"],IRI_REF:["dataBlockValue","*dataBlockValue"],TRUE:["dataBlockValue","*dataBlockValue"],FALSE:["dataBlockValue","*dataBlockValue"],PNAME_LN:["dataBlockValue","*dataBlockValue"],PNAME_NS:["dataBlockValue","*dataBlockValue"],STRING_LITERAL1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL2:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG2:["dataBlockValue","*dataBlockValue"],INTEGER:["dataBlockValue","*dataBlockValue"],DECIMAL:["dataBlockValue","*dataBlockValue"],DOUBLE:["dataBlockValue","*dataBlockValue"],INTEGER_POSITIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_POSITIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_P
 OSITIVE:["dataBlockValue","*dataBlockValue"],INTEGER_NEGATIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_NEGATIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_NEGATIVE:["dataBlockValue","*dataBlockValue"],"}":[],")":[]},"*datasetClause":{FROM:["datasetClause","*datasetClause"],WHERE:[],"{":[]},"*describeDatasetClause":{FROM:["describeDatasetClause","*describeDatasetClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],VALUES:[],$:[]},"*graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","
 *graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"],")":[]},"*graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNod
 ePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"],")":[]},"*groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCond
 ition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"
 ],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondit
 ion"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"*havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCond
 ition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],S
 HA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","
 *havingCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"*or([[ (,*dataBlockValue,)],NIL])":{"(":["or([[ (,*dataBlockValue,)],NIL])","*or([[ (,*dataBlockValue,)],NIL])"],NIL:["or([[ (,*dataBlockValue,)],NIL])","*or([[ (,*dataBlockValue,)],NIL])"],"}":[]},"*or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],";":[]},"*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[
 or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["or([[+,mult
 iplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpre
 ssion],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"*or([var,[ (,expression,AS,var,)]])":{"(":["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR1:["or([var,[ (,expression,AS,v
 ar,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR2:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],WHERE:[],"{":[],FROM:[]},"*orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["order
 Condition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"
 ],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"*prefixDecl":{PREFIX:["prefixDecl","*prefixDecl"],$:[],CONSTRUCT:
 [],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[]},"*usingClause":{USING:["usingClause","*usingClause"],WHERE:[]},"*var":{VAR1:["var","*var"],VAR2:["var","*var"],")":[]},"*varOrIRIref":{VAR1:["varOrIRIref","*varOrIRIref"],VAR2:["varOrIRIref","*varOrIRIref"],IRI_REF:["varOrIRIref","*varOrIRIref"],PNAME_LN:["varOrIRIref","*varOrIRIref"],PNAME_NS:["varOrIRIref","*varOrIRIref"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],FROM:[],VALUES:[],$:[]},"+graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STR
 ING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"]},"+graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNod
 ePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"]},"+groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition
 "],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*
 groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupConditio
 n","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"]},"+havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCon
 dition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],
 SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition",
 "*havingCondition"]},"+or([var,[ (,expression,AS,var,)]])":{"(":["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR1:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR2:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"]},"+orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondi
 tion"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCond
 ition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNA
 ME_NS:["orderCondition","*orderCondition"]},"+varOrIRIref":{VAR1:["varOrIRIref","*varOrIRIref"],VAR2:["varOrIRIref","*varOrIRIref"],IRI_REF:["varOrIRIref","*varOrIRIref"],PNAME_LN:["varOrIRIref","*varOrIRIref"],PNAME_NS:["varOrIRIref","*varOrIRIref"]},"?.":{".":["."],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?DISTINCT":{DISTINCT:["DISTINCT"],"!":[],"+":[],"-":[],VAR1:[],VAR2:[],"(":[],STR:[],LANG:[],LANGMATCHES:[],DATATYPE:[],BOUND:[],IRI:[],URI:[],BNODE:[],RAND:[],ABS:[],CEIL:[],FLOOR:[],ROUND:[],CONCAT:[],STRLEN:[],UCASE:[],LCASE:[],ENCODE_FOR_URI:[],CONTAINS:[],STRSTARTS:[],STRENDS:[],STRBEF
 ORE:[],STRAFTER:[],YEAR:[],MONTH:[],DAY:[],HOURS:[],MINUTES:[],SECONDS:[],TIMEZONE:[],TZ:[],NOW:[],UUID:[],STRUUID:[],MD5:[],SHA1:[],SHA256:[],SHA384:[],SHA512:[],COALESCE:[],IF:[],STRLANG:[],STRDT:[],SAMETERM:[],ISIRI:[],ISURI:[],ISBLANK:[],ISLITERAL:[],ISNUMERIC:[],TRUE:[],FALSE:[],COUNT:[],SUM:[],MIN:[],MAX:[],AVG:[],SAMPLE:[],GROUP_CONCAT:[],SUBSTR:[],REPLACE:[],REGEX:[],EXISTS:[],NOT:[],IRI_REF:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],PNAME_LN:[],PNAME_NS:[],"*":[]},"?GRAPH":{GRAPH:["GRAPH"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT":{SILENT:["SILENT"],VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_1":{SILENT:["SILENT"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_2":{SILENT:["SILENT"],GRAPH:[],DEFAULT:[],NAMED:[],ALL:[]},"?SILENT_3":{SILENT:["SILENT"],GRAPH:[]},"?SI
 LENT_4":{SILENT:["SILENT"],DEFAULT:[],GRAPH:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?WHERE":{WHERE:["WHERE"],"{":[]},"?[,,expression]":{",":["[,,expression]"],")":[]},"?[.,?constructTriples]":{".":["[.,?constructTriples]"],"}":[]},"?[.,?triplesBlock]":{".":["[.,?triplesBlock]"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[.,?triplesTemplate]":{".":["[.,?triplesTemplate]"],"}":[],GRAPH:[]},"?[;,SEPARATOR,=,string]":{";":["[;,SEPARATOR,=,string]"],")":[]},"?[;,update]":{";":["[;,update]"],$:[]},"?[AS,var]":{AS:["[AS,var]"],")":[]},"?[INTO,graphRef]":{INTO:["[INTO,graphRef]"],";":[],$:[]},"?[or([verbPath,verbSimple]),objectList]":{VAR1:["[or([verbPath,verbSimple]),objectList]"],VAR2:["[or([verbPath,verbSimple]),objectList]"],"^":["[or([verbPath,verbSimple]),objectList]"],a:["[or([verbPath,verbSimple]),objectList]"],"!":["[or([verbPath,verbSimple]),objectList]"],"(":["[or([verbPath,verbSimple]),objectList]"],IRI_REF:["[or([verbPath,verbSimple]),
 objectList]"],PNAME_LN:["[or([verbPath,verbSimple]),objectList]"],PNAME_NS:["[or([verbPath,verbSimple]),objectList]"],";":[],".":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],"^":["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],IRI_REF:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_LN:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_NS:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],")":[]},"?[update1,?[;,update]]":{INSERT:["[update1,?[;,update]]"],DELETE:["[update1,?[;,update]]"],LOAD:["[update1,?[;,update]]"],CLEAR:["[update1,?[;,update]]"],DROP:["[update1,?[;,update]]"],ADD:["[update1,?[;,update]]"],MOVE:["[update1,?[;,update]]"],COPY:["[update1,?[;,update]]"],CREATE:["[update1,?[;,update]]"],WITH:["[update1,?[;,update]]"],$:[]},"?[verb,objectList]":{a:["[verb,objectList]"],VAR1:["[verb,objectLis
 t]"],VAR2:["[verb,objectList]"],IRI_REF:["[verb,objectList]"],PNAME_LN:["[verb,objectList]"],PNAME_NS:["[verb,objectList]"],";":[],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?argList":{NIL:["argList"],"(":["argList"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],"*":[],"/":[],";":[]},"?baseDecl":{BASE:["baseDecl"],$:[],CONSTRUCT:[],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[],PREFIX:[]},"?constructTriples":{VAR1:["constructTriples"],VAR2:["constructTriples"],NIL:["constructTriples"],"(":["constructTriples"],"[":["constructTriples"],IRI_REF:["constructTriples"],TRUE:["constructTriples"],FALSE:["constructTriples"],BLANK_NODE_LABEL:["constructTriples"],ANON:["constructTriples"],PNAME_L
 N:["constructTriples"],PNAME_NS:["constructTriples"],STRING_LITERAL1:["constructTriples"],STRING_LITERAL2:["constructTriples"],STRING_LITERAL_LONG1:["constructTriples"],STRING_LITERAL_LONG2:["constructTriples"],INTEGER:["constructTriples"],DECIMAL:["constructTriples"],DOUBLE:["constructTriples"],INTEGER_POSITIVE:["constructTriples"],DECIMAL_POSITIVE:["constructTriples"],DOUBLE_POSITIVE:["constructTriples"],INTEGER_NEGATIVE:["constructTriples"],DECIMAL_NEGATIVE:["constructTriples"],DOUBLE_NEGATIVE:["constructTriples"],"}":[]},"?groupClause":{GROUP:["groupClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"?havingClause":{HAVING:["havingClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"?insertClause":{INSERT:["insertClause"],WHERE:[],USING:[]},"?limitClause":{LIMIT:["limitClause"],VALUES:[],$:[],"}":[]},"?limitOffsetClauses":{LIMIT:["limitOffsetClauses"],OFFSET:["limitOffsetClauses"],VALUES:[],$:[],"}":[]},"?offsetClause":{OFFSET:["offsetClause"],VALUES:[
 ],$:[],"}":[]},"?or([DISTINCT,REDUCED])":{DISTINCT:["or([DISTINCT,REDUCED])"],REDUCED:["or([DISTINCT,REDUCED])"],"*":[],"(":[],VAR1:[],VAR2:[]},"?or([LANGTAG,[^^,iriRef]])":{LANGTAG:["or([LANGTAG,[^^,iriRef]])"],"^^":["or([LANGTAG,[^^,iriRef]])"],UNDEF:[],IRI_REF:[],TRUE:[],FALSE:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],a:[],VAR1:[],VAR2:[],"^":[],"!":[],"(":[],".":[],";":[],",":[],AS:[],")":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],"*":[],"/":[],"}":[],"[":[],NIL:[],BLANK_NODE_LABEL:[],ANON:[],"]":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unary
 Expression]])"],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"!=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,I
 N,expressionList]])"],">":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IN:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AS:[],")"
 :[],",":[],"||":[],"&&":[],";":[]},"?orderClause":{ORDER:["orderClause"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"?pathMod":{"*":["pathMod"],"?":["pathMod"],"+":["pathMod"],"{":["pathMod"],"|":[],"/":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"?triplesBlock":{VAR1:["triplesBlock"],VAR2:["triplesBlock"],NIL:["triplesBlock"],"(":["triplesBlock"],"[":["triplesBlock"],IRI_REF:["triplesBlock"],TRUE:["triplesBlock"],FALSE:["triplesBlock"],BLANK_NODE_LABEL:["triplesBlock"],ANON:["triplesBlock"],PNAME_LN:["triplesBlock"],PNAME_NS:["triplesBlock"],STRING_LITERAL1:["triplesBlock"],STRING_LITERAL2:["triplesBlock"],STRING_LITERAL_LONG1:["triplesBlock"],STRING_LITERAL_LONG2:["tr
 iplesBlock"],INTEGER:["triplesBlock"],DECIMAL:["triplesBlock"],DOUBLE:["triplesBlock"],INTEGER_POSITIVE:["triplesBlock"],DECIMAL_POSITIVE:["triplesBlock"],DOUBLE_POSITIVE:["triplesBlock"],INTEGER_NEGATIVE:["triplesBlock"],DECIMAL_NEGATIVE:["triplesBlock"],DOUBLE_NEGATIVE:["triplesBlock"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?triplesTemplate":{VAR1:["triplesTemplate"],VAR2:["triplesTemplate"],NIL:["triplesTemplate"],"(":["triplesTemplate"],"[":["triplesTemplate"],IRI_REF:["triplesTemplate"],TRUE:["triplesTemplate"],FALSE:["triplesTemplate"],BLANK_NODE_LABEL:["triplesTemplate"],ANON:["triplesTemplate"],PNAME_LN:["triplesTemplate"],PNAME_NS:["triplesTemplate"],STRING_LITERAL1:["triplesTemplate"],STRING_LITERAL2:["triplesTemplate"],STRING_LITERAL_LONG1:["triplesTemplate"],STRING_LITERAL_LONG2:["triplesTemplate"],INTEGER:["triplesTemplate"],DECIMAL:["triplesTemplate"],DOUBLE:["triplesTemplate"],INTEGER_POSITIVE:["triplesTemplate"],DECIMAL_P
 OSITIVE:["triplesTemplate"],DOUBLE_POSITIVE:["triplesTemplate"],INTEGER_NEGATIVE:["triplesTemplate"],DECIMAL_NEGATIVE:["triplesTemplate"],DOUBLE_NEGATIVE:["triplesTemplate"],"}":[],GRAPH:[]},"?whereClause":{WHERE:["whereClause"],"{":["whereClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],VALUES:[],$:[]},"[ (,*dataBlockValue,)]":{"(":["(","*dataBlockValue",")"]},"[ (,*var,)]":{"(":["(","*var",")"]},"[ (,expression,)]":{"(":["(","expression",")"]},"[ (,expression,AS,var,)]":{"(":["(","expression","AS","var",")"]},"[!=,numericExpression]":{"!=":["!=","numericExpression"]},"[&&,valueLogical]":{"&&":["&&","valueLogical"]},"[*,unaryExpression]":{"*":["*","unaryExpression"]},"[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]":{WHERE:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"],FROM:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"]},"[+,multiplicativeExpression]":{"+":["+","multiplicativeExpression"]},"[,,expression]":{","
 :[",","expression"]},"[,,integer,}]":{",":[",","integer","}"]},"[,,objectPath]":{",":[",","objectPath"]},"[,,object]":{",":[",","object"]},"[,,or([},[integer,}]])]":{",":[",","or([},[integer,}]])"]},"[-,multiplicativeExpression]":{"-":["-","multiplicativeExpression"]},"[.,?constructTriples]":{".":[".","?constructTriples"]},"[.,?triplesBlock]":{".":[".","?triplesBlock"]},"[.,?triplesTemplate]":{".":[".","?triplesTemplate"]},"[/,pathEltOrInverse]":{"/":["/","pathEltOrInverse"]},"[/,unaryExpression]":{"/":["/","unaryExpression"]},"[;,?[or([verbPath,verbSimple]),objectList]]":{";":[";","?[or([verbPath,verbSimple]),objectList]"]},"[;,?[verb,objectList]]":{";":[";","?[verb,objectList]"]},"[;,SEPARATOR,=,string]":{";":[";","SEPARATOR","=","string"]},"[;,update]":{";":[";","update"]},"[<,numericExpression]":{"<":["<","numericExpression"]},"[<=,numericExpression]":{"<=":["<=","numericExpression"]},"[=,numericExpression]":{"=":["=","numericExpression"]},"[>,numericExpression]":{">":[">","nume
 ricExpression"]},"[>=,numericExpression]":{">=":[">=","numericExpression"]},"[AS,var]":{AS:["AS","var"]},"[IN,expressionList]":{IN:["IN","expressionList"]},"[INTO,graphRef]":{INTO:["INTO","graphRef"]},"[NAMED,iriRef]":{NAMED:["NAMED","iriRef"]},"[NOT,IN,expressionList]":{NOT:["NOT","IN","expressionList"]},"[UNION,groupGraphPattern]":{UNION:["UNION","groupGraphPattern"]},"[^^,iriRef]":{"^^":["^^","iriRef"]},"[constructTemplate,*datasetClause,whereClause,solutionModifier]":{"{":["constructTemplate","*datasetClause","whereClause","solutionModifier"]},"[deleteClause,?insertClause]":{DELETE:["deleteClause","?insertClause"]},"[graphPatternNotTriples,?.,?triplesBlock]":{"{":["graphPatternNotTriples","?.","?triplesBlock"],OPTIONAL:["graphPatternNotTriples","?.","?triplesBlock"],MINUS:["graphPatternNotTriples","?.","?triplesBlock"],GRAPH:["graphPatternNotTriples","?.","?triplesBlock"],SERVICE:["graphPatternNotTriples","?.","?triplesBlock"],FILTER:["graphPatternNotTriples","?.","?triplesBlock
 "],BIND:["graphPatternNotTriples","?.","?triplesBlock"],VALUES:["graphPatternNotTriples","?.","?triplesBlock"]},"[integer,or([[,,or([},[integer,}]])],}])]":{INTEGER:["integer","or([[,,or([},[integer,}]])],}])"]},"[integer,}]":{INTEGER:["integer","}"]},"[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]":{INTEGER_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["or([numericLit
 eralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"]},"[or([verbPath,verbSimple]),objectList]":{VAR1:["or([verbPath,verbSimple])","objectList"],VAR2:["or([verbPath,verbSimple])","objectList"],"^":["or([verbPath,verbSimple])","objectList"],a:["or([verbPath,verbSimple])","objectList"],"!":["or([verbPath,verbSimple])","objectList"],"(":["or([verbPath,verbSimple])","objectList"],IRI_REF:["or([verbPath,verbSimple])","objectList"],PNAME_LN:["or([verbPath,verbSimple])","objectList"],PNAME_NS:["or([verbPath,verbSimple])","objectList"]},"[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],"^":["pathOneInPropertySet","*[|,pathOneInPropertySet]"],IRI_REF:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_LN:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_NS:["pathOneInPropertySet","*[|,pathOneInPropertySet]"]},"[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["quadsNotTriples","?.","?trip
 lesTemplate"]},"[update1,?[;,update]]":{INSERT:["update1","?[;,update]"],DELETE:["update1","?[;,update]"],LOAD:["update1","?[;,update]"],CLEAR:["update1","?[;,update]"],DROP:["update1","?[;,update]"],ADD:["update1","?[;,update]"],MOVE:["update1","?[;,update]"],COPY:["update1","?[;,update]"],CREATE:["update1","?[;,update]"],WITH:["update1","?[;,update]"]},"[verb,objectList]":{a:["verb","objectList"],VAR1:["verb","objectList"],VAR2:["verb","objectList"],IRI_REF:["verb","objectList"],PNAME_LN:["verb","objectList"],PNAME_NS:["verb","objectList"]},"[|,pathOneInPropertySet]":{"|":["|","pathOneInPropertySet"]},"[|,pathSequence]":{"|":["|","pathSequence"]},"[||,conditionalAndExpression]":{"||":["||","conditionalAndExpression"]},add:{ADD:["ADD","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},additiveExpression:{"!":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,u
 naryExpression]])]])"],"+":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"(":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpres
 sion],[/,unaryExpression]])]])"],STR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANGMATCHES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DATATYPE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BOUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegati
 ve]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BNODE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],RAND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ABS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLi
 teralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CEIL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FLOOR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ROUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLEN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLitera
 lPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ENCODE_FOR_URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONTAINS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRSTARTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplica
 tiveExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRENDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRBEFORE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRAFTER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],YEAR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MONTH:["multiplicativeExpression","*or([[+,multiplicativ
 eExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DAY:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],HOURS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MINUTES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SECONDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TIMEZONE:["multiplicativeExpression"
 ,"*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TZ:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOW:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRUUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MD5:["multiplicativ
 eExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA256:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA384:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA512:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],C
 OALESCE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRDT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMETERM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,un
 aryExpression]])]])"],ISIRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISURI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISBLANK:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISLITERAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISNUMERIC:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?o
 r([[*,unaryExpression],[/,unaryExpression]])]])"],TRUE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FALSE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COUNT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MIN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteral
 Negative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MAX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AVG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMPLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],GROUP_CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUBSTR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteral
 Positive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REPLACE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REGEX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],EXISTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI_REF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression
 ],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER:["multiplicativeExpr
 ession","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryEx
 pression]])]])"],DOUBLE_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_LN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositi
 ve,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_NS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"]},aggregate:{COUNT:["COUNT","(","?DISTINCT","or([*,expression])",")"],SUM:["SUM","(","?DISTINCT","expression",")"],MIN:["MIN","(","?DISTINCT","expression",")"],MAX:["MAX","(","?DISTINCT","expression",")"],AVG:["AVG","(","?DISTINCT","expression",")"],SAMPLE:["SAMPLE","(","?DISTINCT","expression",")"],GROUP_CONCAT:["GROUP_CONCAT","(","?DISTINCT","expression","?[;,SEPARATOR,=,string]",")"]},allowBnodes:{"}":[]},allowVars:{"}":[]},argList:{NIL:["NIL"],"(":["(","?DISTINCT","expression","*[,,expression]",")"]},askQuery:{ASK:["ASK","*datasetClause","whereClause","solutionModifier"]},baseDecl:{BASE:["BASE","IRI_REF"]},bind:{BIND:["BIND","(","expression","AS","var",")"]},blankNode:{BLANK_NODE_LABEL:["BLANK_NODE_
 LABEL"],ANON:["ANON"]},blankNodePropertyList:{"[":["[","propertyListNotEmpty","]"]},blankNodePropertyListPath:{"[":["[","propertyListPathNotEmpty","]"]},booleanLiteral:{TRUE:["TRUE"],FALSE:["FALSE"]},brackettedExpression:{"(":["(","expression",")"]},builtInCall:{STR:["STR","(","expression",")"],LANG:["LANG","(","expression",")"],LANGMATCHES:["LANGMATCHES","(","expression",",","expression",")"],DATATYPE:["DATATYPE","(","expression",")"],BOUND:["BOUND","(","var",")"],IRI:["IRI","(","expression",")"],URI:["URI","(","expression",")"],BNODE:["BNODE","or([[ (,expression,)],NIL])"],RAND:["RAND","NIL"],ABS:["ABS","(","expression",")"],CEIL:["CEIL","(","expression",")"],FLOOR:["FLOOR","(","expression",")"],ROUND:["ROUND","(","expression",")"],CONCAT:["CONCAT","expressionList"],SUBSTR:["substringExpression"],STRLEN:["STRLEN","(","expression",")"],REPLACE:["strReplaceExpression"],UCASE:["UCASE","(","expression",")"],LCASE:["LCASE","(","expression",")"],ENCODE_FOR_URI:["ENCODE_FOR_URI","(","exp
 ression",")"],CONTAINS:["CONTAINS","(","expression",",","expression",")"],STRSTARTS:["STRSTARTS","(","expression",",","expression",")"],STRENDS:["STRENDS","(","expression",",","expression",")"],STRBEFORE:["STRBEFORE","(","expression",",","expression",")"],STRAFTER:["STRAFTER","(","expression",",","expression",")"],YEAR:["YEAR","(","expression",")"],MONTH:["MONTH","(","expression",")"],DAY:["DAY","(","expression",")"],HOURS:["HOURS","(","expression",")"],MINUTES:["MINUTES","(","expression",")"],SECONDS:["SECONDS","(","expression",")"],TIMEZONE:["TIMEZONE","(","expression",")"],TZ:["TZ","(","expression",")"],NOW:["NOW","NIL"],UUID:["UUID","NIL"],STRUUID:["STRUUID","NIL"],MD5:["MD5","(","expression",")"],SHA1:["SHA1","(","expression",")"],SHA256:["SHA256","(","expression",")"],SHA384:["SHA384","(","expression",")"],SHA512:["SHA512","(","expression",")"],COALESCE:["COALESCE","expressionList"],IF:["IF","(","expression",",","expression",",","expression",")"],STRLANG:["STRLANG","(","expres
 sion",",","expression",")"],STRDT:["STRDT","(","expression",",","expression",")"],SAMETERM:["SAMETERM","(","expression",",","expression",")"],ISIRI:["ISIRI","(","expression",")"],ISURI:["ISURI","(","expression",")"],ISBLANK:["ISBLANK","(","expression",")"],ISLITERAL:["ISLITERAL","(","expression",")"],ISNUMERIC:["ISNUMERIC","(","expression",")"],REGEX:["regexExpression"],EXISTS:["existsFunc"],NOT:["notExistsFunc"]},clear:{CLEAR:["CLEAR","?SILENT_2","graphRefAll"]},collection:{"(":["(","+graphNode",")"]},collectionPath:{"(":["(","+graphNodePath",")"]},conditionalAndExpression:{"!":["valueLogical","*[&&,valueLogical]"],"+":["valueLogical","*[&&,valueLogical]"],"-":["valueLogical","*[&&,valueLogical]"],VAR1:["valueLogical","*[&&,valueLogical]"],VAR2:["valueLogical","*[&&,valueLogical]"],"(":["valueLogical","*[&&,valueLogical]"],STR:["valueLogical","*[&&,valueLogical]"],LANG:["valueLogical","*[&&,valueLogical]"],LANGMATCHES:["valueLogical","*[&&,valueLogical]"],DATATYPE:["valueLogical","
 *[&&,valueLogical]"],BOUND:["valueLogical","*[&&,valueLogical]"],IRI:["valueLogical","*[&&,valueLogical]"],URI:["valueLogical","*[&&,valueLogical]"],BNODE:["valueLogical","*[&&,valueLogical]"],RAND:["valueLogical","*[&&,valueLogical]"],ABS:["valueLogical","*[&&,valueLogical]"],CEIL:["valueLogical","*[&&,valueLogical]"],FLOOR:["valueLogical","*[&&,valueLogical]"],ROUND:["valueLogical","*[&&,valueLogical]"],CONCAT:["valueLogical","*[&&,valueLogical]"],STRLEN:["valueLogical","*[&&,valueLogical]"],UCASE:["valueLogical","*[&&,valueLogical]"],LCASE:["valueLogical","*[&&,valueLogical]"],ENCODE_FOR_URI:["valueLogical","*[&&,valueLogical]"],CONTAINS:["valueLogical","*[&&,valueLogical]"],STRSTARTS:["valueLogical","*[&&,valueLogical]"],STRENDS:["valueLogical","*[&&,valueLogical]"],STRBEFORE:["valueLogical","*[&&,valueLogical]"],STRAFTER:["valueLogical","*[&&,valueLogical]"],YEAR:["valueLogical","*[&&,valueLogical]"],MONTH:["valueLogical","*[&&,valueLogical]"],DAY:["valueLogical","*[&&,valueLog
 ical]"],HOURS:["valueLogical","*[&&,valueLogical]"],MINUTES:["valueLogical","*[&&,valueLogical]"],SECONDS:["valueLogical","*[&&,valueLogical]"],TIMEZONE:["valueLogical","*[&&,valueLogical]"],TZ:["valueLogical","*[&&,valueLogical]"],NOW:["valueLogical","*[&&,valueLogical]"],UUID:["valueLogical","*[&&,valueLogical]"],STRUUID:["valueLogical","*[&&,valueLogical]"],MD5:["valueLogical","*[&&,valueLogical]"],SHA1:["valueLogical","*[&&,valueLogical]"],SHA256:["valueLogical","*[&&,valueLogical]"],SHA384:["valueLogical","*[&&,valueLogical]"],SHA512:["valueLogical","*[&&,valueLogical]"],COALESCE:["valueLogical","*[&&,valueLogical]"],IF:["valueLogical","*[&&,valueLogical]"],STRLANG:["valueLogical","*[&&,valueLogical]"],STRDT:["valueLogical","*[&&,valueLogical]"],SAMETERM:["valueLogical","*[&&,valueLogical]"],ISIRI:["valueLogical","*[&&,valueLogical]"],ISURI:["valueLogical","*[&&,valueLogical]"],ISBLANK:["valueLogical","*[&&,valueLogical]"],ISLITERAL:["valueLogical","*[&&,valueLogical]"],ISNUMER
 IC:["valueLogical","*[&&,valueLogical]"],TRUE:["valueLogical","*[&&,valueLogical]"],FALSE:["valueLogical","*[&&,valueLogical]"],COUNT:["valueLogical","*[&&,valueLogical]"],SUM:["valueLogical","*[&&,valueLogical]"],MIN:["valueLogical","*[&&,valueLogical]"],MAX:["valueLogical","*[&&,valueLogical]"],AVG:["valueLogical","*[&&,valueLogical]"],SAMPLE:["valueLogical","*[&&,valueLogical]"],GROUP_CONCAT:["valueLogical","*[&&,valueLogical]"],SUBSTR:["valueLogical","*[&&,valueLogical]"],REPLACE:["valueLogical","*[&&,valueLogical]"],REGEX:["valueLogical","*[&&,valueLogical]"],EXISTS:["valueLogical","*[&&,valueLogical]"],NOT:["valueLogical","*[&&,valueLogical]"],IRI_REF:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL2:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG2:["valueLogical","*[&&,valueLogical]"],INTEGER:["valueLogical","*[&&,valueLogical]"],DECIMAL:["valueLogica
 l","*[&&,valueLogical]"],DOUBLE:["valueLogical","*[&&,valueLogical]"],INTEGER_POSITIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_POSITIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_POSITIVE:["valueLogical","*[&&,valueLogical]"],INTEGER_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_NEGATIVE:["valueLogical","*[&&,valueLogical]"],PNAME_LN:["valueLogical","*[&&,valueLogical]"],PNAME_NS:["valueLogical","*[&&,valueLogical]"]},conditionalOrExpression:{"!":["conditionalAndExpression","*[||,conditionalAndExpression]"],"+":["conditionalAndExpression","*[||,conditionalAndExpression]"],"-":["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR1:["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR2:["conditionalAndExpression","*[||,conditionalAndExpression]"],"(":["conditionalAndExpression","*[||,conditionalAndExpression]"],STR:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANG:["conditio
 nalAndExpression","*[||,conditionalAndExpression]"],LANGMATCHES:["conditionalAndExpression","*[||,conditionalAndExpression]"],DATATYPE:["conditionalAndExpression","*[||,conditionalAndExpression]"],BOUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],BNODE:["conditionalAndExpression","*[||,conditionalAndExpression]"],RAND:["conditionalAndExpression","*[||,conditionalAndExpression]"],ABS:["conditionalAndExpression","*[||,conditionalAndExpression]"],CEIL:["conditionalAndExpression","*[||,conditionalAndExpression]"],FLOOR:["conditionalAndExpression","*[||,conditionalAndExpression]"],ROUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLEN:["conditionalAndExpression","*[||,conditionalAndExpression]"],UCASE:["conditionalAndExpression","*[||,conditionalAndExpr
 ession]"],LCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],ENCODE_FOR_URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONTAINS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRSTARTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRENDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRBEFORE:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRAFTER:["conditionalAndExpression","*[||,conditionalAndExpression]"],YEAR:["conditionalAndExpression","*[||,conditionalAndExpression]"],MONTH:["conditionalAndExpression","*[||,conditionalAndExpression]"],DAY:["conditionalAndExpression","*[||,conditionalAndExpression]"],HOURS:["conditionalAndExpression","*[||,conditionalAndExpression]"],MINUTES:["conditionalAndExpression","*[||,conditionalAndExpression]"],SECONDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],TIMEZONE:["conditionalAndExpression","*[||,conditionalAndExpression]"],TZ:["c
 onditionalAndExpression","*[||,conditionalAndExpression]"],NOW:["conditionalAndExpression","*[||,conditionalAndExpression]"],UUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRUUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],MD5:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA1:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA256:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA384:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA512:["conditionalAndExpression","*[||,conditionalAndExpression]"],COALESCE:["conditionalAndExpression","*[||,conditionalAndExpression]"],IF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRDT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMETERM:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISIRI:["conditionalAndExpression","*[||,conditiona
 lAndExpression]"],ISURI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISBLANK:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISLITERAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISNUMERIC:["conditionalAndExpression","*[||,conditionalAndExpression]"],TRUE:["conditionalAndExpression","*[||,conditionalAndExpression]"],FALSE:["conditionalAndExpression","*[||,conditionalAndExpression]"],COUNT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUM:["conditionalAndExpression","*[||,conditionalAndExpression]"],MIN:["conditionalAndExpression","*[||,conditionalAndExpression]"],MAX:["conditionalAndExpression","*[||,conditionalAndExpression]"],AVG:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMPLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],GROUP_CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUBSTR:["conditionalAndExpression","*[||,conditionalAndExpression]"],REPLACE:["conditi
 onalAndExpression","*[||,conditionalAndExpression]"],REGEX:["conditionalAndExpression","*[||,conditionalAndExpression]"],EXISTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOT:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI_REF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL2:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG2:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_POSITIVE:["conditionalAndExpression","*[||,conditiona
 lAndExpression]"],DOUBLE_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_LN:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_NS:["conditionalAndExpression","*[||,conditionalAndExpression]"]},constraint:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],S
 TRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"]},constructQuery:{CONSTRUCT:["CONSTRUCT","or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])
 "]},constructTemplate:{"{":["{","?constructTriples","}"]},constructTriples:{VAR1:["triplesSameSubject","?[.,?constructTriples]"],VAR2:["triplesSameSubject","?[.,?constructTriples]"],NIL:["triplesSameSubject","?[.,?constructTriples]"],"(":["triplesSameSubject","?[.,?constructTriples]"],"[":["triplesSameSubject","?[.,?constructTriples]"],IRI_REF:["triplesSameSubject","?[.,?constructTriples]"],TRUE:["triplesSameSubject","?[.,?constructTriples]"],FALSE:["triplesSameSubject","?[.,?constructTriples]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?constructTriples]"],ANON:["triplesSameSubject","?[.,?constructTriples]"],PNAME_LN:["triplesSameSubject","?[.,?constructTriples]"],PNAME_NS:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL2:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?constructTriples]"
 ],INTEGER:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"]},copy:{COPY:["COPY","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},create:{CREATE:["CREATE","?SILENT_3","graphRef"]},dataBlock:{NIL:["or([inlineDataOneVar,inlineDataFull])"],"(":["or([inlineDataOneVar,inlineDataFull])"],VAR1:["or([inlineDataOneVar,inlineDataFull])"],VAR2:["or([inlineDataOneVar,inlineDataFull])"]},dataBlockValue:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERA
 L2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],UNDEF:["UNDEF"]},datasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},defaultGraphClause:{IRI_REF:["sourceSelector"],PNAME_LN:["sourceSelector"],PNAME_NS:["sourceSelector"]},delete1:{DATA:["DATA","quadDataNoBnodes"],WHERE:["WHERE","quadPatternNoBnodes"],"{":["quadPatternNoBnodes","?insertClause","*usingClause","WHERE","groupGraphPattern"]},deleteClause:{DELETE:["DELETE","quadPattern"]},describeDatasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},describeQuery:{DESCRIBE:["DESCRIBE","or([+varOrIRIref,*])","*describeDat
 asetClause","?whereClause","solutionModifier"]},disallowBnodes:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_

<TRUNCATED>

[42/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryGeneral.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryGeneral.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryGeneral.java
new file mode 100644
index 0000000..f1c9a9a
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryGeneral.java
@@ -0,0 +1,142 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import static java.lang.String.format ;
+
+import java.util.List ;
+
+import org.apache.jena.atlas.lib.InternalErrorException ;
+import org.apache.jena.fuseki.migrate.GraphLoadUtils ;
+import org.apache.jena.riot.RiotException ;
+
+import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.query.DatasetFactory ;
+import com.hp.hpl.jena.query.Query ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.ModelFactory ;
+import com.hp.hpl.jena.sparql.core.DatasetDescription ;
+
+public class SPARQL_QueryGeneral extends SPARQL_Query
+{
+    final static int MaxTriples = 100*1000 ; 
+    
+    public SPARQL_QueryGeneral()    { super() ; }
+
+    @Override
+    protected void validateRequest(HttpAction action) {}
+
+    @Override
+    protected void validateQuery(HttpAction action, Query query) {}
+    
+    @Override
+    protected String mapRequestToDataset(HttpAction action)
+    { return null ; }
+    
+    @Override
+    protected Dataset decideDataset(HttpAction action, Query query, String queryStringLog) 
+    {
+        DatasetDescription datasetDesc = getDatasetDescription(action) ;
+        if ( datasetDesc == null )
+            datasetDesc = getDatasetDescription(query) ;
+        if ( datasetDesc == null )
+            ServletOps.errorBadRequest("No dataset description in protocol request or in the query string") ;
+
+        return datasetFromDescription(action, datasetDesc) ;
+    }
+
+    /**
+     * Construct a Dataset based on a dataset description.
+     */
+    
+    protected Dataset datasetFromDescription(HttpAction action, DatasetDescription datasetDesc)
+    {
+        try {
+            if ( datasetDesc == null )
+                return null ;
+            if ( datasetDesc.isEmpty() )
+                return null ;
+            
+            List<String> graphURLs = datasetDesc.getDefaultGraphURIs() ;
+            List<String> namedGraphs = datasetDesc.getNamedGraphURIs() ;
+            
+            if ( graphURLs.size() == 0 && namedGraphs.size() == 0 )
+                    return null ;
+            
+            Dataset dataset = DatasetFactory.createMem() ;
+            // Look in cache for loaded graphs!!
+
+            // ---- Default graph
+            {
+                Model model = ModelFactory.createDefaultModel() ;
+                for ( String uri : graphURLs )
+                {
+                    if ( uri == null || uri.equals("") )
+                        throw new InternalErrorException("Default graph URI is null or the empty string")  ;
+
+                    try {
+                        GraphLoadUtils.loadModel(model, uri, MaxTriples) ;
+                        action.log.info(format("[%d] Load (default graph) %s", action.id, uri)) ;
+                    } catch (RiotException ex) {
+                        action.log.info(format("[%d] Parsing error loading %s: %s", action.id, uri, ex.getMessage())) ;
+                        ServletOps.errorBadRequest("Failed to load URL (parse error) "+uri+" : "+ex.getMessage()) ;
+                    } catch (Exception ex)
+                    {
+                        action.log.info(format("[%d] Failed to load (default) %s: %s", action.id, uri, ex.getMessage())) ;
+                        ServletOps.errorBadRequest("Failed to load URL "+uri) ;
+                    }
+                }
+                dataset.setDefaultModel(model) ;
+            }
+            // ---- Named graphs
+            if ( namedGraphs != null )
+            {
+                for ( String uri : namedGraphs )
+                {
+                    if ( uri == null || uri.equals("") )
+                        throw new InternalErrorException("Named graph URI is null or the empty string")  ;
+
+                    try {
+                        Model model = ModelFactory.createDefaultModel() ;
+                        GraphLoadUtils.loadModel(model, uri, MaxTriples) ;
+                        action.log.info(format("[%d] Load (named graph) %s", action.id, uri)) ;
+                        dataset.addNamedModel(uri, model) ;
+                    } catch (RiotException ex) {
+                        action.log.info(format("[%d] Parsing error loading %s: %s", action.id, uri, ex.getMessage())) ;
+                        ServletOps.errorBadRequest("Failed to load URL (parse error) "+uri+" : "+ex.getMessage()) ;
+                    } catch (Exception ex)
+                    {
+                        action.log.info(format("[%d] Failed to load (named graph) %s: %s", action.id, uri, ex.getMessage())) ;
+                        ServletOps.errorBadRequest("Failed to load URL "+uri) ;
+                    }
+                }
+            }
+            
+            return dataset ;
+            
+        } 
+        catch (ActionErrorException ex) { throw ex ; }
+        catch (Exception ex)
+        {
+            action.log.info(format("[%d] SPARQL parameter error: "+ex.getMessage(),action.id, ex)) ;
+            ServletOps.errorBadRequest("Parameter error: "+ex.getMessage());
+            return null ;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java
new file mode 100644
index 0000000..efc7222
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java
@@ -0,0 +1,359 @@
+/**
+ * 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.jena.fuseki.servlets;
+
+import static java.lang.String.format ;
+import static org.apache.jena.riot.WebContent.contentTypeSPARQLQuery ;
+import static org.apache.jena.riot.WebContent.contentTypeSPARQLUpdate ;
+
+import java.util.List ;
+
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+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 org.apache.jena.fuseki.server.DataAccessPoint ;
+import org.apache.jena.fuseki.server.DataService ;
+import org.apache.jena.fuseki.server.Endpoint ;
+import org.apache.jena.fuseki.server.OperationName ;
+import org.apache.jena.riot.web.HttpNames ;
+
+/** This servlet can be attached to a dataset location
+ *  and acts as a router for all SPARQL operations
+ *  (query, update, graph store, both direct and 
+ *  indirect naming, quads operations on a dataset and
+ *  ?query and ?update directly on a dataset.) 
+ */
+public abstract class SPARQL_UberServlet extends ActionSPARQL
+{
+    protected abstract boolean allowQuery(HttpAction action) ;
+    protected abstract boolean allowUpdate(HttpAction action) ;
+    protected abstract boolean allowREST_R(HttpAction action) ;
+    protected abstract boolean allowREST_W(HttpAction action) ;
+    protected abstract boolean allowQuadsR(HttpAction action) ;
+    protected abstract boolean allowQuadsW(HttpAction action) ;
+    
+    public static class ReadOnly extends SPARQL_UberServlet
+    {
+        public ReadOnly()    { super() ; }
+        @Override protected boolean allowQuery(HttpAction action)    { return true ; }
+        @Override protected boolean allowUpdate(HttpAction action)   { return false ; }
+        @Override protected boolean allowREST_R(HttpAction action)   { return true ; }
+        @Override protected boolean allowREST_W(HttpAction action)   { return false ; }
+        @Override protected boolean allowQuadsR(HttpAction action)   { return true ; }
+        @Override protected boolean allowQuadsW(HttpAction action)   { return false ; }
+    }
+
+    public static class ReadWrite extends SPARQL_UberServlet
+    {
+        public ReadWrite()    { super() ; }
+        @Override protected boolean allowQuery(HttpAction action)    { return true ; }
+        @Override protected boolean allowUpdate(HttpAction action)   { return true ; }
+        @Override protected boolean allowREST_R(HttpAction action)   { return true ; }
+        @Override protected boolean allowREST_W(HttpAction action)   { return true ; }
+        @Override protected boolean allowQuadsR(HttpAction action)   { return true ; }
+        @Override protected boolean allowQuadsW(HttpAction action)   { return true ; }
+    }
+
+    public static class AccessByConfig extends SPARQL_UberServlet
+    {
+        public AccessByConfig()    { super() ; }
+        @Override protected boolean allowQuery(HttpAction action)    { return isEnabled(action, OperationName.Query) ; }
+        @Override protected boolean allowUpdate(HttpAction action)   { return isEnabled(action, OperationName.Update) ; }
+        @Override protected boolean allowREST_R(HttpAction action)   { return isEnabled(action, OperationName.GSP_R) || isEnabled(action, OperationName.GSP) ; }
+        @Override protected boolean allowREST_W(HttpAction action)   { return isEnabled(action, OperationName.GSP) ; }
+        // Quad operations tied to presence/absence of GSP.
+        @Override protected boolean allowQuadsR(HttpAction action)   { return isEnabled(action, OperationName.GSP_R) ; }
+        @Override protected boolean allowQuadsW(HttpAction action)   { return isEnabled(action, OperationName.GSP) ; }
+
+        // Test whether there is a configuration that allows this action as the operation given.
+        // Ignores the operation in the action (set due to parsing - it might be "quads"
+        // which is the generic operation when just the dataset is specificed.  
+        private boolean isEnabled(HttpAction action, OperationName opName) {
+            // Disregard the operation name of the action
+            DataService dSrv = action.getDataService() ;
+            if ( dSrv == null )
+                return false;
+            return ! dSrv.getOperation(opName).isEmpty() ;
+        }
+    }
+    
+    /*  This can be used for a single servlet for everything (über-servlet)
+     *  
+     *  It can check for a request that looks like a service request and passes it on.
+     * This takes precedence over direct naming.
+     */
+    
+    // Refactor? Extract the direct naming handling.
+    // To test: enable in SPARQLServer.configureOneDataset
+    
+    private final ActionSPARQL queryServlet    = new SPARQL_QueryDataset() ;
+    private final ActionSPARQL updateServlet   = new SPARQL_Update() ;
+    private final ActionSPARQL uploadServlet   = new SPARQL_Upload() ;
+    private final ActionSPARQL gspServlet_R    = new SPARQL_GSP_R() ;
+    private final ActionSPARQL gspServlet_RW   = new SPARQL_GSP_RW() ;
+    private final ActionSPARQL restQuads_R     = new REST_Quads_R() ;
+    private final ActionSPARQL restQuads_RW    = new REST_Quads_RW() ;
+    
+    public SPARQL_UberServlet() { super(); }
+
+    private String getEPName(String dsname, List<String> endpoints) {
+        if (endpoints == null || endpoints.size() == 0) 
+            return null ;
+        String x = endpoints.get(0) ;
+        if ( ! dsname.endsWith("/") )
+            x = dsname+"/"+x ;
+        else
+            x = dsname+x ;
+        return x ;
+    }
+    
+    // These calls should not happen because we hook in at executeAction
+    @Override protected void validate(HttpAction action) { throw new FusekiException("Call to SPARQL_UberServlet.validate") ; }
+    @Override protected void perform(HttpAction action)  { throw new FusekiException("Call to SPARQL_UberServlet.perform") ; }
+
+    /** Map request to uri in the registry.
+     *  null means no mapping done 
+     */
+    @Override
+    protected String mapRequestToDataset(HttpAction action) {
+        String uri = ActionLib.removeContextPath(action) ;
+        return ActionLib.mapRequestToDatasetLongest$(uri) ;
+    }
+    
+    /** Intercept the processing cycle at the point where the action has been set up,
+     *  the dataset target decided but no validation or execution has been done, 
+     *  nor any stats have been done.
+     */
+    @Override
+    protected void executeAction(HttpAction action) {
+        long id = action.id ;
+        HttpServletRequest request = action.request ;
+        HttpServletResponse response = action.response ;
+        String actionURI = action.getActionURI() ;            // No context path
+        String method = request.getMethod() ;
+        
+        DataAccessPoint desc = action.getDataAccessPoint() ;
+        DataService dSrv = action.getDataService() ;
+
+//        if ( ! dSrv.isActive() )
+//            ServletOps.error(HttpSC.SERVICE_UNAVAILABLE_503, "Dataset not currently active");
+        
+        // Part after the DataAccessPoint (dataset) name.
+        String trailing = findTrailing(actionURI, desc.getName()) ;
+        String qs = request.getQueryString() ;
+
+        boolean hasParams = request.getParameterMap().size() > 0 ;
+        
+        // Test for parameters - includes HTML forms.
+        boolean hasParamQuery           = request.getParameter(HttpNames.paramQuery) != null ;
+        // Include old name "request="
+        boolean hasParamUpdate          = request.getParameter(HttpNames.paramUpdate) != null || request.getParameter(HttpNames.paramRequest) != null ;
+        boolean hasParamGraph           = request.getParameter(HttpNames.paramGraph) != null ;
+        boolean hasParamGraphDefault    = request.getParameter(HttpNames.paramGraphDefault) != null ;
+
+        String ct = request.getContentType() ;
+        String charset = request.getCharacterEncoding() ;
+        
+        MediaType mt = null ;
+        if ( ct != null )
+            mt = MediaType.create(ct, charset) ;
+        
+        if (action.log.isInfoEnabled() ) {
+            //String cxt = action.getContextPath() ;
+            action.log.info(format("[%d] %s %s :: '%s' :: %s ? %s", id, method, desc.getName(), trailing, (mt==null?"<none>":mt), (qs==null?"":qs))) ;
+        }
+                       
+        boolean hasTrailing = ( trailing.length() != 0 ) ;
+        
+        if ( !hasTrailing && !hasParams ) {
+            // Check enabled.  But no trailing here.
+            // if ( serviceDispatch(action, desc.readWriteGraphStore, trailing, restQuads_RW) ) return ;
+            // if ( serviceDispatch(action, desc.readGraphStore, trailing, restQuads_R) ) return ;
+            restQuads_RW.executeLifecycle(action) ;
+            return ;
+        }
+        
+        if ( !hasTrailing ) {
+            boolean isPOST = action.getRequest().getMethod().equals(HttpNames.METHOD_POST) ;
+            // Nothing after the DataAccessPoint i.e Dataset by name.
+            // e.g.  http://localhost:3030/ds?query=
+            // Query - GET or POST.
+            // Query - ?query= or body of application/sparql-query
+            if ( hasParamQuery || ( isPOST && contentTypeSPARQLQuery.equalsIgnoreCase(ct) ) ) {
+                // SPARQL Query
+                if ( !allowQuery(action) )
+                    ServletOps.errorForbidden("Forbidden: SPARQL query") ;
+                executeRequest(action, queryServlet) ;
+                return ;
+            }
+
+            // Insist on POST for update.
+            // Update - ?update= or body of application/sparql-update
+            if ( isPOST && ( hasParamUpdate || contentTypeSPARQLUpdate.equalsIgnoreCase(ct) ) ) {
+                // SPARQL Update
+                if ( !allowUpdate(action) )
+                    ServletOps.errorForbidden("Forbidden: SPARQL update") ;
+                executeRequest(action, updateServlet) ;
+                return ;
+            }
+            
+            // ?graph=, ?default
+            if ( hasParamGraph || hasParamGraphDefault ) {
+                doGraphStoreProtocol(action) ;
+                return ;
+            }
+            
+            ServletOps.errorBadRequest("Malformed request") ;
+            ServletOps.errorForbidden("Forbidden: SPARQL Graph Store Protocol : Read operation : "+method) ;
+        }
+        
+        final boolean checkForPossibleService = true ;
+        if ( checkForPossibleService && action.getEndpoint() != null ) {
+            // There is a trailing part.
+            // Check it's not the same name as a registered service.
+            // If so, dispatch to that service.
+            if ( serviceDispatch(action, OperationName.Query, queryServlet) ) return ; 
+            if ( serviceDispatch(action, OperationName.Update, updateServlet) ) return ; 
+            if ( serviceDispatch(action, OperationName.Upload, uploadServlet) ) return ;
+            if ( hasParams ) {
+                if ( serviceDispatch(action, OperationName.GSP_R, gspServlet_R) ) return ; 
+                if ( serviceDispatch(action, OperationName.GSP, gspServlet_RW) ) return ;
+            } else {
+                // No parameters - do as a quads operation on the dataset.
+                if ( serviceDispatch(action, OperationName.GSP_R, restQuads_R) ) return ;
+                if ( serviceDispatch(action, OperationName.GSP, restQuads_RW) ) return ;
+            }
+        }
+        // There is a trailing part - params are illegal by this point.
+        if ( hasParams )
+            // ?? Revisit to include query-on-one-graph 
+            //errorBadRequest("Can't invoke a query-string service on a direct named graph") ;
+            ServletOps.errorNotFound("Not found: dataset='"+printName(desc.getName())+"' service='"+printName(trailing)+"'");
+
+        // There is a trailing part - not a service, no params ==> GSP direct naming.
+        doGraphStoreProtocol(action) ;
+    }
+    
+    private String printName(String x) {
+        if ( x.startsWith("/") )
+            return x.substring(1) ;
+        return x ;
+    }
+    
+    private void doGraphStoreProtocol(HttpAction action) {
+        // The GSP servlets handle direct and indirect naming. 
+        Endpoint operation = action.getEndpoint() ;
+        String method = action.request.getMethod() ;
+
+        // Try to route to read service.
+
+        if ( HttpNames.METHOD_GET.equalsIgnoreCase(method) ||
+            HttpNames.METHOD_HEAD.equalsIgnoreCase(method) ) 
+        {
+            // Graphs Store Protocol, indirect naming, read operations
+            // Try to send to the R service, else drop through to RW service dispatch.
+            if ( allowREST_R(action)) 
+                ServletOps.errorForbidden("Forbidden: SPARQL Graph Store Protocol : Read operation : "+method) ;
+            executeRequest(action, gspServlet_R) ;
+            return ;
+        }
+
+        // Graphs Store Protocol, indirect naming, write (or read, though actually handled above)
+        // operations on the RW service.
+        if ( ! allowREST_W(action))
+            ServletOps.errorForbidden("Forbidden: SPARQL Graph Store Protocol : "+method) ;
+        executeRequest(action, gspServlet_RW) ;
+        return ;
+    }
+
+    private void executeRequest(HttpAction action, ActionSPARQL servlet) {
+        servlet.executeLifecycle(action) ;
+//      // Forwarded dispatch.
+//      try
+//      {
+//          String target = getEPName(desc.name, endpointList) ;
+//          if ( target == null )
+//              errorMethodNotAllowed(request.getMethod()) ;
+//          // ** relative servlet forward
+//          request.getRequestDispatcher(target).forward(request, response) ;    
+//          // ** absolute srvlet forward
+//          // getServletContext().getRequestDispatcher(target) ;
+//      } catch (Exception e) { errorOccurred(e) ; }        
+    }
+
+    protected static MediaType contentNegotationQuads(HttpAction action) {
+        MediaType mt = ConNeg.chooseContentType(action.request, DEF.quadsOffer, DEF.acceptNQuads) ;
+        if ( mt == null )
+            return null ;
+        if ( mt.getContentType() != null )
+            action.response.setContentType(mt.getContentType());
+        if ( mt.getCharset() != null )
+        action.response.setCharacterEncoding(mt.getCharset()) ;
+        return mt ;
+    }
+
+    /** return true if dispatched 
+     * @param opName 
+     */
+    private boolean serviceDispatch(HttpAction action, OperationName opName, ActionSPARQL servlet) {
+        Endpoint operation = action.getEndpoint() ;
+        if ( operation == null )
+            return false ;
+        if ( ! operation.isType(opName) ) 
+            return false ;
+        servlet.executeLifecycle(action) ;
+        return true ;
+    }
+
+    /** Find part after the dataset name: service name or the graph (direct naming) */ 
+    protected String findTrailing(String uri, String dsname) {
+        if ( dsname.length() >= uri.length() )
+            return "" ;
+        return uri.substring(dsname.length()+1) ;   // Skip the separating "/"
+    }
+
+    // Route everything to "doCommon"
+    @Override
+    protected void doHead(HttpServletRequest request, HttpServletResponse response)
+    { doCommon(request, response) ; }
+    
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    { doCommon(request, response) ; }
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    { doCommon(request, response) ; }
+
+    @Override
+    protected void doOptions(HttpServletRequest request, HttpServletResponse response)
+    { doCommon(request, response) ; }
+    
+    @Override
+    protected void doPut(HttpServletRequest request, HttpServletResponse response)
+    { doCommon(request, response) ; }
+
+    @Override
+    protected void doDelete(HttpServletRequest request, HttpServletResponse response)
+    { doCommon(request, response) ; }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java
new file mode 100644
index 0000000..ae87de0
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java
@@ -0,0 +1,286 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import static java.lang.String.format ;
+import static org.apache.jena.fuseki.server.CounterName.UpdateExecErrors ;
+import static org.apache.jena.riot.WebContent.charsetUTF8 ;
+import static org.apache.jena.riot.WebContent.contentTypeHTMLForm ;
+import static org.apache.jena.riot.WebContent.contentTypeSPARQLUpdate ;
+import static org.apache.jena.riot.WebContent.ctSPARQLUpdate ;
+import static org.apache.jena.riot.WebContent.isHtmlForm ;
+import static org.apache.jena.riot.WebContent.matchContentType ;
+import static org.apache.jena.riot.web.HttpNames.paramRequest ;
+import static org.apache.jena.riot.web.HttpNames.paramUpdate ;
+import static org.apache.jena.riot.web.HttpNames.paramUsingGraphURI ;
+import static org.apache.jena.riot.web.HttpNames.paramUsingNamedGraphURI ;
+
+import java.io.ByteArrayInputStream ;
+import java.io.IOException ;
+import java.io.InputStream ;
+import java.util.Arrays ;
+import java.util.Collection ;
+import java.util.Enumeration ;
+import java.util.List ;
+
+import javax.servlet.ServletException ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.io.IO ;
+import org.apache.jena.atlas.lib.StrUtils ;
+import org.apache.jena.atlas.web.ContentType ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.FusekiLib ;
+import org.apache.jena.iri.IRI ;
+import org.apache.jena.riot.system.IRIResolver ;
+import org.apache.jena.riot.web.HttpNames ;
+import org.apache.jena.web.HttpSC ;
+
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.NodeFactory ;
+import com.hp.hpl.jena.query.QueryParseException ;
+import com.hp.hpl.jena.query.Syntax ;
+import com.hp.hpl.jena.sparql.modify.UsingList ;
+import com.hp.hpl.jena.update.UpdateAction ;
+import com.hp.hpl.jena.update.UpdateException ;
+import com.hp.hpl.jena.update.UpdateFactory ;
+import com.hp.hpl.jena.update.UpdateRequest ;
+
+public class SPARQL_Update extends SPARQL_Protocol 
+{
+    // Base URI used to isolate parsing from the current directory of the server. 
+    private static final String UpdateParseBase = Fuseki.BaseParserSPARQL ;
+    private static final IRIResolver resolver = IRIResolver.create(UpdateParseBase) ;
+    
+    public SPARQL_Update()
+    { super() ; }
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) 
+            throws ServletException, IOException {
+        response.sendError(HttpSC.BAD_REQUEST_400, "Attempt to perform SPARQL update by GET.  Use POST") ;
+    }
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) 
+            throws ServletException, IOException {
+        doCommon(request, response) ;
+    }
+
+    @Override
+    protected void doOptions(HttpServletRequest request, HttpServletResponse response) {
+        setCommonHeadersForOptions(response) ;
+        response.setHeader(HttpNames.hAllow, "OPTIONS,POST") ;
+        response.setHeader(HttpNames.hContentLengh, "0") ;
+    }
+
+    @Override
+    protected void perform(HttpAction action) {
+        ContentType ct = FusekiLib.getContentType(action) ;
+        if ( ct == null )
+            ct = ctSPARQLUpdate ;
+
+        if ( matchContentType(ctSPARQLUpdate, ct) ) {
+            executeBody(action) ;
+            return ;
+        }
+        if ( isHtmlForm(ct) ) {
+            executeForm(action) ;
+            return ;
+        }
+        ServletOps.error(HttpSC.UNSUPPORTED_MEDIA_TYPE_415, "Bad content type: " + action.request.getContentType()) ;
+    }
+
+    protected static List<String> paramsForm = Arrays.asList(paramRequest, paramUpdate, 
+                                                             paramUsingGraphURI, paramUsingNamedGraphURI) ;
+    protected static List<String> paramsPOST = Arrays.asList(paramUsingGraphURI, paramUsingNamedGraphURI) ;
+    
+    @Override
+    protected void validate(HttpAction action) {
+        HttpServletRequest request = action.request ;
+
+        if ( !HttpNames.METHOD_POST.equalsIgnoreCase(request.getMethod()) )
+            ServletOps.errorMethodNotAllowed("SPARQL Update : use POST") ;
+
+        ContentType ct = FusekiLib.getContentType(action) ;
+        if ( ct == null )
+            ct = ctSPARQLUpdate ;
+        // ----
+
+        if ( matchContentType(ctSPARQLUpdate, ct) ) {
+            String charset = request.getCharacterEncoding() ;
+            if ( charset != null && !charset.equalsIgnoreCase(charsetUTF8) )
+                ServletOps.errorBadRequest("Bad charset: " + charset) ;
+            validate(action, paramsPOST) ;
+            return ;
+        }
+
+        if ( isHtmlForm(ct) ) {
+            int x = countParamOccurences(request, paramUpdate) + countParamOccurences(request, paramRequest) ;
+            if ( x == 0 )
+                ServletOps.errorBadRequest("SPARQL Update: No 'update=' parameter") ;
+            if ( x != 1 )
+                ServletOps.errorBadRequest("SPARQL Update: Multiple 'update=' parameters") ;
+
+            String requestStr = request.getParameter(paramUpdate) ;
+            if ( requestStr == null )
+                requestStr = request.getParameter(paramRequest) ;
+            if ( requestStr == null )
+                ServletOps.errorBadRequest("SPARQL Update: No update= in HTML form") ;
+            validate(action, paramsForm) ;
+            return ;
+        }
+
+        ServletOps.error(HttpSC.UNSUPPORTED_MEDIA_TYPE_415, "Must be "+contentTypeSPARQLUpdate+" or "+contentTypeHTMLForm+" (got "+ct.getContentType()+")") ;
+    }
+    
+    protected void validate(HttpAction action, Collection<String> params) {
+        if ( params != null ) {
+            Enumeration<String> en = action.request.getParameterNames() ;
+            for ( ; en.hasMoreElements() ; ) {
+                String name = en.nextElement() ;
+                if ( !params.contains(name) )
+                    ServletOps.warning(action, "SPARQL Update: Unrecognized request parameter (ignored): "+name) ;
+            }
+        }
+    }
+
+    private void executeBody(HttpAction action) {
+        InputStream input = null ;
+        try { input = action.request.getInputStream() ; }
+        catch (IOException ex) { ServletOps.errorOccurred(ex) ; }
+
+        if ( action.verbose ) {
+            // Verbose mode only .... capture request for logging (does not scale). 
+            String requestStr = null ;
+            try { requestStr = IO.readWholeFileAsUTF8(input) ; }
+            catch (IOException ex) { IO.exception(ex) ; }
+            action.log.info(format("[%d] Update = %s", action.id, ServletOps.formatForLog(requestStr))) ;
+            
+            input = new ByteArrayInputStream(requestStr.getBytes());
+            requestStr = null;
+        }
+        
+        execute(action, input) ;
+        ServletOps.successNoContent(action) ;
+    }
+
+    private void executeForm(HttpAction action) {
+        String requestStr = action.request.getParameter(paramUpdate) ;
+        if ( requestStr == null )
+            requestStr = action.request.getParameter(paramRequest) ;
+        
+        if ( action.verbose )
+            action.log.info(format("[%d] Form update = \n%s", action.id, requestStr)) ;
+        // A little ugly because we are taking a copy of the string, but hopefully shouldn't be too big if we are in this code-path
+        // If we didn't want this additional copy, we could make the parser take a Reader in addition to an InputStream
+        byte[] b = StrUtils.asUTF8bytes(requestStr) ;
+        ByteArrayInputStream input = new ByteArrayInputStream(b);
+        requestStr = null;  // free it early at least
+        execute(action, input);
+        ServletOps.successPage(action,"Update succeeded") ;
+    }
+    
+    private void execute(HttpAction action, InputStream input) {
+        UsingList usingList = processProtocol(action.request) ;
+        
+        // If the dsg is transactional, then we can parse and execute the update in a streaming fashion.
+        // If it isn't, we need to read the entire update request before performing any updates, because
+        // we have to attempt to make the request atomic in the face of malformed queries
+        UpdateRequest req = null ;
+        if (!action.isTransactional()) { 
+            try {
+                // TODO implement a spill-to-disk version of this
+                req = UpdateFactory.read(usingList, input, UpdateParseBase, Syntax.syntaxARQ);
+            }
+            catch (UpdateException ex) { ServletOps.errorBadRequest(ex.getMessage()) ; return ; }
+            catch (QueryParseException ex) { ServletOps.errorBadRequest(messageForQPE(ex)) ; return ; }
+        }
+        
+        action.beginWrite() ;
+        try {
+            if (req == null )
+                UpdateAction.parseExecute(usingList, action.getActiveDSG(), input, UpdateParseBase, Syntax.syntaxARQ);
+            else
+                UpdateAction.execute(req, action.getActiveDSG()) ;
+            action.commit() ;
+        } catch (UpdateException ex) {
+            action.abort() ;
+            incCounter(action.getEndpoint().getCounters(), UpdateExecErrors) ;
+            ServletOps.errorOccurred(ex.getMessage()) ;
+        } catch (QueryParseException ex) {
+            action.abort() ;
+            // Counter inc'ed further out.
+            ServletOps.errorBadRequest(messageForQPE(ex)) ;
+        } catch (Throwable ex) {
+            if ( ! ( ex instanceof ActionErrorException ) )
+            {
+                try { action.abort() ; } catch (Exception ex2) {}
+                ServletOps.errorOccurred(ex.getMessage(), ex) ;
+            }
+        } finally { action.endWrite(); }
+    }
+
+    /* [It is an error to supply the using-graph-uri or using-named-graph-uri parameters 
+     * when using this protocol to convey a SPARQL 1.1 Update request that contains an 
+     * operation that uses the USING, USING NAMED, or WITH clause.]
+     * 
+     * We will simply capture any using parameters here and pass them to the parser, which will be
+     * responsible for throwing an UpdateException if the query violates the above requirement,
+     * and will also be responsible for adding the using parameters to update queries that can
+     * accept them.
+     */
+    private UsingList processProtocol(HttpServletRequest request) {
+        UsingList toReturn = new UsingList();
+        
+        String[] usingArgs = request.getParameterValues(paramUsingGraphURI) ;
+        String[] usingNamedArgs = request.getParameterValues(paramUsingNamedGraphURI) ;
+        if ( usingArgs == null && usingNamedArgs == null )
+            return toReturn;
+        if ( usingArgs == null )
+            usingArgs = new String[0] ;
+        if ( usingNamedArgs == null )
+            usingNamedArgs = new String[0] ;
+        // Impossible.
+//        if ( usingArgs.length == 0 && usingNamedArgs.length == 0 )
+//            return ;
+        
+        for ( String nodeUri : usingArgs ) {
+            toReturn.addUsing(createNode(nodeUri)) ;
+        }
+        for ( String nodeUri : usingNamedArgs ) {
+            toReturn.addUsingNamed(createNode(nodeUri)) ;
+        }
+
+        return toReturn ;
+    }
+    
+    private static Node createNode(String x) {
+        try {
+            IRI iri = resolver.resolve(x) ;
+            return NodeFactory.createURI(iri.toString()) ;
+        } catch (Exception ex)
+        {
+            ServletOps.errorBadRequest("SPARQL Update: bad IRI: "+x) ;
+            return null ;
+        }
+        
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Upload.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Upload.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Upload.java
new file mode 100644
index 0000000..458c924
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Upload.java
@@ -0,0 +1,291 @@
+/*
+ * 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.jena.fuseki.servlets;
+
+import static java.lang.String.format ;
+
+import java.io.IOException ;
+import java.io.InputStream ;
+import java.io.PrintWriter ;
+import java.util.zip.GZIPInputStream ;
+
+import javax.servlet.ServletException ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.commons.fileupload.FileItemIterator ;
+import org.apache.commons.fileupload.FileItemStream ;
+import org.apache.commons.fileupload.servlet.ServletFileUpload ;
+import org.apache.commons.fileupload.util.Streams ;
+import org.apache.jena.atlas.web.ContentType ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.FusekiLib ;
+import org.apache.jena.iri.IRI ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFLanguages ;
+import org.apache.jena.riot.lang.StreamRDFCounting ;
+import org.apache.jena.riot.system.IRIResolver ;
+import org.apache.jena.riot.system.StreamRDF ;
+import org.apache.jena.riot.system.StreamRDFLib ;
+import org.apache.jena.riot.web.HttpNames ;
+import org.apache.jena.web.HttpSC ;
+
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.NodeFactory ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
+import com.hp.hpl.jena.sparql.core.Quad ;
+
+public class SPARQL_Upload extends ActionSPARQL 
+{
+    public SPARQL_Upload() {
+        super() ;
+    }
+
+    // Methods to respond to.
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException
+    {
+        doCommon(request, response) ;
+    }
+    
+    @Override
+    protected void doOptions(HttpServletRequest request, HttpServletResponse response)
+    {
+        setCommonHeaders(response);
+        setCommonHeadersForOptions(response) ;
+        response.setHeader(HttpNames.hAllow, "OPTIONS,POST");
+        response.setHeader(HttpNames.hContentLengh, "0") ;
+    }
+    
+    @Override
+    protected void perform(HttpAction action)
+    {
+        // Only allows one file in the upload.
+        boolean isMultipart = ServletFileUpload.isMultipartContent(action.request);
+        if ( ! isMultipart )
+            ServletOps.error(HttpSC.BAD_REQUEST_400 , "Not a file upload") ;
+        
+        long count = upload(action, Fuseki.BaseUpload) ;
+        ServletOps.success(action) ;
+        try {
+            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>");
+            out.println("<p>") ;
+            out.println("Triples = "+count + "\n");
+            out.println("<p>") ;
+            out.println("</p>") ;
+            out.println("<button onclick=\"timeFunction()\">Back to Fuseki</button>");
+            out.println("</p>") ;
+            out.println("<script type=\"text/javascript\">");
+            out.println("function timeFunction(){");
+            out.println("window.location.href = \"/fuseki.html\";}");
+            out.println("</script>");
+            out.println("</body>") ;
+            out.println("</html>") ;
+            out.flush() ;
+            ServletOps.success(action) ;
+        }
+        catch (Exception ex) { ServletOps.errorOccurred(ex) ; }
+    }
+    
+    // Also used by SPARQL_REST
+    static public long upload(HttpAction action, String base)
+    {
+        if ( action.isTransactional() )
+            return uploadTxn(action, base) ;
+        else
+            return uploadNonTxn(action, base) ;
+    }
+
+    /** Non-transaction - buffer to a temporary graph so that parse errors
+     * are caught before inserting any data. 
+     */
+     private static long uploadNonTxn(HttpAction action, String base) {
+         UploadDetails upload = uploadWorker(action, base) ;
+         String graphName = upload.graphName ;
+         DatasetGraph dataTmp = upload.data ;
+         long count = upload.count ;
+         
+         if ( graphName == null )
+             action.log.info(format("[%d] Upload: %d Quads(s)",action.id, count)) ;
+         else
+             action.log.info(format("[%d] Upload: Graph: %s, %d triple(s)", action.id, graphName,  count)) ;
+
+         Node gn = null ;
+         if ( graphName != null ) {
+             gn = graphName.equals(HttpNames.valueDefault)
+                 ? Quad.defaultGraphNodeGenerated 
+                 : NodeFactory.createURI(graphName) ;
+         }
+
+         action.beginWrite() ;
+         try {
+             if ( gn != null )
+                 FusekiLib.addDataInto(dataTmp.getDefaultGraph(), action.getActiveDSG(), gn) ;
+             else
+                 FusekiLib.addDataInto(dataTmp, action.getActiveDSG()) ;
+
+             action.commit() ;
+             return count ;
+         } catch (RuntimeException ex)
+        {
+            // If anything went wrong, try to backout.
+            try { action.abort() ; } catch (Exception ex2) {}
+            ServletOps.errorOccurred(ex.getMessage()) ;
+            return -1 ;
+        } 
+        finally { action.endWrite() ; }
+    }
+
+     /** Transactional - we'd like data to go straight to the destination, with an abort on parse error.
+      * But file upload with a name means that the name can be after the data
+      * (it is in the Fuseki default pages).
+      * Use Graph Store protocol for bulk uploads.
+      * (It would be possible to process the incoming stream and see the graph name first.)
+      */
+      private static long uploadTxn(HttpAction action, String base) {
+          // We can't do better than the non-transaction approach.
+          return uploadNonTxn(action, base) ;
+      }
+     
+    static class UploadDetails {
+        final String graphName  ;
+        final DatasetGraph data ;
+        final long count ;
+        UploadDetails(String gn, DatasetGraph dsg, long parserCount) {
+            this.graphName = gn ;
+            this.data = dsg ;
+            this.count = parserCount ;
+        }
+    }
+      
+    /** Process an HTTP file upload of RDF with additiona name field for the graph name.
+     *  We can't stream straight into a dataset because the graph name can be after the data. 
+     *  @return graph name and count
+     */
+    
+    // ?? Combine with Upload.fileUploadWorker
+    // Difference is the handling of names for graphs.  
+    static private UploadDetails uploadWorker(HttpAction action, String base)
+    {
+        DatasetGraph dsgTmp = DatasetGraphFactory.createMem() ;
+        ServletFileUpload upload = new ServletFileUpload();
+        String graphName = null ;
+        boolean isQuads = false ;
+        long count = -1 ;
+        
+        String name = null ;  
+        ContentType ct = null ;
+        Lang lang = null ;
+
+        try {
+            FileItemIterator iter = upload.getItemIterator(action.request);
+            while (iter.hasNext()) {
+                FileItemStream item = iter.next();
+                String fieldName = item.getFieldName();
+                InputStream stream = item.openStream();
+                if (item.isFormField())
+                {
+                    // Graph name.
+                    String value = Streams.asString(stream, "UTF-8") ;
+                    if ( fieldName.equals(HttpNames.paramGraph) )
+                    {
+                        graphName = value ;
+                        if ( graphName != null && ! graphName.equals("") && ! graphName.equals(HttpNames.valueDefault) )
+                        {
+                            IRI iri = IRIResolver.parseIRI(value) ;
+                            if ( iri.hasViolation(false) )
+                                ServletOps.errorBadRequest("Bad IRI: "+graphName) ;
+                            if ( iri.getScheme() == null )
+                                ServletOps.errorBadRequest("Bad IRI: no IRI scheme name: "+graphName) ;
+                            if ( iri.getScheme().equalsIgnoreCase("http") || iri.getScheme().equalsIgnoreCase("https")) 
+                            {
+                                // Redundant??
+                                if ( iri.getRawHost() == null ) 
+                                    ServletOps.errorBadRequest("Bad IRI: no host name: "+graphName) ;
+                                if ( iri.getRawPath() == null || iri.getRawPath().length() == 0 )
+                                    ServletOps.errorBadRequest("Bad IRI: no path: "+graphName) ;
+                                if ( iri.getRawPath().charAt(0) != '/' )
+                                    ServletOps.errorBadRequest("Bad IRI: Path does not start '/': "+graphName) ;
+                            } 
+                        }
+                    }
+                    else if ( fieldName.equals(HttpNames.paramDefaultGraphURI) )
+                        graphName = null ;
+                    else
+                        // Add file type?
+                        action.log.info(format("[%d] Upload: Field=%s ignored", action.id, fieldName)) ;
+                } else {
+                    // Process the input stream
+                    name = item.getName() ; 
+                    if ( name == null || name.equals("") || name.equals("UNSET FILE NAME") ) 
+                        ServletOps.errorBadRequest("No name for content - can't determine RDF syntax") ;
+
+                    String contentTypeHeader = item.getContentType() ;
+                    ct = ContentType.create(contentTypeHeader) ;
+
+                    lang = RDFLanguages.contentTypeToLang(ct.getContentType()) ;
+                    if ( lang == null ) {
+                        lang = RDFLanguages.filenameToLang(name) ;
+
+                        //JENA-600 filenameToLang() strips off certain extensions such as .gz and 
+                        //we need to ensure that if there was a .gz extension present we wrap the stream accordingly
+                        if (name.endsWith(".gz") )
+                            stream = new GZIPInputStream(stream);
+                    }
+                    
+                    
+                    if ( lang == null )
+                        // Desperate.
+                        lang = RDFLanguages.RDFXML ;
+                    
+                    isQuads = RDFLanguages.isQuads(lang) ; 
+
+                    action.log.info(format("[%d] Upload: Filename: %s, Content-Type=%s, Charset=%s => %s", 
+                                    action.id, name,  ct.getContentType(), ct.getCharset(), lang.getName())) ;
+                    
+                    StreamRDF x = StreamRDFLib.dataset(dsgTmp) ;
+                    StreamRDFCounting dest =  StreamRDFLib.count(x) ;
+                    ActionSPARQL.parse(action, dest, stream, lang, base);
+                    count = dest.count() ;
+                }
+            }    
+
+            if ( graphName == null || graphName.equals("") ) 
+                graphName = HttpNames.valueDefault ;
+            if ( isQuads )
+                graphName = null ;
+            return new UploadDetails(graphName, dsgTmp, count) ;
+        }
+        catch (ActionErrorException ex) { throw ex ; }
+        catch (Exception ex)            { ServletOps.errorOccurred(ex) ; return null ; }
+    }            
+
+    @Override
+    protected void validate(HttpAction action)
+    {}
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ServletBase.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ServletBase.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ServletBase.java
new file mode 100644
index 0000000..a39cdd1
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ServletBase.java
@@ -0,0 +1,98 @@
+/*
+ * 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.jena.fuseki.servlets ;
+
+import java.util.concurrent.atomic.AtomicLong ;
+
+import javax.servlet.http.HttpServlet ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.lib.StrUtils ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.riot.web.HttpNames ;
+
+/**
+ * Addition HTTP Servlet operations. 
+ */
+public abstract class ServletBase extends HttpServlet {
+    public static final String METHOD_DELETE    = "DELETE" ;
+    public static final String METHOD_HEAD      = "HEAD" ;
+    public static final String METHOD_GET       = "GET" ;
+    public static final String METHOD_OPTIONS   = "OPTIONS" ;
+    public static final String METHOD_POST      = "POST" ;
+    public static final String METHOD_PUT       = "PUT" ;
+    public static final String METHOD_TRACE     = "TRACE" ;
+    public static final String METHOD_PATCH     = "PATCH" ;
+    
+    private static AtomicLong     requestIdAlloc = new AtomicLong(0) ;
+
+    protected ServletBase() {}
+    
+    /**
+     * Helper method which gets a unique request ID and appends it as a header
+     * to the response
+     * 
+     * @param request
+     *            HTTP Request
+     * @param response
+     *            HTTP Response
+     * @return Request ID
+     */
+    protected static long allocRequestId(HttpServletRequest request, HttpServletResponse response) {
+        long id = requestIdAlloc.incrementAndGet() ;
+        addRequestId(response, id) ;
+        return id ;
+    }
+
+    /**
+     * Helper method for attaching a request ID to a response as a header
+     * 
+     * @param response
+     *            Response
+     * @param id
+     *            Request ID
+     */
+    protected static void addRequestId(HttpServletResponse response, long id) {
+        response.addHeader("Fuseki-Request-ID", Long.toString(id)) ;
+    }
+
+    static final String varyHeaderSetting = StrUtils.strjoin(",",
+         HttpNames.hAccept,
+         HttpNames.hAcceptEncoding,
+         HttpNames.hAcceptCharset) ;
+
+    public static void setVaryHeader(HttpServletResponse httpResponse) {
+        httpResponse.setHeader(HttpNames.hVary, varyHeaderSetting) ;
+    }
+
+    public static boolean CORS_ENABLED = false ;
+    
+    public static void setCommonHeadersForOptions(HttpServletResponse httpResponse) {
+        if ( CORS_ENABLED )
+            httpResponse.setHeader(HttpNames.hAccessControlAllowHeaders, "X-Requested-With, Content-Type, Authorization") ;
+        setCommonHeaders(httpResponse) ;
+    }
+
+    public static void setCommonHeaders(HttpServletResponse httpResponse) {
+        if ( CORS_ENABLED )
+            httpResponse.setHeader(HttpNames.hAccessControlAllowOrigin, "*") ;
+        httpResponse.setHeader(HttpNames.hServer, Fuseki.serverHttpName) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ServletOps.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ServletOps.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ServletOps.java
new file mode 100644
index 0000000..277bf47
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ServletOps.java
@@ -0,0 +1,209 @@
+/**
+ * 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.jena.fuseki.servlets;
+
+import java.io.IOException ;
+import java.io.PrintWriter ;
+
+import javax.servlet.ServletOutputStream ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.json.JSON ;
+import org.apache.jena.atlas.json.JsonValue ;
+import org.apache.jena.fuseki.servlets.UploadDetails.PreState ;
+import org.apache.jena.riot.WebContent ;
+import org.apache.jena.riot.web.HttpNames ;
+import org.apache.jena.web.HttpSC ;
+
+public class ServletOps {
+
+    public static void responseSendError(HttpServletResponse response, int statusCode, String message) {
+        try {
+            response.sendError(statusCode, message) ;
+        } catch (IOException ex) {
+            errorOccurred(ex) ;
+        } catch (IllegalStateException ex) {}
+    }
+
+    public static void responseSendError(HttpServletResponse response, int statusCode) {
+        try {
+            response.sendError(statusCode) ;
+        } catch (IOException ex) {
+            errorOccurred(ex) ;
+        }
+    }
+
+    public static void successNoContent(HttpAction action) {
+        success(action, HttpSC.NO_CONTENT_204) ;
+    }
+
+    public static void success(HttpAction action) {
+        success(action, HttpSC.OK_200) ;
+    }
+
+    public static void successCreated(HttpAction action) {
+        success(action, HttpSC.CREATED_201) ;
+    }
+
+    // When 404 is no big deal e.g. HEAD
+    public static void successNotFound(HttpAction action) {
+        success(action, HttpSC.NOT_FOUND_404) ;
+    }
+
+    //
+    public static void success(HttpAction action, int httpStatusCode) {
+        action.response.setStatus(httpStatusCode) ;
+    }
+
+    public static void successPage(HttpAction action, String message) {
+        try {
+            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("<p>") ;
+                out.println(message) ;
+                out.println("</p>") ;
+            }
+            out.println("</body>") ;
+            out.println("</html>") ;
+            out.flush() ;
+        } catch (IOException ex) {
+            errorOccurred(ex) ;
+        }
+    }
+
+    public static void warning(HttpAction action, String string) {
+        action.log.warn(string) ;
+    }
+
+    public static void warning(HttpAction action, String string, Throwable thorwable) {
+        action.log.warn(string, thorwable) ;
+    }
+
+    public static void errorBadRequest(String string) {
+        error(HttpSC.BAD_REQUEST_400, string) ;
+    }
+
+    public static void errorNotFound(String string) {
+        error(HttpSC.NOT_FOUND_404, string) ;
+    }
+
+    public static void errorNotImplemented(String msg) {
+        error(HttpSC.NOT_IMPLEMENTED_501, msg) ;
+    }
+
+    public static void errorMethodNotAllowed(String method) {
+        errorMethodNotAllowed(method, "HTTP method not allowed: " + method) ;
+    }
+
+    public static void errorMethodNotAllowed(String method, String msg) {
+        error(HttpSC.METHOD_NOT_ALLOWED_405, msg) ;
+    }
+
+    public static void errorForbidden() {
+        error(HttpSC.FORBIDDEN_403, "Forbidden") ;
+    }
+    
+    public static void errorForbidden(String msg) {
+        if ( msg != null )
+            error(HttpSC.FORBIDDEN_403, msg) ;
+        else
+            errorForbidden() ;
+    }
+
+    public static void error(int statusCode) {
+        throw new ActionErrorException(null, null, statusCode) ;
+    }
+
+    public static void error(int statusCode, String string) {
+        throw new ActionErrorException(null, string, statusCode) ;
+    }
+
+    public static void errorOccurred(String message) {
+        errorOccurred(message, null) ;
+    }
+
+    public static void errorOccurred(Throwable ex) {
+        errorOccurred(null, ex) ;
+    }
+
+    public static void errorOccurred(String message, Throwable ex) {
+        throw new ActionErrorException(ex, message, HttpSC.INTERNAL_SERVER_ERROR_500) ;
+    }
+
+    public static String formatForLog(String string) {
+        string = string.replace('\n', ' ') ;
+        string = string.replace('\r', ' ') ;
+        return string ;
+    }
+
+    public static void setNoCache(HttpAction action) {
+        setNoCache(action.response) ;
+    }
+
+    public static void setNoCache(HttpServletResponse response) {
+        response.setHeader(HttpNames.hCacheControl, "must-revalidate,no-cache,no-store");
+        response.setHeader(HttpNames.hPragma, "no-cache");
+    }
+    
+    /** Send a JSON value as a 200 response.  Null object means no response body and no content-type headers. */
+    public static void sendJsonReponse(HttpAction action, JsonValue v) {
+        if ( v == null ) {
+            ServletOps.success(action);
+            //ServletOps.successNoContent(action);
+            return ;
+        }
+        
+        ServletOps.success(action);
+        sendJson(action, v) ;
+    }
+
+    /** Send a JSON value as a 200 response.  Null object means no response body and no content-type headers. */
+    public static void sendJson(HttpAction action, JsonValue v) {
+        if ( v == null )
+            return ;
+        
+        try {
+            HttpServletResponse response = action.response ;
+            ServletOutputStream out = response.getOutputStream() ;
+            response.setContentType(WebContent.contentTypeJSON);
+            response.setCharacterEncoding(WebContent.charsetUTF8) ;
+            JSON.write(out, v) ;
+            out.println() ; 
+            out.flush() ;
+        } catch (IOException ex) { ServletOps.errorOccurred(ex) ; }
+    }
+
+    /** response to a upload operation of some kind. */ 
+    public static void uploadResponse(HttpAction action, UploadDetails details) {
+        if ( details.getExistedBefore().equals(PreState.ABSENT) )
+            ServletOps.successCreated(action) ; 
+        else
+            ServletOps.success(action) ; // successNoContent if empty body.
+        JsonValue v = details.detailsJson() ;
+        ServletOps.sendJson(action, v) ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/Upload.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/Upload.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/Upload.java
new file mode 100644
index 0000000..0db264d
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/Upload.java
@@ -0,0 +1,164 @@
+/**
+ * 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.jena.fuseki.servlets;
+
+import static java.lang.String.format ;
+import static org.apache.jena.riot.WebContent.ctMultipartFormData ;
+import static org.apache.jena.riot.WebContent.ctTextPlain ;
+import static org.apache.jena.riot.WebContent.matchContentType ;
+
+import java.io.IOException ;
+import java.io.InputStream ;
+import java.util.zip.GZIPInputStream ;
+
+import org.apache.commons.fileupload.FileItemIterator ;
+import org.apache.commons.fileupload.FileItemStream ;
+import org.apache.commons.fileupload.servlet.ServletFileUpload ;
+import org.apache.commons.fileupload.util.Streams ;
+import org.apache.jena.atlas.io.IO ;
+import org.apache.jena.atlas.web.ContentType ;
+import org.apache.jena.fuseki.FusekiLib ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFLanguages ;
+import org.apache.jena.riot.RiotParseException ;
+import org.apache.jena.riot.lang.StreamRDFCounting ;
+import org.apache.jena.riot.system.StreamRDF ;
+import org.apache.jena.riot.system.StreamRDFLib ;
+
+public class Upload {
+    public static UploadDetails incomingData(HttpAction action, StreamRDF dest) {
+        ContentType ct = FusekiLib.getContentType(action) ;
+        
+        if ( ct == null ) {
+            ServletOps.errorBadRequest("No content type") ;
+            return null ;
+        }
+         
+        if ( matchContentType(ctMultipartFormData, ct) ) {
+            return fileUploadWorker(action, dest) ;
+        }
+        // Single graph (or quads) in body.
+        
+        String base = ActionLib.wholeRequestURL(action.request) ;
+        Lang lang = RDFLanguages.contentTypeToLang(ct.getContentType()) ;
+        if ( lang == null ) {
+            ServletOps.errorBadRequest("Unknown content type for triples: " + ct) ;
+            return null ;
+        }
+        InputStream input = null ;
+        try { input = action.request.getInputStream() ; } 
+        catch (IOException ex) { IO.exception(ex) ; }
+    
+        int len = action.request.getContentLength() ;
+
+        StreamRDFCounting countingDest = StreamRDFLib.count(dest) ;
+        try {
+            ActionSPARQL.parse(action, countingDest, input, lang, base) ;
+            UploadDetails details = new UploadDetails(countingDest.count(), countingDest.countTriples(),countingDest.countQuads()) ;
+            action.log.info(format("[%d] Body: Content-Length=%d, Content-Type=%s, Charset=%s => %s : %s", 
+                                   action.id, len, ct.getContentType(), ct.getCharset(), lang.getName(),
+                                   details.detailsStr())) ;
+            return details ;
+        } catch (RiotParseException ex) {
+            action.log.info(format("[%d] Body: Content-Length=%d, Content-Type=%s, Charset=%s => %s : %s",
+                                   action.id, len, ct.getContentType(), ct.getCharset(), lang.getName(),
+                                   ex.getMessage())) ;
+            throw ex ;
+        }
+    }
+    
+    /**  Process an HTTP upload of RDF files (triples or quads)
+     *   Stream straight into a graph or dataset -- unlike SPARQL_Upload the destination
+     *   is known at the start of the multipart file body
+     */
+    
+    public static UploadDetails fileUploadWorker(HttpAction action, StreamRDF dest) {
+        String base = ActionLib.wholeRequestURL(action.request) ;
+        ServletFileUpload upload = new ServletFileUpload();
+        //log.info(format("[%d] Upload: Field=%s ignored", action.id, fieldName)) ;
+        
+        // Overall counting.
+        StreamRDFCounting countingDest =  StreamRDFLib.count(dest) ;
+        
+        try {
+            FileItemIterator iter = upload.getItemIterator(action.request);
+            while (iter.hasNext()) {
+                FileItemStream fileStream = iter.next();
+                if (fileStream.isFormField()) {
+                    // Ignore?
+                    String fieldName = fileStream.getFieldName() ;
+                    InputStream stream = fileStream.openStream();
+                    String value = Streams.asString(stream, "UTF-8") ;
+                    ServletOps.errorBadRequest(format("Only files accepted in multipart file upload (got %s=%s)",fieldName, value)) ;
+                }
+                //Ignore the field name.
+                //String fieldName = fileStream.getFieldName();
+    
+                InputStream stream = fileStream.openStream();
+                // Process the input stream
+                String contentTypeHeader = fileStream.getContentType() ;
+                ContentType ct = ContentType.create(contentTypeHeader) ;
+                Lang lang = null ;
+                if ( ! matchContentType(ctTextPlain, ct) )
+                    lang = RDFLanguages.contentTypeToLang(ct.getContentType()) ;
+    
+                if ( lang == null ) {
+                    String name = fileStream.getName() ; 
+                    if ( name == null || name.equals("") ) 
+                        ServletOps.errorBadRequest("No name for content - can't determine RDF syntax") ;
+                    lang = RDFLanguages.filenameToLang(name) ;
+                    if (name.endsWith(".gz"))
+                        stream = new GZIPInputStream(stream);
+                }
+                if ( lang == null )
+                    // Desperate.
+                    lang = RDFLanguages.RDFXML ;
+    
+                String printfilename = fileStream.getName() ; 
+                if ( printfilename == null  || printfilename.equals("") )
+                    printfilename = "<none>" ; 
+    
+                // Before
+                // action.log.info(format("[%d] Filename: %s, Content-Type=%s, Charset=%s => %s", 
+                //                        action.id, printfilename,  ct.getContentType(), ct.getCharset(), lang.getName())) ;
+                
+                // count just this step
+                StreamRDFCounting countingDest2 =  StreamRDFLib.count(countingDest) ;
+                try {
+                    ActionSPARQL.parse(action, countingDest2, stream, lang, base);
+                    UploadDetails details1 = new UploadDetails(countingDest2.count(), countingDest2.countTriples(),countingDest2.countQuads()) ;
+                    action.log.info(format("[%d] Filename: %s, Content-Type=%s, Charset=%s => %s : %s", 
+                                           action.id, printfilename,  ct.getContentType(), ct.getCharset(), lang.getName(),
+                                           details1.detailsStr())) ;
+                } catch (RiotParseException ex) {
+                    action.log.info(format("[%d] Filename: %s, Content-Type=%s, Charset=%s => %s : %s",
+                                           action.id, printfilename,  ct.getContentType(), ct.getCharset(), lang.getName(),
+                                           ex.getMessage())) ;
+                    throw ex ;
+                }
+            }
+        }
+        catch (ActionErrorException ex) { throw ex ; }
+        catch (Exception ex)            { ServletOps.errorOccurred(ex.getMessage()) ; }
+        // Overall results.
+        UploadDetails details = new UploadDetails(countingDest.count(), countingDest.countTriples(),countingDest.countQuads()) ;
+        return details ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/UploadDetails.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/UploadDetails.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/UploadDetails.java
new file mode 100644
index 0000000..a5c144b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/UploadDetails.java
@@ -0,0 +1,86 @@
+/**
+ * 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.jena.fuseki.servlets;
+
+import org.apache.jena.atlas.json.JsonBuilder ;
+import org.apache.jena.atlas.json.JsonValue ;
+
+/** Record of an upload */
+public class UploadDetails {
+    public enum PreState { EXISTED, ABSENT, UNKNOWN } 
+    
+    private final long count ;
+    private final long tripleCount ;
+    private final long quadCount ;
+    private PreState state = PreState.UNKNOWN ;
+    
+    /*package*/ UploadDetails(long parserCount, long parserTripleCount, long parserQuadCount) {
+        this.count = parserCount ;
+        this.tripleCount = parserTripleCount ;
+        this.quadCount = parserQuadCount ;
+    }
+    
+    public static String detailsStr(long count, long tripleCount, long quadCount) {
+        return String.format("Count=%d Triples=%d Quads=%d", count, tripleCount, quadCount) ;
+    }
+    
+    public String detailsStr() {
+        return detailsStr(count, tripleCount, quadCount) ;
+    }
+    
+    public static String jCount = "count" ; 
+    public static String jTriplesCount = "tripleCount" ; 
+    public static String jQuadsCount = "quadCount" ; 
+    
+    public static JsonValue detailsJson(long count, long tripleCount, long quadCount) {
+        JsonBuilder b = new JsonBuilder() ;
+        b.startObject("details") ;
+        b.key(jCount).value(count) ;
+        b.key(jTriplesCount).value(tripleCount) ;
+        b.key(jQuadsCount).value(quadCount) ;
+        b.finishObject("details") ;
+        return b.build() ;
+    }
+
+    public JsonValue detailsJson() {
+        return detailsJson(count, tripleCount, quadCount) ;
+    }
+
+    public long getCount() {
+        return count ;
+    }
+
+    public long getTripleCount() {
+        return tripleCount ;
+    }
+
+    public long getQuadCount() {
+        return quadCount ;
+    }
+
+    public void setExistedBefore(boolean existedBefore) {
+        if ( existedBefore )
+            setExistedBefore(PreState.EXISTED) ;
+        else
+            setExistedBefore(PreState.ABSENT) ;
+    }
+    public void setExistedBefore(PreState state) { this.state = state ; }
+    
+    public PreState getExistedBefore() { return state ; }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java
new file mode 100644
index 0000000..055d798
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java
@@ -0,0 +1,131 @@
+/**
+ * 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.jena.fuseki.validation;
+
+import static org.apache.jena.riot.SysRIOT.fmtMessage ;
+
+import java.io.StringReader ;
+import java.util.ArrayList ;
+import java.util.List ;
+
+import org.apache.jena.atlas.json.JsonBuilder ;
+import org.apache.jena.atlas.json.JsonObject ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+import org.apache.jena.riot.* ;
+import org.apache.jena.riot.system.ErrorHandler ;
+import org.apache.jena.riot.system.StreamRDF ;
+import org.apache.jena.riot.system.StreamRDFLib ;
+
+public class DataValidator extends ValidatorBaseJson {
+    public DataValidator() { }
+  
+    static final String jInput           = "input" ;
+
+    static final String paramFormat           = "outputFormat" ;
+    static final String paramIndirection      = "url" ;
+    static final String paramData             = "data" ;
+    static final String paramSyntax           = "languageSyntax" ;
+    @Override
+    protected JsonObject execute(ValidationAction action) {
+        JsonBuilder obj = new JsonBuilder() ;
+        obj.startObject() ;
+        
+        
+        String syntax = getArgOrNull(action, paramSyntax) ;
+        if ( syntax == null || syntax.equals("") )
+            syntax = RDFLanguages.NQUADS.getName() ;
+
+        Lang language = RDFLanguages.shortnameToLang(syntax) ;
+        if ( language == null ) {
+            ServletOps.errorBadRequest("Unknown syntax: " + syntax) ;
+            return null ;
+        }
+
+        String string = getArg(action, paramData) ;
+        StringReader sr = new StringReader(string) ;
+        obj.key(jInput).value(string) ;
+        StreamRDF dest = StreamRDFLib.sinkNull() ;
+        
+        try {
+            // Set error handler!
+            RDFDataMgr.parse(dest, sr, null, language) ;
+        } catch (RiotParseException ex) {
+            obj.key(jErrors) ;
+
+            obj.startArray() ;      // Errors array
+            obj.startObject() ;
+            obj.key(jParseError).value(ex.getMessage()) ;
+            obj.key(jParseErrorLine).value(ex.getLine()) ;
+            obj.key(jParseErrorCol).value(ex.getCol()) ;
+            obj.finishObject() ;
+            obj.finishArray() ;
+            
+            obj.finishObject() ; // Outer object
+            return obj.build().getAsObject() ;
+        } catch (RiotException ex) {
+            obj.key(jErrors) ;
+
+            obj.startArray() ;      // Errors array
+            obj.startObject() ;
+            obj.key(jParseError).value(ex.getMessage()) ;
+            obj.finishObject() ;
+            obj.finishArray() ;
+            
+            obj.finishObject() ; // Outer object
+            return obj.build().getAsObject() ;
+        }
+
+        
+        obj.finishObject() ;
+        return obj.build().getAsObject() ;
+    }
+    @Override
+    protected String validatorName() {
+        return "RDF Data" ;
+    }
+    
+    // Error handler that records messages
+    private static class ErrorHandlerMsg implements ErrorHandler
+    {
+        private List<String> messages = new ArrayList<>() ;
+
+        ErrorHandlerMsg(List<String> messages) { this.messages = messages; }
+        
+        @Override
+        public void warning(String message, long line, long col)
+        { output(message, line, col, "Warning", "warning") ; }
+    
+        // Attempt to continue.
+        @Override
+        public void error(String message, long line, long col)
+        { output(message, line, col, "Error", "error") ; }
+    
+        @Override
+        public void fatal(String message, long line, long col)
+        { output(message, line, col, "Fatal", "error") ; throw new RiotException(fmtMessage(message, line, col)) ; }
+        
+        private void output(String message, long line, long col, String typeName, String className)
+        {
+            String str = fmtMessage(message, line, col) ;
+            messages.add(str) ;
+        }
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/IRIValidator.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/IRIValidator.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/IRIValidator.java
new file mode 100644
index 0000000..3942115
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/IRIValidator.java
@@ -0,0 +1,168 @@
+/**
+ * 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.jena.fuseki.validation;
+
+import java.util.ArrayList ;
+import java.util.Iterator ;
+import java.util.List ;
+
+import org.apache.jena.atlas.json.JsonBuilder ;
+import org.apache.jena.atlas.json.JsonObject ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+import org.apache.jena.iri.IRI ;
+import org.apache.jena.iri.IRIFactory ;
+import org.apache.jena.iri.Violation ;
+import org.apache.jena.riot.system.IRIResolver ;
+
+public class IRIValidator extends ValidatorBaseJson {
+    public IRIValidator() { }
+    
+    static IRIFactory iriFactory = IRIResolver.iriFactory ;
+    
+    static final String paramIRI           = "iri" ;
+
+    // Output is an object  { "iris" : [ ] }
+    // { "iri": "" , "error": [], "warnings": [] }
+    static final String jIRIs    = "iris" ;
+    static final String jIRI     = "iri" ;
+
+    @Override
+    protected JsonObject execute(ValidationAction action) {
+        JsonBuilder obj = new JsonBuilder() ;
+        obj.startObject() ;
+        
+        String args[] = getArgs(action, paramIRI) ;
+        if ( args.length == 0 )
+            ServletOps.errorBadRequest("No IRIs supplied");
+        
+        obj.key(jIRIs) ;
+        obj.startArray() ;
+        
+        for ( String iriStr : args )
+        {
+            obj.startObject() ;
+            obj.key(jIRI).value(iriStr) ;
+
+            IRI iri = iriFactory.create(iriStr) ;
+
+
+            List<String> errors = new ArrayList<>() ;
+            List<String> warnings = new ArrayList<>() ;
+
+            if ( iri.isRelative() )
+                warnings.add("Relative IRI: "+iriStr) ;
+
+            Iterator<Violation> vIter = iri.violations(true) ;
+            for ( ; vIter.hasNext() ; )
+            {
+                Violation v = vIter.next() ;
+                String str = v.getShortMessage() ;
+                if ( v.isError() )
+                    errors.add(str) ;
+                else
+                    warnings.add(str) ;
+            }
+            
+            obj.key(jErrors) ;
+            obj.startArray() ;
+            for ( String msg : errors )
+                obj.value(msg) ;
+            obj.finishArray() ;
+                
+            obj.key(jWarnings) ;
+            obj.startArray() ;
+            for ( String msg : warnings )
+                obj.value(msg) ;
+            obj.finishArray() ;
+
+            obj.finishObject() ;
+        }
+          
+        
+       obj.finishArray() ;
+        
+        obj.finishObject() ;
+        return obj.build().getAsObject() ;
+    }
+    @Override
+    protected String validatorName() {
+        return "RDF Data" ;
+    }
+}
+
+//static final String paramIRI      = "iri" ;
+////static IRIFactory iriFactory = IRIFactory.iriImplementation() ;
+//static IRIFactory iriFactory = IRIResolver.iriFactory ;
+//
+//@Override
+//protected void execute(HttpServletRequest httpRequest, HttpServletResponse httpResponse)
+//{
+//    try {
+//        String[] args = httpRequest.getParameterValues(paramIRI) ;
+//        ServletOutputStream outStream = httpResponse.getOutputStream() ;
+//        PrintStream stdout = System.out ;
+//        PrintStream stderr = System.err ;
+//        System.setOut(new PrintStream(outStream)) ;
+//        System.setErr(new PrintStream(outStream)) ;
+//
+//        setHeaders(httpResponse) ;
+//
+//        outStream.println("<html>") ;
+//        printHead(outStream, "Jena IRI Validator Report") ;
+//        outStream.println("<body>") ;
+//
+//        outStream.println("<h1>IRI Report</h1>") ;
+//
+//        startFixed(outStream) ;
+//
+//        try {
+//            boolean first = true ;
+//            for ( String iriStr : args )
+//            {
+//                if ( ! first )
+//                    System.out.println() ;
+//                first = false ;
+//
+//                IRI iri = iriFactory.create(iriStr) ;
+//                System.out.println(iriStr + " ==> "+iri) ;
+//                if ( iri.isRelative() )
+//                    System.out.println("Relative IRI: "+iriStr) ;
+//
+//                Iterator<Violation> vIter = iri.violations(true) ;
+//                for ( ; vIter.hasNext() ; )
+//                {
+//                    String str = vIter.next().getShortMessage() ;
+//                    str = htmlQuote(str) ;
+//                    
+//                    System.out.println(str) ;
+//                }
+//            }
+//        } finally 
+//        {
+//            finishFixed(outStream) ;
+//            System.out.flush() ;
+//            System.err.flush() ;
+//            System.setOut(stdout) ;
+//            System.setErr(stdout) ;
+//        }
+//
+//        outStream.println("</body>") ;
+//        outStream.println("</html>") ;
+//    } catch (IOException ex) {}
+//} 


[46/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java
new file mode 100644
index 0000000..8d8a080
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java
@@ -0,0 +1,70 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.json.JsonValue ;
+import org.apache.jena.atlas.lib.InternalErrorException ;
+import org.apache.jena.fuseki.async.AsyncPool ;
+import org.apache.jena.fuseki.async.AsyncTask ;
+import org.apache.jena.fuseki.servlets.HttpAction ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+
+/** Base helper class for creating async tasks on "items", based on POST  */ 
+public abstract class ActionAsyncTask extends ActionItem
+{
+    // ?? Better as a library (mixin) so can be used outside ActionItem
+    private static AsyncPool asyncPool = AsyncPool.get() ;
+    
+    public ActionAsyncTask() { super() ; }
+    
+    @Override
+    final
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) {
+        ServletOps.errorMethodNotAllowed(METHOD_GET);
+    }
+
+    @Override
+    final
+    protected JsonValue execGetItem(HttpAction action) { 
+        throw new InternalErrorException("GET for AsyncTask -- Should not be here!") ;
+    }
+
+    @Override
+    final
+    protected JsonValue execPostItem(HttpAction action) {
+        Runnable task = createRunnable(action) ;
+        AsyncTask aTask = Async.execASyncTask(action, AsyncPool.get(), "backup", task) ;
+        Async.setLocationHeader(action, aTask);
+        return Async.asJson(aTask) ;
+    }
+    
+    public static AsyncTask execASyncTask(HttpAction action, AsyncPool asyncPool, String displayName, Runnable task) {
+        AsyncTask atask = Async.asyncTask(asyncPool, displayName, action.getDataService(), task) ;
+        Async.setLocationHeader(action, atask);
+        JsonValue v = Async.asJson(atask) ;
+        ServletOps.sendJsonReponse(action, v);
+        return atask ;
+    }
+    
+    protected abstract Runnable createRunnable(HttpAction action) ;
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
new file mode 100644
index 0000000..34f134e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
@@ -0,0 +1,84 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import static java.lang.String.format ;
+
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.fuseki.servlets.HttpAction ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
+
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+
+public class ActionBackup extends ActionAsyncTask
+{
+    public ActionBackup() { super() ; }
+    
+    // Only POST
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
+        doCommon(request, response);
+    }
+
+    @Override
+    protected Runnable createRunnable(HttpAction action) {
+        String name = action.getDatasetName() ;
+        if ( name == null ) {
+            action.log.error("Null for dataset name in item request") ;  
+            ServletOps.errorOccurred("Null for dataset name in item request");
+            return null ;
+        }
+        action.log.info(format("[%d] Backup dataset %s", action.id, name)) ;
+        return new BackupTask(action) ;
+    }
+
+    static class BackupTask implements Runnable {
+        static private Logger log = LoggerFactory.getLogger("Backup") ;
+        
+        private final long actionId ;
+        private final DatasetGraph dataset ;
+        private final String datasetName ;
+        
+        public BackupTask(HttpAction action) {
+            this.actionId = action.id ;
+            action.getDataAccessPoint() ;
+            action.getDataAccessPoint().getDataService() ;
+            action.getDataAccessPoint().getDataService().getDataset() ;
+            this.dataset = action.getDataAccessPoint().getDataService().getDataset() ;
+            this.datasetName = action.getDatasetName() ;
+        }
+
+        @Override
+        public void run() {
+            try {
+                String backupFilename = Backup.chooseFileName(datasetName) ;
+                log.info(format("[%d] >>>> Start backup %s -> %s", actionId, datasetName, backupFilename)) ;
+                Backup.backup(dataset, backupFilename) ;
+                log.info(format("[%d] <<<< Finish backup %s -> %s", actionId, datasetName, backupFilename)) ;
+            } catch (Exception ex) {
+                log.info(format("[%d] **** Exception in backup", actionId), ex) ;
+            }
+        }
+    }
+}
+    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionContainerItem.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionContainerItem.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionContainerItem.java
new file mode 100644
index 0000000..134afc4
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionContainerItem.java
@@ -0,0 +1,94 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import org.apache.jena.atlas.json.JsonValue ;
+import org.apache.jena.fuseki.servlets.HttpAction ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+import org.apache.jena.web.HttpSC ;
+
+/** Base for actions that are container and also have action on items */ 
+public abstract class ActionContainerItem extends ActionCtl {
+    
+    public ActionContainerItem() { super() ; }
+    
+    @Override
+    final
+    protected void perform(HttpAction action) {
+        String method = action.request.getMethod() ;
+        if ( method.equals(METHOD_GET) )
+            execGet(action) ;
+        else if ( method.equals(METHOD_POST) )
+            execPost(action) ;
+        else if ( method.equals(METHOD_DELETE) )
+            execDelete(action) ;
+        else
+            ServletOps.error(HttpSC.METHOD_NOT_ALLOWED_405) ;
+    }
+
+    protected void execGet(HttpAction action) {
+        JsonValue v ;
+        if ( isContainerAction(action)  )
+            v = execGetContainer(action) ;
+        else
+            v = execGetItem(action) ;
+        
+        ServletOps.sendJsonReponse(action, v);
+    }
+    
+    /** GET request on the container - respond with JSON, or null for plain 200 */  
+    protected abstract JsonValue execGetContainer(HttpAction action) ;
+    /** GET request on an item in the container - repond with JSON, or null for plain 200 */  
+    protected abstract JsonValue execGetItem(HttpAction action) ;
+
+    protected void execPost(HttpAction action) {
+        JsonValue v ;
+        if ( isContainerAction(action) )
+            v = execPostContainer(action) ;
+        else
+            v = execPostItem(action) ;
+        
+        ServletOps.sendJsonReponse(action, v);
+    }
+    
+    /** POST request on an item in the container - respond with JSON, or null for plain 200 */  
+    protected abstract JsonValue execPostContainer(HttpAction action) ;
+    /** POST request on an item in the container - respond with JSON, or null for plain 200 */  
+    protected abstract JsonValue execPostItem(HttpAction action) ;
+
+    
+    /** DELETE request */
+    protected void execDelete(HttpAction action) {
+        if ( isContainerAction(action)  )
+            execDeleteContainer(action) ;
+        else 
+            execDeleteItem(action) ;
+        ServletOps.success(action) ;
+    }
+    
+    /** DELETE request on an item in the container */
+    protected void execDeleteContainer(HttpAction action) {
+        ServletOps.errorMethodNotAllowed(METHOD_DELETE, "DELETE applied to a container") ;
+    }
+
+    /** DELETE request on an item in the container */
+    protected void execDeleteItem(HttpAction action) {
+        ServletOps.errorMethodNotAllowed(METHOD_DELETE) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java
new file mode 100644
index 0000000..20073d9
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java
@@ -0,0 +1,97 @@
+/*
+ * 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.jena.fuseki.mgt;
+
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.server.DataAccessPoint ;
+import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
+import org.apache.jena.fuseki.server.DataService ;
+import org.apache.jena.fuseki.servlets.ActionBase ;
+import org.apache.jena.fuseki.servlets.HttpAction ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+
+/** Control/admin request lifecycle */
+public abstract class ActionCtl extends ActionBase
+{
+    protected ActionCtl() { super(Fuseki.adminLog) ; }
+    
+    @Override
+    final
+    protected void execCommonWorker(HttpAction action) {
+        DataAccessPoint dataAccessPoint ;
+        DataService dSrv ;
+        
+        String datasetUri = mapRequestToDatasetName(action) ;
+        if ( datasetUri != null ) {
+            dataAccessPoint = DataAccessPointRegistry.get().get(datasetUri) ;
+            if ( dataAccessPoint == null ) {
+                ServletOps.errorNotFound("Not found: "+datasetUri) ;
+                return ;
+            }
+        }
+        else {
+            // This is a placeholder when creating new DatasetRefs
+            // and also if addressing a container, not a dataset
+            dataAccessPoint = null ;
+            dSrv = DataService.serviceOnlyDataService() ;
+        }
+        
+        action.setControlRequest(dataAccessPoint, datasetUri) ;
+        action.setEndpoint(null, null) ;   // No operation or service name.
+        executeAction(action) ;
+    }
+
+    protected String mapRequestToDatasetName(HttpAction action) {
+        return extractItemName(action) ;
+    }
+
+    // Execute - no stats.
+    // Intercept point for the UberServlet 
+    protected void executeAction(HttpAction action) {
+        executeLifecycle(action) ;
+    }
+    
+    // This is the service request lifecycle.
+    final
+    protected void executeLifecycle(HttpAction action)
+    {
+        startRequest(action) ;
+        try {
+            perform(action) ;
+        }
+        finally { 
+            finishRequest(action) ;
+        }
+    }
+    
+    final
+    protected boolean isContainerAction(HttpAction action) {
+        return (action.getDataAccessPoint() == null ) ;
+    }
+    
+    protected abstract void perform(HttpAction action) ;
+
+//    /** Map request to uri in the registry.
+//     *  null means no mapping done (passthrough). 
+//     */
+//    protected String mapRequestToDataset(HttpAction action) 
+//    {
+//        return ActionLib.mapRequestToDataset(action.request.getRequestURI()) ;
+//    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
new file mode 100644
index 0000000..ea3d44e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
@@ -0,0 +1,404 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import static java.lang.String.format ;
+
+import java.io.* ;
+import java.util.HashMap ;
+import java.util.Iterator ;
+import java.util.Map ;
+
+import javax.servlet.ServletException ;
+import javax.servlet.ServletOutputStream ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.io.IO ;
+import org.apache.jena.atlas.json.JsonBuilder ;
+import org.apache.jena.atlas.json.JsonValue ;
+import org.apache.jena.atlas.lib.InternalErrorException ;
+import org.apache.jena.atlas.lib.StrUtils ;
+import org.apache.jena.atlas.web.ContentType ;
+import org.apache.jena.fuseki.FusekiLib ;
+import org.apache.jena.fuseki.build.Builder ;
+import org.apache.jena.fuseki.build.Template ;
+import org.apache.jena.fuseki.build.TemplateFunctions ;
+import org.apache.jena.fuseki.server.* ;
+import org.apache.jena.fuseki.servlets.* ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.RDFLanguages ;
+import org.apache.jena.riot.WebContent ;
+import org.apache.jena.riot.system.StreamRDF ;
+import org.apache.jena.riot.system.StreamRDFLib ;
+import org.apache.jena.web.HttpSC ;
+
+import com.hp.hpl.jena.datatypes.xsd.XSDDatatype ;
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.NodeFactory ;
+import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.query.ReadWrite ;
+import com.hp.hpl.jena.rdf.model.* ;
+import com.hp.hpl.jena.shared.uuid.JenaUUID ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.Quad ;
+import com.hp.hpl.jena.sparql.util.FmtUtils ;
+import com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction ;
+import com.hp.hpl.jena.update.UpdateAction ;
+import com.hp.hpl.jena.update.UpdateFactory ;
+import com.hp.hpl.jena.update.UpdateRequest ;
+
+public class ActionDatasets extends ActionContainerItem {
+    
+    private static Dataset system = SystemState.getDataset() ;
+    private static DatasetGraphTransaction systemDSG = SystemState.getDatasetGraph() ; 
+    
+    static private Property pServiceName = FusekiVocab.pServiceName ;
+    static private Property pStatus = FusekiVocab.pStatus ;
+
+    private static final String paramDatasetName    = "dbName" ;
+    private static final String paramDatasetType    = "dbType" ;
+    private static final String tDatabasetTDB       = "tdb" ;
+    private static final String tDatabasetMem       = "mem" ;
+
+    public ActionDatasets() { super() ; }
+    
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) {
+        doCommon(request, response);
+    }
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
+        doCommon(request, response);
+    }
+    
+    @Override
+    protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        doCommon(request, response);
+    }
+    
+    // ---- GET : return details of dataset or datasets.
+    @Override
+    protected JsonValue execGetContainer(HttpAction action) { 
+        action.log.info(format("[%d] GET datasets", action.id)) ;
+        JsonBuilder builder = new JsonBuilder() ;
+        builder.startObject("D") ;
+        builder.key(JsonConst.datasets) ;
+        JsonDescription.arrayDatasets(builder, DataAccessPointRegistry.get());
+        builder.finishObject("D") ;
+        return builder.build() ;
+    }
+
+    @Override
+    protected JsonValue execGetItem(HttpAction action) {
+        action.log.info(format("[%d] GET dataset %s", action.id, action.getDatasetName())) ;
+        JsonBuilder builder = new JsonBuilder() ;
+        DataAccessPoint dsDesc = DataAccessPointRegistry.get().get(action.getDatasetName()) ;
+        if ( dsDesc == null )
+            ServletOps.errorNotFound("Not found: dataset "+action.getDatasetName());
+        JsonDescription.describe(builder, dsDesc) ;
+        return builder.build() ;
+    }
+    
+    // ---- POST 
+    
+    @Override
+    protected JsonValue execPostContainer(HttpAction action) {
+        JenaUUID uuid = JenaUUID.generate() ;
+        String newURI = uuid.asURI() ;
+        Node gn = NodeFactory.createURI(newURI) ;
+        
+        ContentType ct = FusekiLib.getContentType(action) ;
+        
+        boolean committed = false ;
+        system.begin(ReadWrite.WRITE) ;
+        try {
+            Model model = system.getNamedModel(gn.getURI()) ;
+            StreamRDF dest = StreamRDFLib.graph(model.getGraph()) ;
+    
+            if ( WebContent.isHtmlForm(ct) )
+                assemblerFromForm(action, dest) ;
+            else if ( WebContent.isMultiPartForm(ct) )
+                assemblerFromUpload(action, dest) ;
+            else
+                assemblerFromBody(action, dest) ;
+            
+            // Keep a persistent copy.
+            String filename = FusekiServer.dirFileArea.resolve(uuid.asString()).toString() ;
+            try ( OutputStream outCopy = new FileOutputStream(filename) ) {
+                RDFDataMgr.write(outCopy, model, Lang.TURTLE) ;
+            }
+            
+            Statement stmt = getOne(model, null, pServiceName, null) ;
+            if ( stmt == null ) {
+                StmtIterator sIter = model.listStatements(null, pServiceName, (RDFNode)null ) ;
+                if ( ! sIter.hasNext() )
+                    ServletOps.errorBadRequest("No name given in description of Fuseki service") ;
+                sIter.next() ;
+                if ( sIter.hasNext() )
+                    ServletOps.errorBadRequest("Multiple names given in description of Fuseki service") ;
+                throw new InternalErrorException("Inconsistent: getOne didn't fail the second time") ;
+            }
+                
+            if ( ! stmt.getObject().isLiteral() )
+                ServletOps.errorBadRequest("Found "+FmtUtils.stringForRDFNode(stmt.getObject())+" : Service names are strings, then used to build the external URI") ;
+            
+            Resource subject = stmt.getSubject() ;
+            Literal object = stmt.getObject().asLiteral() ;
+            
+            if ( object.getDatatype() != null && ! object.getDatatype().equals(XSDDatatype.XSDstring) )
+                action.log.warn(format("[%d] Service name '%s' is not a string", action.id, FmtUtils.stringForRDFNode(object)));
+    
+            String datasetName = object.getLexicalForm() ;
+            String datasetPath = DataAccessPoint.canonical(datasetName) ;
+            action.log.info(format("[%d] Create database : name = %s", action.id, datasetPath)) ;
+            
+            if ( DataAccessPointRegistry.get().isRegistered(datasetPath) )
+                // And abort.
+                ServletOps.error(HttpSC.CONFLICT_409, "Name already registered "+datasetPath) ;
+                
+            model.removeAll(null, pStatus, null) ;
+            model.add(subject, pStatus, FusekiVocab.stateActive) ;
+            
+            // Need to be in Resource space at this point.
+            DataAccessPoint ref = Builder.buildDataAccessPoint(subject) ;
+            DataAccessPointRegistry.register(datasetPath, ref) ;
+            action.getResponse().setContentType(WebContent.contentTypeTextPlain); 
+            ServletOutputStream out = action.getResponse().getOutputStream() ;
+            out.println("That went well") ;
+            ServletOps.success(action) ;
+            system.commit();
+            committed = true ;
+            
+        } catch (IOException ex) { IO.exception(ex); }
+        finally { 
+            if ( ! committed ) system.abort() ; 
+            system.end() ; 
+        }
+        return null ;
+    }
+
+    @Override
+    protected JsonValue execPostItem(HttpAction action) {
+        String name = action.getDatasetName() ;
+        if ( name == null )
+            name = "''" ;
+        action.log.info(format("[%d] POST dataset %s", action.id, name)) ;
+        
+        if ( action.getDataAccessPoint() == null )
+            ServletOps.errorNotFound("Not found: dataset "+action.getDatasetName());
+        
+        DataService dSrv = action.getDataService() ;
+        if ( dSrv == null )
+            // If not set explicitly, take from DataAccessPoint
+            dSrv = action.getDataAccessPoint().getDataService() ;
+        
+        String s = action.request.getParameter("state") ;
+        if ( s == null || s.isEmpty() )
+            ServletOps.errorBadRequest("No state change given") ;
+
+        // setDatasetState is a transaction on the persistent state of the server. 
+        if ( s.equalsIgnoreCase("active") ) {
+            action.log.info(format("[%d] REBUILD DATASET %s", action.id, name)) ;
+            setDatasetState(name, FusekiVocab.stateActive) ;
+            dSrv.goActive() ; 
+            // DatasetGraph dsg = ???? ;
+            //dSrv.activate(dsg) ; 
+            //dSrv.activate() ;
+        } else if ( s.equalsIgnoreCase("offline") ) {
+            action.log.info(format("[%d] OFFLINE DATASET %s", action.id, name)) ;
+            DataAccessPoint access = action.getDataAccessPoint() ;
+            //access.goOffline() ;
+            dSrv.goOffline() ;  // Affects the target of the name. 
+            setDatasetState(name, FusekiVocab.stateOffline) ;  
+            //dSrv.offline() ;
+        } else if ( s.equalsIgnoreCase("unlink") ) {
+            action.log.info(format("[%d] UNLINK ACCESS NAME %s", action.id, name)) ;
+            DataAccessPoint access = action.getDataAccessPoint() ;
+            ServletOps.errorNotImplemented("unlink: dataset"+action.getDatasetName());
+            //access.goOffline() ;
+            // Registry?
+        }
+        else
+            ServletOps.errorBadRequest("State change operation '"+s+"' not recognized");
+        return null ;
+    }
+
+    private void assemblerFromBody(HttpAction action, StreamRDF dest) {
+        bodyAsGraph(action, dest) ;
+    }
+
+    private void assemblerFromForm(HttpAction action, StreamRDF dest) {
+        String dbType = action.getRequest().getParameter(paramDatasetType) ;
+        String dbName = action.getRequest().getParameter(paramDatasetName) ;
+        Map<String, String> params = new HashMap<>() ;
+        params.put(Template.NAME, dbName) ;
+        FusekiServer.addGlobals(params); 
+        
+        //action.log.info(format("[%d] Create database : name = %s, type = %s", action.id, dbName, dbType )) ;
+        if ( dbType == null || dbName == null )
+            ServletOps.errorBadRequest("Required parameters: dbName and dbType");
+        if ( ! dbType.equals(tDatabasetTDB) && ! dbType.equals(tDatabasetMem) )
+            ServletOps.errorBadRequest(format("dbType can be only '%s' or '%s'", tDatabasetTDB, tDatabasetMem)) ;
+        
+        String template = null ;
+        if ( dbType.equalsIgnoreCase(tDatabasetTDB))
+            template = TemplateFunctions.templateFile(Template.templateTDBFN, params) ;
+        if ( dbType.equalsIgnoreCase(tDatabasetMem))
+            template = TemplateFunctions.templateFile(Template.templateMemFN, params) ;
+        RDFDataMgr.parse(dest, new StringReader(template), "http://base/", Lang.TTL) ;
+    }
+
+    private void assemblerFromUpload(HttpAction action, StreamRDF dest) {
+        Upload.fileUploadWorker(action, dest);
+    }
+
+    // ---- DELETE
+
+    @Override
+    protected void execDeleteItem(HttpAction action) {
+//      if ( isContainerAction(action) ) {
+//      ServletOps.errorBadRequest("DELETE only applies to a specific dataset.") ;
+//      return ;
+//  }
+  
+        // Does not exist?
+        String name = action.getDatasetName() ;
+        if ( name == null )
+            name = "" ;
+        action.log.info(format("[%d] DELETE ds=%s", action.id, name)) ;
+
+        if ( ! DataAccessPointRegistry.get().isRegistered(name) )
+            ServletOps.errorNotFound("No such dataset registered: "+name);
+
+        systemDSG.begin(ReadWrite.WRITE) ;
+        boolean committed = false ;
+        try {
+            // Here, go offline.
+            // Need to reference count operations when they drop to zero
+            // or a timer goes off, we delete the dataset.
+            
+            DataAccessPoint ref = DataAccessPointRegistry.get().get(name) ;
+            // Redo check inside transaction.
+            if ( ref == null )
+                ServletOps.errorNotFound("No such dataset registered: "+name);
+
+            // Make it invisible to the outside.
+            DataAccessPointRegistry.get().remove(name) ;
+            
+            // Name to graph
+            // Statically configured databases aren't in the system database.
+            Quad q = getOne(systemDSG, null, null, pServiceName.asNode(), null) ;
+//            if ( q == null )
+//                ServletOps.errorBadRequest("Failed to find dataset for '"+name+"'");
+            if ( q != null ) {
+                Node gn = q.getGraph() ;
+                //action.log.info("SHUTDOWN NEEDED"); // To ensure it goes away?
+                systemDSG.deleteAny(gn, null, null, null) ;
+            }
+            systemDSG.commit() ;
+            committed = true ;
+            ServletOps.success(action) ;
+        } finally { 
+            if ( ! committed ) systemDSG.abort() ; 
+            systemDSG.end() ; 
+        }
+    }
+
+    // Persistent state change.
+    private void setDatasetState(String name, Resource newState) {
+        boolean committed = false ;
+        system.begin(ReadWrite.WRITE) ;
+        try {
+            String dbName = name ;
+            if ( dbName.startsWith("/") )
+                dbName = dbName.substring(1) ;
+            
+            String update =  StrUtils.strjoinNL
+                (SystemState.PREFIXES,
+                 "DELETE { GRAPH ?g { ?s fu:status ?state } }",
+                 "INSERT { GRAPH ?g { ?s fu:status "+FmtUtils.stringForRDFNode(newState)+" } }",
+                 "WHERE {",
+                 "   GRAPH ?g { ?s fu:name '"+dbName+"' ; ",
+                 "                 fu:status ?state .",
+                 "   }",
+                 "}"
+                 ) ;
+            UpdateRequest req =  UpdateFactory.create(update) ;
+            UpdateAction.execute(req, system);
+            system.commit();
+            committed = true ;
+        } finally { 
+            if ( ! committed ) system.abort() ; 
+            system.end() ; 
+        }
+    }
+    
+    // ---- Auxilary functions
+
+    private static Quad getOne(DatasetGraph dsg, Node g, Node s, Node p, Node o) {
+        Iterator<Quad> iter = dsg.findNG(g, s, p, o) ;
+        if ( ! iter.hasNext() )
+            return null ;
+        Quad q = iter.next() ;
+        if ( iter.hasNext() )
+            return null ;
+        return q ;
+    }
+    
+    private static Statement getOne(Model m, Resource s, Property p, RDFNode o) {
+        StmtIterator iter = m.listStatements(s, p, o) ;
+        if ( ! iter.hasNext() )
+            return null ;
+        Statement stmt = iter.next() ;
+        if ( iter.hasNext() )
+            return null ;
+        return stmt ;
+    }
+    
+    // XXX Merge with Upload.incomingData
+    
+    private static void bodyAsGraph(HttpAction action, StreamRDF dest) {
+        HttpServletRequest request = action.request ;
+        String base = ActionLib.wholeRequestURL(request) ;
+        ContentType ct = FusekiLib.getContentType(request) ;
+        Lang lang = RDFLanguages.contentTypeToLang(ct.getContentType()) ;
+        if ( lang == null ) {
+            ServletOps.errorBadRequest("Unknown content type for triples: " + ct) ;
+            return ;
+        }
+        InputStream input = null ;
+        try { input = request.getInputStream() ; } 
+        catch (IOException ex) { IO.exception(ex) ; }
+
+        int len = request.getContentLength() ;
+//        if ( verbose ) {
+//            if ( len >= 0 )
+//                alog.info(format("[%d]   Body: Content-Length=%d, Content-Type=%s, Charset=%s => %s", action.id, len,
+//                                ct.getContentType(), ct.getCharset(), lang.getName())) ;
+//            else
+//                alog.info(format("[%d]   Body: Content-Type=%s, Charset=%s => %s", action.id, ct.getContentType(),
+//                                ct.getCharset(), lang.getName())) ;
+//        }
+        dest.prefix("root", base+"#");
+        ActionSPARQL.parse(action, dest, input, lang, base) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionItem.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionItem.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionItem.java
new file mode 100644
index 0000000..72d3c65
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionItem.java
@@ -0,0 +1,45 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import org.apache.jena.atlas.json.JsonValue ;
+import org.apache.jena.fuseki.servlets.HttpAction ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+import org.apache.jena.web.HttpSC ;
+
+/** Action on items in a container, but not the container itself */ 
+public abstract class ActionItem extends ActionContainerItem
+{
+    public ActionItem() { super() ; }
+    
+    @Override
+    final
+    protected JsonValue execGetContainer(HttpAction action) {
+        ServletOps.error(HttpSC.METHOD_NOT_ALLOWED_405) ;
+        return null ;
+    }
+
+    @Override
+    final
+    protected JsonValue execPostContainer(HttpAction action) {
+        ServletOps.error(HttpSC.METHOD_NOT_ALLOWED_405) ;
+        return null ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionLogs.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionLogs.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionLogs.java
new file mode 100644
index 0000000..c4d6579
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionLogs.java
@@ -0,0 +1,59 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import static org.apache.jena.riot.WebContent.charsetUTF8 ;
+import static org.apache.jena.riot.WebContent.contentTypeTextPlain ;
+
+import java.io.IOException ;
+
+import javax.servlet.ServletOutputStream ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.fuseki.servlets.HttpAction ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+
+public class ActionLogs extends ActionCtl
+{
+    public ActionLogs() { super() ; } 
+    
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
+        doCommon(req, resp); 
+    }
+    
+    @Override
+    protected void perform(HttpAction action) {
+        execGet(action) ;
+    }
+
+    protected void execGet(HttpAction action) {
+        try {
+            HttpServletResponse response = action.response ;
+            ServletOutputStream out = response.getOutputStream() ;
+            response.setContentType(contentTypeTextPlain) ;
+            response.setCharacterEncoding(charsetUTF8) ;
+            out.println("Not implemented yet") ;
+            out.println() ; 
+            out.flush() ;
+            ServletOps.success(action);
+        } catch (IOException ex) { ServletOps.errorOccurred(ex) ; }
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionPing.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionPing.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionPing.java
new file mode 100644
index 0000000..b43b9f1
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionPing.java
@@ -0,0 +1,78 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import static org.apache.jena.riot.WebContent.charsetUTF8 ;
+import static org.apache.jena.riot.WebContent.contentTypeTextPlain ;
+
+import java.io.IOException ;
+
+import javax.servlet.ServletOutputStream ;
+import javax.servlet.http.HttpServlet ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import com.hp.hpl.jena.sparql.util.Utils ;
+
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+import org.apache.jena.web.HttpSC ;
+
+/** The ping servlet provides a low costy, uncached endpoint that can be used
+ * to determine if this component is running and responding.  For example,
+ * a nagios check should use this endpoint.    
+ */
+public class ActionPing extends HttpServlet
+{
+    // Ping is special.
+    // To avoid excessive logging and id allocation for a "noise" operation,
+    // this is a raw servlet.
+    public ActionPing() { super() ; } 
+    
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
+        doCommon(req, resp); 
+    }
+    
+    @Override
+    protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
+        doCommon(req, resp); 
+    }
+    
+
+    @Override
+    protected void doHead(HttpServletRequest req, HttpServletResponse resp) {
+        doCommon(req, resp); 
+    }
+
+    protected void doCommon(HttpServletRequest request, HttpServletResponse response) {
+        try {
+            ServletOps.setNoCache(response) ; 
+            response.setContentType(contentTypeTextPlain);
+            response.setCharacterEncoding(charsetUTF8) ;
+            response.setStatus(HttpSC.OK_200);
+            ServletOutputStream out = response.getOutputStream() ;
+            out.println(Utils.nowAsXSDDateTimeString());
+        } catch (IOException ex) {
+            Fuseki.serverLog.warn("ping :: IOException :: "+ex.getMessage());
+        }
+    }
+}
+
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java
new file mode 100644
index 0000000..d8f5b1e
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java
@@ -0,0 +1,114 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import static org.apache.jena.riot.WebContent.charsetUTF8 ;
+import static org.apache.jena.riot.WebContent.contentTypeJSON ;
+
+import java.io.IOException ;
+
+import javax.servlet.ServletOutputStream ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.json.JSON ;
+import org.apache.jena.atlas.json.JsonBuilder ;
+import org.apache.jena.atlas.json.JsonValue ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
+import org.apache.jena.fuseki.servlets.HttpAction ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+
+/** Description of datasets for a server */ 
+public class ActionServerStatus extends ActionCtl
+{
+    public ActionServerStatus() { super() ; }
+    
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
+        doCommon(req, resp) ;
+    }
+
+    @Override
+    protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
+        doCommon(req, resp) ;
+    }
+
+    @Override
+    protected void perform(HttpAction action) {
+        try {
+            description(action) ;
+            ServletOps.success(action) ;
+        } catch (IOException e) {
+            ServletOps.errorOccurred(e) ;
+        }
+    }
+    
+    private void description(HttpAction action) throws IOException {
+        ServletOutputStream out = action.response.getOutputStream() ;
+        action.response.setContentType(contentTypeJSON);
+        action.response.setCharacterEncoding(charsetUTF8) ;
+        
+        JsonBuilder builder = new JsonBuilder() ; 
+        builder.startObject() ;
+        describeServer(builder, action.request.getLocalPort()) ;
+        describeDatasets(builder) ;
+        builder.finishObject() ;
+        
+        JsonValue v = builder.build() ;
+        JSON.write(out, v) ;
+        out.println() ; 
+        out.flush() ;
+    }
+
+    private void describeServer(JsonBuilder builder, int requestPort) {
+        String versionStr = Fuseki.VERSION ;
+        String builtDateStr = Fuseki.BUILD_DATE ;
+        if ( versionStr == null || versionStr.startsWith("${") )
+            versionStr = "Development" ;
+        if ( builtDateStr == null || builtDateStr.startsWith("${") )
+            builtDateStr = "Unknown" ;
+
+//        builder
+//            .key(JsonConst.server)
+//            .startObject()
+//            .key(JsonConst.port).value(port)
+//            .finishObject() ;
+        builder
+            .key(JsonConst.admin)
+            .startObject()
+            .key(JsonConst.port).value(requestPort)
+            .finishObject() ;
+
+        builder
+            .key(JsonConst.version).value(versionStr)
+            .key(JsonConst.built).value(builtDateStr)
+            .key(JsonConst.startDT).value(Fuseki.serverStartedAt())
+            .key(JsonConst.uptime).value(Fuseki.serverUptimeSeconds())
+            ;
+            
+    }
+
+    private void describeDatasets(JsonBuilder builder) {
+        builder.key(JsonConst.datasets) ;
+        JsonDescription.arrayDatasets(builder, DataAccessPointRegistry.get());
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionSleep.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionSleep.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionSleep.java
new file mode 100644
index 0000000..e53eb9a
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionSleep.java
@@ -0,0 +1,98 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import static java.lang.String.format ;
+
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.json.JsonValue ;
+import org.apache.jena.atlas.lib.Lib ;
+import org.apache.jena.fuseki.async.AsyncPool ;
+import org.apache.jena.fuseki.async.AsyncTask ;
+import org.apache.jena.fuseki.servlets.HttpAction ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+import org.slf4j.Logger ;
+
+/** A task that kicks off a asynchornous operation that simply waits and exits.  For testing. */
+public class ActionSleep extends ActionCtl /* Not ActionAsyncTask - that is a container */
+{
+    public ActionSleep() { super() ; }
+    
+    // And only POST
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
+        doCommon(request, response);
+    }
+
+    @Override
+    protected void perform(HttpAction action) {
+        Runnable task = createRunnable(action) ;
+        AsyncTask aTask = Async.execASyncTask(action, AsyncPool.get(), "sleep", task) ;
+        JsonValue v = Async.asJson(aTask) ;
+        Async.setLocationHeader(action, aTask);
+        ServletOps.sendJsonReponse(action, v);
+    }
+
+    protected Runnable createRunnable(HttpAction action) {
+        String name = action.getDatasetName() ;
+        if ( name == null ) {
+//            action.log.error("Null for dataset name in item request") ;  
+//            ServletOps.errorOccurred("Null for dataset name in item request");
+//            return null ;
+            name = "''" ;
+        }
+        
+        String interval = action.request.getParameter("interval") ;
+        int sleepMilli = 5000 ;
+        if ( interval != null )
+            try {
+                sleepMilli = Integer.parseInt(interval) ;
+            } catch (NumberFormatException ex) {
+                action.log.error(format("[%d] NumberFormatException: %s", action.id, interval)) ; 
+            }
+        action.log.info(format("[%d] Sleep %s %d ms", action.id, name, sleepMilli)) ;
+        return new SleepTask(action, sleepMilli) ;
+    }
+
+    static class SleepTask implements Runnable {
+        private final Logger log ;
+        private final long actionId ;
+        private final int sleepMilli ;
+        
+        public SleepTask(HttpAction action, int sleepMilli ) {
+            this.log = action.log ;
+            this.actionId = action.id ;
+            this.sleepMilli = sleepMilli ;
+        }
+
+        @Override
+        public void run() {
+            try {
+                log.info(format("[%d] >> Sleep start", actionId)) ;
+                Lib.sleep(sleepMilli) ;
+                log.info(format("[%d] << Sleep finish", actionId)) ;
+            } catch (Exception ex) {
+                log.info(format("[%d] **** Exception", actionId), ex) ;
+            }
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java
new file mode 100644
index 0000000..490bce2
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java
@@ -0,0 +1,214 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import static java.lang.String.format ;
+import static org.apache.jena.riot.WebContent.charsetUTF8 ;
+import static org.apache.jena.riot.WebContent.contentTypeTextPlain ;
+
+import java.io.IOException ;
+import java.util.Iterator ;
+import java.util.List ;
+
+import javax.servlet.ServletOutputStream ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.json.JsonBuilder ;
+import org.apache.jena.atlas.json.JsonValue ;
+import org.apache.jena.fuseki.server.* ;
+import org.apache.jena.fuseki.servlets.HttpAction ;
+
+public class ActionStats extends ActionContainerItem
+{
+    // XXX Use ActionContainerItem
+    public ActionStats() { super() ; } 
+    
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
+        doCommon(req, resp); 
+    }
+    
+    // This does not consult the system database for dormant etc.
+    @Override
+    protected JsonValue execGetContainer(HttpAction action) { 
+        action.log.info(format("[%d] GET stats all", action.id)) ;
+        JsonBuilder builder = new JsonBuilder() ;
+        builder.startObject("top") ;
+        
+        builder.key(JsonConst.datasets) ;
+        builder.startObject("datasets") ;
+        for ( String ds : DataAccessPointRegistry.get().keys() )
+            statsDataset(builder, ds) ; 
+        builder.finishObject("datasets") ;
+        
+        builder.finishObject("top") ;
+        return builder.build() ;
+    }
+
+    @Override
+    protected JsonValue execGetItem(HttpAction action) {
+        action.log.info(format("[%d] GET stats dataset %s", action.id, action.getDatasetName())) ;
+        
+        JsonBuilder builder = new JsonBuilder() ;
+        String datasetPath = DataAccessPoint.canonical(action.getDatasetName()) ;
+        builder.startObject("TOP") ;
+        
+        builder.key(JsonConst.datasets) ;
+        builder.startObject("datasets") ;
+        statsDataset(builder, datasetPath) ;
+        builder.finishObject("datasets") ;
+        
+        builder.finishObject("TOP") ;
+        return builder.build() ;
+    }
+
+    private void statsDataset(JsonBuilder builder, String ds) {
+        // Object started
+        builder.key(ds) ;
+        
+        DataAccessPoint access = DataAccessPointRegistry.get().get(ds) ;
+        DataService dSrv = access.getDataService() ;
+        builder.startObject("counters") ;
+        
+        builder.key(CounterName.Requests.name()).value(dSrv.getCounters().value(CounterName.Requests)) ;
+        builder.key(CounterName.RequestsGood.name()).value(dSrv.getCounters().value(CounterName.RequestsGood)) ;
+        builder.key(CounterName.RequestsBad.name()).value(dSrv.getCounters().value(CounterName.RequestsBad)) ;
+        
+        
+        // Build the operation -> endpoint list map.
+        
+//      MultiMap<OperationName, Endpoint> map = MultiMap.createMapList() ;
+//      for ( OperationName operName : dSrv.getOperations() ) {
+//          List<Endpoint> endpoints = access.getDataService().getOperation(operName) ;
+//          for ( Endpoint endpoint : endpoints )
+//              map.put(operName, endpoint) ; 
+//      }
+        
+        
+        builder.key(JsonConst.endpoints).startObject("endpoints") ;
+        
+        for ( OperationName operName : dSrv.getOperations() ) {
+            List<Endpoint> endpoints = access.getDataService().getOperation(operName) ;
+//            System.err.println(operName+" : "+endpoints.size()) ;
+//            for ( Endpoint endpoint : endpoints )
+//                System.err.println("  "+endpoint.getEndpoint()) ;
+            
+            for ( Endpoint endpoint : endpoints ) {
+                
+                // Endpoint names are unique but not services.
+                
+                builder.key(endpoint.getEndpoint()) ;
+                builder.startObject() ;
+                
+                operationCounters(builder, endpoint);
+                builder.key(JsonConst.operation).value(operName.name()) ;
+                builder.key(JsonConst.description).value(operName.getDescription()) ;
+                
+                builder.finishObject() ;
+            }
+        }
+        builder.finishObject("endpoints") ;
+        builder.finishObject("counters") ;
+
+    }
+
+    private void operationCounters(JsonBuilder builder, Endpoint operation) {
+        for (CounterName cn : operation.getCounters().counters()) {
+            Counter c = operation.getCounters().get(cn) ;
+            builder.key(cn.name()).value(c.value()) ;
+        }
+    }
+
+    private void statsTxt(HttpServletResponse resp) throws IOException
+    {
+        ServletOutputStream out = resp.getOutputStream() ;
+        resp.setContentType(contentTypeTextPlain);
+        resp.setCharacterEncoding(charsetUTF8) ;
+
+        Iterator<String> iter = DataAccessPointRegistry.get().keys().iterator() ;
+        while(iter.hasNext())
+        {
+            String ds = iter.next() ;
+            DataAccessPoint desc = DataAccessPointRegistry.get().get(ds) ;
+            statsTxt(out, desc) ;
+            if ( iter.hasNext() )
+                out.println() ;
+        }
+        out.flush() ;
+    }
+    
+    private void statsTxt(ServletOutputStream out, DataAccessPoint desc) throws IOException
+    {
+        DataService dSrv = desc.getDataService() ;
+        out.println("Dataset: "+desc.getName()) ;
+        out.println("    Requests      = "+dSrv.getCounters().value(CounterName.Requests)) ;
+        out.println("    Good          = "+dSrv.getCounters().value(CounterName.RequestsGood)) ;
+        out.println("    Bad           = "+dSrv.getCounters().value(CounterName.RequestsBad)) ;
+
+        out.println("  SPARQL Query:") ;
+        out.println("    Request       = "+counter(dSrv, OperationName.Query, CounterName.Requests)) ;
+        out.println("    Good          = "+counter(dSrv, OperationName.Query, CounterName.RequestsGood)) ;
+        out.println("    Bad requests  = "+counter(dSrv, OperationName.Query, CounterName.RequestsBad)) ;
+        out.println("    Timeouts      = "+counter(dSrv, OperationName.Query, CounterName.QueryTimeouts)) ;
+        out.println("    Bad exec      = "+counter(dSrv, OperationName.Query, CounterName.QueryExecErrors)) ;
+        out.println("    IO Errors     = "+counter(dSrv, OperationName.Query, CounterName.QueryIOErrors)) ;
+
+        out.println("  SPARQL Update:") ;
+        out.println("    Request       = "+counter(dSrv, OperationName.Update, CounterName.Requests)) ;
+        out.println("    Good          = "+counter(dSrv, OperationName.Update, CounterName.RequestsGood)) ;
+        out.println("    Bad requests  = "+counter(dSrv, OperationName.Update, CounterName.RequestsBad)) ;
+        out.println("    Bad exec      = "+counter(dSrv, OperationName.Update, CounterName.UpdateExecErrors)) ;
+        
+        out.println("  Upload:") ;
+        out.println("    Requests      = "+counter(dSrv, OperationName.Upload, CounterName.Requests)) ;
+        out.println("    Good          = "+counter(dSrv, OperationName.Upload, CounterName.RequestsGood)) ;
+        out.println("    Bad           = "+counter(dSrv, OperationName.Upload, CounterName.RequestsBad)) ;
+        
+        out.println("  SPARQL Graph Store Protocol:") ;
+        out.println("    GETs          = "+gspValue(dSrv, CounterName.HTTPget)+ " (good="+gspValue(dSrv, CounterName.HTTPgetGood)+"/bad="+gspValue(dSrv, CounterName.HTTPGetBad)+")") ;
+        out.println("    PUTs          = "+gspValue(dSrv, CounterName.HTTPput)+ " (good="+gspValue(dSrv, CounterName.HTTPputGood)+"/bad="+gspValue(dSrv, CounterName.HTTPputBad)+")") ;
+        out.println("    POSTs         = "+gspValue(dSrv, CounterName.HTTPpost)+ " (good="+gspValue(dSrv, CounterName.HTTPpostGood)+"/bad="+gspValue(dSrv, CounterName.HTTPpostBad)+")") ;
+        out.println("    DELETEs       = "+gspValue(dSrv, CounterName.HTTPdelete)+ " (good="+gspValue(dSrv, CounterName.HTTPdeleteGood)+"/bad="+gspValue(dSrv, CounterName.HTTPdeleteBad)+")") ;
+        out.println("    HEADs         = "+gspValue(dSrv, CounterName.HTTPhead)+ " (good="+gspValue(dSrv, CounterName.HTTPheadGood)+"/bad="+gspValue(dSrv, CounterName.HTTPheadBad)+")") ;
+    }
+    
+    private long counter(DataService dSrv, OperationName opName, CounterName cName) {
+        return 0 ;
+    }
+    
+    private long gspValue(DataService dSrv, CounterName cn) {
+        return  counter(dSrv, OperationName.GSP, cn) +
+                counter(dSrv, OperationName.GSP_R, cn) ;
+    }
+
+    // We shouldn't get here - no doPost above.
+    
+    @Override
+    protected JsonValue execPostContainer(HttpAction action) {
+        throw new InternalError(METHOD_POST+" container") ;
+    }
+
+    @Override
+    protected JsonValue execPostItem(HttpAction action) {
+        throw new InternalError(METHOD_POST+" item") ;
+    }
+}
+
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionTasks.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionTasks.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionTasks.java
new file mode 100644
index 0000000..97f8027
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionTasks.java
@@ -0,0 +1,125 @@
+/**
+ * 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.jena.fuseki.mgt;
+import static java.lang.String.format ;
+
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.json.JsonBuilder ;
+import org.apache.jena.atlas.json.JsonValue ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.async.AsyncPool ;
+import org.apache.jena.fuseki.async.AsyncTask ;
+import org.apache.jena.fuseki.servlets.ActionBase ;
+import org.apache.jena.fuseki.servlets.HttpAction ;
+import org.apache.jena.fuseki.servlets.ServletOps ;
+import org.apache.jena.web.HttpSC ;
+
+public class ActionTasks extends ActionBase //ActionContainerItem
+{
+    private static AsyncPool[] pools = { AsyncPool.get() } ; 
+    
+    public ActionTasks() { super(Fuseki.serverLog) ; }
+    
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) {
+        doCommon(request, response);
+    }
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
+        doCommon(request, response);
+    }
+
+    private static String prefix = "/" ;
+    
+    @Override
+    protected void execCommonWorker(HttpAction action) {
+        String name = extractItemName(action) ;
+        if ( name != null ) {
+            if ( name.startsWith(prefix))
+                name = name.substring(prefix.length()) ; 
+            else
+                log.warn("Unexpected task name : "+name) ;
+        }
+        
+        String method = action.request.getMethod() ;
+        if ( method.equals(METHOD_GET) )
+            execGet(action, name) ;
+        else if ( method.equals(METHOD_POST) )
+            execPost(action, name) ;
+        else
+            ServletOps.error(HttpSC.METHOD_NOT_ALLOWED_405) ;
+    }
+
+    private void execGet(HttpAction action, String name) {
+        if ( name == null )
+            log.info(format("[%d] Tasks", action.id));
+        else
+            log.info(format("[%d] Task %s", action.id, name));
+
+        JsonValue responseBody = null ;
+        
+        if ( name == null ) {
+            JsonBuilder builder = new JsonBuilder() ;
+            builder.startArray() ;
+            
+            for ( AsyncPool pool : pools ) {
+                for ( AsyncTask aTask : pool.tasks() ) {
+                    //builder.value(aTask.getTaskId()) ;
+                    descOneTask(builder, aTask) ;
+                }
+            }
+            builder.finishArray() ;
+            responseBody = builder.build(); 
+        } else {
+            for ( AsyncPool pool : pools ) {
+                // Assumes first is only.
+                AsyncTask aTask = pool.getTask(name) ;
+                if ( aTask != null ) {
+                    JsonBuilder builder = new JsonBuilder() ;
+                    descOneTask(builder, aTask);
+                    responseBody = builder.build() ;
+                }
+            }
+        }
+        
+        if ( responseBody == null )
+            ServletOps.errorNotFound("Task '"+name+"' not found") ;
+        ServletOps.setNoCache(action) ; 
+        ServletOps.sendJsonReponse(action, responseBody); 
+    }
+
+    private void execPost(HttpAction action, String name) {
+        
+    }
+    
+    private static void descOneTask(JsonBuilder builder, AsyncTask aTask) {
+        builder.startObject("SingleTask") ;
+        builder.key(JsonConst.task).value(aTask.displayName()) ;
+        builder.key(JsonConst.taskId).value(aTask.getTaskId()) ;
+        if ( aTask.getStartPoint() != null )
+            builder.key(JsonConst.started).value(aTask.getStartPoint()) ;
+        if ( aTask.getFinishPoint() != null )
+            builder.key(JsonConst.finished).value(aTask.getFinishPoint()) ;
+        builder.finishObject("SingleTask") ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Async.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Async.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Async.java
new file mode 100644
index 0000000..1cbda48
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Async.java
@@ -0,0 +1,68 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import org.apache.http.HttpHeaders ;
+import org.apache.jena.atlas.json.JsonBuilder ;
+import org.apache.jena.atlas.json.JsonValue ;
+import org.apache.jena.fuseki.async.AsyncPool ;
+import org.apache.jena.fuseki.async.AsyncTask ;
+import org.apache.jena.fuseki.server.DataService ;
+import org.apache.jena.fuseki.servlets.HttpAction ;
+
+public class Async
+{
+    public static AsyncTask asyncTask(AsyncPool asyncPool, String displayName, DataService dataService, Runnable task) {
+        AsyncTask asyncTask = asyncPool.submit(task, displayName, dataService) ;
+        return asyncTask ;
+    }
+    
+    public static JsonValue asJson(AsyncTask asyncTask) {
+        JsonBuilder builder = new JsonBuilder() ;
+        builder.startObject("outer") ;
+        builder.key(JsonConst.taskId).value(asyncTask.getTaskId()) ;
+        builder.finishObject("outer") ;
+        return builder.build() ;
+    }
+    
+    public static void setLocationHeader(HttpAction action, AsyncTask asyncTask) {
+        String x = action.getRequest().getRequestURI() ;
+        if ( ! x.endsWith("/") )
+            x += "/" ;
+        x += asyncTask.getTaskId() ;
+        //String x = "/$/tasks/"+asyncTask.getTaskId() ;
+        action.getResponse().setHeader(HttpHeaders.LOCATION, x) ;
+    }
+
+    public static AsyncTask execASyncTask(HttpAction action, AsyncPool asyncPool, String displayName, Runnable runnable) {
+        AsyncTask atask = Async.asyncTask(asyncPool, "backup", action.getDataService(), runnable) ;
+        Async.setLocationHeader(action, atask); 
+        return atask ;
+    }
+    
+    // Combined does not work very well - e.g sleep does not set Location.
+//        public static AsyncTask execASyncTask(HttpAction action, AsyncPool asyncPool, String displayName, Runnable task) {
+//        AsyncTask atask = Async.asyncTask(asyncPool, displayName, action.getDataService(), task) ;
+//        Async.setLocationHeader(action, atask);
+//        JsonValue v = Async.asJson(atask) ;
+//        ServletOps.sendJsonReponse(action, v);
+//        return atask ;
+//    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Backup.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Backup.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Backup.java
new file mode 100644
index 0000000..1b1d823
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Backup.java
@@ -0,0 +1,102 @@
+/**
+ * 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.jena.fuseki.mgt;
+
+import java.io.* ;
+import java.util.HashSet ;
+import java.util.Set ;
+import java.util.zip.GZIPOutputStream ;
+
+import org.apache.jena.atlas.io.IO ;
+import org.apache.jena.atlas.lib.FileOps ;
+import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.fuseki.Fuseki ;
+import org.apache.jena.fuseki.FusekiException ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFDataMgr ;
+
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.util.Utils ;
+
+/** Perform a backup */ 
+public class Backup
+{
+    public static final String BackupArea = "backups" ;
+
+    public static String chooseFileName(String dsName) {
+        FileOps.ensureDir(BackupArea) ;
+        final String ds = dsName.startsWith("/") ? dsName : "/" + dsName ;
+    
+        String timestamp = Utils.nowAsString("yyyy-MM-dd_HH-mm-ss") ;
+        final String filename = BackupArea + ds + "_" + timestamp ;
+        return filename ;
+    }
+    
+    // Rcord of all backups so we don't attempt to backup the
+    // same dataset multiple times at the same time. 
+    private static Set<DatasetGraph> activeBackups = new HashSet<>() ;
+    
+    public static void backup(DatasetGraph dsg, String backupfile) {
+        if ( !backupfile.endsWith(".nq") )
+            backupfile = backupfile + ".nq" ;
+
+        // Per backup source lock. 
+        synchronized(activeBackups) {
+            // Atomically check-and-set
+            if ( activeBackups.contains(backupfile) )
+                Log.warn(Fuseki.serverLog, "Backup already in progress") ;
+            activeBackups.add(dsg) ;
+        }
+
+        OutputStream out = null ;
+        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. GZip, large buffer.
+                out = new FileOutputStream(backupfile + ".gz") ;
+                out = new GZIPOutputStream(out, 8 * 1024) ;
+                out = new BufferedOutputStream(out) ;
+            } else {
+                out = new FileOutputStream(backupfile) ;
+                out = new BufferedOutputStream(out) ;
+            }
+
+            RDFDataMgr.write(out, dsg, Lang.NQUADS) ;
+            out.close() ;
+            out = null ;
+        } catch (FileNotFoundException e) {
+            Log.warn(Fuseki.serverLog, "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 */}
+            // Remove lock.
+            synchronized(activeBackups) {
+                activeBackups.remove(dsg) ;
+            }
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/DumpServlet.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/DumpServlet.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/DumpServlet.java
new file mode 100644
index 0000000..0b2a070
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/DumpServlet.java
@@ -0,0 +1,312 @@
+/*
+ * 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.
+ */
+
+/** A servlet that dumps its request
+ */
+
+// Could be neater - much, much neater!
+package org.apache.jena.fuseki.mgt;
+
+import java.io.BufferedReader ;
+import java.io.IOException ;
+import java.io.PrintWriter ;
+import java.io.StringWriter ;
+import java.util.Date ;
+import java.util.Enumeration ;
+import java.util.Locale ;
+import java.util.Properties ;
+
+import javax.servlet.ServletContext ;
+import javax.servlet.http.Cookie ;
+import javax.servlet.http.HttpServlet ;
+import javax.servlet.http.HttpServletRequest ;
+import javax.servlet.http.HttpServletResponse ;
+
+import org.apache.jena.atlas.io.IO ;
+
+public class DumpServlet extends HttpServlet
+{
+    private static final long serialVersionUID = 99L;  // Serilizable.
+
+
+    public DumpServlet()
+    {
+
+    }
+
+    @Override
+    public void init()
+    {
+        return ;
+    }
+
+    @Override
+    public void doGet(HttpServletRequest req, HttpServletResponse resp)
+    {
+        try {
+            PrintWriter out = resp.getWriter() ;
+            resp.setContentType("text/html");
+
+            String now = new Date().toString() ;
+
+            // HEAD
+            out.println("<html>") ;
+            out.println("<head>") ;
+            out.println("<Title>Dump @ "+now+"</Title>") ;
+            // Reduce the desire to cache it.
+            out.println("<meta CONTENT=now HTTP-EQUIV=expires>") ;
+            out.println("</head>") ;
+
+            // BODY
+            out.println("<body>") ;
+            out.println("<pre>") ;
+
+            out.println("Dump : "+now);
+            out.println() ;
+            out.println("==== Request");
+            out.println() ;
+            out.print(dumpRequest(req)) ;
+            out.println() ;
+                        
+            out.println(">>>> Body");
+            out.println() ;
+            printBody(out, req) ;
+            out.println("<<<< Body");
+            
+            out.println("==== ServletContext");
+            out.println() ;
+            out.print(dumpServletContext());
+            out.println() ;
+
+            out.println("==== Environment");
+            out.println() ;
+            out.print(dumpEnvironment());
+            out.println() ;
+
+            out.println("</pre>") ;
+
+            out.println("</body>") ;
+            out.println("</html>") ;
+            out.flush() ;
+        } catch (IOException e)
+        { }
+    }
+
+    // This resets the input stream
+
+    static public String dumpRequest(HttpServletRequest req)
+    {
+        try ( StringWriter sw = new StringWriter() ;
+              PrintWriter pw = new PrintWriter(sw) ) {
+            // Standard environment
+            pw.println("Method:                 "+req.getMethod());
+            pw.println("getContentLength:       "+Integer.toString(req.getContentLength()));
+            pw.println("getContentType:         "+req.getContentType());
+            pw.println("getRequestURI:          "+req.getRequestURI());
+            pw.println("getRequestURL:          "+req.getRequestURL());
+            pw.println("getContextPath:         "+req.getContextPath());
+            pw.println("getServletPath:         "+req.getServletPath());
+            pw.println("getPathInfo:            "+req.getPathInfo());
+            pw.println("getPathTranslated:      "+req.getPathTranslated());
+            pw.println("getQueryString:         "+req.getQueryString());
+            pw.println("getProtocol:            "+req.getProtocol());
+            pw.println("getScheme:              "+req.getScheme());
+            pw.println("getServerName:          "+req.getServerName());
+            pw.println("getServerPort:          "+req.getServerPort());
+            pw.println("getRemoteUser:          "+req.getRemoteUser());
+            pw.println("getRemoteAddr:          "+req.getRemoteAddr());
+            pw.println("getRemoteHost:          "+req.getRemoteHost());
+            pw.println("getRequestedSessionId:  "+req.getRequestedSessionId());
+            {
+                Cookie c[] = req.getCookies() ;
+                if ( c == null )
+                    pw.println("getCookies:            <none>");
+                else
+                {
+                    for ( int i = 0 ; i < c.length ; i++ )            
+                    {
+                        pw.println("Cookie:        "+c[i].getName());
+                        pw.println("    value:     "+c[i].getValue());
+                        pw.println("    version:   "+c[i].getVersion());
+                        pw.println("    comment:   "+c[i].getComment());
+                        pw.println("    domain:    "+c[i].getDomain());
+                        pw.println("    maxAge:    "+c[i].getMaxAge());
+                        pw.println("    path:      "+c[i].getPath());
+                        pw.println("    secure:    "+c[i].getSecure());
+                        pw.println();
+                    }
+                }
+            }
+            
+            {
+                // To do: create a string for the output so can send to console and return it.
+                Enumeration<String> en = req.getHeaderNames() ;
+
+                for ( ; en.hasMoreElements() ; )
+                {
+                    String name = en.nextElement() ;
+                    String value = req.getHeader(name) ;
+                    pw.println("Head: "+name + " = " + value) ;
+                }
+            }
+            
+            Enumeration<String> en2 = req.getAttributeNames() ;
+            if ( en2.hasMoreElements() )
+                pw.println();
+            for ( ; en2.hasMoreElements() ; )
+            {
+                String name = en2.nextElement() ;
+                String value = req.getAttribute(name).toString() ;
+                pw.println("Attr: "+name + " = " + value) ;
+            }
+
+            // Note that doing this on a form causes the forms content (body) to be read
+            // and parsed as form variables.
+//            en = req.getParameterNames() ;
+//            if ( en.hasMoreElements() )
+//                pw.println();
+//            for ( ; en.hasMoreElements() ; )
+//            {
+//                String name = (String)en.nextElement() ;
+//                String value = req.getParameter(name) ;
+//                pw.println("Param: "+name + " = " + value) ;
+//            }
+
+
+            
+//            MultiMap<String, String> map = WebLib.parseQueryString(req) ;
+//            for ( String name : map.keys() )
+//                for ( String value : map.get(name) )
+//                    pw.println("Param: "+name + " = " + value) ;
+            
+            Enumeration<Locale> en = req.getLocales() ;
+            if ( en.hasMoreElements() )
+                pw.println();
+            for ( ; en.hasMoreElements() ; )
+            {
+                String name = en.nextElement().toString() ;
+                pw.println("Locale: "+name) ;
+            }
+
+            pw.println() ;
+            //printBody(pw, req) ;
+
+            return sw.toString() ;
+        } catch (IOException e) { return null ; }
+    }
+
+    static void printBody(PrintWriter pw, HttpServletRequest req) throws IOException
+    {
+        BufferedReader in = req.getReader() ;
+        if ( req.getContentLength() > 0 )
+            // Need +2 because last line may not have a CR/LF on it.
+            in.mark(req.getContentLength()+2) ;
+        else
+            // This is a dump - try to do something that works, even if inefficient.
+            in.mark(100*1024) ;
+
+        while(true)
+        {
+            String x = in.readLine() ;
+            if ( x == null )
+                break ;
+            x = x.replaceAll("&", "&amp;") ;
+            x = x.replaceAll("<", "&lt;") ;
+            x = x.replaceAll(">", "&gt;") ;
+            pw.println(x) ;
+        }
+        try { in.reset() ; } catch (IOException e) { System.out.println("DumpServlet: Reset of content failed: "+e) ; }
+    }
+    
+    /**
+     * <code>dumpEnvironment</code>
+     * @return String that is the HTML of the System properties as name/value pairs.
+     * The values are with single quotes independent of whether or not the value has
+     * single quotes in it.
+     */
+    static public String dumpEnvironment()
+    {
+        Properties properties = System.getProperties();
+        try ( StringWriter sw = new StringWriter() ;
+            PrintWriter pw = new PrintWriter(sw) ; ) {
+            Enumeration<Object> en = properties.keys();
+            while(en.hasMoreElements())
+            {
+                String key = en.nextElement().toString();
+                pw.println(key+": '"+properties.getProperty(key)+"'");
+            }
+
+            pw.println() ;
+            return sw.toString() ;
+        } catch (IOException e) { IO.exception(e); return null ; }
+    }
+
+    public String dumpServletContext()
+    {
+        try ( StringWriter sw = new StringWriter() ;
+              PrintWriter pw = new PrintWriter(sw) ; ) {
+            ServletContext sc =  getServletContext();
+            pw.println("majorVersion: '"+sc.getMajorVersion()+"'");
+            pw.println("minorVersion: '"+sc.getMinorVersion()+"'");
+            pw.println("contextName:  '"+sc.getServletContextName()+"'");
+            pw.println("servletInfo:  '"+getServletInfo()+"'");
+            pw.println("serverInfo:  '"+sc.getServerInfo()+"'");
+    
+            {
+                Enumeration<String> en = sc.getInitParameterNames();
+                if (en != null) {
+                    pw.println("initParameters: ");
+                    while(en.hasMoreElements())
+                    {
+                        String key = en.nextElement();
+                        pw.println(key+": '"+sc.getInitParameter(key)+"'");
+                    }
+                }
+            }
+            
+            {
+                Enumeration<String> en = sc.getAttributeNames();
+                if (en != null) {
+                    pw.println("attributes: ");
+                    while(en.hasMoreElements())
+                    {
+                        String key = en.nextElement();
+                        pw.println(key+": '"+sc.getAttribute(key)+"'");
+                    }
+                }
+            }
+            pw.println() ;
+         
+             return sw.toString() ;
+        } catch (IOException e) { IO.exception(e); return null ; }
+    }
+
+    
+    @Override
+    public void doPost(HttpServletRequest req, HttpServletResponse resp)
+    {
+        doGet(req, resp) ;
+    }
+
+
+    @Override
+    public String getServletInfo()
+    {
+        return "Dump";
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/JsonConst.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/JsonConst.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/JsonConst.java
new file mode 100644
index 0000000..e943ac1
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/JsonConst.java
@@ -0,0 +1,52 @@
+/**
+ * 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.jena.fuseki.mgt ;
+
+public class JsonConst
+{
+    public static final String taskId       = "taskId" ;
+    public static final String task         = "task" ;
+    public static final String datasets     = "datasets" ;
+
+    public static final String finished     = "finished" ;
+    public static final String started      = "started" ;
+
+    public static final String uptime       = "uptime" ;
+    public static final String startDT      = "startDateTime" ;
+    public static final String server       = "server" ;
+    public static final String port         = "port" ;
+    public static final String hostname     = "hostname" ;
+    public static final String admin        = "admin" ;
+    public static final String version      = "version" ;
+    public static final String built        = "built" ;
+
+    public static final String services     = "services" ;
+    public static final String operation    = "operation" ;
+    public static final String description  = "description" ;
+    public static final String endpoints    = "endpoints" ;
+
+    public static final String dsName       = "ds.name" ;
+    public static final String dsState      = "ds.state" ;
+    public static final String dsService    = "ds.services" ;
+
+    public static final String srvType          = "srv.type" ;
+    public static final String srvDescription   = "srv.description" ;
+    public static final String srvEndpoints     = "srv.endpoints" ;
+
+}


[54/93] [abbrv] jena git commit: ignore dependency-reduced-pom

Posted by rv...@apache.org.
ignore dependency-reduced-pom


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

Branch: refs/heads/hadoop-rdf
Commit: bf21e351d0cd0a06681347571cdcc2054f6f84a8
Parents: 4eaa2e8
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Jan 5 18:08:13 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Jan 5 18:08:13 2015 +0000

----------------------------------------------------------------------
 jena-fuseki2/jena-fuseki-server/.gitignore | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/bf21e351/jena-fuseki2/jena-fuseki-server/.gitignore
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-server/.gitignore b/jena-fuseki2/jena-fuseki-server/.gitignore
new file mode 100644
index 0000000..916e17c
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-server/.gitignore
@@ -0,0 +1 @@
+dependency-reduced-pom.xml


[09/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestSPARQLProtocol.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestSPARQLProtocol.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestSPARQLProtocol.java
new file mode 100644
index 0000000..3b86e17
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestSPARQLProtocol.java
@@ -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.
+ */
+
+package org.apache.jena.fuseki;
+
+import static org.apache.jena.fuseki.ServerTest.* ;
+import org.apache.jena.atlas.junit.BaseTest ;
+import org.apache.jena.riot.WebContent ;
+import org.junit.AfterClass ;
+import org.junit.BeforeClass ;
+import org.junit.Test ;
+
+import com.hp.hpl.jena.query.* ;
+import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP ;
+import com.hp.hpl.jena.sparql.util.Convert ;
+import com.hp.hpl.jena.update.UpdateExecutionFactory ;
+import com.hp.hpl.jena.update.UpdateFactory ;
+import com.hp.hpl.jena.update.UpdateProcessor ;
+import com.hp.hpl.jena.update.UpdateRequest ;
+// Generally poke the server using Jena APIs
+// SPARQL Query
+// SPARQL Update
+//   GSP is done in TestDatasetAccessorHTTP
+
+public class TestSPARQLProtocol extends BaseTest
+{
+    @BeforeClass public static void beforeClass()
+    {
+        ServerTest.allocServer() ;
+        ServerTest.resetServer() ;
+        // Load some data.
+        DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
+        du.putModel(model1) ;
+        du.putModel(gn1, model2) ;
+    }
+    
+    @AfterClass public static void afterClass()
+    {
+        ServerTest.resetServer() ;
+        ServerTest.freeServer() ;
+    }
+    
+    static String query(String base, String queryString)
+    {
+        return base+"?query="+Convert.encWWWForm(queryString) ;
+    }
+    
+    @Test public void query_01()
+    {
+        Query query = QueryFactory.create("SELECT * { ?s ?p ?o }") ;
+        QueryExecution qexec = QueryExecutionFactory.sparqlService(serviceQuery, query) ;
+        ResultSet rs = qexec.execSelect() ;
+        int x = ResultSetFormatter.consume(rs) ;
+        assertTrue( x != 0 ) ;
+    }
+
+    @Test public void query_02()
+    {
+        Query query = QueryFactory.create("SELECT * { ?s ?p ?o }") ;
+        QueryEngineHTTP engine = QueryExecutionFactory.createServiceRequest(serviceQuery, query) ;
+        engine.setSelectContentType(WebContent.contentTypeResultsJSON) ;
+        ResultSet rs = engine.execSelect() ;
+        int x = ResultSetFormatter.consume(rs) ;
+        assertTrue( x != 0 ) ;
+    }
+
+    @Test public void update_01()
+    {
+        UpdateRequest update = UpdateFactory.create("INSERT DATA {}") ;
+        UpdateProcessor proc = UpdateExecutionFactory.createRemote(update, serviceUpdate) ;
+        proc.execute() ;
+    }
+    
+    @Test public void update_02()
+    {
+        UpdateRequest update = UpdateFactory.create("INSERT DATA {}") ;
+        UpdateProcessor proc = UpdateExecutionFactory.createRemoteForm(update, serviceUpdate) ;
+        proc.execute() ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestDatasetAccessorHTTP.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestDatasetAccessorHTTP.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestDatasetAccessorHTTP.java
new file mode 100644
index 0000000..1314a2b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestDatasetAccessorHTTP.java
@@ -0,0 +1,261 @@
+/*
+ * 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.jena.fuseki.http;
+
+import static org.apache.jena.fuseki.ServerTest.* ;
+import org.apache.jena.atlas.junit.BaseTest ;
+import org.apache.jena.atlas.web.HttpException ;
+import org.apache.jena.fuseki.ServerTest ;
+import org.apache.jena.riot.web.HttpOp ;
+import org.apache.jena.web.HttpSC ;
+import org.junit.AfterClass ;
+import org.junit.Before ;
+import org.junit.BeforeClass ;
+import org.junit.Test ;
+
+import com.hp.hpl.jena.query.DatasetAccessor ;
+import com.hp.hpl.jena.query.DatasetAccessorFactory ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.ModelFactory ;
+
+
+public class TestDatasetAccessorHTTP extends BaseTest 
+{
+    //Model level testing.
+    
+    static final String datasetURI_not_1    = "http://localhost:"+port+"/junk" ;
+    static final String datasetURI_not_2    = serviceREST+"/not" ;
+    static final String datasetURI_not_3    = "http://localhost:"+port+datasetPath+"/not/data" ;
+    
+    @BeforeClass public static void beforeClass()   { ServerTest.allocServer() ; }
+    @AfterClass public static void afterClass()     { ServerTest.freeServer() ; }
+    @Before public void before()                    { ServerTest.resetServer() ; }
+    
+    @Test
+    public void test_ds_1()
+    {
+        // Can GET the dataset service.
+        try {
+            HttpOp.execHttpGet(serviceREST) ;
+        } catch (HttpException ex) {
+            assertTrue(HttpSC.isClientError(ex.getResponseCode())) ;
+            throw ex ;
+        }
+    }
+    
+    @Test(expected=HttpException.class)
+    public void test_ds_2()
+    {
+        try {
+            HttpOp.execHttpGet(datasetURI_not_1) ;
+        } catch (HttpException ex) {
+            assertEquals(HttpSC.NOT_FOUND_404, ex.getResponseCode()) ;
+            throw ex ;
+        }
+    }
+
+    @Test(expected=HttpException.class)
+    public void test_ds_3()
+    {
+        try {
+            HttpOp.execHttpGet(datasetURI_not_2) ;
+        } catch (HttpException ex) {
+            assertEquals(HttpSC.NOT_FOUND_404, ex.getResponseCode()) ;
+            throw ex ;
+        }
+    }
+
+    @Test
+    public void test_404_1()
+    {
+        // Not the right service.
+        DatasetAccessor du = DatasetAccessorFactory.createHTTP(datasetURI_not_1) ;
+        Model graph = du.getModel(gn99) ;
+        assertNull(graph) ; 
+    }
+
+    @Test
+    public void test_404_2()
+    {
+        DatasetAccessor du = DatasetAccessorFactory.createHTTP(datasetURI_not_2) ;
+        Model graph = du.getModel(gn99) ;
+        assertNull(graph) ;
+    }
+
+    @Test
+    public void test_404_3()
+    {
+        // Right service, wrong graph
+        DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
+        Model graph = du.getModel(gn99) ;
+        assertNull(graph) ;
+    }
+
+    @Test public void head_01()
+    {
+        DatasetAccessor du = create() ;
+        boolean b = du.containsModel(gn1) ;
+        assertFalse("Blank remote dataset as a named graph", b) ;
+    }
+
+    @Test public void head_02()
+    {
+        DatasetAccessor du = create() ;
+        du.putModel(gn1, model1) ;
+        boolean exists = du.containsModel(gn1) ;
+        assertTrue(exists) ;
+        exists = du.containsModel(gn2) ;
+        assertFalse("Expected gn2 not to exist (1)", exists) ;
+
+        exists = du.containsModel(gn2) ;
+        assertFalse("Expected gn2 not to exist (2)", exists) ;
+        // Clearup
+        du.deleteModel(gn1) ;
+    }
+
+    @Test public void get_01()
+    {
+        DatasetAccessor du = create() ;
+        Model graph = du.getModel() ;
+        assertTrue(graph.isEmpty()) ;
+    }
+    
+    @Test public void get_02()
+    {
+        DatasetAccessor du = create() ;
+        Model graph = du.getModel(gn1) ;
+        assertNull(graph) ;
+    }
+
+    @Test public void delete_01()
+    {
+        DatasetAccessor du = create() ;
+        du.deleteDefault() ;
+    }
+
+    @Test public void delete_02()
+    {
+        DatasetAccessor du = create() ;
+        du.deleteModel(gn1) ;
+        boolean exists = du.containsModel(gn1) ;
+        assertFalse("Expected gn1 not to exist", exists) ;
+    }
+
+    @Test public void put_01()
+    {
+        DatasetAccessor du = create() ;
+        du.putModel(model1) ;
+        Model graph = du.getModel() ;
+        assertTrue(graph.isIsomorphicWith(model1)) ;
+        // Empty it.
+        du.deleteDefault() ;
+        graph = du.getModel() ;
+        assertTrue(graph.isEmpty()) ;
+    }
+    
+    @Test public void put_02()
+    {
+        DatasetAccessor du = create() ;
+        du.putModel(gn1, model1) ;
+        boolean exists = du.containsModel(gn1) ;
+        assertTrue(exists) ;
+        exists = du.containsModel(gn2) ;
+        assertFalse("Expected gn2 not to exist", exists) ;
+        
+        Model graph = du.getModel() ;
+        assertTrue(graph.isEmpty()) ;
+        graph = du.getModel(gn1) ;
+        assertTrue(graph.isIsomorphicWith(model1)) ;
+        
+        du.deleteModel(gn1) ;
+        exists = du.containsModel(gn1) ;
+        assertFalse("Expected gn1 not to exist", exists) ;
+        
+        graph = du.getModel(gn1) ;
+        assertNull(graph) ;
+    }
+
+    @Test public void put_03()
+    {
+        DatasetAccessor du = create() ;
+        du.putModel(model1) ;
+        du.putModel(model2) ;  // PUT overwrites
+        Model graph = du.getModel() ;
+        assertFalse(graph.isIsomorphicWith(model1)) ;
+        assertTrue(graph.isIsomorphicWith(model2)) ;
+        // Empty it.
+        du.deleteDefault() ;
+        graph = du.getModel() ;
+        assertTrue(graph.isEmpty()) ;
+    }
+
+    @Test public void post_01()
+    {
+        DatasetAccessor du = create() ;
+        du.putModel(model1) ;
+        du.add(model2) ;  // POST appends
+        Model graph = du.getModel() ;
+        
+        Model graph3 = ModelFactory.createDefaultModel() ;
+        graph3.add(model1) ;
+        graph3.add(model2) ;
+        
+        assertFalse(graph.isIsomorphicWith(model1)) ;
+        assertFalse(graph.isIsomorphicWith(model2)) ;
+        assertTrue(graph.isIsomorphicWith(graph3)) ;
+        // Empty it.
+        du.deleteDefault() ;
+        graph = du.getModel() ;
+        assertTrue(graph.isEmpty()) ;
+    }
+
+    @Test public void post_02()
+    {
+        DatasetAccessor du = create() ;
+        du.add(model1) ;
+        du.add(model2) ;
+        Model graph = du.getModel() ;
+        
+        Model graph3 = ModelFactory.createDefaultModel() ;
+        graph3.add(model1) ;
+        graph3.add(model2) ;
+        
+        assertFalse(graph.isIsomorphicWith(model1)) ;
+        assertFalse(graph.isIsomorphicWith(model2)) ;
+        assertTrue(graph.isIsomorphicWith(graph3)) ;
+        // Empty it.
+        du.deleteDefault() ;
+        graph = du.getModel() ;
+        assertTrue(graph.isEmpty()) ;
+    }
+    
+    @Test public void clearup_1()
+    {
+        DatasetAccessor du = create() ;
+        du.deleteDefault() ;
+        du.deleteModel(gn1) ;
+        du.deleteModel(gn2) ;
+        du.deleteModel(gn99) ;
+    }
+
+    static DatasetAccessor create()
+    {
+        return DatasetAccessorFactory.createHTTP(ServerTest.serviceREST) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestDatasetGraphAccessorHTTP.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestDatasetGraphAccessorHTTP.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestDatasetGraphAccessorHTTP.java
new file mode 100644
index 0000000..7687b2c
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestDatasetGraphAccessorHTTP.java
@@ -0,0 +1,43 @@
+/*
+ * 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.jena.fuseki.http;
+
+import org.apache.jena.fuseki.ServerTest ;
+import org.apache.jena.web.AbstractTestDatasetGraphAccessor ;
+import org.apache.jena.web.DatasetGraphAccessor ;
+import org.apache.jena.web.DatasetGraphAccessorHTTP ;
+import org.junit.AfterClass ;
+import org.junit.Before ;
+import org.junit.BeforeClass ;
+
+public class TestDatasetGraphAccessorHTTP extends AbstractTestDatasetGraphAccessor
+{
+    @BeforeClass public static void beforeClass() { ServerTest.allocServer() ; }
+    @AfterClass public static void afterClass() { ServerTest.freeServer() ; }
+    @Before public void before() { 
+        ServerTest.resetServer() ; 
+    }
+
+    
+    @Override
+    protected DatasetGraphAccessor getDatasetUpdater()
+    {
+        return new DatasetGraphAccessorHTTP(ServerTest.serviceREST) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestHttpOp.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestHttpOp.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestHttpOp.java
new file mode 100644
index 0000000..9dc8713
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/http/TestHttpOp.java
@@ -0,0 +1,233 @@
+/**
+ * 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.jena.fuseki.http;
+
+import org.apache.jena.atlas.junit.BaseTest ;
+import org.apache.jena.atlas.web.HttpException ;
+import org.apache.jena.atlas.web.TypedInputStream ;
+import org.apache.jena.fuseki.ServerTest ;
+import org.apache.jena.riot.WebContent ;
+import org.apache.jena.riot.system.IRILib ;
+import org.apache.jena.riot.web.HttpOp ;
+import org.apache.jena.web.HttpSC ;
+import org.junit.AfterClass ;
+import org.junit.BeforeClass ;
+import org.junit.Test ;
+
+import com.hp.hpl.jena.sparql.engine.http.Params ;
+
+// This a mixture of testing HttpOp and testing basic operation of the SPARQL server
+// especially error cases abnd unusual usage that the higher level APIs don't use.
+public class TestHttpOp extends BaseTest {
+    
+    static String pingURL = ServerTest.urlRoot+"$/ping" ;
+    @BeforeClass public static void beforeClass() { ServerTest.allocServer() ; }
+    @AfterClass  public static void afterClass()  { ServerTest.freeServer() ; }
+    
+    static String gspServiceURL     = ServerTest.serviceREST ;
+    static String defaultGraphURL   = ServerTest.serviceREST+"?default" ;
+    static String namedGraphURL     = ServerTest.serviceREST+"?graph=http://example/g" ;
+    static String queryURL          = ServerTest.serviceQuery ;
+    static String updateURL         = ServerTest.serviceUpdate ;
+    
+    static String simpleQuery = queryURL+"?query="+IRILib.encodeUriComponent("ASK{}") ;
+    
+    // Basic operations
+    
+    @Test public void httpGet_01() {
+        try ( TypedInputStream in = HttpOp.execHttpGet(pingURL) ) {}
+    }
+    
+    @Test(expected=HttpException.class) 
+    public void httpGet_02() {
+        try ( TypedInputStream in = HttpOp.execHttpGet(ServerTest.urlRoot+"does-not-exist") ) { }
+        catch(HttpException ex) {
+            assertEquals(HttpSC.NOT_FOUND_404, ex.getResponseCode()) ;
+            throw ex ;
+        }
+    }
+
+    @Test public void httpGet_03() {
+        String x = HttpOp.execHttpGetString(pingURL) ;
+    }   
+    
+    @Test public void httpGet_04() {
+        String x = HttpOp.execHttpGetString(ServerTest.urlRoot+"does-not-exist") ;
+        assertNull(x) ;
+    }
+    
+    @Test public void httpGet_05() {
+        try ( TypedInputStream in = HttpOp.execHttpGet(simpleQuery) ) {}
+    }
+    
+    // SPARQL Query
+    
+    @Test public void queryGet_01() {
+        try ( TypedInputStream in = HttpOp.execHttpGet(simpleQuery) ) {}
+    }
+
+    @Test(expected=HttpException.class)
+    public void queryGet_02() {
+        // No query.
+        try ( TypedInputStream in = HttpOp.execHttpGet(queryURL+"?query=") ) {}
+        catch (HttpException ex) {
+            assertEquals(ex.getResponseCode(), HttpSC.BAD_REQUEST_400) ;
+            throw ex ; 
+        }
+    }
+
+    @Test(expected=HttpException.class)
+    public void httpPost_01() {
+        try {
+            HttpOp.execHttpPost(queryURL, "ASK{}", "text/plain") ;
+        } catch (HttpException ex) {
+            assertEquals(ex.getResponseCode(), HttpSC.UNSUPPORTED_MEDIA_TYPE_415) ;
+            throw ex ;
+        }
+    }
+    
+    @Test(expected=HttpException.class)
+    public void httpPost_02() {
+        try {
+            HttpOp.execHttpPost(queryURL, "ASK{}", WebContent.contentTypeSPARQLQuery) ;
+        } catch (HttpException ex) {
+            assertEquals(ex.getResponseCode(), HttpSC.UNSUPPORTED_MEDIA_TYPE_415) ;
+            throw ex ;
+        }
+    }
+    
+    @Test(expected=HttpException.class)
+    public void httpPost_03() {
+        try {
+            HttpOp.execHttpPost(queryURL, "ASK{}", WebContent.contentTypeOctets) ;
+        } catch (HttpException ex) {
+            assertEquals(ex.getResponseCode(), HttpSC.UNSUPPORTED_MEDIA_TYPE_415) ;
+            throw ex ;
+        }
+    }
+        
+    @Test public void httpPost_04() {
+        Params params = new Params() ;
+        params.addParam("query", "ASK{}") ;
+        try ( TypedInputStream in = HttpOp.execHttpPostFormStream(queryURL, params, WebContent.contentTypeResultsJSON) ) {}
+    }
+    
+    @Test(expected=HttpException.class)
+    public void httpPost_05() {
+        Params params = new Params() ;
+        params.addParam("query", "ASK{}") ;
+        // Query to Update
+        try ( TypedInputStream in = HttpOp.execHttpPostFormStream(updateURL, params, WebContent.contentTypeResultsJSON) ) { }
+        catch (HttpException ex) {
+            assertEquals(ex.getResponseCode(), HttpSC.BAD_REQUEST_400) ;
+            throw ex ;
+        }
+    }
+    
+    @Test public void httpPost_06() {
+        Params params = new Params() ;
+        params.addParam("request", "CLEAR ALL") ;
+        HttpOp.execHttpPostForm(updateURL, params) ;
+    }
+    
+    // GSP
+    @Test public void gsp_01() {
+        String x = HttpOp.execHttpGetString(defaultGraphURL, "application/rdf+xml") ;
+        assertTrue(x.contains("</")) ;
+        assertTrue(x.contains(":RDF")) ;
+    }
+
+    @Test public void gsp_02() {
+        String x = HttpOp.execHttpGetString(defaultGraphURL, "application/n-triples") ;
+        assertTrue(x.isEmpty()) ;
+    }
+    
+    static String graphString = "@prefix : <http://example/> . :s :p :o ." ;
+    static String datasetString = "@prefix : <http://example/> . :s :p :o . :g { :sg :pg :og }" ;
+    
+    @Test public void gsp_03() {
+        HttpOp.execHttpPut(defaultGraphURL, WebContent.contentTypeTurtle, graphString) ;
+    }
+    
+    @Test public void gsp_04() {
+        HttpOp.execHttpPut(defaultGraphURL, WebContent.contentTypeTurtle, graphString) ;
+        String s1 = HttpOp.execHttpGetString(defaultGraphURL, WebContent.contentTypeNTriples) ;
+        assertFalse(s1.isEmpty()) ;
+        HttpOp.execHttpDelete(defaultGraphURL) ;
+        String s2 = HttpOp.execHttpGetString(defaultGraphURL, WebContent.contentTypeNTriples) ;
+        assertTrue(s2.isEmpty()) ;
+    }
+    
+    @Test public void gsp_05() {
+        HttpOp.execHttpDelete(defaultGraphURL) ;
+        
+        HttpOp.execHttpPost(defaultGraphURL, WebContent.contentTypeTurtle, graphString) ;
+        String s1 = HttpOp.execHttpGetString(defaultGraphURL, WebContent.contentTypeNTriples) ;
+        assertFalse(s1.isEmpty()) ;
+        HttpOp.execHttpDelete(defaultGraphURL) ;
+        String s2 = HttpOp.execHttpGetString(defaultGraphURL, WebContent.contentTypeNTriples) ;
+        assertTrue(s2.isEmpty()) ;
+    }
+    
+    @Test public void gsp_06() {
+        //HttpOp.execHttpDelete(namedGraphURL) ; -- woudl be 404.
+        
+        HttpOp.execHttpPost(namedGraphURL, WebContent.contentTypeTurtle, graphString) ;
+        String s1 = HttpOp.execHttpGetString(namedGraphURL, WebContent.contentTypeNTriples) ;
+        assertFalse(s1.isEmpty()) ;
+        String s2 = HttpOp.execHttpGetString(defaultGraphURL, WebContent.contentTypeNTriples) ;
+        assertTrue(s2.isEmpty()) ;
+        HttpOp.execHttpDelete(namedGraphURL) ;
+        String s3 = HttpOp.execHttpGetString(defaultGraphURL, WebContent.contentTypeNTriples) ;
+        assertTrue(s3.isEmpty()) ;
+        
+        try {
+            HttpOp.execHttpDelete(namedGraphURL) ;
+            fail("Expected 404") ;
+        } catch (HttpException ex) {
+            assertEquals(ex.getResponseCode(), HttpSC.NOT_FOUND_404) ;
+        }
+        
+    }
+
+    // Extended GSP - no ?default, no ?graph acts on the datasets as a whole.  
+   
+    @Test public void gsp_10() {
+        try {
+            HttpOp.execHttpDelete(gspServiceURL) ;
+            fail("Expected 405") ;
+        } catch (HttpException ex) {
+            assertEquals(ex.getResponseCode(), HttpSC.METHOD_NOT_ALLOWED_405) ;
+        }
+    }
+        
+    @Test public void gsp_11() {
+        
+        String s1 = HttpOp.execHttpGetString(gspServiceURL, WebContent.contentTypeNQuads) ;
+        assertTrue(s1.isEmpty()) ;
+        
+        HttpOp.execHttpPost(gspServiceURL, WebContent.contentTypeTriG, datasetString) ;
+        String s2 = HttpOp.execHttpGetString(gspServiceURL, WebContent.contentTypeNQuads) ;
+        assertFalse(s2.isEmpty()) ;
+        
+        String s4 = HttpOp.execHttpGetString(defaultGraphURL, WebContent.contentTypeNTriples) ;
+        assertFalse(s4.isEmpty()) ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/testing/config-ds-1.ttl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/testing/config-ds-1.ttl b/jena-fuseki2/jena-fuseki-core/testing/config-ds-1.ttl
new file mode 100644
index 0000000..8e7a57b
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/testing/config-ds-1.ttl
@@ -0,0 +1,15 @@
+@prefix :        <#> .
+@prefix fuseki:  <http://jena.apache.org/fuseki#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+<#service1> rdf:type fuseki:Service ;
+    # URI of the dataset -- http://host:port/ds
+    fuseki:name                        "test-ds2" ; 
+    fuseki:serviceQuery                "sparql" ;
+    fuseki:dataset                     <#emptyDataset> ;
+    .
+
+<#emptyDataset> rdf:type ja:RDFDataset .

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml b/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml
new file mode 100644
index 0000000..e7ae2d5
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/assembly-dist.xml
@@ -0,0 +1,100 @@
+<?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.
+-->
+
+<!-- 
+The distribution.
+Assumes jar made and onejar has been assembled.
+-->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+
+  <id>distribution</id>
+
+  <formats>
+    <format>zip</format>
+    <format>tar.gz</format>
+  </formats>
+
+  <baseDirectory>${project.artifactId}-${project.version}</baseDirectory>
+
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <includes>
+	<include>org.apache.jena:jena-fuseki-server:jar</include>
+	<include>org.apache.jena:jena-fuseki-war:war</include>
+      </includes>
+    </dependencySet>
+  </dependencySets>
+
+  <files>
+    
+    <!--
+    <file>
+      <source>${project.build.directory}/${server.jar.name}.jar</source>
+      <outputDirectory></outputDirectory>
+      <destName>fuseki-server.jar</destName>
+    </file>
+    <file>
+      <source>${project.build.directory}/${project.build.finalName}.war</source>
+      <outputDirectory></outputDirectory>
+      <destName>fuseki-server.war</destName>
+    </file>
+    -->
+    <file>
+      <source>dist/LICENSE</source>
+      <destName>LICENSE</destName>
+    </file>
+    <file>
+      <source>dist/NOTICE</source>
+      <destName>NOTICE</destName>
+    </file>
+  </files>
+
+  <fileSets>
+    <fileSet>
+      <outputDirectory></outputDirectory>
+      <includes>
+	<include>templates/*</include>
+        <include>README*</include>
+        <include>DEPENDENCIES*</include>
+        <include>ReleaseNotes.txt</include>
+      </includes>
+    </fileSet>
+
+    <fileSet>
+      <outputDirectory></outputDirectory>
+      <includes>
+        <include>log4j.properties</include>
+	<!--<include>examples/**</include>-->
+        <include>fuseki</include>
+        <include>fuseki-server</include>
+        <include>fuseki-server.bat</include>
+        <!--<include>s-*</include>-->
+      </includes>
+    </fileSet>
+
+     <fileSet>
+       <directory>../jena-fuseki-core/src/main/webapp</directory>
+       <outputDirectory>webapp</outputDirectory>
+    </fileSet>
+
+  </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/backup
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/backup b/jena-fuseki2/jena-fuseki-dist/backup
new file mode 100755
index 0000000..a3cb0b1
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/backup
@@ -0,0 +1,22 @@
+#!/bin/bash
+# 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.
+
+DB="ds"
+
+curl -v -XPOST 'http://localhost:3030/$/sleep?interval=10000'
+
+curl -v 'http://localhost:3030/$/tasks'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/bin/s-delete
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/bin/s-delete b/jena-fuseki2/jena-fuseki-dist/bin/s-delete
new file mode 100755
index 0000000..0e3a807
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/bin/s-delete
@@ -0,0 +1,707 @@
+#!/usr/bin/env ruby
+# -*- coding: 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.
+
+# SPARQL HTTP Update, client.
+
+require 'optparse'
+require 'net/http'
+require 'uri'
+require 'cgi'
+require 'pp'
+require 'ostruct'
+
+# ToDo
+#  Allow a choice of media type for GET
+#   --accept "content-type" (and abbreviations)
+#   --header "Add:this"
+#   --user, --password
+#  Basic authentication: request.basic_auth("username", "password")
+#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
+
+SOH_NAME="SOH"
+SOH_VERSION="0.0.0"
+
+$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
+
+# What about direct naming?
+
+# Names
+$mtTurtle           = 'text/turtle;charset=utf-8'
+$mtRDF              = 'application/rdf+xml'
+$mtText             = 'text/plain'
+$mtNQuads           = 'text/n-quads'
+$mtTriG             = 'application/trig'
+$mtSparqlResultsX   = 'application/sparql-results+xml'
+$mtSparqlResultsJ   = 'application/sparql-results+json'
+$mtAppJSON          = 'application/json'
+$mtAppXML           = 'application/xml'
+$mtSparqlResultsTSV = 'application/sparql-results+tsv'
+$mtSparqlResultsCSV = 'application/sparql-results+csv'
+$mtSparqlUpdate     = 'application/sparql-update'
+$mtWWWForm          = 'application/x-www-form-urlencoded'
+$mtSparqlQuery      = "application/sparql-query" ;
+
+# Global media type table.
+$fileMediaTypes = {}
+$fileMediaTypes['ttl']   = $mtTurtle
+$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
+$fileMediaTypes['nt']    = $mtText
+$fileMediaTypes['rdf']   = $mtRDF
+$fileMediaTypes['owl']   = $mtRDF
+$fileMediaTypes['nq']    = $mtNQuads
+$fileMediaTypes['trig']  = $mtTriG
+
+# Global charset : no entry means "don't set"
+$charsetUTF8      = 'utf-8'
+$charset = {}
+$charset[$mtTurtle]   = 'utf-8'
+$charset[$mtText]     = 'ascii'
+$charset[$mtTriG]     = 'utf-8'
+$charset[$mtNQuads]   = 'ascii'
+
+# Headers
+
+$hContentType         = 'Content-Type'
+# $hContentEncoding     = 'Content-Encoding'
+$hContentLength       = 'Content-Length'
+# $hContentLocation     = 'Content-Location'
+# $hContentRange        = 'Content-Range'
+
+$hAccept              = 'Accept'
+$hAcceptCharset       = 'Accept-Charset'
+$hAcceptEncoding      = 'Accept-Encoding'
+$hAcceptRanges        = 'Accept-Ranges' 
+
+$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
+$print_http = false
+
+# Default for GET
+# At least allow anythign (and hope!)
+$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
+# For SPARQL query
+$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
+
+# Accept any in case of trouble.
+$accept_rdf="#{$accept_rdf} , */*;q=0.1"
+$accept_results="#{$accept_results} , */*;q=0.1" 
+
+# The media type usually forces the charset.
+$accept_charset=nil
+
+## Who we are.
+## Two styles:
+##    s-query .....
+##    soh query .....
+
+$cmd = File.basename($0)
+if $cmd == 'soh'
+then
+  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
+end
+
+if ! $cmd.start_with?('s-') && $cmd != 'soh'
+  $cmd = 's-'+$cmd
+end
+
+## -------- 
+
+def GET(dataset, graph)
+  print "GET #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  get_worker(requestURI, headers)
+end
+
+def get_worker(requestURI, headers)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Get.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+def HEAD(dataset, graph)
+  print "HEAD #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Head.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def PUT(dataset, graph, file)
+  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Put)
+end
+
+def POST(dataset, graph, file)
+  print "POST #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Post)
+end
+
+def DELETE(dataset, graph)
+  print "DELETE #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Delete.new(uri.request_uri)
+  headers = {}
+  headers.merge!($headers)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def uri_escape(string)
+  CGI.escape(string)
+end
+
+def target(dataset, graph)
+  return dataset+"?default" if graph == "default"
+  return dataset+"?graph="+uri_escape(graph)
+end
+
+def send_body(dataset, graph, file, method)
+  mt = content_type(file)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hContentType] = mt
+  headers[$hContentLength] = File.size(file).to_s
+  ## p headers
+
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  
+  request = method.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  request.body_stream = File.open(file)
+  response_no_body(uri, request)
+end
+
+def response_no_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue Exception => e  
+    # puts e.message  
+    #puts e.backtrace.inspect  
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+  response = http.request(request)
+  print_http_response(response)
+  case response
+  when Net::HTTPSuccess, Net::HTTPRedirection
+    # OK
+  when Net::HTTPNotFound
+    warn_exit "404 Not found: #{uri}", 9
+    #print response.body
+  else
+    warn_exit "#{response.code} #{response.message} #{uri}", 9
+    # Unreachable
+      response.error!
+  end
+  # NO BODY IN RESPONSE
+end
+
+def response_print_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue => e  
+    #puts e.backtrace.inspect  
+    #print e.class
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+
+  # Add a blank line if headers were output.
+  print "\n" if $http_print ;
+
+  begin
+    response = http.request(request) { |res| 
+      print_http_response(res)
+      #puts res.code
+      res.read_body do |segment|
+        print segment
+      end
+    }
+    case response
+    when Net::HTTPSuccess, Net::HTTPRedirection
+      # OK
+    when Net::HTTPNotFound
+      warn_exit "404 Not found: #{uri}", 9
+      #print response.body
+    else
+      warn_exit "#{response.code}: #{uri}", 9
+      # Unreachable
+      response.error!
+    end
+  rescue EOFError => e
+    warn_exit "IO Error: "+e.message, 3
+  end
+end
+
+def print_http_request(uri, request)
+  return unless $print_http
+  #print "Request\n"
+  print request.method," ",uri, "\n"
+  print_headers("  ",request)
+end
+
+def print_http_response(response)
+  return unless $print_http
+  #print "Response\n"
+  print response.code, " ", response.message, "\n"
+  print_headers("  ",response)
+end
+
+def print_headers(marker, headers)
+  headers.each do |k,v| 
+    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
+    printf "%s%-20s %s\n",marker,k,v
+  end
+end
+
+def content_type(file)
+  file =~ /\.([^.]*)$/
+  ext = $1
+  mt = $fileMediaTypes[ext]
+  cs = $charset[mt]
+  mt = mt+';charset='+cs if ! cs.nil?
+  return mt
+end
+
+def charset(content_type)
+  return $charset[content_type]
+end
+
+def warn_exit(msg, rc)
+    warn msg
+    exit rc ;
+end
+
+def parseURI(uri_string)
+  begin
+    return URI.parse(uri_string).to_s
+  rescue URI::InvalidURIError => err
+    warn_exit "Bad URI: <#{uri_string}>", 2
+  end
+end
+
+## ---- Command
+
+def cmd_soh(command=nil)
+  ## Command line
+  options = {}
+  optparse = OptionParser.new do |opts|
+    # Set a banner, displayed at the top
+    # of the help screen.
+    case $cmd
+    when "s-http", "sparql-http", "soh"
+      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
+    when "s-get", "s-head", "s-delete"
+      banner="$cmd  datasetURI graph"
+    end
+
+    opts.banner = $banner
+    # Define the options, and what they do
+    
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    
+    options[:version] = false
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end
+    
+    # This displays the help screen, all programs are
+    # assumed to have this option.
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  if command.nil?
+    if ARGV.size == 0
+      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
+      exit 1
+    end
+    cmdPrint=ARGV.shift
+    command=cmdPrint.upcase
+  else
+    cmdPrint=command
+  end
+
+  case command
+  when "HEAD", "GET", "DELETE"
+    requiredFile=false
+  when "PUT", "POST"
+    requiredFile=true
+  when "QUERY"
+    cmd_sparql_query
+  when "UPDATE"
+    cmd_sparql_update
+  else
+    warn_exit "Unknown command: #{command}", 2
+  end
+
+  if requiredFile 
+  then
+    if ARGV.size != 3
+      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
+    end
+  else
+    if ARGV.size != 2
+      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
+    end
+  end
+
+  dataset=parseURI(ARGV.shift)
+  # Relative URI?
+  graph=parseURI(ARGV.shift)
+  file=""
+  if requiredFile
+  then
+    file = ARGV.shift if requiredFile
+    if ! File.exist?(file)
+      warn_exit "No such file: "+file, 3
+    end
+    if File.directory?(file)
+      warn_exit "File is a directory: "+file, 3
+    end
+  end
+
+  case command
+  when "GET"
+    GET(dataset, graph)
+  when "HEAD"
+    HEAD(dataset, graph)
+  when "PUT"
+    PUT(dataset, graph, file)
+  when "DELETE"
+    DELETE(dataset, graph)
+  when "POST"
+    POST(dataset, graph, file)
+  else
+    warn_exit "Internal error: Unknown command: #{cmd}", 2
+  end
+  exit 0
+end
+
+## --------
+def string_or_file(arg)
+  return arg if ! arg.match(/^@/)
+  a=(arg[1..-1])
+  open(a, 'rb'){|f| f.read}
+end
+
+## -------- SPARQL Query
+
+## Choose method
+def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
+   if ! query_file.nil?
+    query = open(query_file, 'rb'){|f| f.read}
+  end
+  if forcePOST || query.length >= 2*1024 
+    SPARQL_query_POST(service, query, args2)
+  else
+    SPARQL_query_GET(service, query, args2)
+  end
+end
+
+## By GET
+
+def SPARQL_query_GET(service, query, args2)
+  args = { "query" => query }
+  args.merge!(args2)
+  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  action="#{service}?#{qs}"
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  get_worker(action, headers)
+end
+
+## By POST
+
+def SPARQL_query_POST(service, query, args2)
+  # DRY - body/no body for each of request and response.
+  post_params={ "query" => query }
+  post_params.merge!(args2)
+  uri = URI.parse(service)
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  execute_post_form_body(uri, headers, post_params)
+end
+
+def execute_post_form_body(uri, headers, post_params)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = qs.length.to_s
+  request.initialize_http_header(headers)
+  request.body = qs
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+# Usage: -v --help --file= --query=
+def cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
+      options[:file]=file
+    end
+    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
+            'Set the output argument') do |type|
+      options[:output]=type
+    end
+    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
+            'Set the accept header type') do |type|
+      options[:accept]=type
+    end
+    options[:verbose] = false
+    opts.on( '--post', 'Force use of POST' ) do
+      options[:post] = true
+    end
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
+    warn e
+    exit 1
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+  usePOST = options[:post]
+
+  service = options[:service]
+  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
+
+  # Query
+  query=nil
+  query_file=options[:file]
+  if query_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No query specified.',1
+    end
+  if query_file.nil?
+    query = ARGV.shift
+    if query.match(/^@/)
+      query_file = query[1..-1]
+      query = nil
+    end
+  end
+
+  # --output ==> output= (non-standard)
+  args={}
+  case options[:output]
+  when nil
+  when  "json","xml","text","csv","tsv"
+    args['output'] = options[:output]
+  when :json,:xml,:text,:csv,:tsv
+    args['output'] = options[:output].to_s
+  else
+    warn_exit "Unrecognized output type: "+options[:output],2
+  end
+
+  # --accept
+  # options[:accept]
+
+  print "SPARQL #{service}\n" if $verbose
+  #args={"output"=>"text"}
+  SPARQL_query(service, query, query_file, usePOST, args)
+  exit(0)
+end
+
+## -------- SPARQL Update
+
+# Update sent as a WWW form.
+def SPARQL_update_by_form(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  # args? encode?
+  body="update="+uri_escape(update)
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = body.length.to_s
+  uri = URI.parse(service)
+  execute_post_form(uri, headers, body)
+end
+
+# DRY - query form.
+def execute_post_form(uri, headers, body)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = body
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def SPARQL_update(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  headers[$hContentType] = $mtSparqlUpdate
+  uri = URI.parse(service)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = update
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def cmd_sparql_update(by_raw_post=true)
+  # Share with cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
+      options[:file]=file
+    end
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  service = options[:service]
+  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
+  
+  update=nil
+  update_file=options[:file]
+
+  if update_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No update specified.',1
+    end
+  if update_file.nil?
+    update = ARGV.shift
+    if update.match(/^@/)
+      update_file = update[1..-1]
+      update = nil
+    end
+  end
+  
+  print "SPARQL-Update #{service}\n" if $verbose
+  args={}
+
+  # Reads in the file :-(
+  if update.nil?
+  then
+    update = open(update_file, 'rb'){|f| f.read}
+  else
+    update = string_or_file(update)
+  end
+
+  if by_raw_post
+    SPARQL_update(service, update, args)
+  else
+    SPARQL_update_by_form(service, update, args)
+  end
+  exit(0)
+end
+
+## -------
+
+case $cmd
+when "s-http", "sparql-http", "soh"
+  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
+  cmd_soh
+when "s-get", "s-head", "s-put", "s-delete", "s-post"
+
+  case $cmd
+  when "s-get", "s-head", "s-delete"
+    $banner="#{$cmd} datasetURI graph"
+  when "s-put", "s-post"
+    $banner="#{$cmd} datasetURI graph file"
+  end
+  cmd2 = $cmd.sub(/^s-/, '').upcase
+  cmd_soh cmd2
+
+when "s-query", "sparql-query"
+  cmd_sparql_query
+when "s-update", "sparql-update"
+  cmd_sparql_update true
+when "s-update-form", "sparql-update-form"
+  cmd_sparql_update false
+else 
+  warn_exit "Unknown: "+$cmd, 1
+end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/bin/s-get
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/bin/s-get b/jena-fuseki2/jena-fuseki-dist/bin/s-get
new file mode 100755
index 0000000..0e3a807
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/bin/s-get
@@ -0,0 +1,707 @@
+#!/usr/bin/env ruby
+# -*- coding: 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.
+
+# SPARQL HTTP Update, client.
+
+require 'optparse'
+require 'net/http'
+require 'uri'
+require 'cgi'
+require 'pp'
+require 'ostruct'
+
+# ToDo
+#  Allow a choice of media type for GET
+#   --accept "content-type" (and abbreviations)
+#   --header "Add:this"
+#   --user, --password
+#  Basic authentication: request.basic_auth("username", "password")
+#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
+
+SOH_NAME="SOH"
+SOH_VERSION="0.0.0"
+
+$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
+
+# What about direct naming?
+
+# Names
+$mtTurtle           = 'text/turtle;charset=utf-8'
+$mtRDF              = 'application/rdf+xml'
+$mtText             = 'text/plain'
+$mtNQuads           = 'text/n-quads'
+$mtTriG             = 'application/trig'
+$mtSparqlResultsX   = 'application/sparql-results+xml'
+$mtSparqlResultsJ   = 'application/sparql-results+json'
+$mtAppJSON          = 'application/json'
+$mtAppXML           = 'application/xml'
+$mtSparqlResultsTSV = 'application/sparql-results+tsv'
+$mtSparqlResultsCSV = 'application/sparql-results+csv'
+$mtSparqlUpdate     = 'application/sparql-update'
+$mtWWWForm          = 'application/x-www-form-urlencoded'
+$mtSparqlQuery      = "application/sparql-query" ;
+
+# Global media type table.
+$fileMediaTypes = {}
+$fileMediaTypes['ttl']   = $mtTurtle
+$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
+$fileMediaTypes['nt']    = $mtText
+$fileMediaTypes['rdf']   = $mtRDF
+$fileMediaTypes['owl']   = $mtRDF
+$fileMediaTypes['nq']    = $mtNQuads
+$fileMediaTypes['trig']  = $mtTriG
+
+# Global charset : no entry means "don't set"
+$charsetUTF8      = 'utf-8'
+$charset = {}
+$charset[$mtTurtle]   = 'utf-8'
+$charset[$mtText]     = 'ascii'
+$charset[$mtTriG]     = 'utf-8'
+$charset[$mtNQuads]   = 'ascii'
+
+# Headers
+
+$hContentType         = 'Content-Type'
+# $hContentEncoding     = 'Content-Encoding'
+$hContentLength       = 'Content-Length'
+# $hContentLocation     = 'Content-Location'
+# $hContentRange        = 'Content-Range'
+
+$hAccept              = 'Accept'
+$hAcceptCharset       = 'Accept-Charset'
+$hAcceptEncoding      = 'Accept-Encoding'
+$hAcceptRanges        = 'Accept-Ranges' 
+
+$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
+$print_http = false
+
+# Default for GET
+# At least allow anythign (and hope!)
+$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
+# For SPARQL query
+$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
+
+# Accept any in case of trouble.
+$accept_rdf="#{$accept_rdf} , */*;q=0.1"
+$accept_results="#{$accept_results} , */*;q=0.1" 
+
+# The media type usually forces the charset.
+$accept_charset=nil
+
+## Who we are.
+## Two styles:
+##    s-query .....
+##    soh query .....
+
+$cmd = File.basename($0)
+if $cmd == 'soh'
+then
+  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
+end
+
+if ! $cmd.start_with?('s-') && $cmd != 'soh'
+  $cmd = 's-'+$cmd
+end
+
+## -------- 
+
+def GET(dataset, graph)
+  print "GET #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  get_worker(requestURI, headers)
+end
+
+def get_worker(requestURI, headers)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Get.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+def HEAD(dataset, graph)
+  print "HEAD #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Head.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def PUT(dataset, graph, file)
+  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Put)
+end
+
+def POST(dataset, graph, file)
+  print "POST #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Post)
+end
+
+def DELETE(dataset, graph)
+  print "DELETE #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Delete.new(uri.request_uri)
+  headers = {}
+  headers.merge!($headers)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def uri_escape(string)
+  CGI.escape(string)
+end
+
+def target(dataset, graph)
+  return dataset+"?default" if graph == "default"
+  return dataset+"?graph="+uri_escape(graph)
+end
+
+def send_body(dataset, graph, file, method)
+  mt = content_type(file)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hContentType] = mt
+  headers[$hContentLength] = File.size(file).to_s
+  ## p headers
+
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  
+  request = method.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  request.body_stream = File.open(file)
+  response_no_body(uri, request)
+end
+
+def response_no_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue Exception => e  
+    # puts e.message  
+    #puts e.backtrace.inspect  
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+  response = http.request(request)
+  print_http_response(response)
+  case response
+  when Net::HTTPSuccess, Net::HTTPRedirection
+    # OK
+  when Net::HTTPNotFound
+    warn_exit "404 Not found: #{uri}", 9
+    #print response.body
+  else
+    warn_exit "#{response.code} #{response.message} #{uri}", 9
+    # Unreachable
+      response.error!
+  end
+  # NO BODY IN RESPONSE
+end
+
+def response_print_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue => e  
+    #puts e.backtrace.inspect  
+    #print e.class
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+
+  # Add a blank line if headers were output.
+  print "\n" if $http_print ;
+
+  begin
+    response = http.request(request) { |res| 
+      print_http_response(res)
+      #puts res.code
+      res.read_body do |segment|
+        print segment
+      end
+    }
+    case response
+    when Net::HTTPSuccess, Net::HTTPRedirection
+      # OK
+    when Net::HTTPNotFound
+      warn_exit "404 Not found: #{uri}", 9
+      #print response.body
+    else
+      warn_exit "#{response.code}: #{uri}", 9
+      # Unreachable
+      response.error!
+    end
+  rescue EOFError => e
+    warn_exit "IO Error: "+e.message, 3
+  end
+end
+
+def print_http_request(uri, request)
+  return unless $print_http
+  #print "Request\n"
+  print request.method," ",uri, "\n"
+  print_headers("  ",request)
+end
+
+def print_http_response(response)
+  return unless $print_http
+  #print "Response\n"
+  print response.code, " ", response.message, "\n"
+  print_headers("  ",response)
+end
+
+def print_headers(marker, headers)
+  headers.each do |k,v| 
+    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
+    printf "%s%-20s %s\n",marker,k,v
+  end
+end
+
+def content_type(file)
+  file =~ /\.([^.]*)$/
+  ext = $1
+  mt = $fileMediaTypes[ext]
+  cs = $charset[mt]
+  mt = mt+';charset='+cs if ! cs.nil?
+  return mt
+end
+
+def charset(content_type)
+  return $charset[content_type]
+end
+
+def warn_exit(msg, rc)
+    warn msg
+    exit rc ;
+end
+
+def parseURI(uri_string)
+  begin
+    return URI.parse(uri_string).to_s
+  rescue URI::InvalidURIError => err
+    warn_exit "Bad URI: <#{uri_string}>", 2
+  end
+end
+
+## ---- Command
+
+def cmd_soh(command=nil)
+  ## Command line
+  options = {}
+  optparse = OptionParser.new do |opts|
+    # Set a banner, displayed at the top
+    # of the help screen.
+    case $cmd
+    when "s-http", "sparql-http", "soh"
+      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
+    when "s-get", "s-head", "s-delete"
+      banner="$cmd  datasetURI graph"
+    end
+
+    opts.banner = $banner
+    # Define the options, and what they do
+    
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    
+    options[:version] = false
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end
+    
+    # This displays the help screen, all programs are
+    # assumed to have this option.
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  if command.nil?
+    if ARGV.size == 0
+      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
+      exit 1
+    end
+    cmdPrint=ARGV.shift
+    command=cmdPrint.upcase
+  else
+    cmdPrint=command
+  end
+
+  case command
+  when "HEAD", "GET", "DELETE"
+    requiredFile=false
+  when "PUT", "POST"
+    requiredFile=true
+  when "QUERY"
+    cmd_sparql_query
+  when "UPDATE"
+    cmd_sparql_update
+  else
+    warn_exit "Unknown command: #{command}", 2
+  end
+
+  if requiredFile 
+  then
+    if ARGV.size != 3
+      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
+    end
+  else
+    if ARGV.size != 2
+      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
+    end
+  end
+
+  dataset=parseURI(ARGV.shift)
+  # Relative URI?
+  graph=parseURI(ARGV.shift)
+  file=""
+  if requiredFile
+  then
+    file = ARGV.shift if requiredFile
+    if ! File.exist?(file)
+      warn_exit "No such file: "+file, 3
+    end
+    if File.directory?(file)
+      warn_exit "File is a directory: "+file, 3
+    end
+  end
+
+  case command
+  when "GET"
+    GET(dataset, graph)
+  when "HEAD"
+    HEAD(dataset, graph)
+  when "PUT"
+    PUT(dataset, graph, file)
+  when "DELETE"
+    DELETE(dataset, graph)
+  when "POST"
+    POST(dataset, graph, file)
+  else
+    warn_exit "Internal error: Unknown command: #{cmd}", 2
+  end
+  exit 0
+end
+
+## --------
+def string_or_file(arg)
+  return arg if ! arg.match(/^@/)
+  a=(arg[1..-1])
+  open(a, 'rb'){|f| f.read}
+end
+
+## -------- SPARQL Query
+
+## Choose method
+def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
+   if ! query_file.nil?
+    query = open(query_file, 'rb'){|f| f.read}
+  end
+  if forcePOST || query.length >= 2*1024 
+    SPARQL_query_POST(service, query, args2)
+  else
+    SPARQL_query_GET(service, query, args2)
+  end
+end
+
+## By GET
+
+def SPARQL_query_GET(service, query, args2)
+  args = { "query" => query }
+  args.merge!(args2)
+  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  action="#{service}?#{qs}"
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  get_worker(action, headers)
+end
+
+## By POST
+
+def SPARQL_query_POST(service, query, args2)
+  # DRY - body/no body for each of request and response.
+  post_params={ "query" => query }
+  post_params.merge!(args2)
+  uri = URI.parse(service)
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  execute_post_form_body(uri, headers, post_params)
+end
+
+def execute_post_form_body(uri, headers, post_params)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = qs.length.to_s
+  request.initialize_http_header(headers)
+  request.body = qs
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+# Usage: -v --help --file= --query=
+def cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
+      options[:file]=file
+    end
+    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
+            'Set the output argument') do |type|
+      options[:output]=type
+    end
+    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
+            'Set the accept header type') do |type|
+      options[:accept]=type
+    end
+    options[:verbose] = false
+    opts.on( '--post', 'Force use of POST' ) do
+      options[:post] = true
+    end
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
+    warn e
+    exit 1
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+  usePOST = options[:post]
+
+  service = options[:service]
+  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
+
+  # Query
+  query=nil
+  query_file=options[:file]
+  if query_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No query specified.',1
+    end
+  if query_file.nil?
+    query = ARGV.shift
+    if query.match(/^@/)
+      query_file = query[1..-1]
+      query = nil
+    end
+  end
+
+  # --output ==> output= (non-standard)
+  args={}
+  case options[:output]
+  when nil
+  when  "json","xml","text","csv","tsv"
+    args['output'] = options[:output]
+  when :json,:xml,:text,:csv,:tsv
+    args['output'] = options[:output].to_s
+  else
+    warn_exit "Unrecognized output type: "+options[:output],2
+  end
+
+  # --accept
+  # options[:accept]
+
+  print "SPARQL #{service}\n" if $verbose
+  #args={"output"=>"text"}
+  SPARQL_query(service, query, query_file, usePOST, args)
+  exit(0)
+end
+
+## -------- SPARQL Update
+
+# Update sent as a WWW form.
+def SPARQL_update_by_form(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  # args? encode?
+  body="update="+uri_escape(update)
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = body.length.to_s
+  uri = URI.parse(service)
+  execute_post_form(uri, headers, body)
+end
+
+# DRY - query form.
+def execute_post_form(uri, headers, body)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = body
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def SPARQL_update(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  headers[$hContentType] = $mtSparqlUpdate
+  uri = URI.parse(service)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = update
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def cmd_sparql_update(by_raw_post=true)
+  # Share with cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
+      options[:file]=file
+    end
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  service = options[:service]
+  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
+  
+  update=nil
+  update_file=options[:file]
+
+  if update_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No update specified.',1
+    end
+  if update_file.nil?
+    update = ARGV.shift
+    if update.match(/^@/)
+      update_file = update[1..-1]
+      update = nil
+    end
+  end
+  
+  print "SPARQL-Update #{service}\n" if $verbose
+  args={}
+
+  # Reads in the file :-(
+  if update.nil?
+  then
+    update = open(update_file, 'rb'){|f| f.read}
+  else
+    update = string_or_file(update)
+  end
+
+  if by_raw_post
+    SPARQL_update(service, update, args)
+  else
+    SPARQL_update_by_form(service, update, args)
+  end
+  exit(0)
+end
+
+## -------
+
+case $cmd
+when "s-http", "sparql-http", "soh"
+  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
+  cmd_soh
+when "s-get", "s-head", "s-put", "s-delete", "s-post"
+
+  case $cmd
+  when "s-get", "s-head", "s-delete"
+    $banner="#{$cmd} datasetURI graph"
+  when "s-put", "s-post"
+    $banner="#{$cmd} datasetURI graph file"
+  end
+  cmd2 = $cmd.sub(/^s-/, '').upcase
+  cmd_soh cmd2
+
+when "s-query", "sparql-query"
+  cmd_sparql_query
+when "s-update", "sparql-update"
+  cmd_sparql_update true
+when "s-update-form", "sparql-update-form"
+  cmd_sparql_update false
+else 
+  warn_exit "Unknown: "+$cmd, 1
+end

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-dist/bin/s-head
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-dist/bin/s-head b/jena-fuseki2/jena-fuseki-dist/bin/s-head
new file mode 100755
index 0000000..0e3a807
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-dist/bin/s-head
@@ -0,0 +1,707 @@
+#!/usr/bin/env ruby
+# -*- coding: 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.
+
+# SPARQL HTTP Update, client.
+
+require 'optparse'
+require 'net/http'
+require 'uri'
+require 'cgi'
+require 'pp'
+require 'ostruct'
+
+# ToDo
+#  Allow a choice of media type for GET
+#   --accept "content-type" (and abbreviations)
+#   --header "Add:this"
+#   --user, --password
+#  Basic authentication: request.basic_auth("username", "password")
+#  Follow redirects => 301:  puts response["location"] # All headers are lowercase?
+
+SOH_NAME="SOH"
+SOH_VERSION="0.0.0"
+
+$proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new  
+
+# What about direct naming?
+
+# Names
+$mtTurtle           = 'text/turtle;charset=utf-8'
+$mtRDF              = 'application/rdf+xml'
+$mtText             = 'text/plain'
+$mtNQuads           = 'text/n-quads'
+$mtTriG             = 'application/trig'
+$mtSparqlResultsX   = 'application/sparql-results+xml'
+$mtSparqlResultsJ   = 'application/sparql-results+json'
+$mtAppJSON          = 'application/json'
+$mtAppXML           = 'application/xml'
+$mtSparqlResultsTSV = 'application/sparql-results+tsv'
+$mtSparqlResultsCSV = 'application/sparql-results+csv'
+$mtSparqlUpdate     = 'application/sparql-update'
+$mtWWWForm          = 'application/x-www-form-urlencoded'
+$mtSparqlQuery      = "application/sparql-query" ;
+
+# Global media type table.
+$fileMediaTypes = {}
+$fileMediaTypes['ttl']   = $mtTurtle
+$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
+$fileMediaTypes['nt']    = $mtText
+$fileMediaTypes['rdf']   = $mtRDF
+$fileMediaTypes['owl']   = $mtRDF
+$fileMediaTypes['nq']    = $mtNQuads
+$fileMediaTypes['trig']  = $mtTriG
+
+# Global charset : no entry means "don't set"
+$charsetUTF8      = 'utf-8'
+$charset = {}
+$charset[$mtTurtle]   = 'utf-8'
+$charset[$mtText]     = 'ascii'
+$charset[$mtTriG]     = 'utf-8'
+$charset[$mtNQuads]   = 'ascii'
+
+# Headers
+
+$hContentType         = 'Content-Type'
+# $hContentEncoding     = 'Content-Encoding'
+$hContentLength       = 'Content-Length'
+# $hContentLocation     = 'Content-Location'
+# $hContentRange        = 'Content-Range'
+
+$hAccept              = 'Accept'
+$hAcceptCharset       = 'Accept-Charset'
+$hAcceptEncoding      = 'Accept-Encoding'
+$hAcceptRanges        = 'Accept-Ranges' 
+
+$headers = { "User-Agent" => "#{SOH_NAME}/Fuseki #{SOH_VERSION}"}
+$print_http = false
+
+# Default for GET
+# At least allow anythign (and hope!)
+$accept_rdf="#{$mtRDF};q=0.9 , #{$mtTurtle}"
+# For SPARQL query
+$accept_results="#{$mtSparqlResultsJ} , #{$mtSparqlResultsX};q=0.9 , #{$accept_rdf}"
+
+# Accept any in case of trouble.
+$accept_rdf="#{$accept_rdf} , */*;q=0.1"
+$accept_results="#{$accept_results} , */*;q=0.1" 
+
+# The media type usually forces the charset.
+$accept_charset=nil
+
+## Who we are.
+## Two styles:
+##    s-query .....
+##    soh query .....
+
+$cmd = File.basename($0)
+if $cmd == 'soh'
+then
+  $cmd = (ARGV.size == 0) ? 'soh' : ARGV.shift
+end
+
+if ! $cmd.start_with?('s-') && $cmd != 'soh'
+  $cmd = 's-'+$cmd
+end
+
+## -------- 
+
+def GET(dataset, graph)
+  print "GET #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  get_worker(requestURI, headers)
+end
+
+def get_worker(requestURI, headers)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Get.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+def HEAD(dataset, graph)
+  print "HEAD #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hAccept] = $accept_rdf
+  headers[$hAcceptCharset] = $accept_charset unless $accept_charset.nil?
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Head.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def PUT(dataset, graph, file)
+  print "PUT #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Put)
+end
+
+def POST(dataset, graph, file)
+  print "POST #{dataset} #{graph} #{file}\n" if $verbose
+  send_body(dataset, graph, file, Net::HTTP::Post)
+end
+
+def DELETE(dataset, graph)
+  print "DELETE #{dataset} #{graph}\n" if $verbose
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  request = Net::HTTP::Delete.new(uri.request_uri)
+  headers = {}
+  headers.merge!($headers)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def uri_escape(string)
+  CGI.escape(string)
+end
+
+def target(dataset, graph)
+  return dataset+"?default" if graph == "default"
+  return dataset+"?graph="+uri_escape(graph)
+end
+
+def send_body(dataset, graph, file, method)
+  mt = content_type(file)
+  headers = {}
+  headers.merge!($headers)
+  headers[$hContentType] = mt
+  headers[$hContentLength] = File.size(file).to_s
+  ## p headers
+
+  requestURI = target(dataset, graph)
+  uri = URI.parse(requestURI)
+  
+  request = method.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  print_http_request(uri, request)
+  request.body_stream = File.open(file)
+  response_no_body(uri, request)
+end
+
+def response_no_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue Exception => e  
+    # puts e.message  
+    #puts e.backtrace.inspect  
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+  response = http.request(request)
+  print_http_response(response)
+  case response
+  when Net::HTTPSuccess, Net::HTTPRedirection
+    # OK
+  when Net::HTTPNotFound
+    warn_exit "404 Not found: #{uri}", 9
+    #print response.body
+  else
+    warn_exit "#{response.code} #{response.message} #{uri}", 9
+    # Unreachable
+      response.error!
+  end
+  # NO BODY IN RESPONSE
+end
+
+def response_print_body(uri, request)
+  http = Net::HTTP::Proxy($proxy.host,$proxy.port).new(uri.host, uri.port)
+  http.read_timeout = nil
+  # check we can connect.
+  begin http.start
+  rescue => e  
+    #puts e.backtrace.inspect  
+    #print e.class
+    warn_exit "Failed to connect: #{uri.host}:#{uri.port}: #{e.message}", 3
+  end
+
+  # Add a blank line if headers were output.
+  print "\n" if $http_print ;
+
+  begin
+    response = http.request(request) { |res| 
+      print_http_response(res)
+      #puts res.code
+      res.read_body do |segment|
+        print segment
+      end
+    }
+    case response
+    when Net::HTTPSuccess, Net::HTTPRedirection
+      # OK
+    when Net::HTTPNotFound
+      warn_exit "404 Not found: #{uri}", 9
+      #print response.body
+    else
+      warn_exit "#{response.code}: #{uri}", 9
+      # Unreachable
+      response.error!
+    end
+  rescue EOFError => e
+    warn_exit "IO Error: "+e.message, 3
+  end
+end
+
+def print_http_request(uri, request)
+  return unless $print_http
+  #print "Request\n"
+  print request.method," ",uri, "\n"
+  print_headers("  ",request)
+end
+
+def print_http_response(response)
+  return unless $print_http
+  #print "Response\n"
+  print response.code, " ", response.message, "\n"
+  print_headers("  ",response)
+end
+
+def print_headers(marker, headers)
+  headers.each do |k,v| 
+    k = k.split('-').map{|w| w.capitalize}.join('-')+':'
+    printf "%s%-20s %s\n",marker,k,v
+  end
+end
+
+def content_type(file)
+  file =~ /\.([^.]*)$/
+  ext = $1
+  mt = $fileMediaTypes[ext]
+  cs = $charset[mt]
+  mt = mt+';charset='+cs if ! cs.nil?
+  return mt
+end
+
+def charset(content_type)
+  return $charset[content_type]
+end
+
+def warn_exit(msg, rc)
+    warn msg
+    exit rc ;
+end
+
+def parseURI(uri_string)
+  begin
+    return URI.parse(uri_string).to_s
+  rescue URI::InvalidURIError => err
+    warn_exit "Bad URI: <#{uri_string}>", 2
+  end
+end
+
+## ---- Command
+
+def cmd_soh(command=nil)
+  ## Command line
+  options = {}
+  optparse = OptionParser.new do |opts|
+    # Set a banner, displayed at the top
+    # of the help screen.
+    case $cmd
+    when "s-http", "sparql-http", "soh"
+      banner="$cmd [get|post|put|delete] datasetURI graph [file]"
+    when "s-get", "s-head", "s-delete"
+      banner="$cmd  datasetURI graph"
+    end
+
+    opts.banner = $banner
+    # Define the options, and what they do
+    
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    
+    options[:version] = false
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end
+    
+    # This displays the help screen, all programs are
+    # assumed to have this option.
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  if command.nil?
+    if ARGV.size == 0
+      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 'query' or 'update'"
+      exit 1
+    end
+    cmdPrint=ARGV.shift
+    command=cmdPrint.upcase
+  else
+    cmdPrint=command
+  end
+
+  case command
+  when "HEAD", "GET", "DELETE"
+    requiredFile=false
+  when "PUT", "POST"
+    requiredFile=true
+  when "QUERY"
+    cmd_sparql_query
+  when "UPDATE"
+    cmd_sparql_update
+  else
+    warn_exit "Unknown command: #{command}", 2
+  end
+
+  if requiredFile 
+  then
+    if ARGV.size != 3
+      warn_exit "Required: dataset URI, graph URI (or 'default') and file", 1 
+    end
+  else
+    if ARGV.size != 2
+      warn_exit "Required: dataset URI and graph URI (or 'default')", 1 
+    end
+  end
+
+  dataset=parseURI(ARGV.shift)
+  # Relative URI?
+  graph=parseURI(ARGV.shift)
+  file=""
+  if requiredFile
+  then
+    file = ARGV.shift if requiredFile
+    if ! File.exist?(file)
+      warn_exit "No such file: "+file, 3
+    end
+    if File.directory?(file)
+      warn_exit "File is a directory: "+file, 3
+    end
+  end
+
+  case command
+  when "GET"
+    GET(dataset, graph)
+  when "HEAD"
+    HEAD(dataset, graph)
+  when "PUT"
+    PUT(dataset, graph, file)
+  when "DELETE"
+    DELETE(dataset, graph)
+  when "POST"
+    POST(dataset, graph, file)
+  else
+    warn_exit "Internal error: Unknown command: #{cmd}", 2
+  end
+  exit 0
+end
+
+## --------
+def string_or_file(arg)
+  return arg if ! arg.match(/^@/)
+  a=(arg[1..-1])
+  open(a, 'rb'){|f| f.read}
+end
+
+## -------- SPARQL Query
+
+## Choose method
+def SPARQL_query(service, query, query_file, forcePOST=false, args2={})
+   if ! query_file.nil?
+    query = open(query_file, 'rb'){|f| f.read}
+  end
+  if forcePOST || query.length >= 2*1024 
+    SPARQL_query_POST(service, query, args2)
+  else
+    SPARQL_query_GET(service, query, args2)
+  end
+end
+
+## By GET
+
+def SPARQL_query_GET(service, query, args2)
+  args = { "query" => query }
+  args.merge!(args2)
+  qs=args.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  action="#{service}?#{qs}"
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  get_worker(action, headers)
+end
+
+## By POST
+
+def SPARQL_query_POST(service, query, args2)
+  # DRY - body/no body for each of request and response.
+  post_params={ "query" => query }
+  post_params.merge!(args2)
+  uri = URI.parse(service)
+  headers={}
+  headers.merge!($headers)
+  headers[$hAccept]=$accept_results
+  execute_post_form_body(uri, headers, post_params)
+end
+
+def execute_post_form_body(uri, headers, post_params)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  qs=post_params.collect { |k,v| "#{k}=#{uri_escape(v)}" }.join('&')
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = qs.length.to_s
+  request.initialize_http_header(headers)
+  request.body = qs
+  print_http_request(uri, request)
+  response_print_body(uri, request)
+end
+
+# Usage: -v --help --file= --query=
+def cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--query QUERY] [--service URI] [--post] 'query' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--query=FILE','--file=FILE', 'Take query from a file') do |file|
+      options[:file]=file
+    end
+    opts.on('--output=TYPE', [:json,:xml,:text,:csv,:tsv],
+            'Set the output argument') do |type|
+      options[:output]=type
+    end
+    opts.on('--accept=TYPE', [:json,:xml,:text,:csv,:tsv], 
+            'Set the accept header type') do |type|
+      options[:accept]=type
+    end
+    options[:verbose] = false
+    opts.on( '--post', 'Force use of POST' ) do
+      options[:post] = true
+    end
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
+    warn e
+    exit 1
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+  usePOST = options[:post]
+
+  service = options[:service]
+  warn_exit 'No service specified.  Required --service=URI',1 if service.nil?
+
+  # Query
+  query=nil
+  query_file=options[:file]
+  if query_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No query specified.',1
+    end
+  if query_file.nil?
+    query = ARGV.shift
+    if query.match(/^@/)
+      query_file = query[1..-1]
+      query = nil
+    end
+  end
+
+  # --output ==> output= (non-standard)
+  args={}
+  case options[:output]
+  when nil
+  when  "json","xml","text","csv","tsv"
+    args['output'] = options[:output]
+  when :json,:xml,:text,:csv,:tsv
+    args['output'] = options[:output].to_s
+  else
+    warn_exit "Unrecognized output type: "+options[:output],2
+  end
+
+  # --accept
+  # options[:accept]
+
+  print "SPARQL #{service}\n" if $verbose
+  #args={"output"=>"text"}
+  SPARQL_query(service, query, query_file, usePOST, args)
+  exit(0)
+end
+
+## -------- SPARQL Update
+
+# Update sent as a WWW form.
+def SPARQL_update_by_form(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  # args? encode?
+  body="update="+uri_escape(update)
+  headers[$hContentType] = $mtWWWForm
+  headers[$hContentLength] = body.length.to_s
+  uri = URI.parse(service)
+  execute_post_form(uri, headers, body)
+end
+
+# DRY - query form.
+def execute_post_form(uri, headers, body)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = body
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def SPARQL_update(service, update, args2={})
+  args = {}
+  args.merge!(args2)
+  headers={}
+  headers.merge!($headers)
+  headers[$hContentType] = $mtSparqlUpdate
+  uri = URI.parse(service)
+  request = Net::HTTP::Post.new(uri.request_uri)
+  request.initialize_http_header(headers)
+  request.body = update
+  print_http_request(uri, request)
+  response_no_body(uri, request)
+end
+
+def cmd_sparql_update(by_raw_post=true)
+  # Share with cmd_sparql_query
+  options={}
+  optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{$cmd} [--file REQUEST] [--service URI] 'request' | @file"
+    opts.on('--service=URI', '--server=URI', 'SPARQL endpoint') do |uri|
+      options[:service]=uri
+    end
+    opts.on('--update=FILE', '--file=FILE', 'Take update from a file') do |file|
+      options[:file]=file
+    end
+    options[:verbose] = false
+    opts.on( '-v', '--verbose', 'Verbose' ) do
+      options[:verbose] = true
+    end
+    opts.on( '--version', 'Print version and exit' ) do
+      print "#{SOH_NAME} #{SOH_VERSION}\n"
+      exit
+    end 
+    opts.on( '-h', '--help', 'Display this screen and exit' ) do
+      puts opts
+      exit
+    end
+  end
+
+  begin optparse.parse!    
+  rescue OptionParser::InvalidArgument => e
+    warn e
+    exit
+  end
+
+  $verbose = options[:verbose]
+  $print_http = $verbose
+
+  service = options[:service]
+  warn_exit 'No service specified. Required --service=URI',1   if service.nil?
+  
+  update=nil
+  update_file=options[:file]
+
+  if update_file.nil? && ARGV.size == 0
+  then
+    warn_exit 'No update specified.',1
+    end
+  if update_file.nil?
+    update = ARGV.shift
+    if update.match(/^@/)
+      update_file = update[1..-1]
+      update = nil
+    end
+  end
+  
+  print "SPARQL-Update #{service}\n" if $verbose
+  args={}
+
+  # Reads in the file :-(
+  if update.nil?
+  then
+    update = open(update_file, 'rb'){|f| f.read}
+  else
+    update = string_or_file(update)
+  end
+
+  if by_raw_post
+    SPARQL_update(service, update, args)
+  else
+    SPARQL_update_by_form(service, update, args)
+  end
+  exit(0)
+end
+
+## -------
+
+case $cmd
+when "s-http", "sparql-http", "soh"
+  $banner="#{$cmd} [get|post|put|delete] datasetURI graph [file]"
+  cmd_soh
+when "s-get", "s-head", "s-put", "s-delete", "s-post"
+
+  case $cmd
+  when "s-get", "s-head", "s-delete"
+    $banner="#{$cmd} datasetURI graph"
+  when "s-put", "s-post"
+    $banner="#{$cmd} datasetURI graph file"
+  end
+  cmd2 = $cmd.sub(/^s-/, '').upcase
+  cmd_soh cmd2
+
+when "s-query", "sparql-query"
+  cmd_sparql_query
+when "s-update", "sparql-update"
+  cmd_sparql_update true
+when "s-update-form", "sparql-update-form"
+  cmd_sparql_update false
+else 
+  warn_exit "Unknown: "+$cmd, 1
+end


[21/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/lib/codemirror.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/lib/codemirror.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/lib/codemirror.js
new file mode 100644
index 0000000..bafc9fa
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/lib/codemirror.js
@@ -0,0 +1,7638 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+// This is CodeMirror (http://codemirror.net), a code editor
+// implemented in JavaScript on top of the browser's DOM.
+//
+// You can find some technical background for some of the code below
+// at http://marijnhaverbeke.nl/blog/#cm-internals .
+
+(function(mod) {
+  if (typeof exports == "object" && typeof module == "object") // CommonJS
+    module.exports = mod();
+  else if (typeof define == "function" && define.amd) // AMD
+    return define([], mod);
+  else // Plain browser env
+    this.CodeMirror = mod();
+})(function() {
+  "use strict";
+
+  // BROWSER SNIFFING
+
+  // Kludges for bugs and behavior differences that can't be feature
+  // detected are enabled based on userAgent etc sniffing.
+
+  var gecko = /gecko\/\d/i.test(navigator.userAgent);
+  // ie_uptoN means Internet Explorer version N or lower
+  var ie_upto10 = /MSIE \d/.test(navigator.userAgent);
+  var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
+  var ie = ie_upto10 || ie_11up;
+  var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : ie_11up[1]);
+  var webkit = /WebKit\//.test(navigator.userAgent);
+  var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent);
+  var chrome = /Chrome\//.test(navigator.userAgent);
+  var presto = /Opera\//.test(navigator.userAgent);
+  var safari = /Apple Computer/.test(navigator.vendor);
+  var khtml = /KHTML\//.test(navigator.userAgent);
+  var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);
+  var phantom = /PhantomJS/.test(navigator.userAgent);
+
+  var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
+  // This is woefully incomplete. Suggestions for alternative methods welcome.
+  var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);
+  var mac = ios || /Mac/.test(navigator.platform);
+  var windows = /win/i.test(navigator.platform);
+
+  var presto_version = presto && navigator.userAgent.match(/Version\/(\d*\.\d*)/);
+  if (presto_version) presto_version = Number(presto_version[1]);
+  if (presto_version && presto_version >= 15) { presto = false; webkit = true; }
+  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
+  var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
+  var captureRightClick = gecko || (ie && ie_version >= 9);
+
+  // Optimize some code when these features are not used.
+  var sawReadOnlySpans = false, sawCollapsedSpans = false;
+
+  // EDITOR CONSTRUCTOR
+
+  // A CodeMirror instance represents an editor. This is the object
+  // that user code is usually dealing with.
+
+  function CodeMirror(place, options) {
+    if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);
+
+    this.options = options = options || {};
+    // Determine effective options based on given values and defaults.
+    copyObj(defaults, options, false);
+    setGuttersForLineNumbers(options);
+
+    var doc = options.value;
+    if (typeof doc == "string") doc = new Doc(doc, options.mode);
+    this.doc = doc;
+
+    var display = this.display = new Display(place, doc);
+    display.wrapper.CodeMirror = this;
+    updateGutters(this);
+    themeChanged(this);
+    if (options.lineWrapping)
+      this.display.wrapper.className += " CodeMirror-wrap";
+    if (options.autofocus && !mobile) focusInput(this);
+
+    this.state = {
+      keyMaps: [],  // stores maps added by addKeyMap
+      overlays: [], // highlighting overlays, as added by addOverlay
+      modeGen: 0,   // bumped when mode/overlay changes, used to invalidate highlighting info
+      overwrite: false, focused: false,
+      suppressEdits: false, // used to disable editing during key handlers when in readOnly mode
+      pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in readInput
+      draggingText: false,
+      highlight: new Delayed() // stores highlight worker timeout
+    };
+
+    // Override magic textarea content restore that IE sometimes does
+    // on our hidden textarea on reload
+    if (ie && ie_version < 11) setTimeout(bind(resetInput, this, true), 20);
+
+    registerEventHandlers(this);
+    ensureGlobalHandlers();
+
+    var cm = this;
+    runInOp(this, function() {
+      cm.curOp.forceUpdate = true;
+      attachDoc(cm, doc);
+
+      if ((options.autofocus && !mobile) || activeElt() == display.input)
+        setTimeout(bind(onFocus, cm), 20);
+      else
+        onBlur(cm);
+
+      for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt))
+        optionHandlers[opt](cm, options[opt], Init);
+      for (var i = 0; i < initHooks.length; ++i) initHooks[i](cm);
+    });
+  }
+
+  // DISPLAY CONSTRUCTOR
+
+  // The display handles the DOM integration, both for input reading
+  // and content drawing. It holds references to DOM nodes and
+  // display-related state.
+
+  function Display(place, doc) {
+    var d = this;
+
+    // The semihidden textarea that is focused when the editor is
+    // focused, and receives input.
+    var input = d.input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none");
+    // The textarea is kept positioned near the cursor to prevent the
+    // fact that it'll be scrolled into view on input from scrolling
+    // our fake cursor out of view. On webkit, when wrap=off, paste is
+    // very slow. So make the area wide instead.
+    if (webkit) input.style.width = "1000px";
+    else input.setAttribute("wrap", "off");
+    // If border: 0; -- iOS fails to open keyboard (issue #1287)
+    if (ios) input.style.border = "1px solid black";
+    input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off"); input.setAttribute("spellcheck", "false");
+
+    // Wraps and hides input textarea
+    d.inputDiv = elt("div", [input], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
+    // The fake scrollbar elements.
+    d.scrollbarH = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
+    d.scrollbarV = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
+    // Covers bottom-right square when both scrollbars are present.
+    d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
+    // Covers bottom of gutter when coverGutterNextToScrollbar is on
+    // and h scrollbar is present.
+    d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
+    // Will contain the actual code, positioned to cover the viewport.
+    d.lineDiv = elt("div", null, "CodeMirror-code");
+    // Elements are added to these to represent selection and cursors.
+    d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
+    d.cursorDiv = elt("div", null, "CodeMirror-cursors");
+    // A visibility: hidden element used to find the size of things.
+    d.measure = elt("div", null, "CodeMirror-measure");
+    // When lines outside of the viewport are measured, they are drawn in this.
+    d.lineMeasure = elt("div", null, "CodeMirror-measure");
+    // Wraps everything that needs to exist inside the vertically-padded coordinate system
+    d.lineSpace = elt("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],
+                      null, "position: relative; outline: none");
+    // Moved around its parent to cover visible view.
+    d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative");
+    // Set to the height of the document, allowing scrolling.
+    d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
+    // Behavior of elts with overflow: auto and padding is
+    // inconsistent across browsers. This is used to ensure the
+    // scrollable area is big enough.
+    d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerCutOff + "px; width: 1px;");
+    // Will contain the gutters, if any.
+    d.gutters = elt("div", null, "CodeMirror-gutters");
+    d.lineGutter = null;
+    // Actual scrollable element.
+    d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
+    d.scroller.setAttribute("tabIndex", "-1");
+    // The element in which the editor lives.
+    d.wrapper = elt("div", [d.inputDiv, d.scrollbarH, d.scrollbarV,
+                            d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
+
+    // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
+    if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
+    // Needed to hide big blue blinking cursor on Mobile Safari
+    if (ios) input.style.width = "0px";
+    if (!webkit) d.scroller.draggable = true;
+    // Needed to handle Tab key in KHTML
+    if (khtml) { d.inputDiv.style.height = "1px"; d.inputDiv.style.position = "absolute"; }
+    // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
+    if (ie && ie_version < 8) d.scrollbarH.style.minHeight = d.scrollbarV.style.minWidth = "18px";
+
+    if (place.appendChild) place.appendChild(d.wrapper);
+    else place(d.wrapper);
+
+    // Current rendered range (may be bigger than the view window).
+    d.viewFrom = d.viewTo = doc.first;
+    // Information about the rendered lines.
+    d.view = [];
+    // Holds info about a single rendered line when it was rendered
+    // for measurement, while not in view.
+    d.externalMeasured = null;
+    // Empty space (in pixels) above the view
+    d.viewOffset = 0;
+    d.lastSizeC = 0;
+    d.updateLineNumbers = null;
+
+    // Used to only resize the line number gutter when necessary (when
+    // the amount of lines crosses a boundary that makes its width change)
+    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
+    // See readInput and resetInput
+    d.prevInput = "";
+    // Set to true when a non-horizontal-scrolling line widget is
+    // added. As an optimization, line widget aligning is skipped when
+    // this is false.
+    d.alignWidgets = false;
+    // Flag that indicates whether we expect input to appear real soon
+    // now (after some event like 'keypress' or 'input') and are
+    // polling intensively.
+    d.pollingFast = false;
+    // Self-resetting timeout for the poller
+    d.poll = new Delayed();
+
+    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
+
+    // Tracks when resetInput has punted to just putting a short
+    // string into the textarea instead of the full selection.
+    d.inaccurateSelection = false;
+
+    // Tracks the maximum line length so that the horizontal scrollbar
+    // can be kept static when scrolling.
+    d.maxLine = null;
+    d.maxLineLength = 0;
+    d.maxLineChanged = false;
+
+    // Used for measuring wheel scrolling granularity
+    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
+
+    // True when shift is held down.
+    d.shift = false;
+
+    // Used to track whether anything happened since the context menu
+    // was opened.
+    d.selForContextMenu = null;
+  }
+
+  // STATE UPDATES
+
+  // Used to get the editor into a consistent state again when options change.
+
+  function loadMode(cm) {
+    cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);
+    resetModeState(cm);
+  }
+
+  function resetModeState(cm) {
+    cm.doc.iter(function(line) {
+      if (line.stateAfter) line.stateAfter = null;
+      if (line.styles) line.styles = null;
+    });
+    cm.doc.frontier = cm.doc.first;
+    startWorker(cm, 100);
+    cm.state.modeGen++;
+    if (cm.curOp) regChange(cm);
+  }
+
+  function wrappingChanged(cm) {
+    if (cm.options.lineWrapping) {
+      addClass(cm.display.wrapper, "CodeMirror-wrap");
+      cm.display.sizer.style.minWidth = "";
+    } else {
+      rmClass(cm.display.wrapper, "CodeMirror-wrap");
+      findMaxLine(cm);
+    }
+    estimateLineHeights(cm);
+    regChange(cm);
+    clearCaches(cm);
+    setTimeout(function(){updateScrollbars(cm);}, 100);
+  }
+
+  // Returns a function that estimates the height of a line, to use as
+  // first approximation until the line becomes visible (and is thus
+  // properly measurable).
+  function estimateHeight(cm) {
+    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
+    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
+    return function(line) {
+      if (lineIsHidden(cm.doc, line)) return 0;
+
+      var widgetsHeight = 0;
+      if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {
+        if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;
+      }
+
+      if (wrapping)
+        return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;
+      else
+        return widgetsHeight + th;
+    };
+  }
+
+  function estimateLineHeights(cm) {
+    var doc = cm.doc, est = estimateHeight(cm);
+    doc.iter(function(line) {
+      var estHeight = est(line);
+      if (estHeight != line.height) updateLineHeight(line, estHeight);
+    });
+  }
+
+  function keyMapChanged(cm) {
+    var map = keyMap[cm.options.keyMap], style = map.style;
+    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-keymap-\S+/g, "") +
+      (style ? " cm-keymap-" + style : "");
+  }
+
+  function themeChanged(cm) {
+    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
+      cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
+    clearCaches(cm);
+  }
+
+  function guttersChanged(cm) {
+    updateGutters(cm);
+    regChange(cm);
+    setTimeout(function(){alignHorizontally(cm);}, 20);
+  }
+
+  // Rebuild the gutter elements, ensure the margin to the left of the
+  // code matches their width.
+  function updateGutters(cm) {
+    var gutters = cm.display.gutters, specs = cm.options.gutters;
+    removeChildren(gutters);
+    for (var i = 0; i < specs.length; ++i) {
+      var gutterClass = specs[i];
+      var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass));
+      if (gutterClass == "CodeMirror-linenumbers") {
+        cm.display.lineGutter = gElt;
+        gElt.style.width = (cm.display.lineNumWidth || 1) + "px";
+      }
+    }
+    gutters.style.display = i ? "" : "none";
+    updateGutterSpace(cm);
+  }
+
+  function updateGutterSpace(cm) {
+    var width = cm.display.gutters.offsetWidth;
+    cm.display.sizer.style.marginLeft = width + "px";
+    cm.display.scrollbarH.style.left = cm.options.fixedGutter ? width + "px" : 0;
+  }
+
+  // Compute the character length of a line, taking into account
+  // collapsed ranges (see markText) that might hide parts, and join
+  // other lines onto it.
+  function lineLength(line) {
+    if (line.height == 0) return 0;
+    var len = line.text.length, merged, cur = line;
+    while (merged = collapsedSpanAtStart(cur)) {
+      var found = merged.find(0, true);
+      cur = found.from.line;
+      len += found.from.ch - found.to.ch;
+    }
+    cur = line;
+    while (merged = collapsedSpanAtEnd(cur)) {
+      var found = merged.find(0, true);
+      len -= cur.text.length - found.from.ch;
+      cur = found.to.line;
+      len += cur.text.length - found.to.ch;
+    }
+    return len;
+  }
+
+  // Find the longest line in the document.
+  function findMaxLine(cm) {
+    var d = cm.display, doc = cm.doc;
+    d.maxLine = getLine(doc, doc.first);
+    d.maxLineLength = lineLength(d.maxLine);
+    d.maxLineChanged = true;
+    doc.iter(function(line) {
+      var len = lineLength(line);
+      if (len > d.maxLineLength) {
+        d.maxLineLength = len;
+        d.maxLine = line;
+      }
+    });
+  }
+
+  // Make sure the gutters options contains the element
+  // "CodeMirror-linenumbers" when the lineNumbers option is true.
+  function setGuttersForLineNumbers(options) {
+    var found = indexOf(options.gutters, "CodeMirror-linenumbers");
+    if (found == -1 && options.lineNumbers) {
+      options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]);
+    } else if (found > -1 && !options.lineNumbers) {
+      options.gutters = options.gutters.slice(0);
+      options.gutters.splice(found, 1);
+    }
+  }
+
+  // SCROLLBARS
+
+  function hScrollbarTakesSpace(cm) {
+    return cm.display.scroller.clientHeight - cm.display.wrapper.clientHeight < scrollerCutOff - 3;
+  }
+
+  // Prepare DOM reads needed to update the scrollbars. Done in one
+  // shot to minimize update/measure roundtrips.
+  function measureForScrollbars(cm) {
+    var scroll = cm.display.scroller;
+    return {
+      clientHeight: scroll.clientHeight,
+      barHeight: cm.display.scrollbarV.clientHeight,
+      scrollWidth: scroll.scrollWidth, clientWidth: scroll.clientWidth,
+      hScrollbarTakesSpace: hScrollbarTakesSpace(cm),
+      barWidth: cm.display.scrollbarH.clientWidth,
+      docHeight: Math.round(cm.doc.height + paddingVert(cm.display))
+    };
+  }
+
+  // Re-synchronize the fake scrollbars with the actual size of the
+  // content.
+  function updateScrollbars(cm, measure) {
+    if (!measure) measure = measureForScrollbars(cm);
+    var d = cm.display, sWidth = scrollbarWidth(d.measure);
+    var scrollHeight = measure.docHeight + scrollerCutOff;
+    var needsH = measure.scrollWidth > measure.clientWidth;
+    if (needsH && measure.scrollWidth <= measure.clientWidth + 1 &&
+        sWidth > 0 && !measure.hScrollbarTakesSpace)
+      needsH = false; // (Issue #2562)
+    var needsV = scrollHeight > measure.clientHeight;
+
+    if (needsV) {
+      d.scrollbarV.style.display = "block";
+      d.scrollbarV.style.bottom = needsH ? sWidth + "px" : "0";
+      // A bug in IE8 can cause this value to be negative, so guard it.
+      d.scrollbarV.firstChild.style.height =
+        Math.max(0, scrollHeight - measure.clientHeight + (measure.barHeight || d.scrollbarV.clientHeight)) + "px";
+    } else {
+      d.scrollbarV.style.display = "";
+      d.scrollbarV.firstChild.style.height = "0";
+    }
+    if (needsH) {
+      d.scrollbarH.style.display = "block";
+      d.scrollbarH.style.right = needsV ? sWidth + "px" : "0";
+      d.scrollbarH.firstChild.style.width =
+        (measure.scrollWidth - measure.clientWidth + (measure.barWidth || d.scrollbarH.clientWidth)) + "px";
+    } else {
+      d.scrollbarH.style.display = "";
+      d.scrollbarH.firstChild.style.width = "0";
+    }
+    if (needsH && needsV) {
+      d.scrollbarFiller.style.display = "block";
+      d.scrollbarFiller.style.height = d.scrollbarFiller.style.width = sWidth + "px";
+    } else d.scrollbarFiller.style.display = "";
+    if (needsH && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
+      d.gutterFiller.style.display = "block";
+      d.gutterFiller.style.height = sWidth + "px";
+      d.gutterFiller.style.width = d.gutters.offsetWidth + "px";
+    } else d.gutterFiller.style.display = "";
+
+    if (!cm.state.checkedOverlayScrollbar && measure.clientHeight > 0) {
+      if (sWidth === 0) {
+        var w = mac && !mac_geMountainLion ? "12px" : "18px";
+        d.scrollbarV.style.minWidth = d.scrollbarH.style.minHeight = w;
+        var barMouseDown = function(e) {
+          if (e_target(e) != d.scrollbarV && e_target(e) != d.scrollbarH)
+            operation(cm, onMouseDown)(e);
+        };
+        on(d.scrollbarV, "mousedown", barMouseDown);
+        on(d.scrollbarH, "mousedown", barMouseDown);
+      }
+      cm.state.checkedOverlayScrollbar = true;
+    }
+  }
+
+  // Compute the lines that are visible in a given viewport (defaults
+  // the the current scroll position). viewPort may contain top,
+  // height, and ensure (see op.scrollToPos) properties.
+  function visibleLines(display, doc, viewPort) {
+    var top = viewPort && viewPort.top != null ? Math.max(0, viewPort.top) : display.scroller.scrollTop;
+    top = Math.floor(top - paddingTop(display));
+    var bottom = viewPort && viewPort.bottom != null ? viewPort.bottom : top + display.wrapper.clientHeight;
+
+    var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);
+    // Ensure is a {from: {line, ch}, to: {line, ch}} object, and
+    // forces those lines into the viewport (if possible).
+    if (viewPort && viewPort.ensure) {
+      var ensureFrom = viewPort.ensure.from.line, ensureTo = viewPort.ensure.to.line;
+      if (ensureFrom < from)
+        return {from: ensureFrom,
+                to: lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight)};
+      if (Math.min(ensureTo, doc.lastLine()) >= to)
+        return {from: lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight),
+                to: ensureTo};
+    }
+    return {from: from, to: Math.max(to, from + 1)};
+  }
+
+  // LINE NUMBERS
+
+  // Re-align line numbers and gutter marks to compensate for
+  // horizontal scrolling.
+  function alignHorizontally(cm) {
+    var display = cm.display, view = display.view;
+    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return;
+    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
+    var gutterW = display.gutters.offsetWidth, left = comp + "px";
+    for (var i = 0; i < view.length; i++) if (!view[i].hidden) {
+      if (cm.options.fixedGutter && view[i].gutter)
+        view[i].gutter.style.left = left;
+      var align = view[i].alignable;
+      if (align) for (var j = 0; j < align.length; j++)
+        align[j].style.left = left;
+    }
+    if (cm.options.fixedGutter)
+      display.gutters.style.left = (comp + gutterW) + "px";
+  }
+
+  // Used to ensure that the line number gutter is still the right
+  // size for the current document size. Returns true when an update
+  // is needed.
+  function maybeUpdateLineNumberWidth(cm) {
+    if (!cm.options.lineNumbers) return false;
+    var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;
+    if (last.length != display.lineNumChars) {
+      var test = display.measure.appendChild(elt("div", [elt("div", last)],
+                                                 "CodeMirror-linenumber CodeMirror-gutter-elt"));
+      var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
+      display.lineGutter.style.width = "";
+      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding);
+      display.lineNumWidth = display.lineNumInnerWidth + padding;
+      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
+      display.lineGutter.style.width = display.lineNumWidth + "px";
+      updateGutterSpace(cm);
+      return true;
+    }
+    return false;
+  }
+
+  function lineNumberFor(options, i) {
+    return String(options.lineNumberFormatter(i + options.firstLineNumber));
+  }
+
+  // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,
+  // but using getBoundingClientRect to get a sub-pixel-accurate
+  // result.
+  function compensateForHScroll(display) {
+    return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left;
+  }
+
+  // DISPLAY DRAWING
+
+  // Updates the display, selection, and scrollbars, using the
+  // information in display.view to find out which nodes are no longer
+  // up-to-date. Tries to bail out early when no changes are needed,
+  // unless forced is true.
+  // Returns true if an actual update happened, false otherwise.
+  function updateDisplay(cm, viewPort, forced) {
+    var oldFrom = cm.display.viewFrom, oldTo = cm.display.viewTo, updated;
+    var visible = visibleLines(cm.display, cm.doc, viewPort);
+    for (var first = true;; first = false) {
+      var oldWidth = cm.display.scroller.clientWidth;
+      if (!updateDisplayInner(cm, visible, forced)) break;
+      updated = true;
+
+      // If the max line changed since it was last measured, measure it,
+      // and ensure the document's width matches it.
+      if (cm.display.maxLineChanged && !cm.options.lineWrapping)
+        adjustContentWidth(cm);
+
+      var barMeasure = measureForScrollbars(cm);
+      updateSelection(cm);
+      setDocumentHeight(cm, barMeasure);
+      updateScrollbars(cm, barMeasure);
+      if (webkit && cm.options.lineWrapping)
+        checkForWebkitWidthBug(cm, barMeasure); // (Issue #2420)
+      if (webkit && barMeasure.scrollWidth > barMeasure.clientWidth &&
+          barMeasure.scrollWidth < barMeasure.clientWidth + 1 &&
+          !hScrollbarTakesSpace(cm))
+        updateScrollbars(cm); // (Issue #2562)
+      if (first && cm.options.lineWrapping && oldWidth != cm.display.scroller.clientWidth) {
+        forced = true;
+        continue;
+      }
+      forced = false;
+
+      // Clip forced viewport to actual scrollable area.
+      if (viewPort && viewPort.top != null)
+        viewPort = {top: Math.min(barMeasure.docHeight - scrollerCutOff - barMeasure.clientHeight, viewPort.top)};
+      // Updated line heights might result in the drawn area not
+      // actually covering the viewport. Keep looping until it does.
+      visible = visibleLines(cm.display, cm.doc, viewPort);
+      if (visible.from >= cm.display.viewFrom && visible.to <= cm.display.viewTo)
+        break;
+    }
+
+    cm.display.updateLineNumbers = null;
+    if (updated) {
+      signalLater(cm, "update", cm);
+      if (cm.display.viewFrom != oldFrom || cm.display.viewTo != oldTo)
+        signalLater(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
+    }
+    return updated;
+  }
+
+  // Does the actual updating of the line display. Bails out
+  // (returning false) when there is nothing to be done and forced is
+  // false.
+  function updateDisplayInner(cm, visible, forced) {
+    var display = cm.display, doc = cm.doc;
+    if (!display.wrapper.offsetWidth) {
+      resetView(cm);
+      return;
+    }
+
+    // Bail out if the visible area is already rendered and nothing changed.
+    if (!forced && visible.from >= display.viewFrom && visible.to <= display.viewTo &&
+        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&
+        countDirtyView(cm) == 0)
+      return;
+
+    if (maybeUpdateLineNumberWidth(cm))
+      resetView(cm);
+    var dims = getDimensions(cm);
+
+    // Compute a suitable new viewport (from & to)
+    var end = doc.first + doc.size;
+    var from = Math.max(visible.from - cm.options.viewportMargin, doc.first);
+    var to = Math.min(end, visible.to + cm.options.viewportMargin);
+    if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom);
+    if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo);
+    if (sawCollapsedSpans) {
+      from = visualLineNo(cm.doc, from);
+      to = visualLineEndNo(cm.doc, to);
+    }
+
+    var different = from != display.viewFrom || to != display.viewTo ||
+      display.lastSizeC != display.wrapper.clientHeight;
+    adjustView(cm, from, to);
+
+    display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));
+    // Position the mover div to align with the current scroll position
+    cm.display.mover.style.top = display.viewOffset + "px";
+
+    var toUpdate = countDirtyView(cm);
+    if (!different && toUpdate == 0 && !forced) return;
+
+    // For big changes, we hide the enclosing element during the
+    // update, since that speeds up the operations on most browsers.
+    var focused = activeElt();
+    if (toUpdate > 4) display.lineDiv.style.display = "none";
+    patchDisplay(cm, display.updateLineNumbers, dims);
+    if (toUpdate > 4) display.lineDiv.style.display = "";
+    // There might have been a widget with a focused element that got
+    // hidden or updated, if so re-focus it.
+    if (focused && activeElt() != focused && focused.offsetHeight) focused.focus();
+
+    // Prevent selection and cursors from interfering with the scroll
+    // width.
+    removeChildren(display.cursorDiv);
+    removeChildren(display.selectionDiv);
+
+    if (different) {
+      display.lastSizeC = display.wrapper.clientHeight;
+      startWorker(cm, 400);
+    }
+
+    updateHeightsInViewport(cm);
+
+    return true;
+  }
+
+  function adjustContentWidth(cm) {
+    var display = cm.display;
+    var width = measureChar(cm, display.maxLine, display.maxLine.text.length).left;
+    display.maxLineChanged = false;
+    var minWidth = Math.max(0, width + 3);
+    var maxScrollLeft = Math.max(0, display.sizer.offsetLeft + minWidth + scrollerCutOff - display.scroller.clientWidth);
+    display.sizer.style.minWidth = minWidth + "px";
+    if (maxScrollLeft < cm.doc.scrollLeft)
+      setScrollLeft(cm, Math.min(display.scroller.scrollLeft, maxScrollLeft), true);
+  }
+
+  function setDocumentHeight(cm, measure) {
+    cm.display.sizer.style.minHeight = cm.display.heightForcer.style.top = measure.docHeight + "px";
+    cm.display.gutters.style.height = Math.max(measure.docHeight, measure.clientHeight - scrollerCutOff) + "px";
+  }
+
+  function checkForWebkitWidthBug(cm, measure) {
+    // Work around Webkit bug where it sometimes reserves space for a
+    // non-existing phantom scrollbar in the scroller (Issue #2420)
+    if (cm.display.sizer.offsetWidth + cm.display.gutters.offsetWidth < cm.display.scroller.clientWidth - 1) {
+      cm.display.sizer.style.minHeight = cm.display.heightForcer.style.top = "0px";
+      cm.display.gutters.style.height = measure.docHeight + "px";
+    }
+  }
+
+  // Read the actual heights of the rendered lines, and update their
+  // stored heights to match.
+  function updateHeightsInViewport(cm) {
+    var display = cm.display;
+    var prevBottom = display.lineDiv.offsetTop;
+    for (var i = 0; i < display.view.length; i++) {
+      var cur = display.view[i], height;
+      if (cur.hidden) continue;
+      if (ie && ie_version < 8) {
+        var bot = cur.node.offsetTop + cur.node.offsetHeight;
+        height = bot - prevBottom;
+        prevBottom = bot;
+      } else {
+        var box = cur.node.getBoundingClientRect();
+        height = box.bottom - box.top;
+      }
+      var diff = cur.line.height - height;
+      if (height < 2) height = textHeight(display);
+      if (diff > .001 || diff < -.001) {
+        updateLineHeight(cur.line, height);
+        updateWidgetHeight(cur.line);
+        if (cur.rest) for (var j = 0; j < cur.rest.length; j++)
+          updateWidgetHeight(cur.rest[j]);
+      }
+    }
+  }
+
+  // Read and store the height of line widgets associated with the
+  // given line.
+  function updateWidgetHeight(line) {
+    if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)
+      line.widgets[i].height = line.widgets[i].node.offsetHeight;
+  }
+
+  // Do a bulk-read of the DOM positions and sizes needed to draw the
+  // view, so that we don't interleave reading and writing to the DOM.
+  function getDimensions(cm) {
+    var d = cm.display, left = {}, width = {};
+    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
+      left[cm.options.gutters[i]] = n.offsetLeft;
+      width[cm.options.gutters[i]] = n.offsetWidth;
+    }
+    return {fixedPos: compensateForHScroll(d),
+            gutterTotalWidth: d.gutters.offsetWidth,
+            gutterLeft: left,
+            gutterWidth: width,
+            wrapperWidth: d.wrapper.clientWidth};
+  }
+
+  // Sync the actual display DOM structure with display.view, removing
+  // nodes for lines that are no longer in view, and creating the ones
+  // that are not there yet, and updating the ones that are out of
+  // date.
+  function patchDisplay(cm, updateNumbersFrom, dims) {
+    var display = cm.display, lineNumbers = cm.options.lineNumbers;
+    var container = display.lineDiv, cur = container.firstChild;
+
+    function rm(node) {
+      var next = node.nextSibling;
+      // Works around a throw-scroll bug in OS X Webkit
+      if (webkit && mac && cm.display.currentWheelTarget == node)
+        node.style.display = "none";
+      else
+        node.parentNode.removeChild(node);
+      return next;
+    }
+
+    var view = display.view, lineN = display.viewFrom;
+    // Loop over the elements in the view, syncing cur (the DOM nodes
+    // in display.lineDiv) with the view as we go.
+    for (var i = 0; i < view.length; i++) {
+      var lineView = view[i];
+      if (lineView.hidden) {
+      } else if (!lineView.node) { // Not drawn yet
+        var node = buildLineElement(cm, lineView, lineN, dims);
+        container.insertBefore(node, cur);
+      } else { // Already drawn
+        while (cur != lineView.node) cur = rm(cur);
+        var updateNumber = lineNumbers && updateNumbersFrom != null &&
+          updateNumbersFrom <= lineN && lineView.lineNumber;
+        if (lineView.changes) {
+          if (indexOf(lineView.changes, "gutter") > -1) updateNumber = false;
+          updateLineForChanges(cm, lineView, lineN, dims);
+        }
+        if (updateNumber) {
+          removeChildren(lineView.lineNumber);
+          lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));
+        }
+        cur = lineView.node.nextSibling;
+      }
+      lineN += lineView.size;
+    }
+    while (cur) cur = rm(cur);
+  }
+
+  // When an aspect of a line changes, a string is added to
+  // lineView.changes. This updates the relevant part of the line's
+  // DOM structure.
+  function updateLineForChanges(cm, lineView, lineN, dims) {
+    for (var j = 0; j < lineView.changes.length; j++) {
+      var type = lineView.changes[j];
+      if (type == "text") updateLineText(cm, lineView);
+      else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims);
+      else if (type == "class") updateLineClasses(lineView);
+      else if (type == "widget") updateLineWidgets(lineView, dims);
+    }
+    lineView.changes = null;
+  }
+
+  // Lines with gutter elements, widgets or a background class need to
+  // be wrapped, and have the extra elements added to the wrapper div
+  function ensureLineWrapped(lineView) {
+    if (lineView.node == lineView.text) {
+      lineView.node = elt("div", null, null, "position: relative");
+      if (lineView.text.parentNode)
+        lineView.text.parentNode.replaceChild(lineView.node, lineView.text);
+      lineView.node.appendChild(lineView.text);
+      if (ie && ie_version < 8) lineView.node.style.zIndex = 2;
+    }
+    return lineView.node;
+  }
+
+  function updateLineBackground(lineView) {
+    var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
+    if (cls) cls += " CodeMirror-linebackground";
+    if (lineView.background) {
+      if (cls) lineView.background.className = cls;
+      else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
+    } else if (cls) {
+      var wrap = ensureLineWrapped(lineView);
+      lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
+    }
+  }
+
+  // Wrapper around buildLineContent which will reuse the structure
+  // in display.externalMeasured when possible.
+  function getLineContent(cm, lineView) {
+    var ext = cm.display.externalMeasured;
+    if (ext && ext.line == lineView.line) {
+      cm.display.externalMeasured = null;
+      lineView.measure = ext.measure;
+      return ext.built;
+    }
+    return buildLineContent(cm, lineView);
+  }
+
+  // Redraw the line's text. Interacts with the background and text
+  // classes because the mode may output tokens that influence these
+  // classes.
+  function updateLineText(cm, lineView) {
+    var cls = lineView.text.className;
+    var built = getLineContent(cm, lineView);
+    if (lineView.text == lineView.node) lineView.node = built.pre;
+    lineView.text.parentNode.replaceChild(built.pre, lineView.text);
+    lineView.text = built.pre;
+    if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {
+      lineView.bgClass = built.bgClass;
+      lineView.textClass = built.textClass;
+      updateLineClasses(lineView);
+    } else if (cls) {
+      lineView.text.className = cls;
+    }
+  }
+
+  function updateLineClasses(lineView) {
+    updateLineBackground(lineView);
+    if (lineView.line.wrapClass)
+      ensureLineWrapped(lineView).className = lineView.line.wrapClass;
+    else if (lineView.node != lineView.text)
+      lineView.node.className = "";
+    var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass;
+    lineView.text.className = textClass || "";
+  }
+
+  function updateLineGutter(cm, lineView, lineN, dims) {
+    if (lineView.gutter) {
+      lineView.node.removeChild(lineView.gutter);
+      lineView.gutter = null;
+    }
+    var markers = lineView.line.gutterMarkers;
+    if (cm.options.lineNumbers || markers) {
+      var wrap = ensureLineWrapped(lineView);
+      var gutterWrap = lineView.gutter =
+        wrap.insertBefore(elt("div", null, "CodeMirror-gutter-wrapper", "position: absolute; left: " +
+                              (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"),
+                          lineView.text);
+      if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
+        lineView.lineNumber = gutterWrap.appendChild(
+          elt("div", lineNumberFor(cm.options, lineN),
+              "CodeMirror-linenumber CodeMirror-gutter-elt",
+              "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: "
+              + cm.display.lineNumInnerWidth + "px"));
+      if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) {
+        var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];
+        if (found)
+          gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " +
+                                     dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px"));
+      }
+    }
+  }
+
+  function updateLineWidgets(lineView, dims) {
+    if (lineView.alignable) lineView.alignable = null;
+    for (var node = lineView.node.firstChild, next; node; node = next) {
+      var next = node.nextSibling;
+      if (node.className == "CodeMirror-linewidget")
+        lineView.node.removeChild(node);
+    }
+    insertLineWidgets(lineView, dims);
+  }
+
+  // Build a line's DOM representation from scratch
+  function buildLineElement(cm, lineView, lineN, dims) {
+    var built = getLineContent(cm, lineView);
+    lineView.text = lineView.node = built.pre;
+    if (built.bgClass) lineView.bgClass = built.bgClass;
+    if (built.textClass) lineView.textClass = built.textClass;
+
+    updateLineClasses(lineView);
+    updateLineGutter(cm, lineView, lineN, dims);
+    insertLineWidgets(lineView, dims);
+    return lineView.node;
+  }
+
+  // A lineView may contain multiple logical lines (when merged by
+  // collapsed spans). The widgets for all of them need to be drawn.
+  function insertLineWidgets(lineView, dims) {
+    insertLineWidgetsFor(lineView.line, lineView, dims, true);
+    if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)
+      insertLineWidgetsFor(lineView.rest[i], lineView, dims, false);
+  }
+
+  function insertLineWidgetsFor(line, lineView, dims, allowAbove) {
+    if (!line.widgets) return;
+    var wrap = ensureLineWrapped(lineView);
+    for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
+      var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
+      if (!widget.handleMouseEvents) node.ignoreEvents = true;
+      positionLineWidget(widget, node, lineView, dims);
+      if (allowAbove && widget.above)
+        wrap.insertBefore(node, lineView.gutter || lineView.text);
+      else
+        wrap.appendChild(node);
+      signalLater(widget, "redraw");
+    }
+  }
+
+  function positionLineWidget(widget, node, lineView, dims) {
+    if (widget.noHScroll) {
+      (lineView.alignable || (lineView.alignable = [])).push(node);
+      var width = dims.wrapperWidth;
+      node.style.left = dims.fixedPos + "px";
+      if (!widget.coverGutter) {
+        width -= dims.gutterTotalWidth;
+        node.style.paddingLeft = dims.gutterTotalWidth + "px";
+      }
+      node.style.width = width + "px";
+    }
+    if (widget.coverGutter) {
+      node.style.zIndex = 5;
+      node.style.position = "relative";
+      if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px";
+    }
+  }
+
+  // POSITION OBJECT
+
+  // A Pos instance represents a position within the text.
+  var Pos = CodeMirror.Pos = function(line, ch) {
+    if (!(this instanceof Pos)) return new Pos(line, ch);
+    this.line = line; this.ch = ch;
+  };
+
+  // Compare two positions, return 0 if they are the same, a negative
+  // number when a is less, and a positive number otherwise.
+  var cmp = CodeMirror.cmpPos = function(a, b) { return a.line - b.line || a.ch - b.ch; };
+
+  function copyPos(x) {return Pos(x.line, x.ch);}
+  function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; }
+  function minPos(a, b) { return cmp(a, b) < 0 ? a : b; }
+
+  // SELECTION / CURSOR
+
+  // Selection objects are immutable. A new one is created every time
+  // the selection changes. A selection is one or more non-overlapping
+  // (and non-touching) ranges, sorted, and an integer that indicates
+  // which one is the primary selection (the one that's scrolled into
+  // view, that getCursor returns, etc).
+  function Selection(ranges, primIndex) {
+    this.ranges = ranges;
+    this.primIndex = primIndex;
+  }
+
+  Selection.prototype = {
+    primary: function() { return this.ranges[this.primIndex]; },
+    equals: function(other) {
+      if (other == this) return true;
+      if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false;
+      for (var i = 0; i < this.ranges.length; i++) {
+        var here = this.ranges[i], there = other.ranges[i];
+        if (cmp(here.anchor, there.anchor) != 0 || cmp(here.head, there.head) != 0) return false;
+      }
+      return true;
+    },
+    deepCopy: function() {
+      for (var out = [], i = 0; i < this.ranges.length; i++)
+        out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head));
+      return new Selection(out, this.primIndex);
+    },
+    somethingSelected: function() {
+      for (var i = 0; i < this.ranges.length; i++)
+        if (!this.ranges[i].empty()) return true;
+      return false;
+    },
+    contains: function(pos, end) {
+      if (!end) end = pos;
+      for (var i = 0; i < this.ranges.length; i++) {
+        var range = this.ranges[i];
+        if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)
+          return i;
+      }
+      return -1;
+    }
+  };
+
+  function Range(anchor, head) {
+    this.anchor = anchor; this.head = head;
+  }
+
+  Range.prototype = {
+    from: function() { return minPos(this.anchor, this.head); },
+    to: function() { return maxPos(this.anchor, this.head); },
+    empty: function() {
+      return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;
+    }
+  };
+
+  // Take an unsorted, potentially overlapping set of ranges, and
+  // build a selection out of it. 'Consumes' ranges array (modifying
+  // it).
+  function normalizeSelection(ranges, primIndex) {
+    var prim = ranges[primIndex];
+    ranges.sort(function(a, b) { return cmp(a.from(), b.from()); });
+    primIndex = indexOf(ranges, prim);
+    for (var i = 1; i < ranges.length; i++) {
+      var cur = ranges[i], prev = ranges[i - 1];
+      if (cmp(prev.to(), cur.from()) >= 0) {
+        var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());
+        var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;
+        if (i <= primIndex) --primIndex;
+        ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));
+      }
+    }
+    return new Selection(ranges, primIndex);
+  }
+
+  function simpleSelection(anchor, head) {
+    return new Selection([new Range(anchor, head || anchor)], 0);
+  }
+
+  // Most of the external API clips given positions to make sure they
+  // actually exist within the document.
+  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));}
+  function clipPos(doc, pos) {
+    if (pos.line < doc.first) return Pos(doc.first, 0);
+    var last = doc.first + doc.size - 1;
+    if (pos.line > last) return Pos(last, getLine(doc, last).text.length);
+    return clipToLen(pos, getLine(doc, pos.line).text.length);
+  }
+  function clipToLen(pos, linelen) {
+    var ch = pos.ch;
+    if (ch == null || ch > linelen) return Pos(pos.line, linelen);
+    else if (ch < 0) return Pos(pos.line, 0);
+    else return pos;
+  }
+  function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;}
+  function clipPosArray(doc, array) {
+    for (var out = [], i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]);
+    return out;
+  }
+
+  // SELECTION UPDATES
+
+  // The 'scroll' parameter given to many of these indicated whether
+  // the new cursor position should be scrolled into view after
+  // modifying the selection.
+
+  // If shift is held or the extend flag is set, extends a range to
+  // include a given position (and optionally a second position).
+  // Otherwise, simply returns the range between the given positions.
+  // Used for cursor motion and such.
+  function extendRange(doc, range, head, other) {
+    if (doc.cm && doc.cm.display.shift || doc.extend) {
+      var anchor = range.anchor;
+      if (other) {
+        var posBefore = cmp(head, anchor) < 0;
+        if (posBefore != (cmp(other, anchor) < 0)) {
+          anchor = head;
+          head = other;
+        } else if (posBefore != (cmp(head, other) < 0)) {
+          head = other;
+        }
+      }
+      return new Range(anchor, head);
+    } else {
+      return new Range(other || head, head);
+    }
+  }
+
+  // Extend the primary selection range, discard the rest.
+  function extendSelection(doc, head, other, options) {
+    setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options);
+  }
+
+  // Extend all selections (pos is an array of selections with length
+  // equal the number of selections)
+  function extendSelections(doc, heads, options) {
+    for (var out = [], i = 0; i < doc.sel.ranges.length; i++)
+      out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null);
+    var newSel = normalizeSelection(out, doc.sel.primIndex);
+    setSelection(doc, newSel, options);
+  }
+
+  // Updates a single range in the selection.
+  function replaceOneSelection(doc, i, range, options) {
+    var ranges = doc.sel.ranges.slice(0);
+    ranges[i] = range;
+    setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options);
+  }
+
+  // Reset the selection to a single range.
+  function setSimpleSelection(doc, anchor, head, options) {
+    setSelection(doc, simpleSelection(anchor, head), options);
+  }
+
+  // Give beforeSelectionChange handlers a change to influence a
+  // selection update.
+  function filterSelectionChange(doc, sel) {
+    var obj = {
+      ranges: sel.ranges,
+      update: function(ranges) {
+        this.ranges = [];
+        for (var i = 0; i < ranges.length; i++)
+          this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),
+                                     clipPos(doc, ranges[i].head));
+      }
+    };
+    signal(doc, "beforeSelectionChange", doc, obj);
+    if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj);
+    if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);
+    else return sel;
+  }
+
+  function setSelectionReplaceHistory(doc, sel, options) {
+    var done = doc.history.done, last = lst(done);
+    if (last && last.ranges) {
+      done[done.length - 1] = sel;
+      setSelectionNoUndo(doc, sel, options);
+    } else {
+      setSelection(doc, sel, options);
+    }
+  }
+
+  // Set a new selection.
+  function setSelection(doc, sel, options) {
+    setSelectionNoUndo(doc, sel, options);
+    addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);
+  }
+
+  function setSelectionNoUndo(doc, sel, options) {
+    if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange"))
+      sel = filterSelectionChange(doc, sel);
+
+    var bias = options && options.bias ||
+      (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);
+    setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));
+
+    if (!(options && options.scroll === false) && doc.cm)
+      ensureCursorVisible(doc.cm);
+  }
+
+  function setSelectionInner(doc, sel) {
+    if (sel.equals(doc.sel)) return;
+
+    doc.sel = sel;
+
+    if (doc.cm) {
+      doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true;
+      signalCursorActivity(doc.cm);
+    }
+    signalLater(doc, "cursorActivity", doc);
+  }
+
+  // Verify that the selection does not partially select any atomic
+  // marked ranges.
+  function reCheckSelection(doc) {
+    setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll);
+  }
+
+  // Return a selection that does not partially select any atomic
+  // ranges.
+  function skipAtomicInSelection(doc, sel, bias, mayClear) {
+    var out;
+    for (var i = 0; i < sel.ranges.length; i++) {
+      var range = sel.ranges[i];
+      var newAnchor = skipAtomic(doc, range.anchor, bias, mayClear);
+      var newHead = skipAtomic(doc, range.head, bias, mayClear);
+      if (out || newAnchor != range.anchor || newHead != range.head) {
+        if (!out) out = sel.ranges.slice(0, i);
+        out[i] = new Range(newAnchor, newHead);
+      }
+    }
+    return out ? normalizeSelection(out, sel.primIndex) : sel;
+  }
+
+  // Ensure a given position is not inside an atomic range.
+  function skipAtomic(doc, pos, bias, mayClear) {
+    var flipped = false, curPos = pos;
+    var dir = bias || 1;
+    doc.cantEdit = false;
+    search: for (;;) {
+      var line = getLine(doc, curPos.line);
+      if (line.markedSpans) {
+        for (var i = 0; i < line.markedSpans.length; ++i) {
+          var sp = line.markedSpans[i], m = sp.marker;
+          if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) &&
+              (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) {
+            if (mayClear) {
+              signal(m, "beforeCursorEnter");
+              if (m.explicitlyCleared) {
+                if (!line.markedSpans) break;
+                else {--i; continue;}
+              }
+            }
+            if (!m.atomic) continue;
+            var newPos = m.find(dir < 0 ? -1 : 1);
+            if (cmp(newPos, curPos) == 0) {
+              newPos.ch += dir;
+              if (newPos.ch < 0) {
+                if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1));
+                else newPos = null;
+              } else if (newPos.ch > line.text.length) {
+                if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0);
+                else newPos = null;
+              }
+              if (!newPos) {
+                if (flipped) {
+                  // Driven in a corner -- no valid cursor position found at all
+                  // -- try again *with* clearing, if we didn't already
+                  if (!mayClear) return skipAtomic(doc, pos, bias, true);
+                  // Otherwise, turn off editing until further notice, and return the start of the doc
+                  doc.cantEdit = true;
+                  return Pos(doc.first, 0);
+                }
+                flipped = true; newPos = pos; dir = -dir;
+              }
+            }
+            curPos = newPos;
+            continue search;
+          }
+        }
+      }
+      return curPos;
+    }
+  }
+
+  // SELECTION DRAWING
+
+  // Redraw the selection and/or cursor
+  function updateSelection(cm) {
+    var display = cm.display, doc = cm.doc;
+    var curFragment = document.createDocumentFragment();
+    var selFragment = document.createDocumentFragment();
+
+    for (var i = 0; i < doc.sel.ranges.length; i++) {
+      var range = doc.sel.ranges[i];
+      var collapsed = range.empty();
+      if (collapsed || cm.options.showCursorWhenSelecting)
+        drawSelectionCursor(cm, range, curFragment);
+      if (!collapsed)
+        drawSelectionRange(cm, range, selFragment);
+    }
+
+    // Move the hidden textarea near the cursor to prevent scrolling artifacts
+    if (cm.options.moveInputWithCursor) {
+      var headPos = cursorCoords(cm, doc.sel.primary().head, "div");
+      var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();
+      var top = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
+                                     headPos.top + lineOff.top - wrapOff.top));
+      var left = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
+                                      headPos.left + lineOff.left - wrapOff.left));
+      display.inputDiv.style.top = top + "px";
+      display.inputDiv.style.left = left + "px";
+    }
+
+    removeChildrenAndAdd(display.cursorDiv, curFragment);
+    removeChildrenAndAdd(display.selectionDiv, selFragment);
+  }
+
+  // Draws a cursor for the given range
+  function drawSelectionCursor(cm, range, output) {
+    var pos = cursorCoords(cm, range.head, "div", null, null, !cm.options.singleCursorHeightPerLine);
+
+    var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor"));
+    cursor.style.left = pos.left + "px";
+    cursor.style.top = pos.top + "px";
+    cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
+
+    if (pos.other) {
+      // Secondary cursor, shown when on a 'jump' in bi-directional text
+      var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
+      otherCursor.style.display = "";
+      otherCursor.style.left = pos.other.left + "px";
+      otherCursor.style.top = pos.other.top + "px";
+      otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
+    }
+  }
+
+  // Draws the given range as a highlighted selection
+  function drawSelectionRange(cm, range, output) {
+    var display = cm.display, doc = cm.doc;
+    var fragment = document.createDocumentFragment();
+    var padding = paddingH(cm.display), leftSide = padding.left, rightSide = display.lineSpace.offsetWidth - padding.right;
+
+    function add(left, top, width, bottom) {
+      if (top < 0) top = 0;
+      top = Math.round(top);
+      bottom = Math.round(bottom);
+      fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left +
+                               "px; top: " + top + "px; width: " + (width == null ? rightSide - left : width) +
+                               "px; height: " + (bottom - top) + "px"));
+    }
+
+    function drawForLine(line, fromArg, toArg) {
+      var lineObj = getLine(doc, line);
+      var lineLen = lineObj.text.length;
+      var start, end;
+      function coords(ch, bias) {
+        return charCoords(cm, Pos(line, ch), "div", lineObj, bias);
+      }
+
+      iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {
+        var leftPos = coords(from, "left"), rightPos, left, right;
+        if (from == to) {
+          rightPos = leftPos;
+          left = right = leftPos.left;
+        } else {
+          rightPos = coords(to - 1, "right");
+          if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }
+          left = leftPos.left;
+          right = rightPos.right;
+        }
+        if (fromArg == null && from == 0) left = leftSide;
+        if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part
+          add(left, leftPos.top, null, leftPos.bottom);
+          left = leftSide;
+          if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);
+        }
+        if (toArg == null && to == lineLen) right = rightSide;
+        if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)
+          start = leftPos;
+        if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)
+          end = rightPos;
+        if (left < leftSide + 1) left = leftSide;
+        add(left, rightPos.top, right - left, rightPos.bottom);
+      });
+      return {start: start, end: end};
+    }
+
+    var sFrom = range.from(), sTo = range.to();
+    if (sFrom.line == sTo.line) {
+      drawForLine(sFrom.line, sFrom.ch, sTo.ch);
+    } else {
+      var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);
+      var singleVLine = visualLine(fromLine) == visualLine(toLine);
+      var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;
+      var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;
+      if (singleVLine) {
+        if (leftEnd.top < rightStart.top - 2) {
+          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
+          add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);
+        } else {
+          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
+        }
+      }
+      if (leftEnd.bottom < rightStart.top)
+        add(leftSide, leftEnd.bottom, null, rightStart.top);
+    }
+
+    output.appendChild(fragment);
+  }
+
+  // Cursor-blinking
+  function restartBlink(cm) {
+    if (!cm.state.focused) return;
+    var display = cm.display;
+    clearInterval(display.blinker);
+    var on = true;
+    display.cursorDiv.style.visibility = "";
+    if (cm.options.cursorBlinkRate > 0)
+      display.blinker = setInterval(function() {
+        display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden";
+      }, cm.options.cursorBlinkRate);
+    else if (cm.options.cursorBlinkRate < 0)
+      display.cursorDiv.style.visibility = "hidden";
+  }
+
+  // HIGHLIGHT WORKER
+
+  function startWorker(cm, time) {
+    if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo)
+      cm.state.highlight.set(time, bind(highlightWorker, cm));
+  }
+
+  function highlightWorker(cm) {
+    var doc = cm.doc;
+    if (doc.frontier < doc.first) doc.frontier = doc.first;
+    if (doc.frontier >= cm.display.viewTo) return;
+    var end = +new Date + cm.options.workTime;
+    var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));
+
+    runInOp(cm, function() {
+    doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) {
+      if (doc.frontier >= cm.display.viewFrom) { // Visible
+        var oldStyles = line.styles;
+        var highlighted = highlightLine(cm, line, state, true);
+        line.styles = highlighted.styles;
+        var oldCls = line.styleClasses, newCls = highlighted.classes;
+        if (newCls) line.styleClasses = newCls;
+        else if (oldCls) line.styleClasses = null;
+        var ischange = !oldStyles || oldStyles.length != line.styles.length ||
+          oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);
+        for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i];
+        if (ischange) regLineChange(cm, doc.frontier, "text");
+        line.stateAfter = copyState(doc.mode, state);
+      } else {
+        processLine(cm, line.text, state);
+        line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null;
+      }
+      ++doc.frontier;
+      if (+new Date > end) {
+        startWorker(cm, cm.options.workDelay);
+        return true;
+      }
+    });
+    });
+  }
+
+  // Finds the line to start with when starting a parse. Tries to
+  // find a line with a stateAfter, so that it can start with a
+  // valid state. If that fails, it returns the line with the
+  // smallest indentation, which tends to need the least context to
+  // parse correctly.
+  function findStartLine(cm, n, precise) {
+    var minindent, minline, doc = cm.doc;
+    var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);
+    for (var search = n; search > lim; --search) {
+      if (search <= doc.first) return doc.first;
+      var line = getLine(doc, search - 1);
+      if (line.stateAfter && (!precise || search <= doc.frontier)) return search;
+      var indented = countColumn(line.text, null, cm.options.tabSize);
+      if (minline == null || minindent > indented) {
+        minline = search - 1;
+        minindent = indented;
+      }
+    }
+    return minline;
+  }
+
+  function getStateBefore(cm, n, precise) {
+    var doc = cm.doc, display = cm.display;
+    if (!doc.mode.startState) return true;
+    var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;
+    if (!state) state = startState(doc.mode);
+    else state = copyState(doc.mode, state);
+    doc.iter(pos, n, function(line) {
+      processLine(cm, line.text, state);
+      var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo;
+      line.stateAfter = save ? copyState(doc.mode, state) : null;
+      ++pos;
+    });
+    if (precise) doc.frontier = pos;
+    return state;
+  }
+
+  // POSITION MEASUREMENT
+
+  function paddingTop(display) {return display.lineSpace.offsetTop;}
+  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}
+  function paddingH(display) {
+    if (display.cachedPaddingH) return display.cachedPaddingH;
+    var e = removeChildrenAndAdd(display.measure, elt("pre", "x"));
+    var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
+    var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
+    if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data;
+    return data;
+  }
+
+  // Ensure the lineView.wrapping.heights array is populated. This is
+  // an array of bottom offsets for the lines that make up a drawn
+  // line. When lineWrapping is on, there might be more than one
+  // height.
+  function ensureLineHeights(cm, lineView, rect) {
+    var wrapping = cm.options.lineWrapping;
+    var curWidth = wrapping && cm.display.scroller.clientWidth;
+    if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {
+      var heights = lineView.measure.heights = [];
+      if (wrapping) {
+        lineView.measure.width = curWidth;
+        var rects = lineView.text.firstChild.getClientRects();
+        for (var i = 0; i < rects.length - 1; i++) {
+          var cur = rects[i], next = rects[i + 1];
+          if (Math.abs(cur.bottom - next.bottom) > 2)
+            heights.push((cur.bottom + next.top) / 2 - rect.top);
+        }
+      }
+      heights.push(rect.bottom - rect.top);
+    }
+  }
+
+  // Find a line map (mapping character offsets to text nodes) and a
+  // measurement cache for the given line number. (A line view might
+  // contain multiple lines when collapsed ranges are present.)
+  function mapFromLineView(lineView, line, lineN) {
+    if (lineView.line == line)
+      return {map: lineView.measure.map, cache: lineView.measure.cache};
+    for (var i = 0; i < lineView.rest.length; i++)
+      if (lineView.rest[i] == line)
+        return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]};
+    for (var i = 0; i < lineView.rest.length; i++)
+      if (lineNo(lineView.rest[i]) > lineN)
+        return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true};
+  }
+
+  // Render a line into the hidden node display.externalMeasured. Used
+  // when measurement is needed for a line that's not in the viewport.
+  function updateExternalMeasurement(cm, line) {
+    line = visualLine(line);
+    var lineN = lineNo(line);
+    var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
+    view.lineN = lineN;
+    var built = view.built = buildLineContent(cm, view);
+    view.text = built.pre;
+    removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
+    return view;
+  }
+
+  // Get a {top, bottom, left, right} box (in line-local coordinates)
+  // for a given character.
+  function measureChar(cm, line, ch, bias) {
+    return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias);
+  }
+
+  // Find a line view that corresponds to the given line number.
+  function findViewForLine(cm, lineN) {
+    if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)
+      return cm.display.view[findViewIndex(cm, lineN)];
+    var ext = cm.display.externalMeasured;
+    if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)
+      return ext;
+  }
+
+  // Measurement can be split in two steps, the set-up work that
+  // applies to the whole line, and the measurement of the actual
+  // character. Functions like coordsChar, that need to do a lot of
+  // measurements in a row, can thus ensure that the set-up work is
+  // only done once.
+  function prepareMeasureForLine(cm, line) {
+    var lineN = lineNo(line);
+    var view = findViewForLine(cm, lineN);
+    if (view && !view.text)
+      view = null;
+    else if (view && view.changes)
+      updateLineForChanges(cm, view, lineN, getDimensions(cm));
+    if (!view)
+      view = updateExternalMeasurement(cm, line);
+
+    var info = mapFromLineView(view, line, lineN);
+    return {
+      line: line, view: view, rect: null,
+      map: info.map, cache: info.cache, before: info.before,
+      hasHeights: false
+    };
+  }
+
+  // Given a prepared measurement object, measures the position of an
+  // actual character (or fetches it from the cache).
+  function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
+    if (prepared.before) ch = -1;
+    var key = ch + (bias || ""), found;
+    if (prepared.cache.hasOwnProperty(key)) {
+      found = prepared.cache[key];
+    } else {
+      if (!prepared.rect)
+        prepared.rect = prepared.view.text.getBoundingClientRect();
+      if (!prepared.hasHeights) {
+        ensureLineHeights(cm, prepared.view, prepared.rect);
+        prepared.hasHeights = true;
+      }
+      found = measureCharInner(cm, prepared, ch, bias);
+      if (!found.bogus) prepared.cache[key] = found;
+    }
+    return {left: found.left, right: found.right,
+            top: varHeight ? found.rtop : found.top,
+            bottom: varHeight ? found.rbottom : found.bottom};
+  }
+
+  var nullRect = {left: 0, right: 0, top: 0, bottom: 0};
+
+  function measureCharInner(cm, prepared, ch, bias) {
+    var map = prepared.map;
+
+    var node, start, end, collapse;
+    // First, search the line map for the text node corresponding to,
+    // or closest to, the target character.
+    for (var i = 0; i < map.length; i += 3) {
+      var mStart = map[i], mEnd = map[i + 1];
+      if (ch < mStart) {
+        start = 0; end = 1;
+        collapse = "left";
+      } else if (ch < mEnd) {
+        start = ch - mStart;
+        end = start + 1;
+      } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {
+        end = mEnd - mStart;
+        start = end - 1;
+        if (ch >= mEnd) collapse = "right";
+      }
+      if (start != null) {
+        node = map[i + 2];
+        if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right"))
+          collapse = bias;
+        if (bias == "left" && start == 0)
+          while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {
+            node = map[(i -= 3) + 2];
+            collapse = "left";
+          }
+        if (bias == "right" && start == mEnd - mStart)
+          while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {
+            node = map[(i += 3) + 2];
+            collapse = "right";
+          }
+        break;
+      }
+    }
+
+    var rect;
+    if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.
+      while (start && isExtendingChar(prepared.line.text.charAt(mStart + start))) --start;
+      while (mStart + end < mEnd && isExtendingChar(prepared.line.text.charAt(mStart + end))) ++end;
+      if (ie && ie_version < 9 && start == 0 && end == mEnd - mStart) {
+        rect = node.parentNode.getBoundingClientRect();
+      } else if (ie && cm.options.lineWrapping) {
+        var rects = range(node, start, end).getClientRects();
+        if (rects.length)
+          rect = rects[bias == "right" ? rects.length - 1 : 0];
+        else
+          rect = nullRect;
+      } else {
+        rect = range(node, start, end).getBoundingClientRect() || nullRect;
+      }
+    } else { // If it is a widget, simply get the box for the whole widget.
+      if (start > 0) collapse = bias = "right";
+      var rects;
+      if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)
+        rect = rects[bias == "right" ? rects.length - 1 : 0];
+      else
+        rect = node.getBoundingClientRect();
+    }
+    if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {
+      var rSpan = node.parentNode.getClientRects()[0];
+      if (rSpan)
+        rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom};
+      else
+        rect = nullRect;
+    }
+
+    var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;
+    var mid = (rtop + rbot) / 2;
+    var heights = prepared.view.measure.heights;
+    for (var i = 0; i < heights.length - 1; i++)
+      if (mid < heights[i]) break;
+    var top = i ? heights[i - 1] : 0, bot = heights[i];
+    var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left,
+                  right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left,
+                  top: top, bottom: bot};
+    if (!rect.left && !rect.right) result.bogus = true;
+    if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }
+    return result;
+  }
+
+  function clearLineMeasurementCacheFor(lineView) {
+    if (lineView.measure) {
+      lineView.measure.cache = {};
+      lineView.measure.heights = null;
+      if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)
+        lineView.measure.caches[i] = {};
+    }
+  }
+
+  function clearLineMeasurementCache(cm) {
+    cm.display.externalMeasure = null;
+    removeChildren(cm.display.lineMeasure);
+    for (var i = 0; i < cm.display.view.length; i++)
+      clearLineMeasurementCacheFor(cm.display.view[i]);
+  }
+
+  function clearCaches(cm) {
+    clearLineMeasurementCache(cm);
+    cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;
+    if (!cm.options.lineWrapping) cm.display.maxLineChanged = true;
+    cm.display.lineNumChars = null;
+  }
+
+  function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; }
+  function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; }
+
+  // Converts a {top, bottom, left, right} box from line-local
+  // coordinates into another coordinate system. Context may be one of
+  // "line", "div" (display.lineDiv), "local"/null (editor), or "page".
+  function intoCoordSystem(cm, lineObj, rect, context) {
+    if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) {
+      var size = widgetHeight(lineObj.widgets[i]);
+      rect.top += size; rect.bottom += size;
+    }
+    if (context == "line") return rect;
+    if (!context) context = "local";
+    var yOff = heightAtLine(lineObj);
+    if (context == "local") yOff += paddingTop(cm.display);
+    else yOff -= cm.display.viewOffset;
+    if (context == "page" || context == "window") {
+      var lOff = cm.display.lineSpace.getBoundingClientRect();
+      yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
+      var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
+      rect.left += xOff; rect.right += xOff;
+    }
+    rect.top += yOff; rect.bottom += yOff;
+    return rect;
+  }
+
+  // Coverts a box from "div" coords to another coordinate system.
+  // Context may be "window", "page", "div", or "local"/null.
+  function fromCoordSystem(cm, coords, context) {
+    if (context == "div") return coords;
+    var left = coords.left, top = coords.top;
+    // First move into "page" coordinate system
+    if (context == "page") {
+      left -= pageScrollX();
+      top -= pageScrollY();
+    } else if (context == "local" || !context) {
+      var localBox = cm.display.sizer.getBoundingClientRect();
+      left += localBox.left;
+      top += localBox.top;
+    }
+
+    var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();
+    return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};
+  }
+
+  function charCoords(cm, pos, context, lineObj, bias) {
+    if (!lineObj) lineObj = getLine(cm.doc, pos.line);
+    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context);
+  }
+
+  // Returns a box for a given cursor position, which may have an
+  // 'other' property containing the position of the secondary cursor
+  // on a bidi boundary.
+  function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {
+    lineObj = lineObj || getLine(cm.doc, pos.line);
+    if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj);
+    function get(ch, right) {
+      var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight);
+      if (right) m.left = m.right; else m.right = m.left;
+      return intoCoordSystem(cm, lineObj, m, context);
+    }
+    function getBidi(ch, partPos) {
+      var part = order[partPos], right = part.level % 2;
+      if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) {
+        part = order[--partPos];
+        ch = bidiRight(part) - (part.level % 2 ? 0 : 1);
+        right = true;
+      } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) {
+        part = order[++partPos];
+        ch = bidiLeft(part) - part.level % 2;
+        right = false;
+      }
+      if (right && ch == part.to && ch > part.from) return get(ch - 1);
+      return get(ch, right);
+    }
+    var order = getOrder(lineObj), ch = pos.ch;
+    if (!order) return get(ch);
+    var partPos = getBidiPartAt(order, ch);
+    var val = getBidi(ch, partPos);
+    if (bidiOther != null) val.other = getBidi(ch, bidiOther);
+    return val;
+  }
+
+  // Used to cheaply estimate the coordinates for a position. Used for
+  // intermediate scroll updates.
+  function estimateCoords(cm, pos) {
+    var left = 0, pos = clipPos(cm.doc, pos);
+    if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch;
+    var lineObj = getLine(cm.doc, pos.line);
+    var top = heightAtLine(lineObj) + paddingTop(cm.display);
+    return {left: left, right: left, top: top, bottom: top + lineObj.height};
+  }
+
+  // Positions returned by coordsChar contain some extra information.
+  // xRel is the relative x position of the input coordinates compared
+  // to the found position (so xRel > 0 means the coordinates are to
+  // the right of the character position, for example). When outside
+  // is true, that means the coordinates lie outside the line's
+  // vertical range.
+  function PosWithInfo(line, ch, outside, xRel) {
+    var pos = Pos(line, ch);
+    pos.xRel = xRel;
+    if (outside) pos.outside = true;
+    return pos;
+  }
+
+  // Compute the character position closest to the given coordinates.
+  // Input must be lineSpace-local ("div" coordinate system).
+  function coordsChar(cm, x, y) {
+    var doc = cm.doc;
+    y += cm.display.viewOffset;
+    if (y < 0) return PosWithInfo(doc.first, 0, true, -1);
+    var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
+    if (lineN > last)
+      return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1);
+    if (x < 0) x = 0;
+
+    var lineObj = getLine(doc, lineN);
+    for (;;) {
+      var found = coordsCharInner(cm, lineObj, lineN, x, y);
+      var merged = collapsedSpanAtEnd(lineObj);
+      var mergedPos = merged && merged.find(0, true);
+      if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
+        lineN = lineNo(lineObj = mergedPos.to.line);
+      else
+        return found;
+    }
+  }
+
+  function coordsCharInner(cm, lineObj, lineNo, x, y) {
+    var innerOff = y - heightAtLine(lineObj);
+    var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth;
+    var preparedMeasure = prepareMeasureForLine(cm, lineObj);
+
+    function getX(ch) {
+      var sp = cursorCoords(cm, Pos(lineNo, ch), "line", lineObj, preparedMeasure);
+      wrongLine = true;
+      if (innerOff > sp.bottom) return sp.left - adjust;
+      else if (innerOff < sp.top) return sp.left + adjust;
+      else wrongLine = false;
+      return sp.left;
+    }
+
+    var bidi = getOrder(lineObj), dist = lineObj.text.length;
+    var from = lineLeft(lineObj), to = lineRight(lineObj);
+    var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine;
+
+    if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1);
+    // Do a binary search between these bounds.
+    for (;;) {
+      if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {
+        var ch = x < fromX || x - fromX <= toX - x ? from : to;
+        var xDiff = x - (ch == from ? fromX : toX);
+        while (isExtendingChar(lineObj.text.charAt(ch))) ++ch;
+        var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,
+                              xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);
+        return pos;
+      }
+      var step = Math.ceil(dist / 2), middle = from + step;
+      if (bidi) {
+        middle = from;
+        for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1);
+      }
+      var middleX = getX(middle);
+      if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;}
+      else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;}
+    }
+  }
+
+  var measureText;
+  // Compute the default text height.
+  function textHeight(display) {
+    if (display.cachedTextHeight != null) return display.cachedTextHeight;
+    if (measureText == null) {
+      measureText = elt("pre");
+      // Measure a bunch of lines, for browsers that compute
+      // fractional heights.
+      for (var i = 0; i < 49; ++i) {
+        measureText.appendChild(document.createTextNode("x"));
+        measureText.appendChild(elt("br"));
+      }
+      measureText.appendChild(document.createTextNode("x"));
+    }
+    removeChildrenAndAdd(display.measure, measureText);
+    var height = measureText.offsetHeight / 50;
+    if (height > 3) display.cachedTextHeight = height;
+    removeChildren(display.measure);
+    return height || 1;
+  }
+
+  // Compute the default character width.
+  function charWidth(display) {
+    if (display.cachedCharWidth != null) return display.cachedCharWidth;
+    var anchor = elt("span", "xxxxxxxxxx");
+    var pre = elt("pre", [anchor]);
+    removeChildrenAndAdd(display.measure, pre);
+    var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;
+    if (width > 2) display.cachedCharWidth = width;
+    return width || 10;
+  }
+
+  // OPERATIONS
+
+  // Operations are used to wrap a series of changes to the editor
+  // state in such a way that each change won't have to update the
+  // cursor and display (which would be awkward, slow, and
+  // error-prone). Instead, display updates are batched and then all
+  // combined and executed at once.
+
+  var nextOpId = 0;
+  // Start a new operation.
+  function startOperation(cm) {
+    cm.curOp = {
+      viewChanged: false,      // Flag that indicates that lines might need to be redrawn
+      startHeight: cm.doc.height, // Used to detect need to update scrollbar
+      forceUpdate: false,      // Used to force a redraw
+      updateInput: null,       // Whether to reset the input textarea
+      typing: false,           // Whether this reset should be careful to leave existing text (for compositing)
+      changeObjs: null,        // Accumulated changes, for firing change events
+      cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on
+      selectionChanged: false, // Whether the selection needs to be redrawn
+      updateMaxLine: false,    // Set when the widest line needs to be determined anew
+      scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet
+      scrollToPos: null,       // Used to scroll to a specific position
+      id: ++nextOpId           // Unique ID
+    };
+    if (!delayedCallbackDepth++) delayedCallbacks = [];
+  }
+
+  // Finish an operation, updating the display and signalling delayed events
+  function endOperation(cm) {
+    var op = cm.curOp, doc = cm.doc, display = cm.display;
+    cm.curOp = null;
+
+    if (op.updateMaxLine) findMaxLine(cm);
+
+    // If it looks like an update might be needed, call updateDisplay
+    if (op.viewChanged || op.forceUpdate || op.scrollTop != null ||
+        op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||
+                           op.scrollToPos.to.line >= display.viewTo) ||
+        display.maxLineChanged && cm.options.lineWrapping) {
+      var updated = updateDisplay(cm, {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);
+      if (cm.display.scroller.offsetHeight) cm.doc.scrollTop = cm.display.scroller.scrollTop;
+    }
+    // If no update was run, but the selection changed, redraw that.
+    if (!updated && op.selectionChanged) updateSelection(cm);
+    if (!updated && op.startHeight != cm.doc.height) updateScrollbars(cm);
+
+    // Abort mouse wheel delta measurement, when scrolling explicitly
+    if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))
+      display.wheelStartX = display.wheelStartY = null;
+
+    // Propagate the scroll position to the actual DOM scroller
+    if (op.scrollTop != null && display.scroller.scrollTop != op.scrollTop) {
+      var top = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop));
+      display.scroller.scrollTop = display.scrollbarV.scrollTop = doc.scrollTop = top;
+    }
+    if (op.scrollLeft != null && display.scroller.scrollLeft != op.scrollLeft) {
+      var left = Math.max(0, Math.min(display.scroller.scrollWidth - display.scroller.clientWidth, op.scrollLeft));
+      display.scroller.scrollLeft = display.scrollbarH.scrollLeft = doc.scrollLeft = left;
+      alignHorizontally(cm);
+    }
+    // If we need to scroll a specific position into view, do so.
+    if (op.scrollToPos) {
+      var coords = scrollPosIntoView(cm, clipPos(cm.doc, op.scrollToPos.from),
+                                     clipPos(cm.doc, op.scrollToPos.to), op.scrollToPos.margin);
+      if (op.scrollToPos.isCursor && cm.state.focused) maybeScrollWindow(cm, coords);
+    }
+
+    if (op.selectionChanged) restartBlink(cm);
+
+    if (cm.state.focused && op.updateInput)
+      resetInput(cm, op.typing);
+
+    // Fire events for markers that are hidden/unidden by editing or
+    // undoing
+    var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;
+    if (hidden) for (var i = 0; i < hidden.length; ++i)
+      if (!hidden[i].lines.length) signal(hidden[i], "hide");
+    if (unhidden) for (var i = 0; i < unhidden.length; ++i)
+      if (unhidden[i].lines.length) signal(unhidden[i], "unhide");
+
+    var delayed;
+    if (!--delayedCallbackDepth) {
+      delayed = delayedCallbacks;
+      delayedCallbacks = null;
+    }
+    // Fire change events, and delayed event handlers
+    if (op.changeObjs)
+      signal(cm, "changes", cm, op.changeObjs);
+    if (delayed) for (var i = 0; i < delayed.length; ++i) delayed[i]();
+    if (op.cursorActivityHandlers)
+      for (var i = 0; i < op.cursorActivityHandlers.length; i++)
+        op.cursorActivityHandlers[i](cm);
+  }
+
+  // Run the given function in an operation
+  function runInOp(cm, f) {
+    if (cm.curOp) return f();
+    startOperation(cm);
+    try { return f(); }
+    finally { endOperation(cm); }
+  }
+  // Wraps a function in an operation. Returns the wrapped function.
+  function operation(cm, f) {
+    return function() {
+      if (cm.curOp) return f.apply(cm, arguments);
+      startOperation(cm);
+      try { return f.apply(cm, arguments); }
+      finally { endOperation(cm); }
+    };
+  }
+  // Used to add methods to editor and doc instances, wrapping them in
+  // operations.
+  function methodOp(f) {
+    return function() {
+      if (this.curOp) return f.apply(this, arguments);
+      startOperation(this);
+      try { return f.apply(this, arguments); }
+      finally { endOperation(this); }
+    };
+  }
+  function docMethodOp(f) {
+    return function() {
+      var cm = this.cm;
+      if (!cm || cm.curOp) return f.apply(this, arguments);
+      startOperation(cm);
+      try { return f.apply(this, arguments); }
+      finally { endOperation(cm); }
+    };
+  }
+
+  // VIEW TRACKING
+
+  // These objects are used to represent the visible (currently drawn)
+  // part of the document. A LineView may correspond to multiple
+  // logical lines, if those are connected by collapsed ranges.
+  function LineView(doc, line, lineN) {
+    // The starting line
+    this.line = line;
+    // Continuing lines, if any
+    this.rest = visualLineContinued(line);
+    // Number of logical lines in this visual line
+    this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;
+    this.node = this.text = null;
+    this.hidden = lineIsHidden(doc, line);
+  }
+
+  // Create a range of LineView objects for the given lines.
+  function buildViewArray(cm, from, to) {
+    var array = [], nextPos;
+    for (var pos = from; pos < to; pos = nextPos) {
+      var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
+      nextPos = pos + view.size;
+      array.push(view);
+    }
+    return array;
+  }
+
+  // Updates the display.view data structure for a given change to the
+  // document. From and to are in pre-change coordinates. Lendiff is
+  // the amount of lines added or subtracted by the change. This is
+  // used for changes that span multiple lines, or change the way
+  // lines are divided into visual lines. regLineChange (below)
+  // registers single-line changes.
+  function regChange(cm, from, to, lendiff) {
+    if (from == null) from = cm.doc.first;
+    if (to == null) to = cm.doc.first + cm.doc.size;
+    if (!lendiff) lendiff = 0;
+
+    var display = cm.display;
+    if (lendiff && to < display.viewTo &&
+        (display.updateLineNumbers == null || display.updateLineNumbers > from))
+      display.updateLineNumbers = from;
+
+    cm.curOp.viewChanged = true;
+
+    if (from >= display.viewTo) { // Change after
+      if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)
+        resetView(cm);
+    } else if (to <= display.viewFrom) { // Change before
+      if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {
+        resetView(cm);
+      } else {
+        display.viewFrom += lendiff;
+        display.viewTo += lendiff;
+      }
+    } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap
+      resetView(cm);
+    } else if (from <= display.viewFrom) { // Top overlap
+      var cut = viewCuttingPoint(cm, to, to + lendiff, 1);
+      if (cut) {
+        display.view = display.view.slice(cut.index);
+        display.viewFrom = cut.lineN;
+        display.viewTo += lendiff;
+      } else {
+        resetView(cm);
+      }
+    } else if (to >= display.viewTo) { // Bottom overlap
+   

<TRUNCATED>

[19/93] [abbrv] [partial] jena git commit: Maven modules for Fuseki2

Posted by rv...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/pivot.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/pivot.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/pivot.js
new file mode 100644
index 0000000..c4f7eab
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/pivot.js
@@ -0,0 +1,1363 @@
+(function() {
+  var callWithJQuery,
+    __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
+    __slice = [].slice,
+    __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+    __hasProp = {}.hasOwnProperty;
+
+  callWithJQuery = function(pivotModule) {
+    if (typeof exports === "object" && typeof module === "object") {
+      return pivotModule(require("jquery"));
+    } else if (typeof define === "function" && define.amd) {
+      return define(["jquery"], pivotModule);
+    } else {
+      return pivotModule(jQuery);
+    }
+  };
+
+  callWithJQuery(function($) {
+
+    /*
+    Utilities
+     */
+    var PivotData, addSeparators, aggregatorTemplates, aggregators, dayNamesEn, derivers, locales, mthNamesEn, naturalSort, numberFormat, pivotTableRenderer, renderers, usFmt, usFmtInt, usFmtPct, zeroPad;
+    addSeparators = function(nStr, thousandsSep, decimalSep) {
+      var rgx, x, x1, x2;
+      nStr += '';
+      x = nStr.split('.');
+      x1 = x[0];
+      x2 = x.length > 1 ? decimalSep + x[1] : '';
+      rgx = /(\d+)(\d{3})/;
+      while (rgx.test(x1)) {
+        x1 = x1.replace(rgx, '$1' + thousandsSep + '$2');
+      }
+      return x1 + x2;
+    };
+    numberFormat = function(opts) {
+      var defaults;
+      defaults = {
+        digitsAfterDecimal: 2,
+        scaler: 1,
+        thousandsSep: ",",
+        decimalSep: ".",
+        prefix: "",
+        suffix: "",
+        showZero: false
+      };
+      opts = $.extend(defaults, opts);
+      return function(x) {
+        var result;
+        if (isNaN(x) || !isFinite(x)) {
+          return "";
+        }
+        if (x === 0 && !opts.showZero) {
+          return "";
+        }
+        result = addSeparators((opts.scaler * x).toFixed(opts.digitsAfterDecimal), opts.thousandsSep, opts.decimalSep);
+        return "" + opts.prefix + result + opts.suffix;
+      };
+    };
+    usFmt = numberFormat();
+    usFmtInt = numberFormat({
+      digitsAfterDecimal: 0
+    });
+    usFmtPct = numberFormat({
+      digitsAfterDecimal: 1,
+      scaler: 100,
+      suffix: "%"
+    });
+    aggregatorTemplates = {
+      count: function(formatter) {
+        if (formatter == null) {
+          formatter = usFmtInt;
+        }
+        return function() {
+          return function(data, rowKey, colKey) {
+            return {
+              count: 0,
+              push: function() {
+                return this.count++;
+              },
+              value: function() {
+                return this.count;
+              },
+              format: formatter
+            };
+          };
+        };
+      },
+      countUnique: function(formatter) {
+        if (formatter == null) {
+          formatter = usFmtInt;
+        }
+        return function(_arg) {
+          var attr;
+          attr = _arg[0];
+          return function(data, rowKey, colKey) {
+            return {
+              uniq: [],
+              push: function(record) {
+                var _ref;
+                if (_ref = record[attr], __indexOf.call(this.uniq, _ref) < 0) {
+                  return this.uniq.push(record[attr]);
+                }
+              },
+              value: function() {
+                return this.uniq.length;
+              },
+              format: formatter,
+              numInputs: attr != null ? 0 : 1
+            };
+          };
+        };
+      },
+      listUnique: function(sep) {
+        return function(_arg) {
+          var attr;
+          attr = _arg[0];
+          return function(data, rowKey, colKey) {
+            return {
+              uniq: [],
+              push: function(record) {
+                var _ref;
+                if (_ref = record[attr], __indexOf.call(this.uniq, _ref) < 0) {
+                  return this.uniq.push(record[attr]);
+                }
+              },
+              value: function() {
+                return this.uniq.join(sep);
+              },
+              format: function(x) {
+                return x;
+              },
+              numInputs: attr != null ? 0 : 1
+            };
+          };
+        };
+      },
+      sum: function(formatter) {
+        if (formatter == null) {
+          formatter = usFmt;
+        }
+        return function(_arg) {
+          var attr;
+          attr = _arg[0];
+          return function(data, rowKey, colKey) {
+            return {
+              sum: 0,
+              push: function(record) {
+                if (!isNaN(parseFloat(record[attr]))) {
+                  return this.sum += parseFloat(record[attr]);
+                }
+              },
+              value: function() {
+                return this.sum;
+              },
+              format: formatter,
+              numInputs: attr != null ? 0 : 1
+            };
+          };
+        };
+      },
+      average: function(formatter) {
+        if (formatter == null) {
+          formatter = usFmt;
+        }
+        return function(_arg) {
+          var attr;
+          attr = _arg[0];
+          return function(data, rowKey, colKey) {
+            return {
+              sum: 0,
+              len: 0,
+              push: function(record) {
+                if (!isNaN(parseFloat(record[attr]))) {
+                  this.sum += parseFloat(record[attr]);
+                  return this.len++;
+                }
+              },
+              value: function() {
+                return this.sum / this.len;
+              },
+              format: formatter,
+              numInputs: attr != null ? 0 : 1
+            };
+          };
+        };
+      },
+      sumOverSum: function(formatter) {
+        if (formatter == null) {
+          formatter = usFmt;
+        }
+        return function(_arg) {
+          var denom, num;
+          num = _arg[0], denom = _arg[1];
+          return function(data, rowKey, colKey) {
+            return {
+              sumNum: 0,
+              sumDenom: 0,
+              push: function(record) {
+                if (!isNaN(parseFloat(record[num]))) {
+                  this.sumNum += parseFloat(record[num]);
+                }
+                if (!isNaN(parseFloat(record[denom]))) {
+                  return this.sumDenom += parseFloat(record[denom]);
+                }
+              },
+              value: function() {
+                return this.sumNum / this.sumDenom;
+              },
+              format: formatter,
+              numInputs: (num != null) && (denom != null) ? 0 : 2
+            };
+          };
+        };
+      },
+      sumOverSumBound80: function(upper, formatter) {
+        if (upper == null) {
+          upper = true;
+        }
+        if (formatter == null) {
+          formatter = usFmt;
+        }
+        return function(_arg) {
+          var denom, num;
+          num = _arg[0], denom = _arg[1];
+          return function(data, rowKey, colKey) {
+            return {
+              sumNum: 0,
+              sumDenom: 0,
+              push: function(record) {
+                if (!isNaN(parseFloat(record[num]))) {
+                  this.sumNum += parseFloat(record[num]);
+                }
+                if (!isNaN(parseFloat(record[denom]))) {
+                  return this.sumDenom += parseFloat(record[denom]);
+                }
+              },
+              value: function() {
+                var sign;
+                sign = upper ? 1 : -1;
+                return (0.821187207574908 / this.sumDenom + this.sumNum / this.sumDenom + 1.2815515655446004 * sign * Math.sqrt(0.410593603787454 / (this.sumDenom * this.sumDenom) + (this.sumNum * (1 - this.sumNum / this.sumDenom)) / (this.sumDenom * this.sumDenom))) / (1 + 1.642374415149816 / this.sumDenom);
+              },
+              format: formatter,
+              numInputs: (num != null) && (denom != null) ? 0 : 2
+            };
+          };
+        };
+      },
+      fractionOf: function(wrapped, type, formatter) {
+        if (type == null) {
+          type = "total";
+        }
+        if (formatter == null) {
+          formatter = usFmtPct;
+        }
+        return function() {
+          var x;
+          x = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
+          return function(data, rowKey, colKey) {
+            return {
+              selector: {
+                total: [[], []],
+                row: [rowKey, []],
+                col: [[], colKey]
+              }[type],
+              inner: wrapped.apply(null, x)(data, rowKey, colKey),
+              push: function(record) {
+                return this.inner.push(record);
+              },
+              format: formatter,
+              value: function() {
+                return this.inner.value() / data.getAggregator.apply(data, this.selector).inner.value();
+              },
+              numInputs: wrapped.apply(null, x)().numInputs
+            };
+          };
+        };
+      }
+    };
+    aggregators = (function(tpl) {
+      return {
+        "Count": tpl.count(usFmtInt),
+        "Count Unique Values": tpl.countUnique(usFmtInt),
+        "List Unique Values": tpl.listUnique(", "),
+        "Sum": tpl.sum(usFmt),
+        "Integer Sum": tpl.sum(usFmtInt),
+        "Average": tpl.average(usFmt),
+        "Sum over Sum": tpl.sumOverSum(usFmt),
+        "80% Upper Bound": tpl.sumOverSumBound80(true, usFmt),
+        "80% Lower Bound": tpl.sumOverSumBound80(false, usFmt),
+        "Sum as Fraction of Total": tpl.fractionOf(tpl.sum(), "total", usFmtPct),
+        "Sum as Fraction of Rows": tpl.fractionOf(tpl.sum(), "row", usFmtPct),
+        "Sum as Fraction of Columns": tpl.fractionOf(tpl.sum(), "col", usFmtPct),
+        "Count as Fraction of Total": tpl.fractionOf(tpl.count(), "total", usFmtPct),
+        "Count as Fraction of Rows": tpl.fractionOf(tpl.count(), "row", usFmtPct),
+        "Count as Fraction of Columns": tpl.fractionOf(tpl.count(), "col", usFmtPct)
+      };
+    })(aggregatorTemplates);
+    renderers = {
+      "Table": function(pvtData, opts) {
+        return pivotTableRenderer(pvtData, opts);
+      },
+      "Table Barchart": function(pvtData, opts) {
+        return $(pivotTableRenderer(pvtData, opts)).barchart();
+      },
+      "Heatmap": function(pvtData, opts) {
+        return $(pivotTableRenderer(pvtData, opts)).heatmap();
+      },
+      "Row Heatmap": function(pvtData, opts) {
+        return $(pivotTableRenderer(pvtData, opts)).heatmap("rowheatmap");
+      },
+      "Col Heatmap": function(pvtData, opts) {
+        return $(pivotTableRenderer(pvtData, opts)).heatmap("colheatmap");
+      }
+    };
+    locales = {
+      en: {
+        aggregators: aggregators,
+        renderers: renderers,
+        localeStrings: {
+          renderError: "An error occurred rendering the PivotTable results.",
+          computeError: "An error occurred computing the PivotTable results.",
+          uiRenderError: "An error occurred rendering the PivotTable UI.",
+          selectAll: "Select All",
+          selectNone: "Select None",
+          tooMany: "(too many to list)",
+          filterResults: "Filter results",
+          totals: "Totals",
+          vs: "vs",
+          by: "by"
+        }
+      }
+    };
+    mthNamesEn = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
+    dayNamesEn = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
+    zeroPad = function(number) {
+      return ("0" + number).substr(-2, 2);
+    };
+    derivers = {
+      bin: function(col, binWidth) {
+        return function(record) {
+          return record[col] - record[col] % binWidth;
+        };
+      },
+      dateFormat: function(col, formatString, mthNames, dayNames) {
+        if (mthNames == null) {
+          mthNames = mthNamesEn;
+        }
+        if (dayNames == null) {
+          dayNames = dayNamesEn;
+        }
+        return function(record) {
+          var date;
+          date = new Date(Date.parse(record[col]));
+          if (isNaN(date)) {
+            return "";
+          }
+          return formatString.replace(/%(.)/g, function(m, p) {
+            switch (p) {
+              case "y":
+                return date.getFullYear();
+              case "m":
+                return zeroPad(date.getMonth() + 1);
+              case "n":
+                return mthNames[date.getMonth()];
+              case "d":
+                return zeroPad(date.getDate());
+              case "w":
+                return dayNames[date.getDay()];
+              case "x":
+                return date.getDay();
+              case "H":
+                return zeroPad(date.getHours());
+              case "M":
+                return zeroPad(date.getMinutes());
+              case "S":
+                return zeroPad(date.getSeconds());
+              default:
+                return "%" + p;
+            }
+          });
+        };
+      }
+    };
+    naturalSort = (function(_this) {
+      return function(as, bs) {
+        var a, a1, b, b1, rd, rx, rz;
+        rx = /(\d+)|(\D+)/g;
+        rd = /\d/;
+        rz = /^0/;
+        if (typeof as === "number" || typeof bs === "number") {
+          if (isNaN(as)) {
+            return 1;
+          }
+          if (isNaN(bs)) {
+            return -1;
+          }
+          return as - bs;
+        }
+        a = String(as).toLowerCase();
+        b = String(bs).toLowerCase();
+        if (a === b) {
+          return 0;
+        }
+        if (!(rd.test(a) && rd.test(b))) {
+          return (a > b ? 1 : -1);
+        }
+        a = a.match(rx);
+        b = b.match(rx);
+        while (a.length && b.length) {
+          a1 = a.shift();
+          b1 = b.shift();
+          if (a1 !== b1) {
+            if (rd.test(a1) && rd.test(b1)) {
+              return a1.replace(rz, ".0") - b1.replace(rz, ".0");
+            } else {
+              return (a1 > b1 ? 1 : -1);
+            }
+          }
+        }
+        return a.length - b.length;
+      };
+    })(this);
+    $.pivotUtilities = {
+      aggregatorTemplates: aggregatorTemplates,
+      aggregators: aggregators,
+      renderers: renderers,
+      derivers: derivers,
+      locales: locales,
+      naturalSort: naturalSort,
+      numberFormat: numberFormat
+    };
+
+    /*
+    Data Model class
+     */
+    PivotData = (function() {
+      function PivotData(input, opts) {
+        this.getAggregator = __bind(this.getAggregator, this);
+        this.getRowKeys = __bind(this.getRowKeys, this);
+        this.getColKeys = __bind(this.getColKeys, this);
+        this.sortKeys = __bind(this.sortKeys, this);
+        this.arrSort = __bind(this.arrSort, this);
+        this.natSort = __bind(this.natSort, this);
+        this.aggregator = opts.aggregator;
+        this.aggregatorName = opts.aggregatorName;
+        this.colAttrs = opts.cols;
+        this.rowAttrs = opts.rows;
+        this.valAttrs = opts.vals;
+        this.tree = {};
+        this.rowKeys = [];
+        this.colKeys = [];
+        this.rowTotals = {};
+        this.colTotals = {};
+        this.allTotal = this.aggregator(this, [], []);
+        this.sorted = false;
+        PivotData.forEachRecord(input, opts.derivedAttributes, (function(_this) {
+          return function(record) {
+            if (opts.filter(record)) {
+              return _this.processRecord(record);
+            }
+          };
+        })(this));
+      }
+
+      PivotData.forEachRecord = function(input, derivedAttributes, f) {
+        var addRecord, compactRecord, i, j, k, record, tblCols, _i, _len, _ref, _results, _results1;
+        if ($.isEmptyObject(derivedAttributes)) {
+          addRecord = f;
+        } else {
+          addRecord = function(record) {
+            var k, v, _ref;
+            for (k in derivedAttributes) {
+              v = derivedAttributes[k];
+              record[k] = (_ref = v(record)) != null ? _ref : record[k];
+            }
+            return f(record);
+          };
+        }
+        if ($.isFunction(input)) {
+          return input(addRecord);
+        } else if ($.isArray(input)) {
+          if ($.isArray(input[0])) {
+            _results = [];
+            for (i in input) {
+              if (!__hasProp.call(input, i)) continue;
+              compactRecord = input[i];
+              if (!(i > 0)) {
+                continue;
+              }
+              record = {};
+              _ref = input[0];
+              for (j in _ref) {
+                if (!__hasProp.call(_ref, j)) continue;
+                k = _ref[j];
+                record[k] = compactRecord[j];
+              }
+              _results.push(addRecord(record));
+            }
+            return _results;
+          } else {
+            _results1 = [];
+            for (_i = 0, _len = input.length; _i < _len; _i++) {
+              record = input[_i];
+              _results1.push(addRecord(record));
+            }
+            return _results1;
+          }
+        } else if (input instanceof jQuery) {
+          tblCols = [];
+          $("thead > tr > th", input).each(function(i) {
+            return tblCols.push($(this).text());
+          });
+          return $("tbody > tr", input).each(function(i) {
+            record = {};
+            $("td", this).each(function(j) {
+              return record[tblCols[j]] = $(this).text();
+            });
+            return addRecord(record);
+          });
+        } else {
+          throw new Error("unknown input format");
+        }
+      };
+
+      PivotData.convertToArray = function(input) {
+        var result;
+        result = [];
+        PivotData.forEachRecord(input, {}, function(record) {
+          return result.push(record);
+        });
+        return result;
+      };
+
+      PivotData.prototype.natSort = function(as, bs) {
+        return naturalSort(as, bs);
+      };
+
+      PivotData.prototype.arrSort = function(a, b) {
+        return this.natSort(a.join(), b.join());
+      };
+
+      PivotData.prototype.sortKeys = function() {
+        if (!this.sorted) {
+          this.rowKeys.sort(this.arrSort);
+          this.colKeys.sort(this.arrSort);
+        }
+        return this.sorted = true;
+      };
+
+      PivotData.prototype.getColKeys = function() {
+        this.sortKeys();
+        return this.colKeys;
+      };
+
+      PivotData.prototype.getRowKeys = function() {
+        this.sortKeys();
+        return this.rowKeys;
+      };
+
+      PivotData.prototype.processRecord = function(record) {
+        var colKey, flatColKey, flatRowKey, rowKey, x, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3;
+        colKey = [];
+        rowKey = [];
+        _ref = this.colAttrs;
+        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+          x = _ref[_i];
+          colKey.push((_ref1 = record[x]) != null ? _ref1 : "null");
+        }
+        _ref2 = this.rowAttrs;
+        for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
+          x = _ref2[_j];
+          rowKey.push((_ref3 = record[x]) != null ? _ref3 : "null");
+        }
+        flatRowKey = rowKey.join(String.fromCharCode(0));
+        flatColKey = colKey.join(String.fromCharCode(0));
+        this.allTotal.push(record);
+        if (rowKey.length !== 0) {
+          if (!this.rowTotals[flatRowKey]) {
+            this.rowKeys.push(rowKey);
+            this.rowTotals[flatRowKey] = this.aggregator(this, rowKey, []);
+          }
+          this.rowTotals[flatRowKey].push(record);
+        }
+        if (colKey.length !== 0) {
+          if (!this.colTotals[flatColKey]) {
+            this.colKeys.push(colKey);
+            this.colTotals[flatColKey] = this.aggregator(this, [], colKey);
+          }
+          this.colTotals[flatColKey].push(record);
+        }
+        if (colKey.length !== 0 && rowKey.length !== 0) {
+          if (!this.tree[flatRowKey]) {
+            this.tree[flatRowKey] = {};
+          }
+          if (!this.tree[flatRowKey][flatColKey]) {
+            this.tree[flatRowKey][flatColKey] = this.aggregator(this, rowKey, colKey);
+          }
+          return this.tree[flatRowKey][flatColKey].push(record);
+        }
+      };
+
+      PivotData.prototype.getAggregator = function(rowKey, colKey) {
+        var agg, flatColKey, flatRowKey;
+        flatRowKey = rowKey.join(String.fromCharCode(0));
+        flatColKey = colKey.join(String.fromCharCode(0));
+        if (rowKey.length === 0 && colKey.length === 0) {
+          agg = this.allTotal;
+        } else if (rowKey.length === 0) {
+          agg = this.colTotals[flatColKey];
+        } else if (colKey.length === 0) {
+          agg = this.rowTotals[flatRowKey];
+        } else {
+          agg = this.tree[flatRowKey][flatColKey];
+        }
+        return agg != null ? agg : {
+          value: (function() {
+            return null;
+          }),
+          format: function() {
+            return "";
+          }
+        };
+      };
+
+      return PivotData;
+
+    })();
+
+    /*
+    Default Renderer for hierarchical table layout
+     */
+    pivotTableRenderer = function(pivotData, opts) {
+      var aggregator, c, colAttrs, colKey, colKeys, defaults, i, j, r, result, rowAttrs, rowKey, rowKeys, spanSize, td, th, totalAggregator, tr, txt, val, x;
+      defaults = {
+        localeStrings: {
+          totals: "Totals"
+        }
+      };
+      opts = $.extend(defaults, opts);
+      colAttrs = pivotData.colAttrs;
+      rowAttrs = pivotData.rowAttrs;
+      rowKeys = pivotData.getRowKeys();
+      colKeys = pivotData.getColKeys();
+      result = document.createElement("table");
+      result.className = "pvtTable";
+      spanSize = function(arr, i, j) {
+        var len, noDraw, stop, x, _i, _j;
+        if (i !== 0) {
+          noDraw = true;
+          for (x = _i = 0; 0 <= j ? _i <= j : _i >= j; x = 0 <= j ? ++_i : --_i) {
+            if (arr[i - 1][x] !== arr[i][x]) {
+              noDraw = false;
+            }
+          }
+          if (noDraw) {
+            return -1;
+          }
+        }
+        len = 0;
+        while (i + len < arr.length) {
+          stop = false;
+          for (x = _j = 0; 0 <= j ? _j <= j : _j >= j; x = 0 <= j ? ++_j : --_j) {
+            if (arr[i][x] !== arr[i + len][x]) {
+              stop = true;
+            }
+          }
+          if (stop) {
+            break;
+          }
+          len++;
+        }
+        return len;
+      };
+      for (j in colAttrs) {
+        if (!__hasProp.call(colAttrs, j)) continue;
+        c = colAttrs[j];
+        tr = document.createElement("tr");
+        if (parseInt(j) === 0 && rowAttrs.length !== 0) {
+          th = document.createElement("th");
+          th.setAttribute("colspan", rowAttrs.length);
+          th.setAttribute("rowspan", colAttrs.length);
+          tr.appendChild(th);
+        }
+        th = document.createElement("th");
+        th.className = "pvtAxisLabel";
+        th.textContent = c;
+        tr.appendChild(th);
+        for (i in colKeys) {
+          if (!__hasProp.call(colKeys, i)) continue;
+          colKey = colKeys[i];
+          x = spanSize(colKeys, parseInt(i), parseInt(j));
+          if (x !== -1) {
+            th = document.createElement("th");
+            th.className = "pvtColLabel";
+            th.textContent = colKey[j];
+            th.setAttribute("colspan", x);
+            if (parseInt(j) === colAttrs.length - 1 && rowAttrs.length !== 0) {
+              th.setAttribute("rowspan", 2);
+            }
+            tr.appendChild(th);
+          }
+        }
+        if (parseInt(j) === 0) {
+          th = document.createElement("th");
+          th.className = "pvtTotalLabel";
+          th.innerHTML = opts.localeStrings.totals;
+          th.setAttribute("rowspan", colAttrs.length + (rowAttrs.length === 0 ? 0 : 1));
+          tr.appendChild(th);
+        }
+        result.appendChild(tr);
+      }
+      if (rowAttrs.length !== 0) {
+        tr = document.createElement("tr");
+        for (i in rowAttrs) {
+          if (!__hasProp.call(rowAttrs, i)) continue;
+          r = rowAttrs[i];
+          th = document.createElement("th");
+          th.className = "pvtAxisLabel";
+          th.textContent = r;
+          tr.appendChild(th);
+        }
+        th = document.createElement("th");
+        if (colAttrs.length === 0) {
+          th.className = "pvtTotalLabel";
+          th.innerHTML = opts.localeStrings.totals;
+        }
+        tr.appendChild(th);
+        result.appendChild(tr);
+      }
+      for (i in rowKeys) {
+        if (!__hasProp.call(rowKeys, i)) continue;
+        rowKey = rowKeys[i];
+        tr = document.createElement("tr");
+        for (j in rowKey) {
+          if (!__hasProp.call(rowKey, j)) continue;
+          txt = rowKey[j];
+          x = spanSize(rowKeys, parseInt(i), parseInt(j));
+          if (x !== -1) {
+            th = document.createElement("th");
+            th.className = "pvtRowLabel";
+            th.textContent = txt;
+            th.setAttribute("rowspan", x);
+            if (parseInt(j) === rowAttrs.length - 1 && colAttrs.length !== 0) {
+              th.setAttribute("colspan", 2);
+            }
+            tr.appendChild(th);
+          }
+        }
+        for (j in colKeys) {
+          if (!__hasProp.call(colKeys, j)) continue;
+          colKey = colKeys[j];
+          aggregator = pivotData.getAggregator(rowKey, colKey);
+          val = aggregator.value();
+          td = document.createElement("td");
+          td.className = "pvtVal row" + i + " col" + j;
+          td.innerHTML = aggregator.format(val);
+          td.setAttribute("data-value", val);
+          tr.appendChild(td);
+        }
+        totalAggregator = pivotData.getAggregator(rowKey, []);
+        val = totalAggregator.value();
+        td = document.createElement("td");
+        td.className = "pvtTotal rowTotal";
+        td.innerHTML = totalAggregator.format(val);
+        td.setAttribute("data-value", val);
+        td.setAttribute("data-for", "row" + i);
+        tr.appendChild(td);
+        result.appendChild(tr);
+      }
+      tr = document.createElement("tr");
+      th = document.createElement("th");
+      th.className = "pvtTotalLabel";
+      th.innerHTML = opts.localeStrings.totals;
+      th.setAttribute("colspan", rowAttrs.length + (colAttrs.length === 0 ? 0 : 1));
+      tr.appendChild(th);
+      for (j in colKeys) {
+        if (!__hasProp.call(colKeys, j)) continue;
+        colKey = colKeys[j];
+        totalAggregator = pivotData.getAggregator([], colKey);
+        val = totalAggregator.value();
+        td = document.createElement("td");
+        td.className = "pvtTotal colTotal";
+        td.innerHTML = totalAggregator.format(val);
+        td.setAttribute("data-value", val);
+        td.setAttribute("data-for", "col" + j);
+        tr.appendChild(td);
+      }
+      totalAggregator = pivotData.getAggregator([], []);
+      val = totalAggregator.value();
+      td = document.createElement("td");
+      td.className = "pvtGrandTotal";
+      td.innerHTML = totalAggregator.format(val);
+      td.setAttribute("data-value", val);
+      tr.appendChild(td);
+      result.appendChild(tr);
+      result.setAttribute("data-numrows", rowKeys.length);
+      result.setAttribute("data-numcols", colKeys.length);
+      return result;
+    };
+
+    /*
+    Pivot Table core: create PivotData object and call Renderer on it
+     */
+    $.fn.pivot = function(input, opts) {
+      var defaults, e, pivotData, result, x;
+      defaults = {
+        cols: [],
+        rows: [],
+        filter: function() {
+          return true;
+        },
+        aggregator: aggregatorTemplates.count()(),
+        aggregatorName: "Count",
+        derivedAttributes: {},
+        renderer: pivotTableRenderer,
+        rendererOptions: null,
+        localeStrings: locales.en.localeStrings
+      };
+      opts = $.extend(defaults, opts);
+      result = null;
+      try {
+        pivotData = new PivotData(input, opts);
+        try {
+          result = opts.renderer(pivotData, opts.rendererOptions);
+        } catch (_error) {
+          e = _error;
+          if (typeof console !== "undefined" && console !== null) {
+            console.error(e.stack);
+          }
+          result = $("<span>").html(opts.localeStrings.renderError);
+        }
+      } catch (_error) {
+        e = _error;
+        if (typeof console !== "undefined" && console !== null) {
+          console.error(e.stack);
+        }
+        result = $("<span>").html(opts.localeStrings.computeError);
+      }
+      x = this[0];
+      while (x.hasChildNodes()) {
+        x.removeChild(x.lastChild);
+      }
+      return this.append(result);
+    };
+
+    /*
+    Pivot Table UI: calls Pivot Table core above with options set by user
+     */
+    $.fn.pivotUI = function(input, inputOpts, overwrite, locale) {
+      var a, aggregator, attrLength, axisValues, c, colList, defaults, e, existingOpts, i, initialRender, k, opts, pivotTable, refresh, refreshDelayed, renderer, rendererControl, shownAttributes, tblCols, tr1, tr2, uiTable, unusedAttrsVerticalAutoOverride, x, _fn, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3, _ref4;
+      if (overwrite == null) {
+        overwrite = false;
+      }
+      if (locale == null) {
+        locale = "en";
+      }
+      defaults = {
+        derivedAttributes: {},
+        aggregators: locales[locale].aggregators,
+        renderers: locales[locale].renderers,
+        hiddenAttributes: [],
+        menuLimit: 200,
+        cols: [],
+        rows: [],
+        vals: [],
+        exclusions: {},
+        unusedAttrsVertical: "auto",
+        autoSortUnusedAttrs: false,
+        rendererOptions: {
+          localeStrings: locales[locale].localeStrings
+        },
+        onRefresh: null,
+        filter: function() {
+          return true;
+        },
+        localeStrings: locales[locale].localeStrings
+      };
+      existingOpts = this.data("pivotUIOptions");
+      if ((existingOpts == null) || overwrite) {
+        opts = $.extend(defaults, inputOpts);
+      } else {
+        opts = existingOpts;
+      }
+      try {
+        input = PivotData.convertToArray(input);
+        tblCols = (function() {
+          var _ref, _results;
+          _ref = input[0];
+          _results = [];
+          for (k in _ref) {
+            if (!__hasProp.call(_ref, k)) continue;
+            _results.push(k);
+          }
+          return _results;
+        })();
+        _ref = opts.derivedAttributes;
+        for (c in _ref) {
+          if (!__hasProp.call(_ref, c)) continue;
+          if ((__indexOf.call(tblCols, c) < 0)) {
+            tblCols.push(c);
+          }
+        }
+        axisValues = {};
+        for (_i = 0, _len = tblCols.length; _i < _len; _i++) {
+          x = tblCols[_i];
+          axisValues[x] = {};
+        }
+        PivotData.forEachRecord(input, opts.derivedAttributes, function(record) {
+          var v, _base, _results;
+          _results = [];
+          for (k in record) {
+            if (!__hasProp.call(record, k)) continue;
+            v = record[k];
+            if (!(opts.filter(record))) {
+              continue;
+            }
+            if (v == null) {
+              v = "null";
+            }
+            if ((_base = axisValues[k])[v] == null) {
+              _base[v] = 0;
+            }
+            _results.push(axisValues[k][v]++);
+          }
+          return _results;
+        });
+        uiTable = $("<table cellpadding='5'>");
+        rendererControl = $("<td>");
+        renderer = $("<select class='pvtRenderer'>").appendTo(rendererControl).bind("change", function() {
+          return refresh();
+        });
+        _ref1 = opts.renderers;
+        for (x in _ref1) {
+          if (!__hasProp.call(_ref1, x)) continue;
+          $("<option>").val(x).html(x).appendTo(renderer);
+        }
+        colList = $("<td class='pvtAxisContainer pvtUnused'>");
+        shownAttributes = (function() {
+          var _j, _len1, _results;
+          _results = [];
+          for (_j = 0, _len1 = tblCols.length; _j < _len1; _j++) {
+            c = tblCols[_j];
+            if (__indexOf.call(opts.hiddenAttributes, c) < 0) {
+              _results.push(c);
+            }
+          }
+          return _results;
+        })();
+        unusedAttrsVerticalAutoOverride = false;
+        if (opts.unusedAttrsVertical === "auto") {
+          attrLength = 0;
+          for (_j = 0, _len1 = shownAttributes.length; _j < _len1; _j++) {
+            a = shownAttributes[_j];
+            attrLength += a.length;
+          }
+          unusedAttrsVerticalAutoOverride = attrLength > 120;
+        }
+        if (opts.unusedAttrsVertical === true || unusedAttrsVerticalAutoOverride) {
+          colList.addClass('pvtVertList');
+        } else {
+          colList.addClass('pvtHorizList');
+        }
+        _fn = function(c) {
+          var attrElem, btns, checkContainer, filterItem, filterItemExcluded, hasExcludedItem, keys, showFilterList, triangleLink, updateFilter, v, valueList, _k, _len2, _ref2;
+          keys = (function() {
+            var _results;
+            _results = [];
+            for (k in axisValues[c]) {
+              _results.push(k);
+            }
+            return _results;
+          })();
+          hasExcludedItem = false;
+          valueList = $("<div>").addClass('pvtFilterBox').hide();
+          valueList.append($("<h4>").text("" + c + " (" + keys.length + ")"));
+          if (keys.length > opts.menuLimit) {
+            valueList.append($("<p>").html(opts.localeStrings.tooMany));
+          } else {
+            btns = $("<p>").appendTo(valueList);
+            btns.append($("<button>", {
+              type: "button"
+            }).html(opts.localeStrings.selectAll).bind("click", function() {
+              return valueList.find("input:visible").prop("checked", true);
+            }));
+            btns.append($("<button>", {
+              type: "button"
+            }).html(opts.localeStrings.selectNone).bind("click", function() {
+              return valueList.find("input:visible").prop("checked", false);
+            }));
+            btns.append($("<input>").addClass("pvtSearch").attr("placeholder", opts.localeStrings.filterResults).bind("keyup", function() {
+              var filter;
+              filter = $(this).val().toLowerCase();
+              return $(this).parents(".pvtFilterBox").find('label span').each(function() {
+                var testString;
+                testString = $(this).text().toLowerCase().indexOf(filter);
+                if (testString !== -1) {
+                  return $(this).parent().show();
+                } else {
+                  return $(this).parent().hide();
+                }
+              });
+            }));
+            checkContainer = $("<div>").addClass("pvtCheckContainer").appendTo(valueList);
+            _ref2 = keys.sort(naturalSort);
+            for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
+              k = _ref2[_k];
+              v = axisValues[c][k];
+              filterItem = $("<label>");
+              filterItemExcluded = opts.exclusions[c] ? (__indexOf.call(opts.exclusions[c], k) >= 0) : false;
+              hasExcludedItem || (hasExcludedItem = filterItemExcluded);
+              $("<input type='checkbox' class='pvtFilter'>").attr("checked", !filterItemExcluded).data("filter", [c, k]).appendTo(filterItem);
+              filterItem.append($("<span>").text("" + k + " (" + v + ")"));
+              checkContainer.append($("<p>").append(filterItem));
+            }
+          }
+          updateFilter = function() {
+            var unselectedCount;
+            unselectedCount = $(valueList).find("[type='checkbox']").length - $(valueList).find("[type='checkbox']:checked").length;
+            if (unselectedCount > 0) {
+              attrElem.addClass("pvtFilteredAttribute");
+            } else {
+              attrElem.removeClass("pvtFilteredAttribute");
+            }
+            if (keys.length > opts.menuLimit) {
+              return valueList.toggle();
+            } else {
+              return valueList.toggle(0, refresh);
+            }
+          };
+          $("<p>").appendTo(valueList).append($("<button>", {
+            type: "button"
+          }).text("OK").bind("click", updateFilter));
+          showFilterList = function(e) {
+            valueList.css({
+              left: e.pageX,
+              top: e.pageY
+            }).toggle();
+            $('.pvtSearch').val('');
+            return $('label').show();
+          };
+          triangleLink = $("<span class='pvtTriangle'>").html(" &#x25BE;").bind("click", showFilterList);
+          attrElem = $("<li class='axis_" + i + "'>").append($("<span class='pvtAttr'>").text(c).data("attrName", c).append(triangleLink));
+          if (hasExcludedItem) {
+            attrElem.addClass('pvtFilteredAttribute');
+          }
+          colList.append(attrElem).append(valueList);
+          return attrElem.bind("dblclick", showFilterList);
+        };
+        for (i in shownAttributes) {
+          c = shownAttributes[i];
+          _fn(c);
+        }
+        tr1 = $("<tr>").appendTo(uiTable);
+        aggregator = $("<select class='pvtAggregator'>").bind("change", function() {
+          return refresh();
+        });
+        _ref2 = opts.aggregators;
+        for (x in _ref2) {
+          if (!__hasProp.call(_ref2, x)) continue;
+          aggregator.append($("<option>").val(x).html(x));
+        }
+        $("<td class='pvtVals'>").appendTo(tr1).append(aggregator).append($("<br>"));
+        $("<td class='pvtAxisContainer pvtHorizList pvtCols'>").appendTo(tr1);
+        tr2 = $("<tr>").appendTo(uiTable);
+        tr2.append($("<td valign='top' class='pvtAxisContainer pvtRows'>"));
+        pivotTable = $("<td valign='top' class='pvtRendererArea'>").appendTo(tr2);
+        if (opts.unusedAttrsVertical === true || unusedAttrsVerticalAutoOverride) {
+          uiTable.find('tr:nth-child(1)').prepend(rendererControl);
+          uiTable.find('tr:nth-child(2)').prepend(colList);
+        } else {
+          uiTable.prepend($("<tr>").append(rendererControl).append(colList));
+        }
+        this.html(uiTable);
+        _ref3 = opts.cols;
+        for (_k = 0, _len2 = _ref3.length; _k < _len2; _k++) {
+          x = _ref3[_k];
+          this.find(".pvtCols").append(this.find(".axis_" + (shownAttributes.indexOf(x))));
+        }
+        _ref4 = opts.rows;
+        for (_l = 0, _len3 = _ref4.length; _l < _len3; _l++) {
+          x = _ref4[_l];
+          this.find(".pvtRows").append(this.find(".axis_" + (shownAttributes.indexOf(x))));
+        }
+        if (opts.aggregatorName != null) {
+          this.find(".pvtAggregator").val(opts.aggregatorName);
+        }
+        if (opts.rendererName != null) {
+          this.find(".pvtRenderer").val(opts.rendererName);
+        }
+        initialRender = true;
+        refreshDelayed = (function(_this) {
+          return function() {
+            var attr, exclusions, natSort, newDropdown, numInputsToProcess, pivotUIOptions, pvtVals, subopts, unusedAttrsContainer, vals, _len4, _m, _n, _ref5;
+            subopts = {
+              derivedAttributes: opts.derivedAttributes,
+              localeStrings: opts.localeStrings,
+              rendererOptions: opts.rendererOptions,
+              cols: [],
+              rows: []
+            };
+            numInputsToProcess = (_ref5 = opts.aggregators[aggregator.val()]([])().numInputs) != null ? _ref5 : 0;
+            vals = [];
+            _this.find(".pvtRows li span.pvtAttr").each(function() {
+              return subopts.rows.push($(this).data("attrName"));
+            });
+            _this.find(".pvtCols li span.pvtAttr").each(function() {
+              return subopts.cols.push($(this).data("attrName"));
+            });
+            _this.find(".pvtVals select.pvtAttrDropdown").each(function() {
+              if (numInputsToProcess === 0) {
+                return $(this).remove();
+              } else {
+                numInputsToProcess--;
+                if ($(this).val() !== "") {
+                  return vals.push($(this).val());
+                }
+              }
+            });
+            if (numInputsToProcess !== 0) {
+              pvtVals = _this.find(".pvtVals");
+              for (x = _m = 0; 0 <= numInputsToProcess ? _m < numInputsToProcess : _m > numInputsToProcess; x = 0 <= numInputsToProcess ? ++_m : --_m) {
+                newDropdown = $("<select class='pvtAttrDropdown'>").append($("<option>")).bind("change", function() {
+                  return refresh();
+                });
+                for (_n = 0, _len4 = shownAttributes.length; _n < _len4; _n++) {
+                  attr = shownAttributes[_n];
+                  newDropdown.append($("<option>").val(attr).text(attr));
+                }
+                pvtVals.append(newDropdown);
+              }
+            }
+            if (initialRender) {
+              vals = opts.vals;
+              i = 0;
+              _this.find(".pvtVals select.pvtAttrDropdown").each(function() {
+                $(this).val(vals[i]);
+                return i++;
+              });
+              initialRender = false;
+            }
+            subopts.aggregatorName = aggregator.val();
+            subopts.vals = vals;
+            subopts.aggregator = opts.aggregators[aggregator.val()](vals);
+            subopts.renderer = opts.renderers[renderer.val()];
+            exclusions = {};
+            _this.find('input.pvtFilter').not(':checked').each(function() {
+              var filter;
+              filter = $(this).data("filter");
+              if (exclusions[filter[0]] != null) {
+                return exclusions[filter[0]].push(filter[1]);
+              } else {
+                return exclusions[filter[0]] = [filter[1]];
+              }
+            });
+            subopts.filter = function(record) {
+              var excludedItems, _ref6;
+              if (!opts.filter(record)) {
+                return false;
+              }
+              for (k in exclusions) {
+                excludedItems = exclusions[k];
+                if (_ref6 = "" + record[k], __indexOf.call(excludedItems, _ref6) >= 0) {
+                  return false;
+                }
+              }
+              return true;
+            };
+            pivotTable.pivot(input, subopts);
+            pivotUIOptions = $.extend(opts, {
+              cols: subopts.cols,
+              rows: subopts.rows,
+              vals: vals,
+              exclusions: exclusions,
+              aggregatorName: aggregator.val(),
+              rendererName: renderer.val()
+            });
+            _this.data("pivotUIOptions", pivotUIOptions);
+            if (opts.autoSortUnusedAttrs) {
+              natSort = $.pivotUtilities.naturalSort;
+              unusedAttrsContainer = _this.find("td.pvtUnused.pvtAxisContainer");
+              $(unusedAttrsContainer).children("li").sort(function(a, b) {
+                return natSort($(a).text(), $(b).text());
+              }).appendTo(unusedAttrsContainer);
+            }
+            pivotTable.css("opacity", 1);
+            if (opts.onRefresh != null) {
+              return opts.onRefresh(pivotUIOptions);
+            }
+          };
+        })(this);
+        refresh = (function(_this) {
+          return function() {
+            pivotTable.css("opacity", 0.5);
+            return setTimeout(refreshDelayed, 10);
+          };
+        })(this);
+        refresh();
+        this.find(".pvtAxisContainer").sortable({
+          update: function(e, ui) {
+            if (ui.sender == null) {
+              return refresh();
+            }
+          },
+          connectWith: this.find(".pvtAxisContainer"),
+          items: 'li',
+          placeholder: 'pvtPlaceholder'
+        });
+      } catch (_error) {
+        e = _error;
+        if (typeof console !== "undefined" && console !== null) {
+          console.error(e.stack);
+        }
+        this.html(opts.localeStrings.uiRenderError);
+      }
+      return this;
+    };
+
+    /*
+    Heatmap post-processing
+     */
+    $.fn.heatmap = function(scope) {
+      var colorGen, heatmapper, i, j, numCols, numRows, _i, _j;
+      if (scope == null) {
+        scope = "heatmap";
+      }
+      numRows = this.data("numrows");
+      numCols = this.data("numcols");
+      colorGen = function(color, min, max) {
+        var hexGen;
+        hexGen = (function() {
+          switch (color) {
+            case "red":
+              return function(hex) {
+                return "ff" + hex + hex;
+              };
+            case "green":
+              return function(hex) {
+                return "" + hex + "ff" + hex;
+              };
+            case "blue":
+              return function(hex) {
+                return "" + hex + hex + "ff";
+              };
+          }
+        })();
+        return function(x) {
+          var hex, intensity;
+          intensity = 255 - Math.round(255 * (x - min) / (max - min));
+          hex = intensity.toString(16).split(".")[0];
+          if (hex.length === 1) {
+            hex = 0 + hex;
+          }
+          return hexGen(hex);
+        };
+      };
+      heatmapper = (function(_this) {
+        return function(scope, color) {
+          var colorFor, forEachCell, values;
+          forEachCell = function(f) {
+            return _this.find(scope).each(function() {
+              var x;
+              x = $(this).data("value");
+              if ((x != null) && isFinite(x)) {
+                return f(x, $(this));
+              }
+            });
+          };
+          values = [];
+          forEachCell(function(x) {
+            return values.push(x);
+          });
+          colorFor = colorGen(color, Math.min.apply(Math, values), Math.max.apply(Math, values));
+          return forEachCell(function(x, elem) {
+            return elem.css("background-color", "#" + colorFor(x));
+          });
+        };
+      })(this);
+      switch (scope) {
+        case "heatmap":
+          heatmapper(".pvtVal", "red");
+          break;
+        case "rowheatmap":
+          for (i = _i = 0; 0 <= numRows ? _i < numRows : _i > numRows; i = 0 <= numRows ? ++_i : --_i) {
+            heatmapper(".pvtVal.row" + i, "red");
+          }
+          break;
+        case "colheatmap":
+          for (j = _j = 0; 0 <= numCols ? _j < numCols : _j > numCols; j = 0 <= numCols ? ++_j : --_j) {
+            heatmapper(".pvtVal.col" + j, "red");
+          }
+      }
+      heatmapper(".pvtTotal.rowTotal", "red");
+      heatmapper(".pvtTotal.colTotal", "red");
+      return this;
+    };
+
+    /*
+    Barchart post-processing
+     */
+    return $.fn.barchart = function() {
+      var barcharter, i, numCols, numRows, _i;
+      numRows = this.data("numrows");
+      numCols = this.data("numcols");
+      barcharter = (function(_this) {
+        return function(scope) {
+          var forEachCell, max, scaler, values;
+          forEachCell = function(f) {
+            return _this.find(scope).each(function() {
+              var x;
+              x = $(this).data("value");
+              if ((x != null) && isFinite(x)) {
+                return f(x, $(this));
+              }
+            });
+          };
+          values = [];
+          forEachCell(function(x) {
+            return values.push(x);
+          });
+          max = Math.max.apply(Math, values);
+          scaler = function(x) {
+            return 100 * x / (1.4 * max);
+          };
+          return forEachCell(function(x, elem) {
+            var text, wrapper;
+            text = elem.text();
+            wrapper = $("<div>").css({
+              "position": "relative",
+              "height": "55px"
+            });
+            wrapper.append($("<div>").css({
+              "position": "absolute",
+              "bottom": 0,
+              "left": 0,
+              "right": 0,
+              "height": scaler(x) + "%",
+              "background-color": "gray"
+            }));
+            wrapper.append($("<div>").text(text).css({
+              "position": "relative",
+              "padding-left": "5px",
+              "padding-right": "5px"
+            }));
+            return elem.css({
+              "padding": 0,
+              "padding-top": "5px",
+              "text-align": "center"
+            }).html(wrapper);
+          });
+        };
+      })(this);
+      for (i = _i = 0; 0 <= numRows ? _i < numRows : _i > numRows; i = 0 <= numRows ? ++_i : --_i) {
+        barcharter(".pvtVal.row" + i);
+      }
+      barcharter(".pvtTotal.colTotal");
+      return this;
+    };
+  });
+
+}).call(this);
+
+//# sourceMappingURL=pivot.js.map
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/470ee4d7/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/pivot.min.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/pivot.min.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/pivot.min.js
new file mode 100644
index 0000000..4ea9f33
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/lib/pivot.min.js
@@ -0,0 +1,2 @@
+(function(){var t,e=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},n=[].slice,r=function(t,e){return function(){return t.apply(e,arguments)}},o={}.hasOwnProperty;(t=function(t){return"object"==typeof exports&&"object"==typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){var a,i,s,u,l,c,p,h,d,f,g,m,v,b,A,y;return i=function(t,e,n){var r,o,a,i;for(t+="",o=t.split("."),a=o[0],i=o.length>1?n+o[1]:"",r=/(\d+)(\d{3})/;r.test(a);)a=a.replace(r,"$1"+e+"$2");return a+i},f=function(e){var n;return n={digitsAfterDecimal:2,scaler:1,thousandsSep:",",decimalSep:".",prefix:"",suffix:"",showZero:!1},e=t.extend(n,e),function(t){var n;return isNaN(t)||!isFinite(t)?"":0!==t||e.showZero?(n=i((e.scaler*t).toFixed(e.digitsAfterDecimal),e.thousandsSep,e.decimalSep),""+e.prefix+n+e.suffix):""}},v=f(),b=f({digitsAfterDecimal:0}),A=f({digitsAfterDecimal:1,scaler:100,suffix:"%"}),s={count:
 function(t){return null==t&&(t=b),function(){return function(){return{count:0,push:function(){return this.count++},value:function(){return this.count},format:t}}}},countUnique:function(t){return null==t&&(t=b),function(n){var r;return r=n[0],function(){return{uniq:[],push:function(t){var n;return n=t[r],e.call(this.uniq,n)<0?this.uniq.push(t[r]):void 0},value:function(){return this.uniq.length},format:t,numInputs:null!=r?0:1}}}},listUnique:function(t){return function(n){var r;return r=n[0],function(){return{uniq:[],push:function(t){var n;return n=t[r],e.call(this.uniq,n)<0?this.uniq.push(t[r]):void 0},value:function(){return this.uniq.join(t)},format:function(t){return t},numInputs:null!=r?0:1}}}},sum:function(t){return null==t&&(t=v),function(e){var n;return n=e[0],function(){return{sum:0,push:function(t){return isNaN(parseFloat(t[n]))?void 0:this.sum+=parseFloat(t[n])},value:function(){return this.sum},format:t,numInputs:null!=n?0:1}}}},average:function(t){return null==t&&(t=v),fu
 nction(e){var n;return n=e[0],function(){return{sum:0,len:0,push:function(t){return isNaN(parseFloat(t[n]))?void 0:(this.sum+=parseFloat(t[n]),this.len++)},value:function(){return this.sum/this.len},format:t,numInputs:null!=n?0:1}}}},sumOverSum:function(t){return null==t&&(t=v),function(e){var n,r;return r=e[0],n=e[1],function(){return{sumNum:0,sumDenom:0,push:function(t){return isNaN(parseFloat(t[r]))||(this.sumNum+=parseFloat(t[r])),isNaN(parseFloat(t[n]))?void 0:this.sumDenom+=parseFloat(t[n])},value:function(){return this.sumNum/this.sumDenom},format:t,numInputs:null!=r&&null!=n?0:2}}}},sumOverSumBound80:function(t,e){return null==t&&(t=!0),null==e&&(e=v),function(n){var r,o;return o=n[0],r=n[1],function(){return{sumNum:0,sumDenom:0,push:function(t){return isNaN(parseFloat(t[o]))||(this.sumNum+=parseFloat(t[o])),isNaN(parseFloat(t[r]))?void 0:this.sumDenom+=parseFloat(t[r])},value:function(){var e;return e=t?1:-1,(.821187207574908/this.sumDenom+this.sumNum/this.sumDenom+1.281551
 5655446004*e*Math.sqrt(.410593603787454/(this.sumDenom*this.sumDenom)+this.sumNum*(1-this.sumNum/this.sumDenom)/(this.sumDenom*this.sumDenom)))/(1+1.642374415149816/this.sumDenom)},format:e,numInputs:null!=o&&null!=r?0:2}}}},fractionOf:function(t,e,r){return null==e&&(e="total"),null==r&&(r=A),function(){var o;return o=1<=arguments.length?n.call(arguments,0):[],function(n,a,i){return{selector:{total:[[],[]],row:[a,[]],col:[[],i]}[e],inner:t.apply(null,o)(n,a,i),push:function(t){return this.inner.push(t)},format:r,value:function(){return this.inner.value()/n.getAggregator.apply(n,this.selector).inner.value()},numInputs:t.apply(null,o)().numInputs}}}}},u=function(t){return{Count:t.count(b),"Count Unique Values":t.countUnique(b),"List Unique Values":t.listUnique(", "),Sum:t.sum(v),"Integer Sum":t.sum(b),Average:t.average(v),"Sum over Sum":t.sumOverSum(v),"80% Upper Bound":t.sumOverSumBound80(!0,v),"80% Lower Bound":t.sumOverSumBound80(!1,v),"Sum as Fraction of Total":t.fractionOf(t.sum
 (),"total",A),"Sum as Fraction of Rows":t.fractionOf(t.sum(),"row",A),"Sum as Fraction of Columns":t.fractionOf(t.sum(),"col",A),"Count as Fraction of Total":t.fractionOf(t.count(),"total",A),"Count as Fraction of Rows":t.fractionOf(t.count(),"row",A),"Count as Fraction of Columns":t.fractionOf(t.count(),"col",A)}}(s),m={Table:function(t,e){return g(t,e)},"Table Barchart":function(e,n){return t(g(e,n)).barchart()},Heatmap:function(e,n){return t(g(e,n)).heatmap()},"Row Heatmap":function(e,n){return t(g(e,n)).heatmap("rowheatmap")},"Col Heatmap":function(e,n){return t(g(e,n)).heatmap("colheatmap")}},p={en:{aggregators:u,renderers:m,localeStrings:{renderError:"An error occurred rendering the PivotTable results.",computeError:"An error occurred computing the PivotTable results.",uiRenderError:"An error occurred rendering the PivotTable UI.",selectAll:"Select All",selectNone:"Select None",tooMany:"(too many to list)",filterResults:"Filter results",totals:"Totals",vs:"vs",by:"by"}}},h=["J
 an","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],l=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],y=function(t){return("0"+t).substr(-2,2)},c={bin:function(t,e){return function(n){return n[t]-n[t]%e}},dateFormat:function(t,e,n,r){return null==n&&(n=h),null==r&&(r=l),function(o){var a;return a=new Date(Date.parse(o[t])),isNaN(a)?"":e.replace(/%(.)/g,function(t,e){switch(e){case"y":return a.getFullYear();case"m":return y(a.getMonth()+1);case"n":return n[a.getMonth()];case"d":return y(a.getDate());case"w":return r[a.getDay()];case"x":return a.getDay();case"H":return y(a.getHours());case"M":return y(a.getMinutes());case"S":return y(a.getSeconds());default:return"%"+e}})}}},d=function(){return function(t,e){var n,r,o,a,i,s,u;if(s=/(\d+)|(\D+)/g,i=/\d/,u=/^0/,"number"==typeof t||"number"==typeof e)return isNaN(t)?1:isNaN(e)?-1:t-e;if(n=String(t).toLowerCase(),o=String(e).toLowerCase(),n===o)return 0;if(!i.test(n)||!i.test(o))return n>o?1:-1;for(n=n.match(s),o=o.match(s)
 ;n.length&&o.length;)if(r=n.shift(),a=o.shift(),r!==a)return i.test(r)&&i.test(a)?r.replace(u,".0")-a.replace(u,".0"):r>a?1:-1;return n.length-o.length}}(this),t.pivotUtilities={aggregatorTemplates:s,aggregators:u,renderers:m,derivers:c,locales:p,naturalSort:d,numberFormat:f},a=function(){function e(t,n){this.getAggregator=r(this.getAggregator,this),this.getRowKeys=r(this.getRowKeys,this),this.getColKeys=r(this.getColKeys,this),this.sortKeys=r(this.sortKeys,this),this.arrSort=r(this.arrSort,this),this.natSort=r(this.natSort,this),this.aggregator=n.aggregator,this.aggregatorName=n.aggregatorName,this.colAttrs=n.cols,this.rowAttrs=n.rows,this.valAttrs=n.vals,this.tree={},this.rowKeys=[],this.colKeys=[],this.rowTotals={},this.colTotals={},this.allTotal=this.aggregator(this,[],[]),this.sorted=!1,e.forEachRecord(t,n.derivedAttributes,function(t){return function(e){return n.filter(e)?t.processRecord(e):void 0}}(this))}return e.forEachRecord=function(e,n,r){var a,i,s,u,l,c,p,h,d,f,g,m;if(a
 =t.isEmptyObject(n)?r:function(t){var e,o,a;for(e in n)o=n[e],t[e]=null!=(a=o(t))?a:t[e];return r(t)},t.isFunction(e))return e(a);if(t.isArray(e)){if(t.isArray(e[0])){g=[];for(s in e)if(o.call(e,s)&&(i=e[s],s>0)){c={},f=e[0];for(u in f)o.call(f,u)&&(l=f[u],c[l]=i[u]);g.push(a(c))}return g}for(m=[],h=0,d=e.length;d>h;h++)c=e[h],m.push(a(c));return m}if(e instanceof jQuery)return p=[],t("thead > tr > th",e).each(function(){return p.push(t(this).text())}),t("tbody > tr",e).each(function(){return c={},t("td",this).each(function(e){return c[p[e]]=t(this).text()}),a(c)});throw new Error("unknown input format")},e.convertToArray=function(t){var n;return n=[],e.forEachRecord(t,{},function(t){return n.push(t)}),n},e.prototype.natSort=function(t,e){return d(t,e)},e.prototype.arrSort=function(t,e){return this.natSort(t.join(),e.join())},e.prototype.sortKeys=function(){return this.sorted||(this.rowKeys.sort(this.arrSort),this.colKeys.sort(this.arrSort)),this.sorted=!0},e.prototype.getColKeys=fu
 nction(){return this.sortKeys(),this.colKeys},e.prototype.getRowKeys=function(){return this.sortKeys(),this.rowKeys},e.prototype.processRecord=function(t){var e,n,r,o,a,i,s,u,l,c,p,h,d;for(e=[],o=[],c=this.colAttrs,i=0,u=c.length;u>i;i++)a=c[i],e.push(null!=(p=t[a])?p:"null");for(h=this.rowAttrs,s=0,l=h.length;l>s;s++)a=h[s],o.push(null!=(d=t[a])?d:"null");return r=o.join(String.fromCharCode(0)),n=e.join(String.fromCharCode(0)),this.allTotal.push(t),0!==o.length&&(this.rowTotals[r]||(this.rowKeys.push(o),this.rowTotals[r]=this.aggregator(this,o,[])),this.rowTotals[r].push(t)),0!==e.length&&(this.colTotals[n]||(this.colKeys.push(e),this.colTotals[n]=this.aggregator(this,[],e)),this.colTotals[n].push(t)),0!==e.length&&0!==o.length?(this.tree[r]||(this.tree[r]={}),this.tree[r][n]||(this.tree[r][n]=this.aggregator(this,o,e)),this.tree[r][n].push(t)):void 0},e.prototype.getAggregator=function(t,e){var n,r,o;return o=t.join(String.fromCharCode(0)),r=e.join(String.fromCharCode(0)),n=0===t.
 length&&0===e.length?this.allTotal:0===t.length?this.colTotals[r]:0===e.length?this.rowTotals[o]:this.tree[o][r],null!=n?n:{value:function(){return null},format:function(){return""}}},e}(),g=function(e,n){var r,a,i,s,u,l,c,p,h,d,f,g,m,v,b,A,y,w,C,S,T;l={localeStrings:{totals:"Totals"}},n=t.extend(l,n),i=e.colAttrs,f=e.rowAttrs,m=e.getRowKeys(),u=e.getColKeys(),d=document.createElement("table"),d.className="pvtTable",v=function(t,e,n){var r,o,a,i,s,u;if(0!==e){for(o=!0,i=s=0;n>=0?n>=s:s>=n;i=n>=0?++s:--s)t[e-1][i]!==t[e][i]&&(o=!1);if(o)return-1}for(r=0;e+r<t.length;){for(a=!1,i=u=0;n>=0?n>=u:u>=n;i=n>=0?++u:--u)t[e][i]!==t[e+r][i]&&(a=!0);if(a)break;r++}return r};for(p in i)if(o.call(i,p)){a=i[p],w=document.createElement("tr"),0===parseInt(p)&&0!==f.length&&(A=document.createElement("th"),A.setAttribute("colspan",f.length),A.setAttribute("rowspan",i.length),w.appendChild(A)),A=document.createElement("th"),A.className="pvtAxisLabel",A.textContent=a,w.appendChild(A);for(c in u)o.call(
 u,c)&&(s=u[c],T=v(u,parseInt(c),parseInt(p)),-1!==T&&(A=document.createElement("th"),A.className="pvtColLabel",A.textContent=s[p],A.setAttribute("colspan",T),parseInt(p)===i.length-1&&0!==f.length&&A.setAttribute("rowspan",2),w.appendChild(A)));0===parseInt(p)&&(A=document.createElement("th"),A.className="pvtTotalLabel",A.innerHTML=n.localeStrings.totals,A.setAttribute("rowspan",i.length+(0===f.length?0:1)),w.appendChild(A)),d.appendChild(w)}if(0!==f.length){w=document.createElement("tr");for(c in f)o.call(f,c)&&(h=f[c],A=document.createElement("th"),A.className="pvtAxisLabel",A.textContent=h,w.appendChild(A));A=document.createElement("th"),0===i.length&&(A.className="pvtTotalLabel",A.innerHTML=n.localeStrings.totals),w.appendChild(A),d.appendChild(w)}for(c in m)if(o.call(m,c)){g=m[c],w=document.createElement("tr");for(p in g)o.call(g,p)&&(C=g[p],T=v(m,parseInt(c),parseInt(p)),-1!==T&&(A=document.createElement("th"),A.className="pvtRowLabel",A.textContent=C,A.setAttribute("rowspan",
 T),parseInt(p)===f.length-1&&0!==i.length&&A.setAttribute("colspan",2),w.appendChild(A)));for(p in u)o.call(u,p)&&(s=u[p],r=e.getAggregator(g,s),S=r.value(),b=document.createElement("td"),b.className="pvtVal row"+c+" col"+p,b.innerHTML=r.format(S),b.setAttribute("data-value",S),w.appendChild(b));y=e.getAggregator(g,[]),S=y.value(),b=document.createElement("td"),b.className="pvtTotal rowTotal",b.innerHTML=y.format(S),b.setAttribute("data-value",S),b.setAttribute("data-for","row"+c),w.appendChild(b),d.appendChild(w)}w=document.createElement("tr"),A=document.createElement("th"),A.className="pvtTotalLabel",A.innerHTML=n.localeStrings.totals,A.setAttribute("colspan",f.length+(0===i.length?0:1)),w.appendChild(A);for(p in u)o.call(u,p)&&(s=u[p],y=e.getAggregator([],s),S=y.value(),b=document.createElement("td"),b.className="pvtTotal colTotal",b.innerHTML=y.format(S),b.setAttribute("data-value",S),b.setAttribute("data-for","col"+p),w.appendChild(b));return y=e.getAggregator([],[]),S=y.value(
 ),b=document.createElement("td"),b.className="pvtGrandTotal",b.innerHTML=y.format(S),b.setAttribute("data-value",S),w.appendChild(b),d.appendChild(w),d.setAttribute("data-numrows",m.length),d.setAttribute("data-numcols",u.length),d},t.fn.pivot=function(e,n){var r,o,i,u,l;r={cols:[],rows:[],filter:function(){return!0},aggregator:s.count()(),aggregatorName:"Count",derivedAttributes:{},renderer:g,rendererOptions:null,localeStrings:p.en.localeStrings},n=t.extend(r,n),u=null;try{i=new a(e,n);try{u=n.renderer(i,n.rendererOptions)}catch(c){o=c,"undefined"!=typeof console&&null!==console&&console.error(o.stack),u=t("<span>").html(n.localeStrings.renderError)}}catch(c){o=c,"undefined"!=typeof console&&null!==console&&console.error(o.stack),u=t("<span>").html(n.localeStrings.computeError)}for(l=this[0];l.hasChildNodes();)l.removeChild(l.lastChild);return this.append(u)},t.fn.pivotUI=function(n,r,i,s){var u,l,c,h,f,g,m,v,b,A,y,w,C,S,T,x,N,F,E,D,O,R,L,k,M,I,K,q,U,V,j,H,B,P,J,_,z,Q,W;null==i&&(i
 =!1),null==s&&(s="en"),m={derivedAttributes:{},aggregators:p[s].aggregators,renderers:p[s].renderers,hiddenAttributes:[],menuLimit:200,cols:[],rows:[],vals:[],exclusions:{},unusedAttrsVertical:"auto",autoSortUnusedAttrs:!1,rendererOptions:{localeStrings:p[s].localeStrings},onRefresh:null,filter:function(){return!0},localeStrings:p[s].localeStrings},b=this.data("pivotUIOptions"),C=null==b||i?t.extend(m,r):b;try{n=a.convertToArray(n),D=function(){var t,e;t=n[0],e=[];for(w in t)o.call(t,w)&&e.push(w);return e}(),J=C.derivedAttributes;for(f in J)o.call(J,f)&&e.call(D,f)<0&&D.push(f);for(h={},K=0,j=D.length;j>K;K++)M=D[K],h[M]={};a.forEachRecord(n,C.derivedAttributes,function(t){var e,n,r;r=[];for(w in t)o.call(t,w)&&(e=t[w],C.filter(t)&&(null==e&&(e="null"),null==(n=h[w])[e]&&(n[e]=0),r.push(h[w][e]++)));return r}),L=t("<table cellpadding='5'>"),F=t("<td>"),N=t("<select class='pvtRenderer'>").appendTo(F).bind("change",function(){return T()}),_=C.renderers;for(M in _)o.call(_,M)&&t("<opt
 ion>").val(M).html(M).appendTo(N);if(g=t("<td class='pvtAxisContainer pvtUnused'>"),E=function(){var t,n,r;for(r=[],t=0,n=D.length;n>t;t++)f=D[t],e.call(C.hiddenAttributes,f)<0&&r.push(f);return r}(),k=!1,"auto"===C.unusedAttrsVertical){for(c=0,q=0,H=E.length;H>q;q++)u=E[q],c+=u.length;k=c>120}g.addClass(C.unusedAttrsVertical===!0||k?"pvtVertList":"pvtHorizList"),I=function(n){var r,o,a,i,s,u,l,c,p,f,m,v,b,y,S;if(l=function(){var t;t=[];for(w in h[n])t.push(w);return t}(),u=!1,v=t("<div>").addClass("pvtFilterBox").hide(),v.append(t("<h4>").text(""+n+" ("+l.length+")")),l.length>C.menuLimit)v.append(t("<p>").html(C.localeStrings.tooMany));else for(o=t("<p>").appendTo(v),o.append(t("<button>",{type:"button"}).html(C.localeStrings.selectAll).bind("click",function(){return v.find("input:visible").prop("checked",!0)})),o.append(t("<button>",{type:"button"}).html(C.localeStrings.selectNone).bind("click",function(){return v.find("input:visible").prop("checked",!1)})),o.append(t("<input>").
 addClass("pvtSearch").attr("placeholder",C.localeStrings.filterResults).bind("keyup",function(){var e;return e=t(this).val().toLowerCase(),t(this).parents(".pvtFilterBox").find("label span").each(function(){var n;return n=t(this).text().toLowerCase().indexOf(e),-1!==n?t(this).parent().show():t(this).parent().hide()})})),a=t("<div>").addClass("pvtCheckContainer").appendTo(v),S=l.sort(d),b=0,y=S.length;y>b;b++)w=S[b],m=h[n][w],i=t("<label>"),s=C.exclusions[n]?e.call(C.exclusions[n],w)>=0:!1,u||(u=s),t("<input type='checkbox' class='pvtFilter'>").attr("checked",!s).data("filter",[n,w]).appendTo(i),i.append(t("<span>").text(""+w+" ("+m+")")),a.append(t("<p>").append(i));return f=function(){var e;return e=t(v).find("[type='checkbox']").length-t(v).find("[type='checkbox']:checked").length,e>0?r.addClass("pvtFilteredAttribute"):r.removeClass("pvtFilteredAttribute"),l.length>C.menuLimit?v.toggle():v.toggle(0,T)},t("<p>").appendTo(v).append(t("<button>",{type:"button"}).text("OK").bind("clic
 k",f)),c=function(e){return v.css({left:e.pageX,top:e.pageY}).toggle(),t(".pvtSearch").val(""),t("label").show()},p=t("<span class='pvtTriangle'>").html(" &#x25BE;").bind("click",c),r=t("<li class='axis_"+A+"'>").append(t("<span class='pvtAttr'>").text(n).data("attrName",n).append(p)),u&&r.addClass("pvtFilteredAttribute"),g.append(r).append(v),r.bind("dblclick",c)};for(A in E)f=E[A],I(f);O=t("<tr>").appendTo(L),l=t("<select class='pvtAggregator'>").bind("change",function(){return T()}),z=C.aggregators;for(M in z)o.call(z,M)&&l.append(t("<option>").val(M).html(M));for(t("<td class='pvtVals'>").appendTo(O).append(l).append(t("<br>")),t("<td class='pvtAxisContainer pvtHorizList pvtCols'>").appendTo(O),R=t("<tr>").appendTo(L),R.append(t("<td valign='top' class='pvtAxisContainer pvtRows'>")),S=t("<td valign='top' class='pvtRendererArea'>").appendTo(R),C.unusedAttrsVertical===!0||k?(L.find("tr:nth-child(1)").prepend(F),L.find("tr:nth-child(2)").prepend(g)):L.prepend(t("<tr>").append(F).ap
 pend(g)),this.html(L),Q=C.cols,U=0,B=Q.length;B>U;U++)M=Q[U],this.find(".pvtCols").append(this.find(".axis_"+E.indexOf(M)));for(W=C.rows,V=0,P=W.length;P>V;V++)M=W[V],this.find(".pvtRows").append(this.find(".axis_"+E.indexOf(M)));null!=C.aggregatorName&&this.find(".pvtAggregator").val(C.aggregatorName),null!=C.rendererName&&this.find(".pvtRenderer").val(C.rendererName),y=!0,x=function(r){return function(){var o,a,i,s,u,c,p,h,d,f,g,m,v,b;if(h={derivedAttributes:C.derivedAttributes,localeStrings:C.localeStrings,rendererOptions:C.rendererOptions,cols:[],rows:[]},u=null!=(b=C.aggregators[l.val()]([])().numInputs)?b:0,f=[],r.find(".pvtRows li span.pvtAttr").each(function(){return h.rows.push(t(this).data("attrName"))}),r.find(".pvtCols li span.pvtAttr").each(function(){return h.cols.push(t(this).data("attrName"))}),r.find(".pvtVals select.pvtAttrDropdown").each(function(){return 0===u?t(this).remove():(u--,""!==t(this).val()?f.push(t(this).val()):void 0)}),0!==u)for(p=r.find(".pvtVals"),
 M=m=0;u>=0?u>m:m>u;M=u>=0?++m:--m){for(s=t("<select class='pvtAttrDropdown'>").append(t("<option>")).bind("change",function(){return T()}),v=0,g=E.length;g>v;v++)o=E[v],s.append(t("<option>").val(o).text(o));p.append(s)}return y&&(f=C.vals,A=0,r.find(".pvtVals select.pvtAttrDropdown").each(function(){return t(this).val(f[A]),A++}),y=!1),h.aggregatorName=l.val(),h.vals=f,h.aggregator=C.aggregators[l.val()](f),h.renderer=C.renderers[N.val()],a={},r.find("input.pvtFilter").not(":checked").each(function(){var e;return e=t(this).data("filter"),null!=a[e[0]]?a[e[0]].push(e[1]):a[e[0]]=[e[1]]}),h.filter=function(t){var n,r;if(!C.filter(t))return!1;for(w in a)if(n=a[w],r=""+t[w],e.call(n,r)>=0)return!1;return!0},S.pivot(n,h),c=t.extend(C,{cols:h.cols,rows:h.rows,vals:f,exclusions:a,aggregatorName:l.val(),rendererName:N.val()}),r.data("pivotUIOptions",c),C.autoSortUnusedAttrs&&(i=t.pivotUtilities.naturalSort,d=r.find("td.pvtUnused.pvtAxisContainer"),t(d).children("li").sort(function(e,n){ret
 urn i(t(e).text(),t(n).text())}).appendTo(d)),S.css("opacity",1),null!=C.onRefresh?C.onRefresh(c):void 0}}(this),T=function(){return function(){return S.css("opacity",.5),setTimeout(x,10)}}(this),T(),this.find(".pvtAxisContainer").sortable({update:function(t,e){return null==e.sender?T():void 0},connectWith:this.find(".pvtAxisContainer"),items:"li",placeholder:"pvtPlaceholder"})}catch(Y){v=Y,"undefined"!=typeof console&&null!==console&&console.error(v.stack),this.html(C.localeStrings.uiRenderError)}return this},t.fn.heatmap=function(e){var n,r,o,a,i,s,u,l;switch(null==e&&(e="heatmap"),s=this.data("numrows"),i=this.data("numcols"),n=function(t,e,n){var r;return r=function(){switch(t){case"red":return function(t){return"ff"+t+t};case"green":return function(t){return""+t+"ff"+t};case"blue":return function(t){return""+t+t+"ff"}}}(),function(t){var o,a;return a=255-Math.round(255*(t-e)/(n-e)),o=a.toString(16).split(".")[0],1===o.length&&(o=0+o),r(o)}},r=function(e){return function(r,o){va
 r a,i,s;return i=function(n){return e.find(r).each(function(){var e;return e=t(this).data("value"),null!=e&&isFinite(e)?n(e,t(this)):void 0})},s=[],i(function(t){return s.push(t)}),a=n(o,Math.min.apply(Math,s),Math.max.apply(Math,s)),i(function(t,e){return e.css("background-color","#"+a(t))})}}(this),e){case"heatmap":r(".pvtVal","red");break;case"rowheatmap":for(o=u=0;s>=0?s>u:u>s;o=s>=0?++u:--u)r(".pvtVal.row"+o,"red");break;case"colheatmap":for(a=l=0;i>=0?i>l:l>i;a=i>=0?++l:--l)r(".pvtVal.col"+a,"red")}return r(".pvtTotal.rowTotal","red"),r(".pvtTotal.colTotal","red"),this},t.fn.barchart=function(){var e,n,r,o,a;for(o=this.data("numrows"),r=this.data("numcols"),e=function(e){return function(n){var r,o,a,i;return r=function(r){return e.find(n).each(function(){var e;return e=t(this).data("value"),null!=e&&isFinite(e)?r(e,t(this)):void 0})},i=[],r(function(t){return i.push(t)}),o=Math.max.apply(Math,i),a=function(t){return 100*t/(1.4*o)},r(function(e,n){var r,o;return r=n.text(),o=t(
 "<div>").css({position:"relative",height:"55px"}),o.append(t("<div>").css({position:"absolute",bottom:0,left:0,right:0,height:a(e)+"%","background-color":"gray"})),o.append(t("<div>").text(r).css({position:"relative","padding-left":"5px","padding-right":"5px"})),n.css({padding:0,"padding-top":"5px","text-align":"center"}).html(o)})}}(this),n=a=0;o>=0?o>a:a>o;n=o>=0?++a:--a)e(".pvtVal.row"+n);return e(".pvtTotal.colTotal"),this}})}).call(this);
+//# sourceMappingURL=pivot.min.js.map
\ No newline at end of file