jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1199454 - in /incubator/jena/Jena2/ARQ/trunk: src-examples/arq/examples/riot/ src/main/java/arq/ src/main/java/arq/cmdline/ src/main/java/com/hp/hpl/jena/query/ src/main/java/com/hp/hpl/jena/sparql/core/ src/main/java/com/hp/hpl/jena/sparq...
Date Tue, 08 Nov 2011 21:06:42 GMT
Author: andy
Date: Tue Nov  8 21:06:41 2011
New Revision: 1199454

URL: http://svn.apache.org/viewvc?rev=1199454&view=rev
Log:
Merge interface DataSource into interface Dataset; leave DataSource as deprecated stub for
compatibility.

Removed:
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DataSourceImpl.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl2.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DataSourceAssembler.java
Modified:
    incubator/jena/Jena2/ARQ/trunk/src-examples/arq/examples/riot/ExRIOT_3.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/cmdline/ModDatasetGeneral.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/qparse.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/sse_query.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/DataSource.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/Dataset.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/DatasetFactory.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/QueryExecutionFactory.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DatasetGraph.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/AssemblerUtils.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssembler.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/GraphStoreAssembler.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/modify/GraphStoreBasic.java
    incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/util/DatasetUtils.java
    incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/core/TestDataset.java
    incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/core/TestDatasetDataSource.java
    incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/junit/UpdateTest.java

Modified: incubator/jena/Jena2/ARQ/trunk/src-examples/arq/examples/riot/ExRIOT_3.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src-examples/arq/examples/riot/ExRIOT_3.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src-examples/arq/examples/riot/ExRIOT_3.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src-examples/arq/examples/riot/ExRIOT_3.java Tue Nov  8
21:06:41 2011
@@ -43,8 +43,8 @@ public class ExRIOT_3
         // read some (more) data into a dataset graph.
         RiotLoader.read("data2.trig", dsg) ;
         
-        // Create a daatset,
-        Dataset ds = DatasetFactory.create() ;
+        // Create a dataset,
+        Dataset ds = DatasetFactory.createMem() ;
         // read in data.
         RiotLoader.read("data2.trig", ds.asDatasetGraph()) ;
 

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/cmdline/ModDatasetGeneral.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/cmdline/ModDatasetGeneral.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/cmdline/ModDatasetGeneral.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/cmdline/ModDatasetGeneral.java Tue Nov
 8 21:06:41 2011
@@ -26,7 +26,6 @@ import org.openjena.riot.RiotLoader ;
 
 import arq.cmd.CmdException ;
 
-import com.hp.hpl.jena.query.DataSource ;
 import com.hp.hpl.jena.query.Dataset ;
 import com.hp.hpl.jena.query.DatasetFactory ;
 import com.hp.hpl.jena.query.LabelExistsException ;
@@ -97,13 +96,13 @@ public class ModDatasetGeneral extends M
         
         // This can auto-add graphs.
         DatasetGraph dsg = DatasetGraphFactory.createMem() ;
-        DataSource ds = DatasetFactory.create(dsg) ;
+        Dataset ds = DatasetFactory.create(dsg) ;
         addGraphs(ds) ;
         dataset = ds ;
         return dataset ;
     }
         
-    protected void addGraphs(DataSource ds)
+    protected void addGraphs(Dataset ds)
     {
         try {
             if ( (graphURLs != null) || (namedGraphURLs != null) )

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/qparse.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/qparse.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/qparse.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/qparse.java Tue Nov  8 21:06:41 2011
@@ -164,7 +164,7 @@ public class qparse extends CmdARQ
             { 
                 divider() ;
                 // This forces internal query initialization - must be after QueryUtils.checkQuery
-                QueryExecution qExec = QueryExecutionFactory.create(query, DatasetFactory.create())
;
+                QueryExecution qExec = QueryExecutionFactory.create(query, DatasetFactory.createMem())
;
                 QueryOutputUtils.printPlan(query, qExec) ; 
             }
         }

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/sse_query.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/sse_query.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/sse_query.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/arq/sse_query.java Tue Nov  8 21:06:41 2011
@@ -123,7 +123,7 @@ public class sse_query extends CmdARQ
         Dataset dataset = modDataset.getDataset() ;
         // Check there is a dataset.
         if ( dataset == null )
-            dataset = DatasetFactory.create() ;
+            dataset = DatasetFactory.createMem() ;
 
         modTime.startTimer() ;
         DatasetGraph dsg = dataset.asDatasetGraph() ;

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/DataSource.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/DataSource.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/DataSource.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/DataSource.java Tue
Nov  8 21:06:41 2011
@@ -20,21 +20,10 @@ package com.hp.hpl.jena.query;
 
 //import java.util.Iterator;
 
-import com.hp.hpl.jena.rdf.model.Model ;
 
-/** A DataSource is a Dataset that has modification operations. */
+/** A DataSource is a Dataset that has modification operations.
+ * @deprecated Use Dataset, which now has the operations for add/remove of named models.

+ * */
 
-public interface DataSource extends Dataset
-{
-    /** Set the background graph.  Can be set to null for none.  */
-    public void  setDefaultModel(Model model) ;
-
-    /** Set a named graph. */
-    public void  addNamedModel(String uri, Model model) throws LabelExistsException ;
-
-    /** Remove a named graph. */
-    public void  removeNamedModel(String uri) ;
-
-    /** Change a named graph for another using the same name */
-    public void  replaceNamedModel(String uri, Model model) ;
-}
+@Deprecated
+public interface DataSource extends Dataset {}

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/Dataset.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/Dataset.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/Dataset.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/Dataset.java Tue Nov
 8 21:06:41 2011
@@ -33,12 +33,24 @@ public interface Dataset
     /** Get the default graph as a Jena Model */
     public Model getDefaultModel() ;
 
+    /** Set the background graph.  Can be set to null for none.  */
+    public void  setDefaultModel(Model model) ;
+
     /** Get a graph by name as a Jena Model */
     public Model getNamedModel(String uri) ;
 
     /** Does the dataset contain a model with the name supplied? */ 
     public boolean containsNamedModel(String uri) ;
 
+    /** Set a named graph. */
+    public void  addNamedModel(String uri, Model model) throws LabelExistsException ;
+
+    /** Remove a named graph. */
+    public void  removeNamedModel(String uri) ;
+
+    /** Change a named graph for another using the same name */
+    public void  replaceNamedModel(String uri, Model model) ;
+    
     /** List the names */
     public Iterator<String> listNames() ;
     

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/DatasetFactory.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/DatasetFactory.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/DatasetFactory.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/DatasetFactory.java
Tue Nov  8 21:06:41 2011
@@ -22,12 +22,14 @@ import java.util.List ;
 
 import com.hp.hpl.jena.assembler.Assembler ;
 import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.ModelFactory ;
 import com.hp.hpl.jena.rdf.model.Resource ;
 import com.hp.hpl.jena.sparql.ARQException ;
-import com.hp.hpl.jena.sparql.core.DataSourceImpl ;
 import com.hp.hpl.jena.sparql.core.DatasetGraph ;
-import com.hp.hpl.jena.sparql.core.assembler.DataSourceAssembler ;
+import com.hp.hpl.jena.sparql.core.DatasetImpl ;
+import com.hp.hpl.jena.sparql.core.assembler.DatasetAssembler ;
 import com.hp.hpl.jena.sparql.util.DatasetUtils ;
+import com.hp.hpl.jena.sparql.util.graph.GraphFactory ;
 import com.hp.hpl.jena.sparql.util.graph.GraphUtils ;
 import com.hp.hpl.jena.util.FileManager ;
 
@@ -35,33 +37,43 @@ import com.hp.hpl.jena.util.FileManager 
 
 public class DatasetFactory
 {
-    /** Create a Dataset
-     * 
-     * @return DataSource
+    /** Create an in-memory, modifable Dataset */
+    public static Dataset createMem() { return create() ; }
+    
+    /** Create an in-memory, modifable Dataset
+     * @deprecated Use createMem
      */
+    @Deprecated
     public static DataSource create()
-    { return DataSourceImpl.createMem() ; }
+    { 
+        // This may not be a defaultJena model - during testing, 
+        // we use a graph that is not value-aware for xsd:String vs plain literals.
+        return new DatasetImpl(ModelFactory.createModelForGraph(GraphFactory.createDefaultGraph()))
;
+    }
 
     /** Create a dataset with the given model as the default graph
      * @param model
-     * @return DataSource (Updateable Dataset) 
+     * @return Dataset 
      */ 
+    @SuppressWarnings("deprecation")
     public static DataSource create(Model model)
-    { return new DataSourceImpl(model) ; }
+    { return new DatasetImpl(model) ; }
 
     /** Create a dataset
      * @param dataset
-     * @return DataSource (Updateable Dataset) 
+     * @return Dataset 
      */ 
+    @SuppressWarnings("deprecation")
     public static DataSource create(Dataset dataset)
-    { return new DataSourceImpl(dataset) ; }
+    { return new DatasetImpl(dataset) ; }
 
     /** Wrap a datasetgraph to make a mutable dataset
      * @param dataset DatasetGraph
-     * @return DataSource (Updateable Dataset) 
+     * @return Dataset 
      */ 
+    @SuppressWarnings("deprecation")
     public static DataSource create(DatasetGraph dataset)
-    { return DataSourceImpl.wrap(dataset) ; }
+    { return new DatasetImpl(dataset) ; }
     
     /** Create a dataset based on a list of URIs : these are merged into the default graph
of the dataset.
      * 
@@ -197,7 +209,7 @@ public class DatasetFactory
 
     public static Dataset make(Dataset ds, Model defaultModel)
     {
-        DataSourceImpl ds2 = new DataSourceImpl(ds) ;
+        Dataset ds2 = new DatasetImpl(ds) ;
         ds2.setDefaultModel(defaultModel) ;
         return ds2 ; 
     }
@@ -221,9 +233,9 @@ public class DatasetFactory
      */
     public static Dataset assemble(Model model)
     {
-        Resource r = GraphUtils.findRootByType(model, DataSourceAssembler.getType()) ;
+        Resource r = GraphUtils.findRootByType(model, DatasetAssembler.getType()) ;
         if ( r == null )
-            throw new ARQException("No root found for type <"+DataSourceAssembler.getType()+">")
;
+            throw new ARQException("No root found for type <"+DatasetAssembler.getType()+">")
;
         
         return assemble(r) ;
     }

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/QueryExecutionFactory.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/QueryExecutionFactory.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/QueryExecutionFactory.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/query/QueryExecutionFactory.java
Tue Nov  8 21:06:41 2011
@@ -19,12 +19,12 @@
 package com.hp.hpl.jena.query;
 import java.util.List ;
 
+import org.openjena.atlas.logging.Log ;
+
 import com.hp.hpl.jena.graph.Graph ;
 import com.hp.hpl.jena.rdf.model.Model ;
-import com.hp.hpl.jena.sparql.core.DataSourceImpl ;
 import com.hp.hpl.jena.sparql.core.DatasetGraph ;
 import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
-import com.hp.hpl.jena.sparql.core.DatasetImpl ;
 import com.hp.hpl.jena.sparql.engine.Plan ;
 import com.hp.hpl.jena.sparql.engine.QueryEngineFactory ;
 import com.hp.hpl.jena.sparql.engine.QueryEngineRegistry ;
@@ -33,11 +33,9 @@ import com.hp.hpl.jena.sparql.engine.bin
 import com.hp.hpl.jena.sparql.engine.binding.BindingRoot ;
 import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP ;
 import com.hp.hpl.jena.sparql.syntax.Element ;
-import org.openjena.atlas.logging.Log ;
 import com.hp.hpl.jena.sparql.util.Context ;
 import com.hp.hpl.jena.util.FileManager ;
 
-
 /** Place to make QueryExecution objects from Query objects or a string. */
  
 public class QueryExecutionFactory
@@ -179,7 +177,7 @@ public class QueryExecutionFactory
     {
         checkArg(query) ;
         checkArg(model) ;
-        return make(query, new DatasetImpl(model)) ;
+        return make(query, DatasetFactory.create(model)) ;
     }
 
     /** Create a QueryExecution to execute over the Model.
@@ -261,7 +259,7 @@ public class QueryExecutionFactory
     static public QueryExecution create(Query query, Model model, QuerySolution initialBinding)
     {
         checkArg(model) ;
-        return create(query, new DataSourceImpl(model), initialBinding) ;
+        return create(query, DatasetFactory.create(model), initialBinding) ;
     }
     
     /** Create a QueryExecution to execute over the Model, 

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DatasetGraph.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DatasetGraph.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DatasetGraph.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DatasetGraph.java
Tue Nov  8 21:06:41 2011
@@ -25,15 +25,15 @@ import org.openjena.atlas.lib.Closeable 
 import com.hp.hpl.jena.graph.Graph ;
 import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.graph.TripleMatch ;
-import com.hp.hpl.jena.query.DataSource ;
 import com.hp.hpl.jena.query.Dataset ;
 import com.hp.hpl.jena.shared.Lock ;
 import com.hp.hpl.jena.sparql.util.Context ;
 
 /** DatasetGraph: The graph representation of an RDF Dataset. See {@link Dataset}
  * for the Model level, read-only view (fixed set of models - the models
- * themselves are still mutable) of an RDF dataset and {@link DataSource} for an
- * mutabe RDF Datset Whether a dataset contains a graph if there are no triples
+ * themselves are still mutable) of an RDF dataset.  
+ * <p>
+ * Whether a dataset contains a graph if there are no triples
  * is not defined; see the specifc implementation. Some datasets are "open" -
  * they have all graphs even if no triples, Some datasets are "closed" - fixed
  * set of graphs

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/DatasetImpl.java
Tue Nov  8 21:06:41 2011
@@ -25,7 +25,9 @@ import org.openjena.atlas.lib.CacheFacto
 
 import com.hp.hpl.jena.graph.Graph ;
 import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.query.DataSource ;
 import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.query.LabelExistsException ;
 import com.hp.hpl.jena.query.ReadWrite ;
 import com.hp.hpl.jena.rdf.model.Model ;
 import com.hp.hpl.jena.rdf.model.ModelFactory ;
@@ -33,40 +35,74 @@ import com.hp.hpl.jena.shared.Lock ;
 import com.hp.hpl.jena.sparql.ARQException ;
 import com.hp.hpl.jena.sparql.util.NodeUtils ;
 
-/** Wrapper around a DatasetGraph. See also DataSourceImpl. */
+/** A implementation of a Dataset.
+ * This is the "usual" implementation based on wrapping a DatasetGraph
+ * and providing an adapter layer from Model/Resource to Graph/Node
+ * The characteristics of this adpter depend on the charcateristics of
+ * DatasetGraph.   
+ */
 
-public class DatasetImpl implements Dataset
+@SuppressWarnings("deprecation")
+public class DatasetImpl implements Dataset, DataSource
 {
+    /* 
+     * We are cautious - SPARQL Update can change the graphs in a store
+     * so we assume DatasetGraph.getGraph is efficient and
+     * here cut the overhead of model wrappers.
+     */
+
     protected DatasetGraph dsg = null ;
-    private Object lock = new Object() ;
+    // Cache of graph -> model so that we don't churn model creation.
+    private Cache<Graph, Model> cache = CacheFactory.createCache(0.75f, 20) ;
+    private Object internalLock = new Object() ;
+
+    protected DatasetImpl()
+    {}
     
-    // A small cache so that calls getDefaultModel()/getNamedModel() are
-    // cheap when used repeatedly in code.  This is not an excuse for
-    // DatasetGraph not to cache if appropriate for the storage technology.
-    private Model defaultModel = null ;
-    // read synchronised in this class, not need for a sync wrapper.
-    private Cache<String, Model> cache = CacheFactory.createCache(0.75f, 20) ;    
 
+    public DatasetImpl(DatasetGraph dsg)
+    {
+        this.dsg = dsg ;
+    }
+    /** Wrap an existing DatasetGraph */
+    public static Dataset wrap(DatasetGraph datasetGraph)
+    {
+        DatasetImpl ds = new DatasetImpl() ;
+        ds.dsg = datasetGraph ; 
+        return ds ;
+    }
+    
+    /** Clone the structure of a DatasetGraph.
+     * The current graph themselves are shared but new naming and new graphs are
+     * only in the cloned    
+     */
+    public static Dataset cloneStructure(DatasetGraph datasetGraph)
+    { 
+        DatasetImpl ds = new DatasetImpl() ;
+        ds.dsg = new DatasetGraphMap(datasetGraph) ;
+        return ds ;
+    }
 
+    /** Create a Dataset with the model as default model.
+     *  Named models must be explicitly added to identify the storage to be used.
+     */
     public DatasetImpl(Model model)
     {
-        defaultModel = model ;
+        addToCache(model) ;
+        // TODO Is this right? this sort of DatasetGraph can't auto-add graphs.
         this.dsg = DatasetGraphFactory.create(model.getGraph()) ;
     }
-    
-    public DatasetImpl(DatasetGraph dsg)
+
+    public DatasetImpl(Dataset ds)
     {
-        this.dsg = dsg ;
+        this.dsg = DatasetGraphFactory.create(ds.asDatasetGraph()) ;
     }
 
-    /** Return the default model */
     @Override
     public Model getDefaultModel() 
     { 
-        synchronized(lock)
+        synchronized(internalLock)
         {
-            if ( defaultModel == null )
-                defaultModel = graph2model(dsg.getDefaultGraph()) ;
-            return defaultModel ;
+            return graph2model(dsg.getDefaultGraph()) ;
         }
     }
 
@@ -77,53 +113,72 @@ public class DatasetImpl implements Data
     @Override public void begin(ReadWrite mode)     { throw new UnsupportedOperationException("Transactions
not supported") ; }
     @Override public void commit()                  { throw new UnsupportedOperationException("Transactions
not supported") ; }
     @Override public void abort()                   { throw new UnsupportedOperationException("Transactions
not supported") ; }
- 
+  
     @Override
     public DatasetGraph asDatasetGraph() { return dsg ; }
 
-    /** Return a model for the named graph - repeated calls so not guarantee to return the
same Java object */
     @Override
     public Model getNamedModel(String uri)
     { 
         checkGraphName(uri) ;
-        
-        // synchronized because we need to read and possible update the cache atomically

-        synchronized(lock)
+        Node n = Node.createURI(uri) ;
+        synchronized(internalLock)
         {
-            Model m = cache.get(uri) ;
-            if ( m == null )
-            {
-                m = graph2model(dsg.getGraph(Node.createURI(uri))) ;
-                cache.put(uri, m) ;
-            }
-            return m ;
+            Graph g = dsg.getGraph(n) ;
+            if ( g == null )
+                return null ;
+            return graph2model(g) ;
         }
     }
 
-    private static void checkGraphName(String uri)
-    {
-        if ( uri == null )
-            throw new ARQException("null for graph name") ; 
+    @Override
+    public void addNamedModel(String uri, Model model) throws LabelExistsException
+    { 
+        checkGraphName(uri) ;
+        // Assumes single writer.
+        addToCache(model) ;
+        Node n = Node.createURI(uri) ;
+        dsg.addGraph(n, model.getGraph()) ;
     }
 
     @Override
-    public boolean containsNamedModel(String uri)
+    public void removeNamedModel(String uri)
+    { 
+        checkGraphName(uri) ;
+        Node n = Node.createURI(uri) ;
+        // Assumes single writer.
+        removeFromCache(dsg.getGraph(n)) ;
+        dsg.removeGraph(n) ;
+    }
+
+    @Override
+    public void replaceNamedModel(String uri, Model model)
     {
+        // Assumes single writer.
         checkGraphName(uri) ;
+        Node n = Node.createURI(uri) ;
+        removeFromCache(dsg.getGraph(n)) ;
+        dsg.removeGraph(n) ;
+        addToCache(model) ;
+        dsg.addGraph(n, model.getGraph() ) ;
+    }
 
-        // Don't look in the cache - just ask the DSG which either caches graphs
-        // or asks the storage as needed. The significant case is whether an
-        // empty graph is contained in a dataset.  If it's pure quad storage,
-        // the answer is usually better as "no"; if it's an in-memory
-        // dataset the answer is "yes". 
-        return dsg.containsGraph(Node.createURI(uri)) ;
+    @Override
+    public void setDefaultModel(Model model)
+    { 
+        // Assumes single writer.
+        removeFromCache(dsg.getDefaultGraph()) ;
+        addToCache(model) ;
+        dsg.setDefaultGraph(model.getGraph()) ;
     }
 
     @Override
-    public void close()
-    {
-        cache = null ;
-        dsg.close();
+    public boolean containsNamedModel(String uri)
+    { 
+        // Does not touch the cache.
+        checkGraphName(uri) ;
+        Node n = Node.createURI(uri) ;
+        return dsg.containsGraph(n) ;
     }
 
     @Override
@@ -132,8 +187,49 @@ public class DatasetImpl implements Data
         return NodeUtils.nodesToURIs(dsg.listGraphNodes()) ;
     }
 
+
+    //  -------
+    //  Cache models wrapping graphs
+    // Assumes outser syncrhonization of necessary (multiple readers possible).
+    // Assume MRSW (Multiple Reader OR Single Writer)
+
+    @Override
+    public void close()
+    {
+        dsg.close() ;
+        cache = null ;
+    }
+
+    private void removeFromCache(Graph graph)
+    {
+        // Assume MRSW - no synchronized needed.
+        if ( graph == null )
+            return ;
+        cache.remove(graph) ;
+    }
+
+    private void addToCache(Model model)
+    {
+        // Assume MRSW - no synchronized needed.
+        cache.put(model.getGraph(), model) ;
+    }
+
     private Model graph2model(Graph graph)
     { 
-        return ModelFactory.createModelForGraph(graph) ;
+        // Called from readers -- outer synchronation needed.
+        Model model = cache.get(graph) ;
+        if ( model == null )
+        {
+            model = ModelFactory.createModelForGraph(graph) ;
+            cache.put(graph, model) ;
+        }
+        return model ;
     }
+    
+    private static void checkGraphName(String uri)
+    {
+        if ( uri == null )
+            throw new ARQException("null for graph name") ; 
+    }
+
 }

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/AssemblerUtils.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/AssemblerUtils.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/AssemblerUtils.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/AssemblerUtils.java
Tue Nov  8 21:06:41 2011
@@ -65,7 +65,7 @@ public class AssemblerUtils
     static public void register(AssemblerGroup g)
     {
         // Wire in the extension assemblers (extensions relative to the Jena assembler framework)
-        g.implementWith(DataSourceAssembler.getType(), new DataSourceAssembler()) ;
+        g.implementWith(DatasetAssembler.getType(), new DatasetAssembler()) ;
         g.implementWith(GraphStoreAssembler.getType(), new GraphStoreAssembler()) ;
     }
     

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssembler.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssembler.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssembler.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/DatasetAssembler.java
Tue Nov  8 21:06:41 2011
@@ -16,28 +16,129 @@
  * limitations under the License.
  */
 
-package com.hp.hpl.jena.sparql.core.assembler ;
+package com.hp.hpl.jena.sparql.core.assembler;
+
+import java.lang.reflect.Method;
+import java.util.Iterator ;
+import java.util.List ;
 
 import com.hp.hpl.jena.assembler.Assembler ;
 import com.hp.hpl.jena.assembler.Mode ;
-import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.assembler.assemblers.AssemblerBase ;
+import com.hp.hpl.jena.query.Dataset;
+import com.hp.hpl.jena.query.DatasetFactory ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.RDFNode ;
 import com.hp.hpl.jena.rdf.model.Resource ;
+import org.openjena.atlas.logging.Log ;
+import org.slf4j.LoggerFactory ;
 
-public class DatasetAssembler extends DataSourceAssembler
-{
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
+import com.hp.hpl.jena.sparql.util.FmtUtils ;
+import com.hp.hpl.jena.sparql.util.graph.GraphFactory ;
+import com.hp.hpl.jena.sparql.util.graph.GraphUtils ;
 
+public class DatasetAssembler extends AssemblerBase implements Assembler
+{
+    public static Resource getType() { return DatasetAssemblerVocab.tDataset ; }
+    
     @Override
-    public final Object open(Assembler a, Resource root, Mode mode)
+    public Object open(Assembler a, Resource root, Mode mode)
     {
         Dataset ds = createDataset(a, root, mode) ;
         createTextIndex(ds, root) ;
+
+        return ds ;
+    }
+    
+    public Dataset createDataset(Assembler a, Resource root, Mode mode) 
+    {
+        // Expanding version.
+        DatasetGraph dsg = DatasetGraphFactory.createMem() ;
+        AssemblerUtils.setContext(root, dsg.getContext()) ;
+        
+        Dataset ds = DatasetFactory.create(dsg) ;
+
+        // -------- Default graph
+        // Can use ja:graph or ja:defaultGraph
+        Resource dftGraph = GraphUtils.getResourceValue(root, DatasetAssemblerVocab.pDefaultGraph)
;
+        if ( dftGraph == null )
+            dftGraph = GraphUtils.getResourceValue(root, DatasetAssemblerVocab.pGraph) ;
+        
+        Model dftModel = null ;
+        if ( dftGraph != null )
+            dftModel = a.openModel(dftGraph) ;
+        else
+            // Assembler description did not define one - make a dummy.
+            dftModel = GraphFactory.makePlainModel() ;
+
+        ds.setDefaultModel(dftModel) ;
+
+        // -------- Named graphs
+        List<RDFNode> nodes = GraphUtils.multiValue(root, DatasetAssemblerVocab.pNamedGraph)
; 
+        
+        for ( Iterator<RDFNode> iter= nodes.iterator() ; iter.hasNext() ; )
+        {
+            RDFNode n = iter.next();
+            if ( ! ( n instanceof Resource ) )
+                throw new DatasetAssemblerException(root, "Not a resource: "+FmtUtils.stringForRDFNode(n))
;
+            Resource r = (Resource)n ;
+
+            String gName = GraphUtils.getAsStringValue(r, DatasetAssemblerVocab.pGraphName)
;
+            Resource g = GraphUtils.getResourceValue(r, DatasetAssemblerVocab.pGraph) ;
+            if ( g == null )
+            {
+                g = GraphUtils.getResourceValue(r, DatasetAssemblerVocab.pGraphAlt) ;
+                if ( g != null )
+                    Log.warn(this, "Use of old vocabulary: use :graph not :graphData") ;
+                else
+                    throw new DatasetAssemblerException(root, "no graph for: "+gName) ;
+            }
+            
+            Model m = a.openModel(g) ;
+            ds.addNamedModel(gName, m) ;
+        }
         
         return ds ;
     }
+
+    public Object createTextIndex (Dataset ds, Resource root) 
+    {
+    	Object result = createTextIndex (ds, root, "org.apache.jena.larq.assembler.AssemblerLARQ")
;
+    	if ( result == null ) result = createTextIndex (ds, root, "com.hp.hpl.jena.query.larq.AssemblerLARQ")
;
+    	return result ;
+    }
     
-    public Dataset createDataset(Assembler a, Resource root, Mode mode)
+    protected Object createTextIndex (Dataset ds, Resource root, String className) 
     {
-        return super.createDataSource(a, root, mode) ;
+        try 
+        {
+            Class<?> clazz = Class.forName(className) ;
+            if ( root.hasProperty(DatasetAssemblerVocab.pIndex) ) 
+            {
+                try {
+                    Log.info(DatasetAssembler.class, "Initializing LARQ") ;
+                    String index = GraphUtils.getAsStringValue(root, DatasetAssemblerVocab.pIndex)
;
+                    Class<?> paramTypes[] = new Class[] { Dataset.class, String.class
} ;
+                    Method method = clazz.getDeclaredMethod("make", paramTypes) ;
+                    Object args[] = new Object[] { ds, index } ;
+                    return method.invoke(clazz, args) ;
+                } catch (Exception e) {
+                	String msg;
+                	if ( e.getMessage() != null ) {
+                		msg = e.getMessage();
+                	} else {
+                		msg = e.getCause().getMessage();
+                	}
+                    Log.warn(DatasetAssembler.class, String.format("Unable to initialize
LARQ using %s: %s", className, msg)) ;
+                }                
+            }
+        } catch(ClassNotFoundException e) {
+            LoggerFactory.getLogger(DatasetAssembler.class).debug("LARQ initialization: class
" + className + " not in the classpath.") ;
+        }
+        
+        return null ;
     }
     
 }

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/GraphStoreAssembler.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/GraphStoreAssembler.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/GraphStoreAssembler.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/core/assembler/GraphStoreAssembler.java
Tue Nov  8 21:06:41 2011
@@ -20,12 +20,12 @@ package com.hp.hpl.jena.sparql.core.asse
 
 import com.hp.hpl.jena.assembler.Assembler ;
 import com.hp.hpl.jena.assembler.Mode ;
-import com.hp.hpl.jena.query.DataSource ;
+import com.hp.hpl.jena.query.Dataset ;
 import com.hp.hpl.jena.rdf.model.Resource ;
 import com.hp.hpl.jena.update.GraphStore ;
 import com.hp.hpl.jena.update.GraphStoreFactory ;
 
-public class GraphStoreAssembler extends DataSourceAssembler
+public class GraphStoreAssembler extends DatasetAssembler
 {
     public static Resource getType() { return DatasetAssemblerVocab.tGraphStore ; }
     
@@ -33,12 +33,12 @@ public class GraphStoreAssembler extends
     public Object open(Assembler a, Resource root, Mode mode)
     {
         // Same vocabulary as datasets.
-        // Have dispatched on type by now so can just call the dataset code to build a DataSource.
+        // Have dispatched on type by now so can just call the dataset code to build a Dataset.
         
         GraphStore gs = null ;
         Object ds = super.open(a, root, mode) ;
-        if ( ds instanceof DataSource )
-            gs = GraphStoreFactory.create((DataSource)ds) ;
+        if ( ds instanceof Dataset )
+            gs = GraphStoreFactory.create((Dataset)ds) ;
         else
             throw new DatasetAssemblerException(root, "Not a graph store") ;
             

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/modify/GraphStoreBasic.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/modify/GraphStoreBasic.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/modify/GraphStoreBasic.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/modify/GraphStoreBasic.java
Tue Nov  8 21:06:41 2011
@@ -20,9 +20,9 @@ package com.hp.hpl.jena.sparql.modify;
 
 import com.hp.hpl.jena.graph.Graph ;
 import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.query.DatasetFactory ;
 import com.hp.hpl.jena.sparql.core.DatasetGraph ;
 import com.hp.hpl.jena.sparql.core.DatasetGraphWrapper ;
-import com.hp.hpl.jena.sparql.core.DatasetImpl ;
 import com.hp.hpl.jena.update.GraphStore ;
 
 public class GraphStoreBasic extends DatasetGraphWrapper implements GraphStore
@@ -40,7 +40,7 @@ public class GraphStoreBasic extends Dat
     @Override
     public Dataset toDataset()
     {
-        return new DatasetImpl(getWrapped()) ;
+        return DatasetFactory.create(getWrapped()) ;
     }
 
     @Override

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/util/DatasetUtils.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/util/DatasetUtils.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/util/DatasetUtils.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/util/DatasetUtils.java
Tue Nov  8 21:06:41 2011
@@ -24,10 +24,9 @@ import java.util.List ;
 
 import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.n3.IRIResolver ;
-import com.hp.hpl.jena.query.DataSource ;
 import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.query.DatasetFactory ;
 import com.hp.hpl.jena.rdf.model.Model ;
-import com.hp.hpl.jena.sparql.core.DataSourceImpl ;
 import com.hp.hpl.jena.sparql.core.DatasetDesc ;
 import com.hp.hpl.jena.sparql.core.DatasetGraph ;
 import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
@@ -60,7 +59,7 @@ public class DatasetUtils
     public static Dataset createDataset(List<String> uriList, List<String> namedSourceList,
                                         FileManager fileManager, String baseURI)
     {
-        DataSource ds = DataSourceImpl.createMem() ;
+        Dataset ds = DatasetFactory.createMem() ;
         addInGraphs(ds, uriList, namedSourceList, fileManager, baseURI) ;
         return ds ;
     }
@@ -78,13 +77,13 @@ public class DatasetUtils
     
     
     /** add graphs into an exiting DataSource */
-    public static Dataset addInGraphs(DataSource ds, List<String> uriList, List<String>
namedSourceList)
+    public static Dataset addInGraphs(Dataset ds, List<String> uriList, List<String>
namedSourceList)
     {
         return addInGraphs(ds, uriList, namedSourceList, null, null) ;
     }
     
     /** add graphs into an existing DataSource */
-    public static Dataset addInGraphs(DataSource ds, List<String> uriList, List<String>
namedSourceList,
+    public static Dataset addInGraphs(Dataset ds, List<String> uriList, List<String>
namedSourceList,
                                       FileManager fileManager, String baseURI)
     {
         if ( fileManager == null )

Modified: incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/core/TestDataset.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/core/TestDataset.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/core/TestDataset.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/core/TestDataset.java
Tue Nov  8 21:06:41 2011
@@ -29,7 +29,6 @@ import java.util.List ;
 import org.junit.Test ;
 import org.openjena.atlas.iterator.Iter ;
 
-import com.hp.hpl.jena.query.DataSource ;
 import com.hp.hpl.jena.query.Dataset ;
 import com.hp.hpl.jena.rdf.model.Model ;
 import com.hp.hpl.jena.rdf.model.ModelFactory ;
@@ -38,7 +37,7 @@ import com.hp.hpl.jena.rdf.model.Resourc
 
 public abstract class TestDataset
 {
-    protected abstract DataSource create() ;
+    protected abstract Dataset create() ;
     
     static Model model1 = ModelFactory.createDefaultModel() ;
     static Model model2 = ModelFactory.createDefaultModel() ;
@@ -88,7 +87,7 @@ public abstract class TestDataset
 
     @Test public void datasource_01()
     {
-        DataSource ds = create() ;
+        Dataset ds = create() ;
         ds.setDefaultModel(model2) ;
         assertTrue(model2.isIsomorphicWith(ds.getDefaultModel())) ;
     }
@@ -96,7 +95,7 @@ public abstract class TestDataset
     @Test public void datasource_02()
     {
         String graphName = "http://example/" ;
-        DataSource ds = create() ;
+        Dataset ds = create() ;
         ds.addNamedModel(graphName, model1) ;
         assertTrue(ds.containsNamedModel(graphName)) ;
         
@@ -118,7 +117,7 @@ public abstract class TestDataset
     @Test public void datasource_03()
     {
         String graphName = "http://example/" ;
-        DataSource ds = create() ;
+        Dataset ds = create() ;
         ds.addNamedModel(graphName, model1) ;
         ds.replaceNamedModel(graphName, model2) ;
         assertTrue(ds.containsNamedModel(graphName)) ;

Modified: incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/core/TestDatasetDataSource.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/core/TestDatasetDataSource.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/core/TestDatasetDataSource.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/core/TestDatasetDataSource.java
Tue Nov  8 21:06:41 2011
@@ -20,7 +20,7 @@ package com.hp.hpl.jena.sparql.core;
 
 import junit.framework.JUnit4TestAdapter ;
 
-import com.hp.hpl.jena.query.DataSource ;
+import com.hp.hpl.jena.query.Dataset ;
 import com.hp.hpl.jena.query.DatasetFactory ;
 
 public class TestDatasetDataSource extends TestDataset 
@@ -31,7 +31,5 @@ public class TestDatasetDataSource exten
     }
     
     @Override
-    protected DataSource create() { return DatasetFactory.create() ; }
-    
-
+    protected Dataset create() { return DatasetFactory.createMem() ; }
 }

Modified: incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/junit/UpdateTest.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/junit/UpdateTest.java?rev=1199454&r1=1199453&r2=1199454&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/junit/UpdateTest.java
(original)
+++ incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/junit/UpdateTest.java
Tue Nov  8 21:06:41 2011
@@ -24,14 +24,13 @@ import java.util.List ;
 import org.openjena.atlas.iterator.Iter ;
 import org.openjena.riot.checker.CheckerLiterals ;
 
-import com.hp.hpl.jena.query.DataSource ;
 import com.hp.hpl.jena.query.Dataset ;
+import com.hp.hpl.jena.query.DatasetFactory ;
 import com.hp.hpl.jena.query.Syntax ;
 import com.hp.hpl.jena.rdf.model.Model ;
 import com.hp.hpl.jena.rdf.model.Property ;
 import com.hp.hpl.jena.rdf.model.Resource ;
 import com.hp.hpl.jena.rdf.model.Statement ;
-import com.hp.hpl.jena.sparql.core.DataSourceImpl ;
 import com.hp.hpl.jena.sparql.core.DatasetGraph ;
 import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
 import com.hp.hpl.jena.sparql.vocabulary.TestManifestUpdate_11 ;
@@ -70,11 +69,11 @@ public class UpdateTest extends EarlTest
         this.result = result ;
         /*
          *  mf:action [ ut:query <insert-data-spo1.rq> ; 
-                ut:data <empty.ttl> 
-              ] ;
-    mf:result [ ut:result ut:success ; 
-                ut:data  <spo.ttl>
-              ] .
+                        ut:data <empty.ttl> 
+                      ] ;
+            mf:result [ ut:result ut:success ; 
+                        ut:data  <spo.ttl>
+                      ] .
 
          */
         
@@ -130,8 +129,6 @@ public class UpdateTest extends EarlTest
         }
     }
     
-    
-    
     private boolean datasetSame(Dataset ds1, Dataset ds2, boolean verbose)
     {
         List<String> names1 = Iter.toList(ds1.listNames()) ;
@@ -173,7 +170,7 @@ public class UpdateTest extends EarlTest
         //DataSource ds = DatasetFactory.create() ;
         DatasetGraph dsg = DatasetGraphFactory.createMem() ;
         // Growing. dataset.
-        DataSource ds = DataSourceImpl.wrap(dsg) ;
+        Dataset ds = DatasetFactory.create(dsg) ;
         
         
         List<String> dftData = getAll(r,  TestManifestUpdate_11.data) ;



Mime
View raw message