jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/3] jena git commit: Provide reading and creating DataAccessPoints from a single file.
Date Fri, 05 Aug 2016 20:55:51 GMT
Provide reading and creating DataAccessPoints from a single file.

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

Branch: refs/heads/master
Commit: 5235b5f6f28efd931d2e7eb4f8e347f5aaa31749
Parents: 2a19e1a
Author: Andy Seaborne <andy@apache.org>
Authored: Fri Aug 5 20:06:39 2016 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Fri Aug 5 20:06:39 2016 +0100

----------------------------------------------------------------------
 .../org/apache/jena/fuseki/build/FusekiConfig.java   | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/5235b5f6/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 f7908fb..5082bf0 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
@@ -71,7 +71,7 @@ public class FusekiConfig {
     } ;
     
     /** Has side effects in server setup */
-    public static List<DataAccessPoint> readConfigFile(String filename) {
+    public static List<DataAccessPoint> readServerConfigFile(String filename) {
         // Old-style config file.
         Model model = readAssemblerFile(filename) ;
         if ( model.size() == 0 )
@@ -209,6 +209,19 @@ public class FusekiConfig {
         return dataServiceRef ;
     }
 
+    /** Read and process one file */ 
+    public static  List<DataAccessPoint> readConfigurationFile(String fn) {
+        List<DataAccessPoint> acc = new ArrayList<>() ;
+        Model m = readAssemblerFile(fn) ;
+        DatasetDescriptionRegistry dsDescMap = new DatasetDescriptionRegistry() ;
+        readConfiguration(m, dsDescMap, acc) ;
+        return acc ;
+    }
+    
+    /** Read a configuration in a model.
+     * Allow dataset descriptions to be carried over from anothe rplace.
+     * Add to a list. 
+     */
     private static void readConfiguration(Model m, DatasetDescriptionRegistry dsDescMap,
List<DataAccessPoint> dataServiceRef) {
         List<Resource> services = getByType(FusekiVocab.fusekiService, m) ; 
 


Mime
View raw message