You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2020/09/09 22:05:50 UTC

[GitHub] [jena] kinow commented on a change in pull request #794: JENA-1960: Clean up Fuseki dispatch

kinow commented on a change in pull request #794:
URL: https://github.com/apache/jena/pull/794#discussion_r485947244



##########
File path: jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
##########
@@ -455,17 +456,54 @@ private static DataService buildDataService(Resource fusekiService, DatasetDescr
         accEndpointOldStyle(endpoints1, Operation.GSP_R,    fusekiService,  pServiceReadGraphStoreEP);
         accEndpointOldStyle(endpoints1, Operation.GSP_RW,   fusekiService,  pServiceReadWriteGraphStoreEP);
 
+        // ---- Legacy for old style: a request wouls also try the dataset (i.e. no endpoint name).
+        // If "sparql" then allow /dataset?query=
+        // Instead, for old style declarations, add new endpoints to put on the dataset
+        // Only complication is that authorization is the AND (all say "yes") of named service authorization.
+        {
+            Collection<Endpoint> endpointsCompat = oldStyleCompat(dataService, endpoints1);
+            endpointsCompat.forEach(dataService::addEndpoint);
+        }
+        endpoints1.forEach(dataService::addEndpoint);
+
         // New (2019) style
         // fuseki:endpoint [ fuseki:operation fuseki:query ; fuseki:name "" ; fuseki:allowedUsers (....) ] ;
         //   and more.
-        accFusekiEndpoints(endpoints2, fusekiService, dsDescMap);
 
-        endpoints1.forEach(dataService::addEndpoint);
+        accFusekiEndpoints(endpoints2, fusekiService, dsDescMap);
         // This will overwrite old style entries of the same fuseki:name.
         endpoints2.forEach(dataService::addEndpoint);
+
         return dataService;
     }
 
+    /**
+     *  Old style compatibility.
+     *  For each endpoint in "endpoints1", ensure there is a endpoint on the dataset 9endpoint name "") itself.

Review comment:
       "an endpoint", and s/9endpoint/(endpoint.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org