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: JENA-1119: Add prefixes to the resulting dataset for construct-quads.
Date Sun, 17 Jan 2016 17:53:41 GMT
JENA-1119: Add prefixes to the resulting dataset for construct-quads.

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

Branch: refs/heads/master
Commit: d3ae834917470cc1997b75b0efd7a46589694804
Parents: e601bda
Author: Andy Seaborne <andy@apache.org>
Authored: Sun Jan 17 17:44:12 2016 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Sun Jan 17 17:50:50 2016 +0000

----------------------------------------------------------------------
 .../java/org/apache/jena/sparql/engine/QueryExecutionBase.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/d3ae8349/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryExecutionBase.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryExecutionBase.java
b/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryExecutionBase.java
index 957c7e2..a32b207 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryExecutionBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryExecutionBase.java
@@ -271,6 +271,7 @@ public class QueryExecutionBase implements QueryExecution
         DatasetGraph dsg = dataset.asDatasetGraph() ; 
         try {
             execConstructQuads().forEachRemaining(dsg::add);
+            insertPrefixesInto(dataset);
         } finally {
             this.close();
         }
@@ -603,6 +604,10 @@ public class QueryExecutionBase implements QueryExecution
         }
     }
 
+    private void insertPrefixesInto(Dataset ds) {
+        insertPrefixesInto(ds.getDefaultModel()) ;
+    }
+    
     static private String labelForQuery(Query q)
     {
         if ( q.isSelectType() )     return "SELECT" ; 


Mime
View raw message