jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cla...@apache.org
Subject [08/50] [abbrv] jena git commit: JENA-926: Remove all use of GraphStore.
Date Sat, 16 May 2015 08:58:50 GMT
http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-arq/src/main/java/org/apache/jena/update/UpdateExecutionFactory.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/update/UpdateExecutionFactory.java b/jena-arq/src/main/java/org/apache/jena/update/UpdateExecutionFactory.java
index eaa106a..38da497 100644
--- a/jena-arq/src/main/java/org/apache/jena/update/UpdateExecutionFactory.java
+++ b/jena-arq/src/main/java/org/apache/jena/update/UpdateExecutionFactory.java
@@ -18,9 +18,11 @@
 
 package org.apache.jena.update;
 
-import org.apache.jena.atlas.web.auth.HttpAuthenticator;
+import org.apache.jena.atlas.web.auth.HttpAuthenticator ;
 import org.apache.jena.query.ARQ ;
+import org.apache.jena.query.Dataset ;
 import org.apache.jena.query.QuerySolution ;
+import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.engine.binding.Binding ;
 import org.apache.jena.sparql.engine.binding.BindingUtils ;
 import org.apache.jena.sparql.modify.* ;
@@ -29,200 +31,247 @@ import org.apache.jena.sparql.util.Context ;
 /** Create UpdateProcessors (one-time executions of a SPARQL Update request) */
 public class UpdateExecutionFactory
 {
-
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
      * @param update
-     * @param graphStore
+     * @param dataset
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessor create(Update update, GraphStore graphStore)
+    public static UpdateProcessor create(Update update, Dataset dataset)
     {
-        return create(new UpdateRequest(update), graphStore, (Binding)null) ;
+        return create(new UpdateRequest(update), dataset) ;
     }
     
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
      * @param update
-     * @param graphStore
-     * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
+     * @param datasetGraph
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessor create(Update update, GraphStore graphStore, QuerySolution inputBinding)
+    public static UpdateProcessor create(Update update, DatasetGraph datasetGraph)
     {
-        return create(update, graphStore, BindingUtils.asBinding(inputBinding)) ;
+        return create(new UpdateRequest(update), datasetGraph) ;
     }
 
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
      * @param update
-     * @param graphStore
+     * @param dataset
      * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessor create(Update update, GraphStore graphStore, Binding inputBinding)
+    public static UpdateProcessor create(Update update, Dataset dataset, QuerySolution inputBinding)
     {
-        return create(new UpdateRequest(update), graphStore, inputBinding) ;
+        return create(update, dataset.asDatasetGraph(), BindingUtils.asBinding(inputBinding)) ;
     }
 
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
+     * @param update
+     * @param datasetGraph
+     * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
+     * @return UpdateProcessor or null
+     */
+    public static UpdateProcessor create(Update update, DatasetGraph datasetGraph, Binding inputBinding)
+    {
+        return create(new UpdateRequest(update), datasetGraph, inputBinding) ;
+    }
 
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
      * @param updateRequest
-     * @param graphStore
+     * @param dataset
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessor create(UpdateRequest updateRequest, GraphStore graphStore)
+    public static UpdateProcessor create(UpdateRequest updateRequest, Dataset dataset)
     {        
-        return make(updateRequest, graphStore, null, null) ;
+        return make(updateRequest, dataset.asDatasetGraph(), null, null) ;
     }
     
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
      * @param updateRequest
-     * @param graphStore
+     * @param datasetGraph
+     * @return UpdateProcessor or null
+     */
+    public static UpdateProcessor create(UpdateRequest updateRequest, DatasetGraph datasetGraph)
+    {        
+        return make(updateRequest, datasetGraph, null, null) ;
+    }
+
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
+     * @param updateRequest
+     * @param dataset
      * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessor create(UpdateRequest updateRequest, GraphStore graphStore, QuerySolution inputBinding)
+    public static UpdateProcessor create(UpdateRequest updateRequest, Dataset dataset, QuerySolution inputBinding)
     {        
-        return create(updateRequest, graphStore, BindingUtils.asBinding(inputBinding)) ;
+        return create(updateRequest, dataset.asDatasetGraph(), BindingUtils.asBinding(inputBinding)) ;
     }
     
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
      * @param updateRequest
-     * @param graphStore
+     * @param datasetGraph
      * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessor create(UpdateRequest updateRequest, GraphStore graphStore, Binding inputBinding)
+    public static UpdateProcessor create(UpdateRequest updateRequest, DatasetGraph datasetGraph, Binding inputBinding)
     {        
-        return make(updateRequest, graphStore, inputBinding, null) ;
+        return make(updateRequest, datasetGraph, inputBinding, null) ;
     }
     
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
-     * @param graphStore
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
+     * @param dataset
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessorStreaming createStreaming(GraphStore graphStore)
+    public static UpdateProcessorStreaming createStreaming(Dataset dataset)
     {        
-        return makeStreaming(graphStore, null, null) ;
+        return makeStreaming(dataset.asDatasetGraph(), null, null) ;
     }
     
-    
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
-     * @param graphStore
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
+     * @param datasetGraph
+     * @return UpdateProcessor or null
+     */
+    public static UpdateProcessorStreaming createStreaming(DatasetGraph datasetGraph)
+    {        
+        return makeStreaming(datasetGraph, null, null) ;
+    }
+
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
+     * @param dataset
      * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessorStreaming createStreaming(GraphStore graphStore, QuerySolution inputBinding)
+    public static UpdateProcessorStreaming createStreaming(Dataset dataset, QuerySolution inputBinding)
     {        
-        return createStreaming(graphStore, BindingUtils.asBinding(inputBinding)) ;
+        return createStreaming(dataset.asDatasetGraph(), BindingUtils.asBinding(inputBinding)) ;
     }
 
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
-     * @param graphStore
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
+     * @param datasetGraph
      * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessorStreaming createStreaming(GraphStore graphStore, Binding inputBinding)
+    public static UpdateProcessorStreaming createStreaming(DatasetGraph datasetGraph, Binding inputBinding)
+    {        
+        return makeStreaming(datasetGraph, inputBinding, null) ;
+    }
+    
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
+     * @param dataset
+     * @param context  (null means use merge of global and graph store context))
+     * @return UpdateProcessor or null
+     */
+    public static UpdateProcessorStreaming createStreaming(Dataset dataset, Context context)
     {        
-        return makeStreaming(graphStore, inputBinding, null) ;
+        return makeStreaming(dataset.asDatasetGraph(), null, context) ;
     }
     
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
-     * @param graphStore
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
+     * @param datasetGraph
      * @param context  (null means use merge of global and graph store context))
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessorStreaming createStreaming(GraphStore graphStore, Context context)
+    public static UpdateProcessorStreaming createStreaming(DatasetGraph datasetGraph, Context context)
     {        
-        return makeStreaming(graphStore, null, context) ;
+        return makeStreaming(datasetGraph, null, context) ;
     }
     
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
-     * @param graphStore
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
+     * @param dataset
      * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
      * @param context  (null means use merge of global and graph store context))
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessorStreaming createStreaming(GraphStore graphStore, QuerySolution inputBinding, Context context)
+    public static UpdateProcessorStreaming createStreaming(Dataset dataset, QuerySolution inputBinding, Context context)
     {        
-        return createStreaming(graphStore, BindingUtils.asBinding(inputBinding), context) ;
+        return createStreaming(dataset.asDatasetGraph(), BindingUtils.asBinding(inputBinding), context) ;
     }
     
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
-     * @param graphStore
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
+     * @param datasetGraph
      * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
      * @param context  (null means use merge of global and graph store context))
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessorStreaming createStreaming(GraphStore graphStore, Binding inputBinding, Context context)
+    public static UpdateProcessorStreaming createStreaming(DatasetGraph datasetGraph, Binding inputBinding, Context context)
     {        
-        return makeStreaming(graphStore, inputBinding, context) ;
+        return makeStreaming(datasetGraph, inputBinding, context) ;
     }
 
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
      * @param updateRequest
-     * @param graphStore
+     * @param dataset
      * @param context  (null means use merge of global and graph store context))
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessor create(UpdateRequest updateRequest, GraphStore graphStore, Context context)
+    public static UpdateProcessor create(UpdateRequest updateRequest, Dataset dataset, Context context)
     {        
-        return make(updateRequest, graphStore, null, context) ;
+        return make(updateRequest, dataset.asDatasetGraph(), null, context) ;
     }
     
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
+     * @param updateRequest
+     * @param datasetGraph
+     * @param context  (null means use merge of global and graph store context))
+     * @return UpdateProcessor or null
+     */
+    public static UpdateProcessor create(UpdateRequest updateRequest, DatasetGraph datasetGraph, Context context)
+    {        
+        return make(updateRequest, datasetGraph, null, context) ;
+    }
+
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
      * @param updateRequest
-     * @param graphStore
+     * @param dataset
      * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
      * @param context  (null means use merge of global and graph store context))
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessor create(UpdateRequest updateRequest, GraphStore graphStore, QuerySolution inputBinding, Context context)
+    public static UpdateProcessor create(UpdateRequest updateRequest, Dataset dataset, QuerySolution inputBinding, Context context)
     {        
-        return create(updateRequest, graphStore, BindingUtils.asBinding(inputBinding), context) ;
+        return create(updateRequest, dataset.asDatasetGraph(), BindingUtils.asBinding(inputBinding), context) ;
     }
 
-    /** Create an UpdateProcessor appropriate to the GraphStore, or null if no available factory to make an UpdateProcessor 
+    /** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor 
      * @param updateRequest
-     * @param graphStore
+     * @param datasetGraph
      * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
      * @param context  (null means use merge of global and graph store context))
      * @return UpdateProcessor or null
      */
-    public static UpdateProcessor create(UpdateRequest updateRequest, GraphStore graphStore, Binding inputBinding, Context context)
+    public static UpdateProcessor create(UpdateRequest updateRequest, DatasetGraph datasetGraph, Binding inputBinding, Context context)
     {        
-        return make(updateRequest, graphStore, inputBinding, context) ;
+        return make(updateRequest, datasetGraph, inputBinding, context) ;
     }
 
     // Everything comes through one of these two make methods
-    private static UpdateProcessor make(UpdateRequest updateRequest, GraphStore graphStore, Binding inputBinding, Context context)
+    private static UpdateProcessor make(UpdateRequest updateRequest, DatasetGraph datasetGraph, Binding inputBinding, Context context)
     {
         if ( context == null )
         {
             context = ARQ.getContext().copy();
-            context.putAll(graphStore.getContext()) ;
+            context.putAll(datasetGraph.getContext()) ;
         }
         
-        UpdateEngineFactory f = UpdateEngineRegistry.get().find(graphStore, context) ;
+        UpdateEngineFactory f = UpdateEngineRegistry.get().find(datasetGraph, context) ;
         if ( f == null )
             return null ;
         
-        UpdateProcessorBase uProc = new UpdateProcessorBase(updateRequest, graphStore, inputBinding, context, f) ;
+        UpdateProcessorBase uProc = new UpdateProcessorBase(updateRequest, datasetGraph, inputBinding, context, f) ;
         return uProc ;
     }
     
     // Everything comes through one of these two make methods
-    private static UpdateProcessorStreaming makeStreaming(GraphStore graphStore, Binding inputBinding, Context context)
+    private static UpdateProcessorStreaming makeStreaming(DatasetGraph datasetGraph, Binding inputBinding, Context context)
     {
         if ( context == null )
         {
             context = ARQ.getContext().copy();
-            context.putAll(graphStore.getContext()) ;
+            context.putAll(datasetGraph.getContext()) ;
         }
         
-        UpdateEngineFactory f = UpdateEngineRegistry.get().find(graphStore, context) ;
+        UpdateEngineFactory f = UpdateEngineRegistry.get().find(datasetGraph, context) ;
         if ( f == null )
             return null ;
         
-        UpdateProcessorStreamingBase uProc = new UpdateProcessorStreamingBase(graphStore, inputBinding, context, f) ;
+        UpdateProcessorStreamingBase uProc = new UpdateProcessorStreamingBase(datasetGraph, inputBinding, context, f) ;
         return uProc;
     }
     

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-arq/src/main/java/org/apache/jena/update/UpdateProcessor.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/update/UpdateProcessor.java b/jena-arq/src/main/java/org/apache/jena/update/UpdateProcessor.java
index d864b05..393aa31 100644
--- a/jena-arq/src/main/java/org/apache/jena/update/UpdateProcessor.java
+++ b/jena-arq/src/main/java/org/apache/jena/update/UpdateProcessor.java
@@ -18,6 +18,7 @@
 
 package org.apache.jena.update;
 
+import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.util.Context ;
 
 /** An instance of a execution of an UpdateRequest */ 
@@ -35,8 +36,18 @@ public interface UpdateProcessor
      * The dataset against which the query will execute.
      * May be null, implying the there isn't a local GraphStore target for this UpdateProcessor.
      */
-    public GraphStore getGraphStore() ;
+    public DatasetGraph getDatasetGraph() ;
     
+    /**
+     * The dataset against which the query will execute.
+     * May be null, implying the there isn't a local GraphStore target for this UpdateProcessor.
+     * @deprecated Use {@link #getDatasetGraph()} 
+     */
+    @Deprecated
+    public default DatasetGraph getGraphStore() {
+        return getDatasetGraph() ;
+    }
+
     /** Execute */
     public void execute() ;
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-arq/src/main/java/org/apache/jena/update/UpdateProcessorStreaming.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/update/UpdateProcessorStreaming.java b/jena-arq/src/main/java/org/apache/jena/update/UpdateProcessorStreaming.java
index 7b5a5b1..4c45252 100644
--- a/jena-arq/src/main/java/org/apache/jena/update/UpdateProcessorStreaming.java
+++ b/jena-arq/src/main/java/org/apache/jena/update/UpdateProcessorStreaming.java
@@ -18,6 +18,7 @@
 
 package org.apache.jena.update;
 
+import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.modify.UpdateSink ;
 import org.apache.jena.sparql.util.Context ;
 
@@ -36,8 +37,14 @@ public interface UpdateProcessorStreaming
      * The dataset against which the query will execute.
      * May be null, implying the there isn't a local GraphStore target for this UpdateProcessor.
      */
-    public GraphStore getGraphStore() ;
+    public DatasetGraph getDatasetGraph() ;
     
+    /** @deprecated Use {@link #getDatasetGraph()} */
+    @Deprecated
+    public default DatasetGraph getGraphStore() {
+        return getDatasetGraph() ;
+    }
+
     /** Start the request, call before putting updates into the Sink */
     public void startRequest() ;
     

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java b/jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java
index 250437d..0f07a2a 100644
--- a/jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java
+++ b/jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java
@@ -32,7 +32,6 @@ import org.apache.jena.sparql.ARQException ;
 import org.apache.jena.sparql.syntax.Element ;
 import org.apache.jena.sparql.syntax.ElementGroup ;
 import org.apache.jena.sparql.syntax.ElementTriplesBlock ;
-import org.apache.jena.update.GraphStoreFactory ;
 import org.apache.jena.update.UpdateExecutionFactory ;
 import org.apache.jena.update.UpdateProcessor ;
 import org.apache.jena.update.UpdateRequest ;
@@ -263,7 +262,7 @@ public class TestParameterizedSparqlString {
         s.setCommandText("INSERT { ?o ?p ?s } WHERE { ?s ?p ?o }");
         s.setIri("s", "_:" + bnode.getId());
         UpdateRequest query = s.asUpdate();
-        UpdateProcessor proc = UpdateExecutionFactory.create(query, GraphStoreFactory.create(ds));
+        UpdateProcessor proc = UpdateExecutionFactory.create(query, ds);
         proc.execute();
 
         // This should be true because this was present in the intial model set

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-arq/src/test/java/org/apache/jena/sparql/graph/TestDatasets.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/graph/TestDatasets.java b/jena-arq/src/test/java/org/apache/jena/sparql/graph/TestDatasets.java
index 1a38543..c8dc89e 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/graph/TestDatasets.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/graph/TestDatasets.java
@@ -18,15 +18,19 @@
 
 package org.apache.jena.sparql.graph;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.util.ArrayList ;
+import java.util.List ;
 
 import org.apache.jena.query.* ;
+import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.core.DynamicDatasets ;
-import org.apache.jena.update.* ;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.apache.jena.update.UpdateExecutionFactory ;
+import org.apache.jena.update.UpdateFactory ;
+import org.apache.jena.update.UpdateProcessor ;
+import org.apache.jena.update.UpdateRequest ;
+import org.junit.Assert ;
+import org.junit.Before ;
+import org.junit.Test ;
 
 public class TestDatasets {
 		
@@ -37,12 +41,12 @@ public class TestDatasets {
 									   + "}";
 
 	private Dataset ds;
-	private GraphStore gs;
+	private DatasetGraph gs;
 	
 	@Before
 	public void setup() {
 		this.ds = DatasetFactory.createMem();
-		this.gs = GraphStoreFactory.create(this.ds);
+		this.gs = ds.asDatasetGraph() ;
 		
 		UpdateRequest up = UpdateFactory.create(TestDatasets.data);
 		UpdateProcessor processor = UpdateExecutionFactory.create(up, this.gs);

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateBase.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateBase.java b/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateBase.java
index 12f05a9..8e09adb 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateBase.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateBase.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.jena.sparql.modify;
+package org.apache.jena.sparql.modify ;
 
 import org.apache.jena.atlas.junit.BaseTest ;
 import org.apache.jena.graph.Graph ;
@@ -24,48 +24,40 @@ import org.apache.jena.graph.GraphUtil ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;
 import org.apache.jena.sparql.ARQTestSuite ;
+import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.graph.GraphFactory ;
-import org.apache.jena.update.GraphStore ;
 import org.apache.jena.update.UpdateAction ;
 
-public abstract class AbstractTestUpdateBase extends BaseTest
-{
-    protected abstract GraphStore getEmptyGraphStore() ; 
-    
-    protected void defaultGraphData(GraphStore gStore, Graph data)
-    {
+public abstract class AbstractTestUpdateBase extends BaseTest {
+    protected abstract DatasetGraph getEmptyDatasetGraph() ;
+
+    protected void defaultGraphData(DatasetGraph gStore, Graph data) {
         Graph g = gStore.getDefaultGraph() ;
         g.clear() ;
         GraphUtil.addInto(g, data) ;
     }
-    
-    protected void namedGraphData(GraphStore gStore, Node uri, Graph data)
-    {
+
+    protected void namedGraphData(DatasetGraph gStore, Node uri, Graph data) {
         Graph g = gStore.getGraph(uri) ;
-        if ( g == null )
-        {
+        if ( g == null ) {
             gStore.addGraph(uri, GraphFactory.createJenaDefaultGraph()) ;
             g = gStore.getGraph(uri) ;
-        }
-        else
+        } else
             g.clear() ;
-        GraphUtil.addInto(g,data) ;
+        GraphUtil.addInto(g, data) ;
     }
-    
+
     protected static final String FileBase = ARQTestSuite.testDirUpdate ;
-    
-    protected static void script(GraphStore gStore, String filename)
-    {
-        UpdateAction.readExecute(FileBase+"/"+filename, gStore) ;
+
+    protected static void script(DatasetGraph gStore, String filename) {
+        UpdateAction.readExecute(FileBase + "/" + filename, gStore) ;
     }
-    
-    protected static boolean graphEmpty(Graph graph)
-    {
-        return graph.isEmpty() ; 
+
+    protected static boolean graphEmpty(Graph graph) {
+        return graph.isEmpty() ;
     }
-    
-    protected static boolean graphContains(Graph graph, Triple triple)
-    {
-        return graph.contains(triple) ; 
+
+    protected static boolean graphContains(Graph graph, Triple triple) {
+        return graph.contains(triple) ;
     }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateGraph.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateGraph.java b/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateGraph.java
index f99576b..2220f03 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateGraph.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateGraph.java
@@ -37,7 +37,6 @@ import org.apache.jena.sparql.modify.request.* ;
 import org.apache.jena.sparql.sse.SSE ;
 import org.apache.jena.sparql.syntax.Element ;
 import org.apache.jena.sparql.util.NodeFactoryExtra ;
-import org.apache.jena.update.GraphStore ;
 import org.apache.jena.update.UpdateAction ;
 import org.apache.jena.update.UpdateExecutionFactory ;
 import org.apache.jena.update.UpdateProcessor ;
@@ -59,7 +58,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testInsertData1()
     {
-		GraphStore gStore = getEmptyGraphStore() ;
+		DatasetGraph gStore = getEmptyDatasetGraph() ;
 		defaultGraphData(gStore, graph1) ;
 		QuadDataAcc acc = new QuadDataAcc() ;
 		acc.addTriple(triple2) ;
@@ -74,7 +73,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
 
     @Test public void testDeleteData1()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         defaultGraphData(gStore, graph1) ;
         QuadDataAcc acc = new QuadDataAcc() ;
         acc.addTriple(triple2) ;
@@ -89,7 +88,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
 
     @Test public void testDeleteData2()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         defaultGraphData(gStore, graph1) ;
         QuadDataAcc acc = new QuadDataAcc() ;
         acc.addTriple(triple1) ;
@@ -103,7 +102,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testInsert1()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         UpdateModify insert = new UpdateModify() ;
         UpdateAction.execute(insert, gStore) ;
         assertTrue(graphEmpty(gStore.getDefaultGraph())) ;
@@ -111,7 +110,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testInsert2()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         UpdateModify insert = new UpdateModify() ;
         insert.getInsertAcc().addTriple(triple1) ;
         UpdateAction.execute(insert, gStore) ;
@@ -120,7 +119,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testInsert3()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         gStore.addGraph(graphIRI, Factory.createDefaultGraph()) ;
         UpdateModify insert = new UpdateModify() ;
         insert.getInsertAcc().addQuad(new Quad(graphIRI, triple1)) ;
@@ -130,7 +129,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
 
     @Test public void testInsert4()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         defaultGraphData(gStore, graph1) ;
         UpdateModify insert = new UpdateModify() ;
         insert.getInsertAcc().addTriple(SSE.parseTriple("(?s <http://example/p> 1066)")) ;
@@ -142,7 +141,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testDelete1()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         QuadAcc acc = new QuadAcc() ;
         UpdateDeleteWhere delete = new UpdateDeleteWhere(acc) ;
         UpdateAction.execute(delete, gStore) ;
@@ -151,7 +150,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testDelete2()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         defaultGraphData(gStore, graph1) ;
         QuadAcc acc = new QuadAcc() ;
         UpdateDeleteWhere delete = new UpdateDeleteWhere(acc) ;
@@ -162,7 +161,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testDelete3()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         defaultGraphData(gStore, graph1) ;
         QuadDataAcc acc = new QuadDataAcc() ;
         UpdateDataDelete delete = new UpdateDataDelete(acc) ;
@@ -174,7 +173,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testDelete4()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         namedGraphData(gStore, graphIRI, data1()) ;
         
         QuadDataAcc acc = new QuadDataAcc() ;
@@ -188,7 +187,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testDelete5()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         defaultGraphData(gStore, data2()) ;
         namedGraphData(gStore, graphIRI, data1()) ;
         
@@ -204,7 +203,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
 
     @Test public void testModify1()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         defaultGraphData(gStore, data2()) ;
         namedGraphData(gStore, graphIRI, Factory.createDefaultGraph()) ;
         
@@ -226,7 +225,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
         // Use blank nodes (will expose any problems in serialization when spill occurs)
         Triple t =  new Triple(org.apache.jena.graph.NodeFactory.createAnon(),p,o2);
         
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         // Set the threshold to in order to force spill to disk
         gStore.getContext().set(ARQ.spillToDiskThreshold, 0L) ;
         
@@ -249,7 +248,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testModifyInitialBindings()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         defaultGraphData(gStore, data12()) ;
         namedGraphData(gStore, graphIRI, Factory.createDefaultGraph()) ;
         
@@ -276,7 +275,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
         Triple t =  new Triple(org.apache.jena.graph.NodeFactory.createAnon(),p,o2);
         Triple t2 = new Triple(org.apache.jena.graph.NodeFactory.createAnon(),p,o1);
         
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         // Set the threshold to in order to force spill to disk
         gStore.getContext().set(ARQ.spillToDiskThreshold, 0L) ;
         
@@ -297,14 +296,14 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testUpdateScript1()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         script(gStore, "update-1.ru") ;
         assertTrue(graphContains(gStore.getDefaultGraph(), new Triple(s,p,NodeFactoryExtra.parseNode("123")))) ;
     }
     
     @Test public void testUpdateScript2()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         script(gStore, "update-2.ru") ;
         assertTrue(graphContains(gStore.getGraph(org.apache.jena.graph.NodeFactory.createURI("http://example/g1")),
                                  new Triple(s,p,NodeFactoryExtra.parseNode("123")))) ;
@@ -313,7 +312,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
 
     @Test public void testUpdateScript3()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         script(gStore, "update-3.ru") ;
         assertTrue(graphEmpty(gStore.getGraph(org.apache.jena.graph.NodeFactory.createURI("http://example/g1")))) ;
         assertTrue(graphEmpty(gStore.getDefaultGraph())) ;
@@ -321,7 +320,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
 
     @Test public void testUpdateScript4()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         script(gStore, "data-1.ru") ;
         assertTrue(graphContains(gStore.getDefaultGraph(),
                                  new Triple(s,p,NodeFactoryExtra.parseNode("123")))) ;
@@ -329,7 +328,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testUpdateScript5()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         script(gStore, "data-2.ru") ;
         
         
@@ -343,7 +342,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testUpdateScript6()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         script(gStore, "data-3.ru") ;
         assertTrue(graphContains(gStore.getGraph(graphIRI),
                                  new Triple(s,p,NodeFactoryExtra.parseNode("123")))) ;
@@ -351,7 +350,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
     
     @Test public void testUpdateScript7()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         script(gStore, "data-4.ru") ;
         assertTrue(graphContains(gStore.getDefaultGraph(),
                                  new Triple(s,p,NodeFactoryExtra.parseNode("123")))) ;
@@ -366,7 +365,7 @@ public abstract class AbstractTestUpdateGraph extends AbstractTestUpdateBase
 
     private void testBad(String file, int expectedSize)
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         script(gStore, file) ;
         assertEquals(expectedSize, countQuads(gStore)) ;
     }

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateGraphMgt.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateGraphMgt.java b/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateGraphMgt.java
index fb0cd21..328004d 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateGraphMgt.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/modify/AbstractTestUpdateGraphMgt.java
@@ -20,10 +20,10 @@ package org.apache.jena.sparql.modify;
 
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.NodeFactory ;
+import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.graph.GraphFactory ;
 import org.apache.jena.sparql.modify.request.UpdateCreate ;
 import org.apache.jena.sparql.modify.request.UpdateDrop ;
-import org.apache.jena.update.GraphStore ;
 import org.apache.jena.update.Update ;
 import org.apache.jena.update.UpdateAction ;
 import org.apache.jena.update.UpdateException ;
@@ -35,7 +35,7 @@ public abstract class AbstractTestUpdateGraphMgt extends AbstractTestUpdateBase
     
     @Test public void testCreateDrop1()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         Update u = new UpdateCreate(graphIRI) ;
         UpdateAction.execute(u, gStore) ;
         assertTrue(gStore.containsGraph(graphIRI)) ;
@@ -71,7 +71,7 @@ public abstract class AbstractTestUpdateGraphMgt extends AbstractTestUpdateBase
 
     @Test public void testCreateDrop2()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         Update u = new UpdateCreate(graphIRI) ;
         UpdateAction.execute(u, gStore) ;
         
@@ -91,7 +91,7 @@ public abstract class AbstractTestUpdateGraphMgt extends AbstractTestUpdateBase
     
     @Test public void testCreateDrop3()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         script(gStore, "create-1.ru") ;
         assertTrue(gStore.containsGraph(graphIRI)) ;
         assertTrue(graphEmpty(gStore.getGraph(graphIRI))) ;
@@ -99,7 +99,7 @@ public abstract class AbstractTestUpdateGraphMgt extends AbstractTestUpdateBase
 
     @Test public void testCreateDrop4()
     {
-        GraphStore gStore = getEmptyGraphStore() ;
+        DatasetGraph gStore = getEmptyDatasetGraph() ;
         gStore.addGraph(graphIRI, GraphFactory.createDefaultGraph()) ;
         script(gStore, "drop-1.ru") ;
         assertFalse(gStore.containsGraph(graphIRI)) ;

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateGraphMem.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateGraphMem.java b/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateGraphMem.java
index 3b88b83..804df4e 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateGraphMem.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateGraphMem.java
@@ -18,15 +18,14 @@
 
 package org.apache.jena.sparql.modify;
 
-import org.apache.jena.update.GraphStore ;
-import org.apache.jena.update.GraphStoreFactory ;
+import org.apache.jena.sparql.core.DatasetGraph ;
+import org.apache.jena.sparql.core.DatasetGraphFactory ;
 
 public class TestUpdateGraphMem extends AbstractTestUpdateGraph
 {
     @Override
-    protected GraphStore getEmptyGraphStore()
+    protected DatasetGraph getEmptyDatasetGraph()
     {
-        GraphStore gStore = GraphStoreFactory.create() ;
-        return gStore ;
+        return DatasetGraphFactory.createMem() ;
     }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateGraphMgtMem.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateGraphMgtMem.java b/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateGraphMgtMem.java
index 92dcd05..7c8b34f 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateGraphMgtMem.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateGraphMgtMem.java
@@ -16,17 +16,14 @@
  * limitations under the License.
  */
 
-package org.apache.jena.sparql.modify;
+package org.apache.jena.sparql.modify ;
 
-import org.apache.jena.update.GraphStore ;
-import org.apache.jena.update.GraphStoreFactory ;
+import org.apache.jena.sparql.core.DatasetGraph ;
+import org.apache.jena.sparql.core.DatasetGraphFactory ;
 
-public class TestUpdateGraphMgtMem extends AbstractTestUpdateGraphMgt
-{
+public class TestUpdateGraphMgtMem extends AbstractTestUpdateGraphMgt {
     @Override
-    protected GraphStore getEmptyGraphStore()
-    {
-        GraphStore gStore = GraphStoreFactory.create() ;
-        return gStore ;
+    protected DatasetGraph getEmptyDatasetGraph() {
+        return DatasetGraphFactory.createMem() ;
     }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateOperations.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateOperations.java b/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateOperations.java
index f4b65fb..ead8940 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateOperations.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/modify/TestUpdateOperations.java
@@ -26,6 +26,8 @@ import org.apache.jena.rdf.model.Model ;
 import org.apache.jena.rdf.model.ModelFactory ;
 import org.apache.jena.rdf.model.RDFNode ;
 import org.apache.jena.rdf.model.Resource ;
+import org.apache.jena.sparql.core.DatasetGraph ;
+import org.apache.jena.sparql.core.DatasetGraphFactory ;
 import org.apache.jena.sparql.sse.SSE ;
 import org.apache.jena.update.* ;
 import org.apache.jena.vocabulary.OWL ;
@@ -37,11 +39,11 @@ import org.junit.Test ;
 public class TestUpdateOperations extends BaseTest
 {
     private static final String DIR = "testing/Update" ;
-    private GraphStore graphStore() { return GraphStoreFactory.create() ; }
+    private DatasetGraph graphStore() { return DatasetGraphFactory.createMem() ; }
     private Node gName = SSE.parseNode("<http://example/g>") ;
     
     @Test public void load1() {
-        GraphStore gs = graphStore() ;
+        DatasetGraph gs = graphStore() ;
         UpdateRequest req = UpdateFactory.create("LOAD <"+DIR+"/D.nt>") ;
         UpdateAction.execute(req, gs) ;
         assertEquals(1, gs.getDefaultGraph().size()) ;
@@ -49,7 +51,7 @@ public class TestUpdateOperations extends BaseTest
     }
 
     @Test public void load2() {
-        GraphStore gs = graphStore() ;
+        DatasetGraph gs = graphStore() ;
         UpdateRequest req = UpdateFactory.create("LOAD <"+DIR+"/D.nt> INTO GRAPH <"+gName.getURI()+">") ;
         UpdateAction.execute(req, gs) ;
     }
@@ -57,7 +59,7 @@ public class TestUpdateOperations extends BaseTest
     // Quad loading
 
     @Test public void load3() {
-        GraphStore gs = graphStore() ;
+        DatasetGraph gs = graphStore() ;
         UpdateRequest req = UpdateFactory.create("LOAD <"+DIR+"/D.nq>") ;
         UpdateAction.execute(req, gs) ;
         assertEquals(0, gs.getDefaultGraph().size()) ;
@@ -68,13 +70,13 @@ public class TestUpdateOperations extends BaseTest
     // Bad: loading quads into a named graph
     @Test(expected=UpdateException.class)
     public void load4() {
-        GraphStore gs = graphStore() ;
+        DatasetGraph gs = graphStore() ;
         UpdateRequest req = UpdateFactory.create("LOAD <"+DIR+"/D.nq> INTO GRAPH <"+gName.getURI()+">") ;
         UpdateAction.execute(req, gs) ;
     }
 
     @Test public void load5() {
-        GraphStore gs = graphStore() ;
+        DatasetGraph gs = graphStore() ;
         UpdateRequest req = UpdateFactory.create("LOAD SILENT <"+DIR+"/D.nq> INTO GRAPH <"+gName.getURI()+">") ;
         UpdateAction.execute(req, gs) ;
         assertEquals(0, Iter.count(gs.find())) ;
@@ -86,9 +88,8 @@ public class TestUpdateOperations extends BaseTest
         anon.addProperty(RDF.type, OWL.Thing);
         assertEquals(1, m.size());
         
-        GraphStore gs = GraphStoreFactory.create(m);
         UpdateRequest req = UpdateFactory.create("INSERT { ?s ?p ?o } WHERE { ?o ?p ?s }");
-        UpdateAction.execute(req, gs);
+        UpdateAction.execute(req, m);
         
         assertEquals(2, m.size());
         assertEquals(1, m.listStatements(anon, null, (RDFNode)null).toList().size());

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-sdb/src/main/java/org/apache/jena/sdb/SDBFactory.java
----------------------------------------------------------------------
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/SDBFactory.java b/jena-sdb/src/main/java/org/apache/jena/sdb/SDBFactory.java
index c172bad..3b88775 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/SDBFactory.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/SDBFactory.java
@@ -189,7 +189,7 @@ public class SDBFactory
      * @param store
      * @return GraphStore
      */
-    public static GraphStore connectGraphStore(Store store)
+    public static DatasetGraphSDB connectGraphStore(Store store)
     {
         return new DatasetGraphSDB(store, SDB.getContext().copy()) ; 
     }

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-sdb/src/main/java/org/apache/jena/sdb/modify/UpdateEngineSDB.java
----------------------------------------------------------------------
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/modify/UpdateEngineSDB.java b/jena-sdb/src/main/java/org/apache/jena/sdb/modify/UpdateEngineSDB.java
index 4377c0a..7680e04 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/modify/UpdateEngineSDB.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/modify/UpdateEngineSDB.java
@@ -19,13 +19,13 @@
 package org.apache.jena.sdb.modify;
 
 import org.apache.jena.sdb.store.DatasetGraphSDB ;
+import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.engine.binding.Binding ;
 import org.apache.jena.sparql.modify.UpdateEngine ;
 import org.apache.jena.sparql.modify.UpdateEngineFactory ;
 import org.apache.jena.sparql.modify.UpdateEngineMain ;
 import org.apache.jena.sparql.modify.UpdateEngineRegistry ;
 import org.apache.jena.sparql.util.Context ;
-import org.apache.jena.update.GraphStore ;
 
 public class UpdateEngineSDB extends UpdateEngineMain
 {
@@ -40,13 +40,13 @@ public class UpdateEngineSDB extends UpdateEngineMain
         return new UpdateEngineFactory()
         {
             @Override
-            public boolean accept(GraphStore graphStore, Context context)
+            public boolean accept(DatasetGraph graphStore, Context context)
             {
                 return (graphStore instanceof DatasetGraphSDB) ;
             }
             
             @Override
-            public UpdateEngine create(GraphStore graphStore, Binding inputBinding, Context context)
+            public UpdateEngine create(DatasetGraph graphStore, Binding inputBinding, Context context)
             {
                 return new UpdateEngineSDB((DatasetGraphSDB)graphStore, inputBinding, context);
             }

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-sdb/src/test/java/org/apache/jena/sdb/test/modify/TestSPARQLUpdate.java
----------------------------------------------------------------------
diff --git a/jena-sdb/src/test/java/org/apache/jena/sdb/test/modify/TestSPARQLUpdate.java b/jena-sdb/src/test/java/org/apache/jena/sdb/test/modify/TestSPARQLUpdate.java
index 3173600..2c016e0 100644
--- a/jena-sdb/src/test/java/org/apache/jena/sdb/test/modify/TestSPARQLUpdate.java
+++ b/jena-sdb/src/test/java/org/apache/jena/sdb/test/modify/TestSPARQLUpdate.java
@@ -23,8 +23,8 @@ import junit.framework.TestSuite ;
 import org.apache.jena.sdb.SDBFactory ;
 import org.apache.jena.sdb.Store ;
 import org.apache.jena.sdb.test.junit.SDBTestUtils ;
+import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.modify.AbstractTestUpdateGraph ;
-import org.apache.jena.update.GraphStore ;
 
 public class TestSPARQLUpdate extends AbstractTestUpdateGraph
 {
@@ -35,10 +35,9 @@ public class TestSPARQLUpdate extends AbstractTestUpdateGraph
     }
     
     @Override
-    protected GraphStore getEmptyGraphStore()
+    protected DatasetGraph getEmptyDatasetGraph()
     {
         Store store = SDBTestUtils.createInMemoryStore() ;
-        GraphStore graphStore = SDBFactory.connectGraphStore(store) ;
-        return graphStore ;
+        return SDBFactory.connectDataset(store).asDatasetGraph() ;
     }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-sdb/src/test/java/org/apache/jena/sdb/test/modify/TestSPARQLUpdateMgt.java
----------------------------------------------------------------------
diff --git a/jena-sdb/src/test/java/org/apache/jena/sdb/test/modify/TestSPARQLUpdateMgt.java b/jena-sdb/src/test/java/org/apache/jena/sdb/test/modify/TestSPARQLUpdateMgt.java
index e46cb2b..2c876df 100644
--- a/jena-sdb/src/test/java/org/apache/jena/sdb/test/modify/TestSPARQLUpdateMgt.java
+++ b/jena-sdb/src/test/java/org/apache/jena/sdb/test/modify/TestSPARQLUpdateMgt.java
@@ -23,8 +23,8 @@ import junit.framework.TestSuite ;
 import org.apache.jena.sdb.SDBFactory ;
 import org.apache.jena.sdb.Store ;
 import org.apache.jena.sdb.test.junit.SDBTestUtils ;
+import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.modify.AbstractTestUpdateGraphMgt ;
-import org.apache.jena.update.GraphStore ;
 
 public class TestSPARQLUpdateMgt extends AbstractTestUpdateGraphMgt
 {
@@ -36,10 +36,8 @@ public class TestSPARQLUpdateMgt extends AbstractTestUpdateGraphMgt
     }
     
     @Override
-    protected GraphStore getEmptyGraphStore()
-    {
+    protected DatasetGraph getEmptyDatasetGraph() {
         Store store = SDBTestUtils.createInMemoryStore() ;
-        GraphStore graphStore = SDBFactory.connectGraphStore(store) ;
-        return graphStore ;
+        return SDBFactory.connectDataset(store).asDatasetGraph() ;
     }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-tdb/src/main/java/org/apache/jena/tdb/modify/UpdateEngineTDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/modify/UpdateEngineTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/modify/UpdateEngineTDB.java
index d811e6f..b3515f1 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/modify/UpdateEngineTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/modify/UpdateEngineTDB.java
@@ -18,6 +18,7 @@
 
 package org.apache.jena.tdb.modify;
 
+import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.sparql.engine.binding.Binding ;
 import org.apache.jena.sparql.modify.UpdateEngine ;
 import org.apache.jena.sparql.modify.UpdateEngineFactory ;
@@ -25,7 +26,6 @@ import org.apache.jena.sparql.modify.UpdateEngineMain ;
 import org.apache.jena.sparql.modify.UpdateEngineRegistry ;
 import org.apache.jena.sparql.util.Context ;
 import org.apache.jena.tdb.store.DatasetGraphTDB ;
-import org.apache.jena.update.GraphStore ;
 
 public class UpdateEngineTDB extends UpdateEngineMain
 {
@@ -38,15 +38,13 @@ public class UpdateEngineTDB extends UpdateEngineMain
         return new UpdateEngineFactory()
         {
             @Override
-            public boolean accept(GraphStore graphStore, Context context)
-            {
+            public boolean accept(DatasetGraph graphStore, Context context) {
                 return (graphStore instanceof DatasetGraphTDB) ;
             }
-            
+
             @Override
-            public UpdateEngine create(GraphStore graphStore, Binding inputBinding, Context context)
-            {
-                return new UpdateEngineTDB((DatasetGraphTDB)graphStore, inputBinding, context);
+            public UpdateEngine create(DatasetGraph graphStore, Binding inputBinding, Context context) {
+                return new UpdateEngineTDB((DatasetGraphTDB)graphStore, inputBinding, context) ;
             }
         } ;
     }

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-tdb/src/main/java/tdb/cmdline/ModTDBGraphStore.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/tdb/cmdline/ModTDBGraphStore.java b/jena-tdb/src/main/java/tdb/cmdline/ModTDBGraphStore.java
deleted file mode 100644
index 513c252..0000000
--- a/jena-tdb/src/main/java/tdb/cmdline/ModTDBGraphStore.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tdb.cmdline;
-
-import org.apache.jena.update.GraphStore ;
-import org.apache.jena.update.GraphStoreFactory ;
-import arq.cmd.CmdArgModule ;
-import arq.cmdline.CmdGeneral ;
-import arq.cmdline.ModGraphStore ;
-
-public class ModTDBGraphStore extends ModGraphStore
-{
-    private ModTDBDataset modTDBDataset = new ModTDBDataset() ;
-    
-    public ModTDBGraphStore() { super() ; }
-    
-    @Override
-    public void registerWith(CmdGeneral cmdLine)
-    {
-        modTDBDataset.registerWith(cmdLine) ;
-    }
-
-    @Override
-    public void processArgs(CmdArgModule cmdLine)
-    {
-        modTDBDataset.processArgs(cmdLine) ;
-    }
-    
-    @Override
-    public GraphStore createGraphStore()
-    {
-        // Simply return the DatasetGraphTDB
-        return GraphStoreFactory.create(modTDBDataset.createDataset()) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-tdb/src/main/java/tdb/tdbupdate.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/tdb/tdbupdate.java b/jena-tdb/src/main/java/tdb/tdbupdate.java
index 1d4cc71..2d25620 100644
--- a/jena-tdb/src/main/java/tdb/tdbupdate.java
+++ b/jena-tdb/src/main/java/tdb/tdbupdate.java
@@ -21,8 +21,6 @@ package tdb;
 import org.apache.jena.tdb.TDB ;
 import org.apache.jena.tdb.transaction.TransactionManager ;
 import tdb.cmdline.CmdTDB ;
-import tdb.cmdline.ModTDBGraphStore ;
-import arq.cmdline.ModGraphStore ;
 
 public class tdbupdate extends arq.update
 {
@@ -35,7 +33,7 @@ public class tdbupdate extends arq.update
         new tdbupdate(argv).mainRun() ;
     }
     
-    public tdbupdate(String[] argv)
+    public tdbupdate(String[] argv) 
     {
         super(argv) ;
         // Because this inherits from an ARQ command
@@ -44,16 +42,7 @@ public class tdbupdate extends arq.update
     }
 
     @Override
-    protected void processModulesAndArgs()
-    {
+    protected void processModulesAndArgs() {
         super.processModulesAndArgs() ;
     }
-    
-    @Override
-    protected ModGraphStore setModGraphStore()
-    {
-        return new ModTDBGraphStore();
-    }
-    
-    
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/bb8d6f3b/jena-tdb/src/test/java/org/apache/jena/tdb/store/Test_SPARQL_TDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/store/Test_SPARQL_TDB.java b/jena-tdb/src/test/java/org/apache/jena/tdb/store/Test_SPARQL_TDB.java
index 512a8f7..3d0315f 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/store/Test_SPARQL_TDB.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/store/Test_SPARQL_TDB.java
@@ -224,8 +224,7 @@ public class Test_SPARQL_TDB extends BaseTest
     private void update(Dataset dataset, String string)
     {
         UpdateRequest req = UpdateFactory.create(string) ;
-        GraphStore gs = GraphStoreFactory.create(dataset) ;
-        UpdateProcessor proc = UpdateExecutionFactory.create(req, gs) ;
+        UpdateProcessor proc = UpdateExecutionFactory.create(req, dataset.asDatasetGraph()) ;
         proc.execute() ;
     }
 }


Mime
View raw message