You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/11/16 23:13:03 UTC

[08/10] jena git commit: JENA-1068: DatasetGraphSDB to use DatasetGraphTriplesQuads.

JENA-1068: DatasetGraphSDB to use DatasetGraphTriplesQuads.

DatasetGraphCaching removed.
Helper code from DatasetGraphCaching moved locally.


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

Branch: refs/heads/master
Commit: e5adf6249f4ffd38af3bb5632af5278abd2ca821
Parents: d687688
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Nov 16 17:53:33 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Nov 16 21:44:07 2015 +0000

----------------------------------------------------------------------
 .../apache/jena/sdb/store/DatasetGraphSDB.java   | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/e5adf624/jena-sdb/src/main/java/org/apache/jena/sdb/store/DatasetGraphSDB.java
----------------------------------------------------------------------
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/store/DatasetGraphSDB.java b/jena-sdb/src/main/java/org/apache/jena/sdb/store/DatasetGraphSDB.java
index c6f045a..c448f87 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/store/DatasetGraphSDB.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/store/DatasetGraphSDB.java
@@ -31,20 +31,21 @@ import org.apache.jena.sdb.util.StoreUtils ;
 import org.apache.jena.shared.Lock ;
 import org.apache.jena.shared.LockMRSW ;
 import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.sparql.core.DatasetGraphCaching ;
+import org.apache.jena.sparql.core.DatasetGraphTriplesQuads ;
 import org.apache.jena.sparql.core.Quad ;
 import org.apache.jena.sparql.util.Context ;
 
-public class DatasetGraphSDB extends DatasetGraphCaching
+public class DatasetGraphSDB extends DatasetGraphTriplesQuads
     implements DatasetGraph, Closeable 
 {
     private final Store store ;
     private Lock lock = new LockMRSW() ;
     private final Context context ;
+    private GraphSDB defaultGraph;
     
     public DatasetGraphSDB(Store store, Context context)
     {
-        this(store, null, context) ;
+        this(store, new GraphSDB(store), context) ;
     }
     
     public DatasetGraphSDB(Store store, GraphSDB graph, Context context)
@@ -64,23 +65,23 @@ public class DatasetGraphSDB extends DatasetGraphCaching
     }
 
     @Override
-    protected boolean _containsGraph(Node graphNode)
+    public boolean containsGraph(Node graphNode)
     {
         return StoreUtils.containsGraph(store, graphNode) ;
     }
 
     @Override
-    protected Graph _createDefaultGraph()
+    public Graph getDefaultGraph()
     {
-        return new GraphSDB(store) ;
+        return defaultGraph ;
     }
 
     @Override
-    protected Graph _createNamedGraph(Node graphNode)
+    public Graph getGraph(Node graphNode)
     {
         return new GraphSDB(store, graphNode) ;
     }
-
+    
     // Use unsubtle helper versions (the bulk loader copes with large additions).
     @Override
     protected void addToDftGraph(Node s, Node p, Node o)
@@ -111,7 +112,7 @@ public class DatasetGraphSDB extends DatasetGraphCaching
     { return Helper.findInSpecificNamedGraph(this, g, s, p, o) ; }
 
     @Override
-    protected void _close()
+    public void close()
     { store.close() ; }
 
     // Helper implementations of operations.