jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1566117 - in /jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki: build/Builder.java server/DataService.java server/OperationName.java servlets/ActionSPARQL.java validation/DataValidator.java
Date Sat, 08 Feb 2014 20:18:02 GMT
Author: andy
Date: Sat Feb  8 20:18:01 2014
New Revision: 1566117

URL: http://svn.apache.org/r1566117
Log:
Repair dispatch for quad operations

Modified:
    jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/build/Builder.java
    jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/DataService.java
    jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/OperationName.java
    jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java
    jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java

Modified: jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/build/Builder.java
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/build/Builder.java?rev=1566117&r1=1566116&r2=1566117&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/build/Builder.java
(original)
+++ jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/build/Builder.java
Sat Feb  8 20:18:01 2014
@@ -82,7 +82,10 @@ public class Builder
         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.
@@ -102,12 +105,14 @@ public class Builder
         addServiceEP(dataService, OperationName.Query, "query") ;
         addServiceEP(dataService, OperationName.Query, "sparql") ;
         if ( ! allowUpdate ) {
+            addServiceEP(dataService, OperationName.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 ;
     }
 
@@ -133,7 +138,7 @@ public class Builder
             QuerySolution soln = rs.next() ;
             String epName = soln.getLiteral("ep").getLexicalForm() ;
             Endpoint operation = new Endpoint(opName, epName) ;
-            dataService.addEndpoint(opName, epName); 
+            addServiceEP(dataService, opName, epName); 
             //log.info("  " + opName.name + " = " + dataAccessPoint.getName() + "/" + epName)
;
         }
     }

Modified: jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/DataService.java
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/DataService.java?rev=1566117&r1=1566116&r2=1566117&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/DataService.java
(original)
+++ jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/DataService.java
Sat Feb  8 20:18:01 2014
@@ -21,10 +21,7 @@ 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.Collection ;
-import java.util.HashMap ;
-import java.util.List ;
-import java.util.Map ;
+import java.util.* ;
 import java.util.concurrent.atomic.AtomicBoolean ;
 import java.util.concurrent.atomic.AtomicLong ;
 
@@ -82,9 +79,9 @@ public class DataService { //implements 
     }
     
     public void addEndpoint(OperationName operationName, String endpointName) {
-        Endpoint oper = new Endpoint(operationName, endpointName) ;
-        endpoints.put(endpointName, oper) ;
-        operations.put(operationName, oper);
+        Endpoint endpoint = new Endpoint(operationName, endpointName) ;
+        endpoints.put(endpointName, endpoint) ;
+        operations.put(operationName, endpoint);
     }
     
     public Endpoint getOperation(String endpointName) {
@@ -92,7 +89,10 @@ public class DataService { //implements 
     }
 
     public List<Endpoint> getOperation(OperationName opName) {
-        return operations.get(opName) ;
+        List<Endpoint> x = operations.get(opName) ;
+        if ( x == null )
+            x = Collections.emptyList() ;
+        return x ;  
     }
 
     /** Return the OperationNames available here.

Modified: jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/OperationName.java
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/OperationName.java?rev=1566117&r1=1566116&r2=1566117&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/OperationName.java
(original)
+++ jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/server/OperationName.java
Sat Feb  8 20:18:01 2014
@@ -25,7 +25,8 @@ public enum OperationName {
     Update("update"),
     Upload("upload"),
     GSP("graph store protocol"),
-    GSP_R("graph store protocol (Read)")
+    GSP_R("graph store protocol (Read)"),
+    Quads("Quads")
     ;
     
     public final String name ;

Modified: jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java?rev=1566117&r1=1566116&r2=1566117&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java
(original)
+++ jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ActionSPARQL.java
Sat Feb  8 20:18:01 2014
@@ -71,6 +71,9 @@ public abstract class ActionSPARQL exten
         String uri = action.request.getRequestURI() ;
         String operationName = ActionLib.mapRequestToOperation(dataAccessPoint, uri, datasetUri)
;
         action.setRequest(dataAccessPoint, dSrv) ;
+        
+        //operationName = ""
+        
         Endpoint op = dSrv.getOperation(operationName) ;
         action.setEndpoint(op, operationName);
         executeAction(action) ;

Modified: jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java?rev=1566117&r1=1566116&r2=1566117&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java
(original)
+++ jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java
Sat Feb  8 20:18:01 2014
@@ -103,7 +103,7 @@ public class DataValidator extends Valid
     // Error handler that records messages
     private static class ErrorHandlerMsg implements ErrorHandler
     {
-        private List<String> messages = new ArrayList<String>() ;
+        private List<String> messages = new ArrayList<>() ;
 
         ErrorHandlerMsg(List<String> messages) { this.messages = messages; }
         



Mime
View raw message