You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/05/04 21:04:34 UTC
jena git commit: JENA-932: Look for fuseki:Service if no services
list found.
Repository: jena
Updated Branches:
refs/heads/master 547b50a16 -> 225737741
JENA-932: Look for fuseki:Service if no services list found.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/22573774
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/22573774
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/22573774
Branch: refs/heads/master
Commit: 2257377413564fb381d1bb1ec8ca8c33c91ce69b
Parents: 547b50a
Author: Andy Seaborne <an...@apache.org>
Authored: Mon May 4 20:04:28 2015 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon May 4 20:04:28 2015 +0100
----------------------------------------------------------------------
.../java/org/apache/jena/fuseki/build/FusekiConfig.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/22573774/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
index c940321..e7cf42b 100644
--- 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
@@ -124,7 +124,7 @@ public class FusekiConfig {
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) ;
+ ResultSet rs = FusekiLib.query("SELECT * { ?s fu:services [ list:member ?service ] }", model) ;
// If the old config.ttl file becomes just the server configuration file,
// then don't warn here.
// if ( !rs.hasNext() )
@@ -132,12 +132,18 @@ public class FusekiConfig {
List<DataAccessPoint> accessPoints = new ArrayList<>() ;
+ if ( ! rs.hasNext() )
+ // No "fu:services ( .... )" so try looking for services directly.
+ // This means Fuseki2, service configuration files (no server section) work for --conf.
+ rs = FusekiLib.query("SELECT ?service { ?service a fu:Service }", model) ;
+
for ( ; rs.hasNext() ; ) {
QuerySolution soln = rs.next() ;
- Resource svc = soln.getResource("member") ;
+ Resource svc = soln.getResource("service") ;
DataAccessPoint acc = Builder.buildDataAccessPoint(svc) ;
accessPoints.add(acc) ;
}
+
return accessPoints ;
}