jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject jena git commit: Correct triples2quadsDftGraph - quads should be Quad.defaultGraphIRI.
Date Mon, 16 Nov 2015 12:22:12 GMT
Repository: jena
Updated Branches:
  refs/heads/master f00e659c5 -> 7b105460c


Correct triples2quadsDftGraph - quads should be Quad.defaultGraphIRI.


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

Branch: refs/heads/master
Commit: 7b105460c1a3cb9c01dc276a66f6f3cd71aaf92c
Parents: f00e659
Author: Andy Seaborne <andy@apache.org>
Authored: Mon Nov 16 11:46:57 2015 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Mon Nov 16 11:46:57 2015 +0000

----------------------------------------------------------------------
 .../apache/jena/sparql/core/DatasetGraphBase.java    | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/7b105460/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphBase.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphBase.java
index bd87c82..4c4c8f1 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphBase.java
@@ -178,15 +178,16 @@ abstract public class DatasetGraphBase implements DatasetGraph
 
     // Helpers
     
-    protected static Iterator<Quad> triples2quadsDftGraph(Iterator<Triple> iter)
-    {
-        //return triples2quads(Quad.defaultGraphIRI, iter) ;
-        return triples2quads(Quad.defaultGraphNodeGenerated, iter) ;
-        //return triples2quads(Quad.tripleInQuad, iter) ;
+    /** Convert an iterator of triples into quads for the default graph.
+     * This is {@link Quad#defaultGraphIRI}, not {@link Quad#defaultGraphNodeGenerated},
+     * which is for quads outside a dataset, usually the output of parsers. 
+     */
+    protected static Iterator<Quad> triples2quadsDftGraph(Iterator<Triple> iter)
{
+        return triples2quads(Quad.defaultGraphIRI, iter) ;
     }
 
-    protected static Iter<Quad> triples2quads(final Node graphNode, Iterator<Triple>
iter)
-    {
+    /** Convert an iterator of triples into quads for the specificed graph name. */
+    protected static Iter<Quad> triples2quads(final Node graphNode, Iterator<Triple>
iter) {
         return Iter.iter(iter).map(t -> new Quad(graphNode, t)) ;
     }
 


Mime
View raw message