jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [03/16] jena git commit: JENA-491 Fuseki Support: Add support of exeConstructDataset() of QueryEngineHTTP
Date Thu, 20 Aug 2015 11:08:34 GMT
JENA-491 Fuseki Support: Add support of exeConstructDataset() of
QueryEngineHTTP

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

Branch: refs/heads/JENA-491-construct-quads
Commit: 2bc9fe621fbeede59885aada83ae361747513b8e
Parents: 5939a35
Author: confidencesun <confidence.sun@gmail.com>
Authored: Mon Aug 17 21:45:05 2015 +0800
Committer: confidencesun <confidence.sun@gmail.com>
Committed: Mon Aug 17 21:45:05 2015 +0800

----------------------------------------------------------------------
 .../jena/sparql/engine/http/QueryEngineHTTP.java   | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/2bc9fe62/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
b/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
index cab831f..84c2c10 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
@@ -36,6 +36,8 @@ import org.apache.jena.rdf.model.Model ;
 import org.apache.jena.riot.* ;
 import org.apache.jena.riot.web.HttpOp ;
 import org.apache.jena.sparql.ARQException ;
+import org.apache.jena.sparql.core.DatasetGraph;
+import org.apache.jena.sparql.core.DatasetGraphFactory;
 import org.apache.jena.sparql.core.Quad;
 import org.apache.jena.sparql.engine.ResultSetCheckCondition ;
 import org.apache.jena.sparql.graph.GraphFactory ;
@@ -399,7 +401,20 @@ public class QueryEngineHTTP implements QueryExecution {
     
     @Override
     public Dataset execConstructDataset(){
-    	return null;
+    	
+    	DatasetGraph graph = DatasetGraphFactory.createMem();
+    	
+        checkNotClosed() ;
+        try
+        {
+        	execConstructQuads().forEachRemaining(graph::add);
+        }
+        finally
+        {
+            this.close();
+        }
+        return DatasetFactory.create(graph);
+
     }
 
     @Override


Mime
View raw message