jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [3/6] jena git commit: Use RDFParser+streamManager().
Date Sun, 04 Jun 2017 08:02:17 GMT
Use RDFParser+streamManager().

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

Branch: refs/heads/master
Commit: 52068f1fb7bcf9f5369b2f88ac1b165a01eae931
Parents: fb95291
Author: Andy Seaborne <andy@apache.org>
Authored: Sat Jun 3 22:54:58 2017 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Sat Jun 3 22:54:58 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java  | 8 ++------
 .../java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java  | 5 +----
 2 files changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/52068f1f/jena-fuseki1/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java
----------------------------------------------------------------------
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java
b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java
index 3ccc9c1..3f226b0 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/migrate/GraphLoadUtils.java
@@ -19,13 +19,12 @@
 
 package org.apache.jena.fuseki.migrate;
 
-import org.apache.jena.atlas.web.TypedInputStream ;
 import org.apache.jena.fuseki.Fuseki ;
 import org.apache.jena.graph.Factory ;
 import org.apache.jena.graph.Graph ;
 import org.apache.jena.rdf.model.Model ;
 import org.apache.jena.rdf.model.ModelFactory ;
-import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.RDFParser;
 import org.apache.jena.riot.system.StreamRDF ;
 import org.apache.jena.riot.system.StreamRDFLib ;
 
@@ -65,11 +64,8 @@ public class GraphLoadUtils
     // ** 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 SinkRDFLimited(sink, limit) ;
-
-        TypedInputStream input = Fuseki.webStreamManager.open(uri) ;
-        RDFDataMgr.parse(sink, input, uri) ;
+        RDFParser.source(uri).streamManager(Fuseki.webStreamManager).parse(sink);
     }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/52068f1f/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
index 020065f..4e4c837 100644
--- 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
@@ -19,7 +19,6 @@
 
 package org.apache.jena.fuseki.migrate;
 
-import org.apache.jena.atlas.web.TypedInputStream ;
 import org.apache.jena.fuseki.Fuseki ;
 import org.apache.jena.graph.Factory ;
 import org.apache.jena.graph.Graph ;
@@ -65,10 +64,8 @@ public class GraphLoadUtils
     // ** 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) ;
-        RDFParser.source(input).base(uri).parse(sink);
+        RDFParser.source(uri).streamManager(Fuseki.webStreamManager).parse(sink);
     }
 }


Mime
View raw message