You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2016/12/22 17:55:06 UTC

[06/11] jena git commit: Fix typos and code formatting

Fix typos and code formatting


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

Branch: refs/heads/master
Commit: 53758b5fb4165b3484d3043a2d3fc98a1abafe61
Parents: ac1ad26
Author: Andy Seaborne <an...@apache.org>
Authored: Fri Dec 16 19:50:29 2016 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri Dec 16 23:30:34 2016 +0000

----------------------------------------------------------------------
 jena-integration-tests/README.md                |   2 +-
 jena-integration-tests/pom.xml                  |  13 +
 .../AbstractTestRDFConnection.java              | 382 -------------------
 .../TestRDFConnectionLocalMRSW.java             |  39 --
 .../TestRDFConnectionLocalTxnMem.java           |  39 --
 jena-rdfconnection/Documentation.md             |  10 +-
 jena-rdfconnection/pom.xml                      |   5 +-
 .../jena/rdfconnection/RDFConnection.java       |  17 +-
 .../rdfconnection/RDFConnectionFactory.java     |  35 +-
 .../jena/rdfconnection/RDFConnectionLocal.java  | 173 +++++----
 .../rdfconnection/RDFConnectionModular.java     | 108 +++---
 .../jena/rdfconnection/RDFConnectionRemote.java | 335 ++++++++--------
 .../RDFDatasetAccessConnection.java             |  16 +-
 .../rdfconnection/RDFDatasetConnection.java     |  40 +-
 .../rdfconnection/SparqlQueryConnection.java    |  34 +-
 .../rdfconnection/SparqlUpdateConnection.java   |  14 +-
 .../examples/RDFConnectionExample2.java         |  30 +-
 .../examples/RDFConnectionExample3.java         |  10 +-
 .../AbstractTestRDFConnection.java              | 267 +++++++------
 .../jena/rdfconnection/TS_RDFConnection.java    |   4 +-
 .../TestRDFConnectionLocalMRSW.java             |  10 +-
 .../TestRDFConnectionLocalTxnMem.java           |  10 +-
 pom.xml                                         |   8 +-
 23 files changed, 576 insertions(+), 1025 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-integration-tests/README.md
----------------------------------------------------------------------
diff --git a/jena-integration-tests/README.md b/jena-integration-tests/README.md
index 77f4df8..0759db4 100644
--- a/jena-integration-tests/README.md
+++ b/jena-integration-tests/README.md
@@ -1,4 +1,4 @@
-Jena Intrgration Tests
+Jena Integration Tests
 ======================
 
 This module provides testing of components where testing depends on

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/jena-integration-tests/pom.xml b/jena-integration-tests/pom.xml
index 9dca002..60f41e5 100644
--- a/jena-integration-tests/pom.xml
+++ b/jena-integration-tests/pom.xml
@@ -122,6 +122,19 @@
   <build>
 
     <plugins>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/AbstractTestRDFConnection.java
----------------------------------------------------------------------
diff --git a/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/AbstractTestRDFConnection.java b/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/AbstractTestRDFConnection.java
deleted file mode 100644
index 9b3a65f..0000000
--- a/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/AbstractTestRDFConnection.java
+++ /dev/null
@@ -1,382 +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 org.apache.jena.test.rdfconnection;
-
-import java.util.concurrent.atomic.AtomicInteger ;
-
-import org.apache.jena.atlas.iterator.Iter ;
-import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.query.DatasetFactory ;
-import org.apache.jena.query.ReadWrite ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.rdf.model.ModelFactory ;
-import org.apache.jena.rdfconnection.RDFConnection;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.sparql.sse.SSE ;
-import org.apache.jena.sparql.util.IsoMatcher ;
-import org.apache.jena.system.Txn ;
-import org.junit.Assume ;
-import org.junit.Test ;
-
-public abstract class AbstractTestRDFConnection extends BaseTest {
-    // Testing data.
-    static String DIR = "testing/RDFConnection/" ;
-    
-    protected abstract RDFConnection connection() ;
-    // Not all RDFConenction types support.
-    //  (may acquite RDFConnection.supportTransactionalAbort but ATM that isn't included)
-    protected abstract boolean supportsAbort() ; 
-
-    // ---- Data
-    static String dsgdata = StrUtils.strjoinNL
-        ("(dataset"
-        ,"  (graph (:s :p :o) (:s0 :p0 _:a))"
-        ,"  (graph :g1 (:s :p :o) (:s1 :p1 :o1))"
-        ,"  (graph :g2 (:s :p :o) (:s2 :p2 :o))"
-        ,")"
-        ) ;
-    
-    static String dsgdata2 = StrUtils.strjoinNL
-        ("(dataset"
-        ,"  (graph (:x :y :z))"
-        ,"  (graph :g9 (:s :p :o))"
-        ,")"
-        ) ;
-
-    
-    static String graph1 = StrUtils.strjoinNL
-        ("(graph (:s :p :o) (:s1 :p1 :o))"
-        ) ;
-
-    static String graph2 = StrUtils.strjoinNL
-        ("(graph (:s :p :o) (:s2 :p2 :o))"
-        ) ;
-    
-    static DatasetGraph dsg        = SSE.parseDatasetGraph(dsgdata);
-    static Dataset      dataset    = DatasetFactory.wrap(dsg);
-    static DatasetGraph dsg2       = SSE.parseDatasetGraph(dsgdata2);
-    static Dataset      dataset2   = DatasetFactory.wrap(dsg2);
-
-    static String       graphName  = "http://test/graph";
-    static String       graphName2 = "http://test/graph2";
-    static Model        model1     = ModelFactory.createModelForGraph(SSE.parseGraph(graph1));
-    static Model        model2     = ModelFactory.createModelForGraph(SSE.parseGraph(graph2));
-    // ---- Data
-
-    @Test public void connect_01() {
-        @SuppressWarnings("resource")
-        RDFConnection conn = connection() ;
-        assertFalse(conn.isClosed()) ;
-        conn.close() ;
-        assertTrue(conn.isClosed()) ;
-        // Allow multiple close()
-        conn.close() ;
-    }
-    
-    @Test public void dataset_load_1() {
-        String testDataFile = DIR+"data.trig" ; 
-        try ( RDFConnection conn = connection() ) {
-            conn.loadDataset(testDataFile);
-            Dataset ds0 = RDFDataMgr.loadDataset(testDataFile) ;
-            Dataset ds = conn.fetchDataset() ;
-            assertTrue("Datasets not isomorphic", isomorphic(ds0, ds)) ;
-        }
-    }
-
-    @Test public void dataset_put_1() {
-        try ( RDFConnection conn = connection() ) {
-            conn.putDataset(dataset) ; 
-            Dataset ds1 = conn.fetchDataset() ;
-            assertTrue("Datasets not isomorphic", isomorphic(dataset, ds1)) ;
-        }
-    }
-
-    @Test public void dataset_put_2() {
-        try ( RDFConnection conn = connection() ) {
-            conn.putDataset(dataset) ; 
-            conn.putDataset(dataset2) ;
-            Dataset ds1 = conn.fetchDataset() ;
-            assertTrue("Datasets not isomorphic", isomorphic(dataset2, ds1)) ;
-        }
-    }
-
-    @Test public void dataset_post_1() {
-        try ( RDFConnection conn = connection() ) {
-            conn.loadDataset(dataset);
-            Dataset ds1 = conn.fetchDataset() ;
-            assertTrue("Datasets not isomorphic", isomorphic(dataset, ds1)) ;
-        }
-    }
-    
-    @Test public void dataset_post_2() {
-        try ( RDFConnection conn = connection() ) {
-            conn.loadDataset(dataset);
-            conn.loadDataset(dataset2);
-            Dataset ds1 = conn.fetchDataset() ;
-            long x = Iter.count(ds1.listNames()) ;
-            assertEquals("NG count", 3, x) ;
-            assertFalse("Datasets are isomorphic", isomorphic(dataset, ds1)) ;
-            assertFalse("Datasets are isomorphic", isomorphic(dataset2, ds1)) ;
-        }
-    }
-
-    // Default graph
-    
-    @Test public void graph_load_1() {
-        String testDataFile = DIR+"data.ttl" ; 
-        Model m0 = RDFDataMgr.loadModel(testDataFile) ;
-        try ( RDFConnection conn = connection() ) {
-            conn.load(testDataFile);
-            Model m = conn.fetch() ;
-            assertTrue("Models not isomorphic", isomorphic(m0, m)) ;
-        }
-    }
-
-    @Test public void graph_put_1() {
-        try ( RDFConnection conn = connection() ) {
-            conn.put(model1); 
-            Dataset ds1 = conn.fetchDataset() ;
-            Model m0 = conn.fetch() ;
-            assertTrue("Models not isomorphic", isomorphic(model1, ds1.getDefaultModel())) ;
-            Model m = conn.fetch() ;
-            assertTrue("Models not isomorphic", isomorphic(model1, m)) ;
-        }
-    }
-
-    @Test public void graph_put_2() {
-        try ( RDFConnection conn = connection() ) {
-            conn.put(model1) ; 
-            conn.put(model2) ;
-            Model m = conn.fetch() ;
-            assertTrue("Models not isomorphic", isomorphic(m, model2)) ;
-            assertFalse("Models not isomorphic", isomorphic(m, model1)) ;
-        }
-    }
-
-    @Test public void graph_post_1() {
-        try ( RDFConnection conn = connection() ) {
-            conn.load(model1) ;
-            Model m = conn.fetch() ;
-            assertTrue("Models not isomorphic", isomorphic(m, model1)) ;
-        }
-    }
-    
-    @Test public void graph_post_2() {
-        try ( RDFConnection conn = connection() ) {
-            conn.load(model1) ;
-            conn.load(model2) ;
-            Model m = conn.fetch() ;
-            Model m0 = ModelFactory.createUnion(model2, model1) ;
-            assertTrue("Models are not isomorphic", isomorphic(m0, m)) ;
-        }
-    }
-
-    // DELETE
-    
-    // Named graphs
-    
-    @Test public void named_graph_load_1() {
-        String testDataFile = DIR+"data.ttl" ; 
-        Model m0 = RDFDataMgr.loadModel(testDataFile) ;
-        try ( RDFConnection conn = connection() ) {
-            conn.load(graphName, testDataFile);
-            Model m = conn.fetch(graphName) ;
-            assertTrue("Models not isomorphic", isomorphic(m0, m)) ;
-            Model mDft = conn.fetch() ;
-            assertTrue(mDft.isEmpty()) ;
-        }
-    }
-
-    @Test public void named_graph_put_1() {
-        try ( RDFConnection conn = connection() ) {
-            conn.put(graphName, model1); 
-            Dataset ds1 = conn.fetchDataset() ;
-            Model m0 = conn.fetch(graphName) ;
-            assertTrue("Models not isomorphic", isomorphic(model1, ds1.getNamedModel(graphName))) ;
-            Model m = conn.fetch(graphName) ;
-            assertTrue("Models not isomorphic", isomorphic(model1, m)) ;
-        }
-    }
-
-    @Test public void named_graph_put_2() {
-        try ( RDFConnection conn = connection() ) {
-            conn.put(graphName, model1) ; 
-            conn.put(graphName, model2) ;
-            Model m = conn.fetch(graphName) ;
-            assertTrue("Models not isomorphic", isomorphic(m, model2)) ;
-            assertFalse("Models not isomorphic", isomorphic(m, model1)) ;
-        }
-    }
-
-    @Test public void named_graph_put_2_different() {
-        try ( RDFConnection conn = connection() ) {
-            conn.put(graphName, model1) ; 
-            conn.put(graphName2, model2) ;
-            Model m1 = conn.fetch(graphName) ;
-            Model m2 = conn.fetch(graphName2) ;
-            assertTrue("Models not isomorphic", isomorphic(m1, model1)) ;
-            assertTrue("Models not isomorphic", isomorphic(m2, model2)) ;
-        }
-    }
-
-    @Test public void named_graph_post_1() {
-        try ( RDFConnection conn = connection() ) {
-            conn.load(graphName, model1) ;
-            Model m = conn.fetch(graphName) ;
-            assertTrue("Models not isomorphic", isomorphic(m, model1)) ;
-        }
-    }
-    
-    @Test public void named_graph_post_2() {
-        try ( RDFConnection conn = connection() ) {
-            conn.load(graphName, model1) ;
-            conn.load(graphName, model2) ;
-            Model m = conn.fetch(graphName) ;
-            Model m0 = ModelFactory.createUnion(model2, model1) ;
-            assertTrue("Models are not isomorphic", isomorphic(m0, m)) ;
-        }
-    }
-
-    // DELETE
-    
-    // Remote connections don't support transactions fully.  
-    //@Test public void transaction_01() 
-
-    private static boolean isomorphic(Dataset ds1, Dataset ds2) {
-        return IsoMatcher.isomorphic(ds1.asDatasetGraph(), ds2.asDatasetGraph()) ;
-    }
-    
-    private static boolean isomorphic(Model model1, Model model2) {
-        return model1.isIsomorphicWith(model2) ;
-    }
-    
-
-    @Test public void query_ask_01() {
-        try ( RDFConnection conn = connection() ) {
-            Txn.executeRead(conn, ()->{
-                boolean b = conn.queryAsk("ASK{}") ;
-                assertTrue(b) ;
-            }) ;
-        }
-    }
-
-    @Test public void query_ask_02() {
-        try ( RDFConnection conn = connection() ) {
-            boolean b = conn.queryAsk("ASK{}") ;
-            assertTrue(b) ;
-        }
-    }
-
-    @Test public void query_select_01() {
-        AtomicInteger counter = new AtomicInteger(0) ;
-        try ( RDFConnection conn = connection() ) {
-            Txn.executeWrite(conn, ()->conn.loadDataset(DIR+"data.trig"));
-            Txn.executeRead(conn, ()->
-                conn.querySelect("SELECT * { ?s ?p ?o }" , (r)->counter.incrementAndGet()));
-            assertEquals(2, counter.get()) ;
-        }
-    }
-
-    @Test public void query_select_02() {
-        AtomicInteger counter = new AtomicInteger(0) ;
-        try ( RDFConnection conn = connection() ) {
-            conn.loadDataset(DIR+"data.trig");
-            conn.querySelect("SELECT * { ?s ?p ?o}" , (r)->counter.incrementAndGet());
-            assertEquals(2, counter.get()) ;
-        }
-    }
-
-    @Test public void query_construct_01() {
-        try ( RDFConnection conn = connection() ) {
-            Txn.executeWrite(conn, ()->conn.loadDataset(DIR+"data.trig"));
-            Txn.executeRead(conn, ()-> {
-                Model m = conn.queryConstruct("CONSTRUCT WHERE { ?s ?p ?o }") ;
-                assertEquals(2, m.size()) ;
-            }) ;
-        }
-    }
-
-    @Test public void query_construct_02() {
-        try ( RDFConnection conn = connection() ) {
-            conn.loadDataset(DIR+"data.trig");
-            Model m = conn.queryConstruct("CONSTRUCT WHERE { ?s ?p ?o }") ;
-            assertEquals(2, m.size()) ;
-        }
-    }
-    
-    @Test public void update_01() {
-        try ( RDFConnection conn = connection() ) {
-            conn.update("INSERT DATA { <urn:x:s> <urn:x:p> <urn:x:o>}");
-        }
-    }
-
-    @Test public void update_02() {
-        try ( RDFConnection conn = connection() ) {
-            Txn.executeWrite(conn, ()->conn.update("INSERT DATA { <urn:x:s> <urn:x:p> <urn:x:o>}")) ;
-        }
-    }
-
-    // Not all Transactional support abort.
-    @Test public void transaction_commit_read_01() {
-        String testDataFile = DIR+"data.trig" ; 
-        try ( RDFConnection conn = connection() ) {
-
-            conn.begin(ReadWrite.WRITE) ;
-            conn.loadDataset(dataset);
-            conn.commit() ;
-            conn.end();
-            
-            conn.begin(ReadWrite.READ) ;
-            Model m = conn.fetch() ;
-            assertTrue(isomorphic(m, dataset.getDefaultModel())) ;
-            conn.end() ;
-        }
-    }
-    
-    // Not all RDFConnections support abort.
-    @Test public void transaction_abort_read02() {
-        Assume.assumeTrue(supportsAbort()) ;
-        
-        String testDataFile = DIR+"data.trig" ; 
-        try ( RDFConnection conn = connection() ) {
-            conn.begin(ReadWrite.WRITE) ;
-            conn.loadDataset(testDataFile);
-            conn.abort();
-            conn.end();
-            
-            conn.begin(ReadWrite.READ) ;
-            Model m = conn.fetch() ;
-            assertTrue(m.isEmpty()) ;
-            conn.end() ;
-        }
-    }
-
-    //@Test(expected=JenaTransactionException.class)
-    public void transaction_bad_01() {
-        try ( RDFConnection conn = connection() ) {
-            conn.begin(ReadWrite.WRITE) ;
-            // Should have conn.commit() ;
-            conn.end();
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/TestRDFConnectionLocalMRSW.java
----------------------------------------------------------------------
diff --git a/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/TestRDFConnectionLocalMRSW.java b/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/TestRDFConnectionLocalMRSW.java
deleted file mode 100644
index 8bc82ff..0000000
--- a/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/TestRDFConnectionLocalMRSW.java
+++ /dev/null
@@ -1,39 +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 org.apache.jena.test.rdfconnection;
-
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.query.DatasetFactory ;
-import org.apache.jena.rdfconnection.AbstractTestRDFConnection;
-import org.apache.jena.rdfconnection.RDFConnection;
-import org.apache.jena.rdfconnection.RDFConnectionFactory;
-
-public class TestRDFConnectionLocalMRSW extends AbstractTestRDFConnection {
-
-    @Override
-    protected boolean supportsAbort() { return false ; }
-    
-    @Override
-    protected RDFConnection connection() {
-        // General purpose, mixed storage, MRSW dataset.  
-        Dataset ds = DatasetFactory.create() ;
-        return RDFConnectionFactory.connect(ds) ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/TestRDFConnectionLocalTxnMem.java
----------------------------------------------------------------------
diff --git a/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/TestRDFConnectionLocalTxnMem.java b/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/TestRDFConnectionLocalTxnMem.java
deleted file mode 100644
index dd50553..0000000
--- a/jena-integration-tests/src/test/java/org/apache/jena/test/rdfconnection/TestRDFConnectionLocalTxnMem.java
+++ /dev/null
@@ -1,39 +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 org.apache.jena.test.rdfconnection;
-
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.query.DatasetFactory ;
-import org.apache.jena.rdfconnection.AbstractTestRDFConnection;
-import org.apache.jena.rdfconnection.RDFConnection;
-import org.apache.jena.rdfconnection.RDFConnectionFactory;
-
-public class TestRDFConnectionLocalTxnMem extends AbstractTestRDFConnection {
-
-    @Override
-    protected boolean supportsAbort() { return true ; }
-
-    @Override
-    protected RDFConnection connection() {
-        // Full transactional in-memory dataset.  
-        Dataset ds = DatasetFactory.createTxnMem() ;
-        return RDFConnectionFactory.connect(ds) ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-rdfconnection/Documentation.md
----------------------------------------------------------------------
diff --git a/jena-rdfconnection/Documentation.md b/jena-rdfconnection/Documentation.md
index af5ff6a..d12bf34 100644
--- a/jena-rdfconnection/Documentation.md
+++ b/jena-rdfconnection/Documentation.md
@@ -106,8 +106,8 @@ SPARQL does not define a remote transaction standard protocol. Each remote
 operation shuld be atomic (all happens or nothing happens) - this is the
 responsibility of the remote server.
 
-An `RDFConenction` will at least provide the client-side locking features.
-This means that overlapping operations that chnage data are naturally
+An `RDFConnection` will at least provide the client-side locking features.
+This means that overlapping operations that change data are naturally
 handled by the transaction pattern within a single JVM.
 
 ## Graph Store Protocol
@@ -150,7 +150,7 @@ provided).
 When creating an `QueryExecution` explicitly, care shoud be taken to close
 it. If the application wishes to capture the result set from a SELECT query and
 retain it across the lifetime of the transaction or `QueryExecution`, then
-the application create a copy which is not attached to any external system
+the application should create a copy which is not attached to any external system
 with `ResultSetFactory.copyResults`.
 
 ```
@@ -184,7 +184,7 @@ SPARQL Update opertions can be performed and mixed with other operations.
 
 In addition to the SPARQL Graph Store Protocol, operations on whole
 datasets are provided for fetching (HTTP GET), adding data (HTTP POST) and
-settign the data (HTTP PUT) on a dataset URL.  This assumes the remote
+setting the data (HTTP PUT) on a dataset URL.  This assumes the remote
 server supported these REST-style operations.  Apache Jena Fuseki does
 provide these.
 
@@ -202,4 +202,4 @@ operations are visible to the called code.
 
 ## Examples
 
-https://github.com/afs/jena-rdfconnection/tree/master/src/main/java/rdfconnection/examples
+https://github.com/apache/jena/jena-rdfconnection/tree/master/src/main/java/rdfconnection/examples

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-rdfconnection/pom.xml
----------------------------------------------------------------------
diff --git a/jena-rdfconnection/pom.xml b/jena-rdfconnection/pom.xml
index c58cce4..d2173c3 100644
--- a/jena-rdfconnection/pom.xml
+++ b/jena-rdfconnection/pom.xml
@@ -48,8 +48,9 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.jena</groupId>
-      <artifactId>jena-arq</artifactId>
+      <artifactId>apache-jena-libs</artifactId>
       <version>3.2.0-SNAPSHOT</version>
+      <type>pom</type>
     </dependency>
 
     <dependency>
@@ -77,7 +78,7 @@
     </dependency>    
 
     <!-- Testing -->
-    <!-- Test is also done in jena-integration-tests -->
+    <!-- Tests is also done in jena-integration-tests -->
     
     <dependency>
       <groupId>org.slf4j</groupId>

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnection.java
----------------------------------------------------------------------
diff --git a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnection.java b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnection.java
index 2610bb3..c1b95ea 100644
--- a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnection.java
+++ b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnection.java
@@ -53,21 +53,26 @@ import org.apache.jena.update.UpdateRequest ;
  * the remote server, multiple operations are not combined into a single
  * transaction.
  * 
- * Not all implementations may implement all operations. See the implementation
- * notes for details.
+ * Not all implementations may implement all operations. 
+ * See the implementation notes for details.
  * 
  * @see RDFConnectionFactory
  * @see RDFConnectionLocal
  * @see RDFConnectionRemote
+ * @see SparqlQueryConnection
+ * @see SparqlUpdateConnection
+ * @see RDFDatasetConnection
+ * 
  */  
-public interface RDFConnection
-    // Default implementations could be pushed up but then they can't be mentioned here.  
-    extends
+public interface RDFConnection extends
         SparqlQueryConnection, SparqlUpdateConnection, RDFDatasetConnection,
         Transactional, AutoCloseable 
  {
-    // Inherits interfaces : re-mentioned to get the javadoc in one place.
+    // Default implementations could be pushed up but then they can't be mentioned here
+    // so that the Javadoc for RDFConnection is not in one place.
+    // Inheriting interfaces and re-mentioning gets the javadoc in one place.
     
+
     // ---- SparqlQueryConnection
 
     /**

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionFactory.java
----------------------------------------------------------------------
diff --git a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionFactory.java b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionFactory.java
index ee78a8d..e7cfb57 100644
--- a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionFactory.java
+++ b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionFactory.java
@@ -18,10 +18,9 @@
 
 package org.apache.jena.rdfconnection;
 
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.system.JenaSystem ;
+import org.apache.jena.query.Dataset;
+import org.apache.jena.system.JenaSystem;
 
-// Pool stuff
 public class RDFConnectionFactory {
     static { JenaSystem.init(); }
     
@@ -42,32 +41,38 @@ public class RDFConnectionFactory {
      * @see #connect(String, String, String, String)
      */
     public static RDFConnection connect(String destination) {
-        return new RDFConnectionRemote(destination) ;
+        return new RDFConnectionRemote(destination);
     }
 
-    /** Create a connection to a remote location by URL.
-     * This is the URL for the dataset.
+    /** Create a connection specifying the URLs of the service.
      * 
-     *  This call requires specifying the names of the service.
-     */ 
+     * @param queryServiceEndpoint
+     * @param updateServiceEndpoint
+     * @param graphStoreProtocolEndpoint
+     * @return RDFConnection
+     */
     public static RDFConnection connect(String queryServiceEndpoint,
                                         String updateServiceEndpoint,
                                         String graphStoreProtocolEndpoint) {
-        return new RDFConnectionRemote(queryServiceEndpoint, updateServiceEndpoint, graphStoreProtocolEndpoint) ;
+        return new RDFConnectionRemote(queryServiceEndpoint, updateServiceEndpoint, graphStoreProtocolEndpoint);
    }
 
     
     /** Create a connection to a remote location by URL.
      * This is the URL for the dataset.
+     * Each service is then specified by a URL which is relative to the {@code datasetURL}.
      * 
-     *  This call requires specifying the names of the servicerelative to the dataset URL.
-     *  
-     */ 
+     * @param datasetURL
+     * @param queryServiceEndpoint
+     * @param updateServiceEndpoint
+     * @param graphStoreProtocolEndpoint
+     * @return RDFConnection
+     */
     public static RDFConnection connect(String datasetURL,
                                         String queryServiceEndpoint,
                                         String updateServiceEndpoint,
                                         String graphStoreProtocolEndpoint) {
-        return new RDFConnectionRemote(datasetURL, queryServiceEndpoint, updateServiceEndpoint, graphStoreProtocolEndpoint) ;
+        return new RDFConnectionRemote(datasetURL, queryServiceEndpoint, updateServiceEndpoint, graphStoreProtocolEndpoint);
     }
 
     /**
@@ -76,9 +81,7 @@ public class RDFConnectionFactory {
      * @return RDFConnection
      */
     public static RDFConnection connect(Dataset dataset) {
-        return new RDFConnectionLocal(dataset) ;
+        return new RDFConnectionLocal(dataset);
     }
 
-    //public RDFConnection getFromPool() ;
 }
-

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionLocal.java
----------------------------------------------------------------------
diff --git a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionLocal.java b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionLocal.java
index 2f7be62..d2fb4df 100644
--- a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionLocal.java
+++ b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionLocal.java
@@ -18,76 +18,75 @@
 
 package org.apache.jena.rdfconnection;
 
-import java.util.Objects ;
-
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.query.* ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.rdf.model.ModelFactory ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.riot.RDFLanguages ;
-import org.apache.jena.sparql.ARQException ;
-import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.sparql.core.DatasetGraphFactory ;
-import org.apache.jena.sparql.core.DatasetGraphReadOnly ;
-import org.apache.jena.sparql.graph.GraphReadOnly ;
-import org.apache.jena.system.Txn ;
-import org.apache.jena.update.UpdateExecutionFactory ;
-import org.apache.jena.update.UpdateRequest ;
+import java.util.Objects;
+
+import org.apache.jena.graph.Graph;
+import org.apache.jena.query.*;
+import org.apache.jena.rdf.model.Model;
+import org.apache.jena.rdf.model.ModelFactory;
+import org.apache.jena.riot.Lang;
+import org.apache.jena.riot.RDFDataMgr;
+import org.apache.jena.riot.RDFLanguages;
+import org.apache.jena.sparql.ARQException;
+import org.apache.jena.sparql.core.DatasetGraph;
+import org.apache.jena.sparql.core.DatasetGraphFactory;
+import org.apache.jena.sparql.core.DatasetGraphReadOnly;
+import org.apache.jena.sparql.graph.GraphReadOnly;
+import org.apache.jena.system.Txn;
+import org.apache.jena.update.UpdateExecutionFactory;
+import org.apache.jena.update.UpdateRequest;
 
 /** 
- * 
+ * Implement of {@link RDFConnection} over a {@link Dataset} in the same JVM.
  */
 
 public class RDFConnectionLocal implements RDFConnection {
-    // XXX Expose copy-mode
-
+    // XXX Expose copy-mode?
     
-    private ThreadLocal<Boolean> transactionActive = ThreadLocal.withInitial(()->false) ;
-    private static boolean isolateByCopy = true ; 
-    private Dataset dataset ;
+    private ThreadLocal<Boolean> transactionActive = ThreadLocal.withInitial(()->false);
+    private static boolean isolateByCopy = true; 
+    private Dataset dataset;
     
     public RDFConnectionLocal(Dataset dataset) {
-        this.dataset = dataset ;
+        this.dataset = dataset;
     }
     
     @Override
     public QueryExecution query(Query query) {
-        checkOpen() ;
-        return Txn.calculateRead(dataset, ()->QueryExecutionFactory.create(query, dataset)) ;
+        checkOpen();
+        return Txn.calculateRead(dataset, ()->QueryExecutionFactory.create(query, dataset));
     }
 
     @Override
     public void update(UpdateRequest update) {
-        checkOpen() ;
-        Txn.executeWrite(dataset, ()->UpdateExecutionFactory.create(update, dataset).execute() ) ; 
+        checkOpen();
+        Txn.executeWrite(dataset, ()->UpdateExecutionFactory.create(update, dataset).execute() ); 
     }
 
     @Override
     public void load(String graph, String file) {
-        checkOpen() ;
-        doPutPost(graph, file, false) ;
+        checkOpen();
+        doPutPost(graph, file, false);
     }
 
     @Override
     public void load(String file) {
-        checkOpen() ;
-        doPutPost(null, file, false) ;
+        checkOpen();
+        doPutPost(null, file, false);
     }
 
     @Override
     public void load(String graphName, Model model) {
-        checkOpen() ;
+        checkOpen();
         Txn.executeWrite(dataset, ()-> {
-            Model modelDst = modelFor(graphName) ; 
-            modelDst.add(model) ;
-        }) ;
+            Model modelDst = modelFor(graphName); 
+            modelDst.add(model);
+        });
     }
 
     @Override
     public void load(Model model) { 
-        load(null, model) ;
+        load(null, model);
     }
 
     /**
@@ -99,70 +98,70 @@ public class RDFConnectionLocal implements RDFConnection {
     @Override
     public Model fetch(String graph) {
         return Txn.calculateRead(dataset, ()-> {
-            Model model = modelFor(graph) ; 
-            return isolate(model) ; 
-        }) ;
+            Model model = modelFor(graph); 
+            return isolate(model); 
+        });
     }
 
     @Override
     public Model fetch() {
-        checkOpen() ;
-        return fetch(null) ;
+        checkOpen();
+        return fetch(null);
     }
 
     @Override
     public void put(String file) {
-        checkOpen() ;
-        doPutPost(null, file, true) ;
+        checkOpen();
+        doPutPost(null, file, true);
     }
 
     @Override
     public void put(String graph, String file) {
-        checkOpen() ;
-        doPutPost(graph, file, true) ;
+        checkOpen();
+        doPutPost(graph, file, true);
     }
 
     @Override
     public void put(Model model) {
-        put(null, model) ; 
+        put(null, model); 
     }
 
     @Override
     public void put(String graphName, Model model) {
-        checkOpen() ;
+        checkOpen();
         Txn.executeWrite(dataset, ()-> {
-            Model modelDst = modelFor(graphName) ; 
+            Model modelDst = modelFor(graphName); 
             modelDst.removeAll();
-            modelDst.add(model) ;
-        }) ;
+            modelDst.add(model);
+        });
     }
 
     @Override
     public void delete(String graph) {
-        checkOpen() ;
+        checkOpen();
         Txn.executeWrite(dataset,() ->{
             if ( RDFConn.isDefault(graph) ) 
                 dataset.getDefaultModel().removeAll();
             else 
                 dataset.removeNamedModel(graph);
-        }) ;
+        });
     }
 
     @Override
     public void delete() {
-        checkOpen() ;
-        delete(null) ;
+        checkOpen();
+        delete(null);
     }
 
     private void doPutPost(String graph, String file, boolean replace) {
-        Objects.requireNonNull(file) ;
-        Lang lang = RDFLanguages.filenameToLang(file) ;
+        Objects.requireNonNull(file);
+        Lang lang = RDFLanguages.filenameToLang(file);
         
         Txn.executeWrite(dataset,() ->{
             if ( RDFLanguages.isTriples(lang) ) {
-                Model model = RDFConn.isDefault(graph) ? dataset.getDefaultModel() : dataset.getNamedModel(graph) ;
+                Model model = RDFConn.isDefault(graph) ? dataset.getDefaultModel() : dataset.getNamedModel(graph);
                 if ( replace )
-                    model.removeAll() ;
+                    model.removeAll();
                 RDFDataMgr.read(model, file); 
             }
             else if ( RDFLanguages.isQuads(lang) ) {
@@ -172,8 +171,8 @@ public class RDFConnectionLocal implements RDFConnection {
                 RDFDataMgr.read(dataset, file); 
             }
             else
-                throw new ARQException("Not an RDF format: "+file+" (lang="+lang+")") ;
-        }) ;
+                throw new ARQException("Not an RDF format: "+file+" (lang="+lang+")");
+        });
     }
 
     /**
@@ -183,13 +182,13 @@ public class RDFConnectionLocal implements RDFConnection {
     private Model isolate(Model model) {
         if ( ! isolateByCopy ) {
             // Half-way - read-only but dataset changes can be seen. 
-            Graph g = new GraphReadOnly(model.getGraph()) ;
-            return ModelFactory.createModelForGraph(g) ;
+            Graph g = new GraphReadOnly(model.getGraph());
+            return ModelFactory.createModelForGraph(g);
         }
         // Copy.
-        Model m2 = ModelFactory.createDefaultModel() ;
-        m2.add(model) ;
-        return m2 ;
+        Model m2 = ModelFactory.createDefaultModel();
+        m2.add(model);
+        return m2;
     }
 
     /**
@@ -198,72 +197,72 @@ public class RDFConnectionLocal implements RDFConnection {
      */
     private Dataset isolate(Dataset dataset) {
         if ( ! isolateByCopy ) {
-            DatasetGraph dsg = new DatasetGraphReadOnly(dataset.asDatasetGraph()) ;
-            return DatasetFactory.wrap(dsg) ;
+            DatasetGraph dsg = new DatasetGraphReadOnly(dataset.asDatasetGraph());
+            return DatasetFactory.wrap(dsg);
         }
 
         // Copy.
-        DatasetGraph dsg2 = DatasetGraphFactory.create() ;
+        DatasetGraph dsg2 = DatasetGraphFactory.create();
         dataset.asDatasetGraph().find().forEachRemaining(q -> dsg2.add(q) );
-        return DatasetFactory.wrap(dsg2) ;
+        return DatasetFactory.wrap(dsg2);
     }
 
     private Model modelFor(String graph) {
         if ( RDFConn.isDefault(graph)) 
-            return dataset.getDefaultModel() ;
-        return dataset.getNamedModel(graph) ;
+            return dataset.getDefaultModel();
+        return dataset.getNamedModel(graph);
     }
 
     @Override
     public Dataset fetchDataset() {
-        checkOpen() ;
-        return Txn.calculateRead(dataset,() -> isolate(dataset)) ;   
+        checkOpen();
+        return Txn.calculateRead(dataset,() -> isolate(dataset));   
     }
 
     @Override
     public void loadDataset(String file) {
-        checkOpen() ;
+        checkOpen();
         Txn.executeWrite(dataset,() ->{
             RDFDataMgr.read(dataset, file);
-        }) ;
+        });
     }
 
     @Override
     public void loadDataset(Dataset dataset) {
         Txn.executeWrite(dataset,() ->{
-            dataset.asDatasetGraph().find().forEachRemaining((q)->this.dataset.asDatasetGraph().add(q)) ;
-        }) ;
+            dataset.asDatasetGraph().find().forEachRemaining((q)->this.dataset.asDatasetGraph().add(q));
+        });
     }
 
     @Override
     public void putDataset(String file) {
-        checkOpen() ;
+        checkOpen();
         Txn.executeWrite(dataset,() ->{
             dataset.asDatasetGraph().clear();
             RDFDataMgr.read(dataset, file);
-        }) ;
+        });
     }
 
     @Override
     public void putDataset(Dataset dataset) {
         Txn.executeWrite(dataset,() ->{
-            this.dataset = isolate(dataset) ;
-        }) ;
+            this.dataset = isolate(dataset);
+        });
     }
 
     @Override
     public void close() {
-        dataset = null ;
+        dataset = null;
     }
     
     @Override
     public boolean isClosed() {
-        return dataset == null ;
+        return dataset == null;
     }
 
     private void checkOpen() {
         if ( dataset == null )
-            throw new ARQException("closed") ;
+            throw new ARQException("closed");
     }
 
     @Override
@@ -276,10 +275,10 @@ public class RDFConnectionLocal implements RDFConnection {
     public void abort()                     { dataset.abort(); }
 
     @Override
-    public boolean isInTransaction()        { return dataset.isInTransaction() ; }
+    public boolean isInTransaction()        { return dataset.isInTransaction(); }
 
     @Override
-    public void end()                       { dataset.end() ; }
+    public void end()                       { dataset.end(); }
     
    
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionModular.java
----------------------------------------------------------------------
diff --git a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionModular.java b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionModular.java
index 8f36355..77e473c 100644
--- a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionModular.java
+++ b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionModular.java
@@ -18,23 +18,24 @@
 
 package org.apache.jena.rdfconnection;
 
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.query.Query ;
-import org.apache.jena.query.QueryExecution ;
-import org.apache.jena.query.ReadWrite ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.sparql.core.Transactional ;
-import org.apache.jena.update.UpdateRequest ;
-
-/** 
- * 
+import org.apache.jena.query.Dataset;
+import org.apache.jena.query.Query;
+import org.apache.jena.query.QueryExecution;
+import org.apache.jena.query.ReadWrite;
+import org.apache.jena.rdf.model.Model;
+import org.apache.jena.sparql.core.Transactional;
+import org.apache.jena.update.UpdateRequest;
+
+/**
+ * Implementation of {@link RDFConnection} where the query, update and graph store
+ * operations are given by specific implementations of the respective interfaces.
  */
 public class RDFConnectionModular implements RDFConnection {
     
-    private final SparqlQueryConnection queryConnection ;
-    private final SparqlUpdateConnection updateConnection ;
-    private final RDFDatasetConnection datasetConnection ;
-    private final Transactional transactional ;
+    private final SparqlQueryConnection queryConnection;
+    private final SparqlUpdateConnection updateConnection;
+    private final RDFDatasetConnection datasetConnection;
+    private final Transactional transactional;
     
     @Override
     public void begin(ReadWrite readWrite) { transactional.begin(readWrite); }
@@ -46,144 +47,139 @@ public class RDFConnectionModular implements RDFConnection {
     public void end() { transactional.end(); }
     @Override
     public boolean isInTransaction() { 
-        return transactional.isInTransaction() ;
+        return transactional.isInTransaction();
     }
     
     public RDFConnectionModular(SparqlQueryConnection queryConnection ,
                                 SparqlUpdateConnection updateConnection ,
                                 RDFDatasetConnection datasetConnection ) {
-        this.queryConnection = queryConnection ;
-        this.updateConnection = updateConnection ;
-        this.datasetConnection = datasetConnection ;
+        this.queryConnection = queryConnection;
+        this.updateConnection = updateConnection;
+        this.datasetConnection = datasetConnection;
         this.transactional = 
             updateConnection  != null ? updateConnection :
             datasetConnection != null ? datasetConnection :
             queryConnection   != null ? queryConnection :
-            null ;
+            null;
     }
     
-    public RDFConnectionModular(RDFConnection connection ) {
-        this.queryConnection = connection ;
-        this.updateConnection = connection ;
-        this.datasetConnection = connection ;
-        this.transactional = connection ;
+    public RDFConnectionModular(RDFConnection connection) {
+        this.queryConnection = connection;
+        this.updateConnection = connection;
+        this.datasetConnection = connection;
+        this.transactional = connection;
     }
 
     private SparqlQueryConnection queryConnection() {
         if ( queryConnection == null )
-            throw new UnsupportedOperationException("No SparqlQueryConnection") ;
-        return queryConnection ;
+            throw new UnsupportedOperationException("No SparqlQueryConnection");
+        return queryConnection;
     }
     
     private SparqlUpdateConnection updateConnection() {
         if ( updateConnection == null )
-            throw new UnsupportedOperationException("No SparqlUpdateConnection") ;
-        return updateConnection ;
+            throw new UnsupportedOperationException("No SparqlUpdateConnection");
+        return updateConnection;
     }
 
     private RDFDatasetConnection datasetConnection() {
         if ( datasetConnection == null )
-            throw new UnsupportedOperationException("No RDFDatasetConnection") ;
-        return datasetConnection ;
+            throw new UnsupportedOperationException("No RDFDatasetConnection");
+        return datasetConnection;
     }
-    
-    
 
     @Override
-    public QueryExecution query(Query query) { return queryConnection().query(query) ; }
+    public QueryExecution query(Query query) { return queryConnection().query(query); }
 
     @Override
     public void update(UpdateRequest update) {
-        updateConnection().update(update) ;
+        updateConnection().update(update);
     }
 
     @Override
     public void load(String graphName, String file) {
-        datasetConnection().load(graphName, file) ;
+        datasetConnection().load(graphName, file);
     }
 
     @Override
     public void load(String file) {
-        datasetConnection().load(file) ;
+        datasetConnection().load(file);
     }
 
     @Override
     public void load(String graphName, Model model) {
-        datasetConnection().load(graphName, model) ;
+        datasetConnection().load(graphName, model);
     }
 
     @Override
     public void load(Model model) {
-        datasetConnection().load(model) ;
+        datasetConnection().load(model);
     }
 
     @Override
     public void put(String graphName, String file) {
-        datasetConnection().put(graphName, file) ;
+        datasetConnection().put(graphName, file);
     }
 
     @Override
     public void put(String file) {
-        datasetConnection().put(file) ;
+        datasetConnection().put(file);
     }
 
     @Override
     public void put(String graphName, Model model) {
-        datasetConnection().put(graphName, model) ;
+        datasetConnection().put(graphName, model);
     }
 
     @Override
     public void put(Model model) {
-        datasetConnection().put(model) ;
+        datasetConnection().put(model);
     }
 
     @Override
     public void delete(String graphName) {
-        datasetConnection().delete(graphName) ;
+        datasetConnection().delete(graphName);
     }
 
     @Override
     public void delete() {
-        datasetConnection().delete() ;
+        datasetConnection().delete();
     }
 
     @Override
     public void loadDataset(String file) {
-        datasetConnection().loadDataset(file) ;
+        datasetConnection().loadDataset(file);
     }
 
     @Override
     public void loadDataset(Dataset dataset) {
-        datasetConnection().loadDataset(dataset) ;
+        datasetConnection().loadDataset(dataset);
     }
 
     @Override
     public void putDataset(String file) {
-        datasetConnection().putDataset(file) ;
+        datasetConnection().putDataset(file);
     }
 
     @Override
     public void putDataset(Dataset dataset) {
-        datasetConnection().putDataset(dataset) ;
+        datasetConnection().putDataset(dataset);
     }
 
-    //    /** Clear the dataset - remove all named graphs, clear the default graph. */
-    //    public void clearDataset() ;
-    
     @Override
     public Model fetch(String graphName) {
-        return datasetConnection.fetch(graphName) ;
+        return datasetConnection.fetch(graphName);
     }
     @Override
     public Model fetch() {
-        return datasetConnection().fetch() ;
+        return datasetConnection().fetch();
     }
     @Override
     public Dataset fetchDataset() {
-        return datasetConnection().fetchDataset() ;
+        return datasetConnection().fetchDataset();
     }
     @Override
-    public boolean isClosed() { return false ; }
+    public boolean isClosed() { return false; }
     
     /** Close this connection.  Use with try-resource. */ 
     @Override 
@@ -193,7 +189,7 @@ public class RDFConnectionModular implements RDFConnection {
         if ( updateConnection != null )
             updateConnection.close();
         if ( datasetConnection != null )
-            datasetConnection.close() ;
+            datasetConnection.close();
     }
 }
 

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionRemote.java
----------------------------------------------------------------------
diff --git a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionRemote.java b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionRemote.java
index 02d7bef..183cff1 100644
--- a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionRemote.java
+++ b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFConnectionRemote.java
@@ -18,65 +18,60 @@
 
 package org.apache.jena.rdfconnection;
 
-import static java.util.Objects.requireNonNull ;
-
-import java.io.File ;
-import java.io.InputStream ;
-import java.util.concurrent.locks.ReentrantLock ;
-import java.util.function.Supplier ;
-
-import org.apache.http.HttpEntity ;
-import org.apache.http.client.HttpClient ;
-import org.apache.http.entity.EntityTemplate ;
-import org.apache.http.protocol.HttpContext ;
-import org.apache.jena.atlas.io.IO ;
-import org.apache.jena.atlas.web.HttpException ;
-import org.apache.jena.atlas.web.TypedInputStream ;
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.query.* ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.rdf.model.ModelFactory ;
-import org.apache.jena.riot.* ;
-import org.apache.jena.riot.web.HttpCaptureResponse ;
-import org.apache.jena.riot.web.HttpOp ;
-import org.apache.jena.riot.web.HttpResponseLib ;
-import org.apache.jena.sparql.ARQException ;
-import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.sparql.core.Transactional ;
-import org.apache.jena.system.Txn ;
-import org.apache.jena.update.UpdateExecutionFactory ;
-import org.apache.jena.update.UpdateProcessor ;
-import org.apache.jena.update.UpdateRequest ;
-import org.apache.jena.web.HttpSC ;
+import static java.util.Objects.requireNonNull;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.function.Supplier;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.client.HttpClient;
+import org.apache.http.entity.EntityTemplate;
+import org.apache.http.protocol.HttpContext;
+import org.apache.jena.atlas.io.IO;
+import org.apache.jena.atlas.web.HttpException;
+import org.apache.jena.atlas.web.TypedInputStream;
+import org.apache.jena.graph.Graph;
+import org.apache.jena.query.*;
+import org.apache.jena.rdf.model.Model;
+import org.apache.jena.rdf.model.ModelFactory;
+import org.apache.jena.riot.*;
+import org.apache.jena.riot.web.HttpCaptureResponse;
+import org.apache.jena.riot.web.HttpOp;
+import org.apache.jena.riot.web.HttpResponseLib;
+import org.apache.jena.sparql.ARQException;
+import org.apache.jena.sparql.core.DatasetGraph;
+import org.apache.jena.sparql.core.Transactional;
+import org.apache.jena.system.Txn;
+import org.apache.jena.update.UpdateExecutionFactory;
+import org.apache.jena.update.UpdateProcessor;
+import org.apache.jena.update.UpdateRequest;
+import org.apache.jena.web.HttpSC;
 
 /** 
- * 
+ * Implemntation of the {@link RDFConnection} interface using remote SPARQL operations.  
  */
 public class RDFConnectionRemote implements RDFConnection {
-    private static final String fusekiDftSrvQuery   = "sparql" ;
-    private static final String fusekiDftSrvUpdate  = "update" ;
-    private static final String fusekiDftSrvGSP     = "data" ;
+    private static final String fusekiDftSrvQuery   = "sparql";
+    private static final String fusekiDftSrvUpdate  = "update";
+    private static final String fusekiDftSrvGSP     = "data";
     
-    private boolean isOpen = true ; 
-    private final String destination ;
-    private final String svcQuery ;
-    private final String svcUpdate ;
-    private final String svcGraphStore ;
-    private HttpClient httpClient ;
-    private HttpContext httpContext = null ;
+    private boolean isOpen = true; 
+    private final String destination;
+    private final String svcQuery;
+    private final String svcUpdate;
+    private final String svcGraphStore;
+    private HttpClient httpClient;
+    private HttpContext httpContext = null;
     
-    // Builder?
-    // HttpContext, HttpClient.
-    // Statics for "query", "query+update" : SparqlQueryConnectionRemote > SparqlUpdateConnectionRemote > RDFConnectionRemote
-    // XXX Very long "HttpOp.execHttpPost"
-    
-    /** Create connection that wil use the {@link HttpClient} using URL of the dataset and default service names */
+    /** Create connection that will use the {@link HttpClient} using URL of the dataset and default service names */
     public RDFConnectionRemote(HttpClient httpClient, String destination) {
         this(httpClient,
              requireNonNull(destination),
              fusekiDftSrvQuery, 
              fusekiDftSrvUpdate,
-             fusekiDftSrvGSP) ;
+             fusekiDftSrvGSP);
     }
 
 
@@ -85,329 +80,327 @@ public class RDFConnectionRemote implements RDFConnection {
         this(requireNonNull(destination),
              fusekiDftSrvQuery, 
              fusekiDftSrvUpdate,
-             fusekiDftSrvGSP) ;
+             fusekiDftSrvGSP);
     }
 
     // ??
     /** Create connection, using full URLs for services. Pass a null for "no service endpoint". */
     public RDFConnectionRemote(String sQuery, String sUpdate, String sGSP) {
-        this(null, sQuery, sUpdate, sGSP) ;
+        this(null, sQuery, sUpdate, sGSP);
     }
     
     /** Create connection, using URL of the dataset and short names for the services */
     public RDFConnectionRemote(String destination, String sQuery, String sUpdate, String sGSP) {
-        this(null, destination, sQuery, sUpdate, sGSP) ;
+        this(null, destination, sQuery, sUpdate, sGSP);
     }
     
     /** Create connection, using URL of the dataset and short names for the services */
     public RDFConnectionRemote(HttpClient httpClient, String destination, String sQuery, String sUpdate, String sGSP) {
-        this.destination = destination ;
-        this.svcQuery = formServiceURL(destination,sQuery) ;
-        this.svcUpdate = formServiceURL(destination,sUpdate) ;
-        this.svcGraphStore = formServiceURL(destination,sGSP) ;
-//        if ( httpClient == null )
-//            httpClient = HttpOp.getDefaultHttpClient() ;
-        this.httpClient = httpClient ;
+        this.destination = destination;
+        this.svcQuery = formServiceURL(destination,sQuery);
+        this.svcUpdate = formServiceURL(destination,sUpdate);
+        this.svcGraphStore = formServiceURL(destination,sGSP);
+        this.httpClient = httpClient;
     }
     
     public HttpClient getHttpClient() {
-        return httpClient ;
+        return httpClient;
     }
 
     public void setHttpClient(HttpClient httpClient) {
-        this.httpClient = httpClient ;
+        this.httpClient = httpClient;
     }
 
     public HttpContext getHttpContext() {
-        return httpContext ;
+        return httpContext;
     }
 
     public void setHttpContext(HttpContext httpContext) {
-        this.httpContext = httpContext ;
+        this.httpContext = httpContext;
     }
 
     private static String formServiceURL(String destination, String srvEndpoint) {
         if ( destination == null )
-            return srvEndpoint ;
-        String dest = destination ;
+            return srvEndpoint;
+        String dest = destination;
         if ( dest.endsWith("/") )
-            dest = dest.substring(0, dest.length()-1) ;
-        return dest+"/"+srvEndpoint ;
+            dest = dest.substring(0, dest.length()-1);
+        return dest+"/"+srvEndpoint;
     }
 
     @Override
     public QueryExecution query(Query query) {
         checkQuery();
-        return exec(()->QueryExecutionFactory.createServiceRequest(svcQuery, query)) ;
+        return exec(()->QueryExecutionFactory.createServiceRequest(svcQuery, query));
     }
 
     @Override
     public void update(UpdateRequest update) {
         checkUpdate();
-        UpdateProcessor proc = UpdateExecutionFactory.createRemote(update, svcUpdate) ;
+        UpdateProcessor proc = UpdateExecutionFactory.createRemote(update, svcUpdate);
         exec(()->proc.execute());
     }
     
     @Override
     public Model fetch(String graphName) {
-        checkGSP() ;
-        String url = RDFConn.urlForGraph(svcGraphStore, graphName) ;
-        Graph graph = fetch$(url) ;
-        return ModelFactory.createModelForGraph(graph) ;
+        checkGSP();
+        String url = RDFConn.urlForGraph(svcGraphStore, graphName);
+        Graph graph = fetch$(url);
+        return ModelFactory.createModelForGraph(graph);
     }
     
     @Override
     public Model fetch() {
-        checkGSP() ;
-        return fetch(null) ;
+        checkGSP();
+        return fetch(null);
     }
     
     private Graph fetch$(String url) {
-        HttpCaptureResponse<Graph> graph = HttpResponseLib.graphHandler() ;
-        exec(()->HttpOp.execHttpGet(url, WebContent.defaultGraphAcceptHeader, graph, this.httpClient, this.httpContext)) ;
-        return graph.get() ;
+        HttpCaptureResponse<Graph> graph = HttpResponseLib.graphHandler();
+        exec(()->HttpOp.execHttpGet(url, WebContent.defaultGraphAcceptHeader, graph, this.httpClient, this.httpContext));
+        return graph.get();
     }
 
     @Override
     public void load(String graph, String file) {
-        checkGSP() ;
-        upload(graph, file, false) ;
+        checkGSP();
+        upload(graph, file, false);
     }
     
     @Override
     public void load(String file) {
-        checkGSP() ;
-        upload(null, file, false) ;
+        checkGSP();
+        upload(null, file, false);
     }
     
     @Override
     public void load(Model model) {
-        doPutPost(model, null, false) ;
+        doPutPost(model, null, false);
     }
     
     @Override
     public void load(String graphName, Model model) {
-        doPutPost(model, graphName, false) ;
+        doPutPost(model, graphName, false);
     }
     
     @Override
     public void put(String graph, String file) {
-        checkGSP() ;
-        upload(graph, file, true) ;
+        checkGSP();
+        upload(graph, file, true);
     }
     
     @Override
     public void put(String file) { 
-        checkGSP() ;
-        upload(null, file, true) ; 
+        checkGSP();
+        upload(null, file, true); 
     }
     
     @Override
     public void put(String graphName, Model model) {
-        checkGSP() ;
-        doPutPost(model, graphName, true) ;
+        checkGSP();
+        doPutPost(model, graphName, true);
     }
 
     @Override
     public void put(Model model) {
-        checkGSP() ;
-        doPutPost(model, null, true) ;
+        checkGSP();
+        doPutPost(model, null, true);
     }
     
     private void upload(String graph, String file, boolean replace) {
         // if triples
-        Lang lang = RDFLanguages.filenameToLang(file) ;
+        Lang lang = RDFLanguages.filenameToLang(file);
         if ( RDFLanguages.isQuads(lang) )
-            throw new ARQException("Can't load quads into a graph") ;
+            throw new ARQException("Can't load quads into a graph");
         if ( ! RDFLanguages.isTriples(lang) )
-            throw new ARQException("Not an RDF format: "+file+" (lang="+lang+")") ;
-        String url = RDFConn.urlForGraph(svcGraphStore, graph) ;
-        doPutPost(url, file, lang, replace) ;
+            throw new ARQException("Not an RDF format: "+file+" (lang="+lang+")");
+        String url = RDFConn.urlForGraph(svcGraphStore, graph);
+        doPutPost(url, file, lang, replace);
     }
 
     private void doPutPost(String url, String file, Lang lang, boolean replace) {
-        File f = new File(file) ;
-        long length = f.length() ; 
-        InputStream source = IO.openFile(file) ;
+        File f = new File(file);
+        long length = f.length(); 
+        InputStream source = IO.openFile(file);
         // Charset.
         exec(()->{
             if ( replace )
-                HttpOp.execHttpPut(url, lang.getContentType().getContentType(), source, length, httpClient, this.httpContext) ;
+                HttpOp.execHttpPut(url, lang.getContentType().getContentType(), source, length, httpClient, this.httpContext);
             else    
-                HttpOp.execHttpPost(url, lang.getContentType().getContentType(), source, length, null, null, httpClient, this.httpContext) ;
-        }) ;
+                HttpOp.execHttpPost(url, lang.getContentType().getContentType(), source, length, null, null, httpClient, this.httpContext);
+        });
     }
 
     private void doPutPost(Model model, String name, boolean replace) {
-        String url = RDFConn.urlForGraph(svcGraphStore, name) ;
+        String url = RDFConn.urlForGraph(svcGraphStore, name);
         exec(()->{
-            Graph graph = model.getGraph() ;
+            Graph graph = model.getGraph();
             if ( replace )
-                HttpOp.execHttpPut(url, graphToHttpEntity(graph), httpClient, this.httpContext) ;
+                HttpOp.execHttpPut(url, graphToHttpEntity(graph), httpClient, this.httpContext);
             else    
-                HttpOp.execHttpPost(url, graphToHttpEntity(graph), null, null, httpClient, this.httpContext) ;
+                HttpOp.execHttpPost(url, graphToHttpEntity(graph), null, null, httpClient, this.httpContext);
         });
     }
 
     @Override
     public void delete(String graph) {
-        checkGSP() ;
-        String url = RDFConn.urlForGraph(svcGraphStore, graph) ;
+        checkGSP();
+        String url = RDFConn.urlForGraph(svcGraphStore, graph);
         exec(()->HttpOp.execHttpDelete(url));
     }
 
     @Override
     public void delete() {
-        checkGSP() ;
-        delete(null) ;
+        checkGSP();
+        delete(null);
     }
 
     @Override
     public Dataset fetchDataset() {
         if ( destination == null )
-            throw new ARQException("Dataset operations not available - no dataset URL provided") ; 
-        Dataset ds = DatasetFactory.createTxnMem() ;
+            throw new ARQException("Dataset operations not available - no dataset URL provided"); 
+        Dataset ds = DatasetFactory.createTxnMem();
         Txn.executeWrite(ds, ()->{
-            TypedInputStream s = exec(()->HttpOp.execHttpGet(destination, WebContent.defaultDatasetAcceptHeader)) ;
-            Lang lang = RDFLanguages.contentTypeToLang(s.getContentType()) ;
-            RDFDataMgr.read(ds, s, lang) ;
-        }) ;
-        return ds ;
+            TypedInputStream s = exec(()->HttpOp.execHttpGet(destination, WebContent.defaultDatasetAcceptHeader));
+            Lang lang = RDFLanguages.contentTypeToLang(s.getContentType());
+            RDFDataMgr.read(ds, s, lang);
+        });
+        return ds;
     }
 
     @Override
     public void loadDataset(String file) { 
         if ( destination == null )
-            throw new ARQException("Dataset operations not available - no dataset URl provided") ; 
-        doPutPostDataset(file, false) ; 
+            throw new ARQException("Dataset operations not available - no dataset URl provided"); 
+        doPutPostDataset(file, false); 
     }
     
     @Override
     public void loadDataset(Dataset dataset) {
         if ( destination == null )
-            throw new ARQException("Dataset operations not available - no dataset URl provided") ; 
-        doPutPostDataset(dataset, false) ; 
+            throw new ARQException("Dataset operations not available - no dataset URl provided"); 
+        doPutPostDataset(dataset, false); 
     }
 
     @Override
     public void putDataset(String file) {
         if ( destination == null )
-            throw new ARQException("Dataset operations not available - no dataset URl provided") ; 
-        doPutPostDataset(file, true) ;
+            throw new ARQException("Dataset operations not available - no dataset URl provided"); 
+        doPutPostDataset(file, true);
     }
     
     @Override
     public void putDataset(Dataset dataset) {
         if ( destination == null )
-            throw new ARQException("Dataset operations not available - no dataset URl provided") ; 
-        doPutPostDataset(dataset, true) ; 
+            throw new ARQException("Dataset operations not available - no dataset URl provided"); 
+        doPutPostDataset(dataset, true); 
     }
 
     private void doPutPostDataset(String file, boolean replace) {
-        Lang lang = RDFLanguages.filenameToLang(file) ;
-        File f = new File(file) ;
-        long length = f.length() ;
+        Lang lang = RDFLanguages.filenameToLang(file);
+        File f = new File(file);
+        long length = f.length();
         exec(()->{
-            InputStream source = IO.openFile(file) ;
+            InputStream source = IO.openFile(file);
             if ( replace )
-                HttpOp.execHttpPut(destination, lang.getContentType().getContentType(), source, length, httpClient, httpContext) ;
+                HttpOp.execHttpPut(destination, lang.getContentType().getContentType(), source, length, httpClient, httpContext);
             else    
-                HttpOp.execHttpPost(destination, lang.getContentType().getContentType(), source, length, null, null, httpClient, httpContext) ;
+                HttpOp.execHttpPost(destination, lang.getContentType().getContentType(), source, length, null, null, httpClient, httpContext);
         });
     }
 
     private void doPutPostDataset(Dataset dataset, boolean replace) {
         exec(()->{
-            DatasetGraph dsg = dataset.asDatasetGraph() ;
+            DatasetGraph dsg = dataset.asDatasetGraph();
             if ( replace )
-                HttpOp.execHttpPut(destination, datasetToHttpEntity(dsg), httpClient, null) ;
+                HttpOp.execHttpPut(destination, datasetToHttpEntity(dsg), httpClient, null);
             else    
-                HttpOp.execHttpPost(destination, datasetToHttpEntity(dsg), httpClient, null) ;
+                HttpOp.execHttpPost(destination, datasetToHttpEntity(dsg), httpClient, null);
         });
     }
 
 
     private void checkQuery() {
-        checkOpen() ;
+        checkOpen();
         if ( svcQuery == null )
-            throw new ARQException("No query service defined for this RDFConnection") ;
+            throw new ARQException("No query service defined for this RDFConnection");
     }
     
     private void checkUpdate() {
-        checkOpen() ;
+        checkOpen();
         if ( svcUpdate == null )
-            throw new ARQException("No update service defined for this RDFConnection") ;
+            throw new ARQException("No update service defined for this RDFConnection");
     }
     
     private void checkGSP() {
-        checkOpen() ;
+        checkOpen();
         if ( svcGraphStore == null )
-            throw new ARQException("No SPARQL Graph Store service defined for this RDFConnection") ;
+            throw new ARQException("No SPARQL Graph Store service defined for this RDFConnection");
     }
     
     private void checkDataset() {
-        checkOpen() ;
+        checkOpen();
         if ( destination == null )
-            throw new ARQException("Dataset operations not available - no dataset URL provided") ; 
+            throw new ARQException("Dataset operations not available - no dataset URL provided"); 
     }
 
     private void checkOpen() {
         if ( ! isOpen )
-            throw new ARQException("closed") ;
+            throw new ARQException("closed");
     }
 
     @Override
     public void close() {
-        isOpen = false ;
+        isOpen = false;
     }
 
     @Override
     public boolean isClosed() {
-        return ! isOpen ;
+        return ! isOpen;
     }
 
     /** Create an HttpEntity for the graph */  
     protected HttpEntity graphToHttpEntity(Graph graph) {
-        return graphToHttpEntity(graph, RDFFormat.NTRIPLES) ;
+        return graphToHttpEntity(graph, RDFFormat.NTRIPLES);
     }
     
     /** Create an HttpEntity for the graph */
     protected HttpEntity graphToHttpEntity(Graph graph, RDFFormat syntax) {
-        EntityTemplate entity = new EntityTemplate((out)->RDFDataMgr.write(out, graph, syntax)) ;
-        String ct = syntax.getLang().getContentType().getContentType() ;
-        entity.setContentType(ct) ;
-        return entity ;
+        EntityTemplate entity = new EntityTemplate((out)->RDFDataMgr.write(out, graph, syntax));
+        String ct = syntax.getLang().getContentType().getContentType();
+        entity.setContentType(ct);
+        return entity;
     }
 
     /** Create an HttpEntity for the dataset */  
     protected HttpEntity datasetToHttpEntity(DatasetGraph dataset) {
-        return datasetToHttpEntity(dataset, RDFFormat.NQUADS) ;
+        return datasetToHttpEntity(dataset, RDFFormat.NQUADS);
     }
     
     /** Create an HttpEntity for the dataset */  
     protected HttpEntity datasetToHttpEntity(DatasetGraph dataset, RDFFormat syntax) {
-        EntityTemplate entity = new EntityTemplate((out)->RDFDataMgr.write(out, dataset, syntax)) ;
-        String ct = syntax.getLang().getContentType().getContentType() ;
-        entity.setContentType(ct) ;
-        return entity ;
+        EntityTemplate entity = new EntityTemplate((out)->RDFDataMgr.write(out, dataset, syntax));
+        String ct = syntax.getLang().getContentType().getContentType();
+        entity.setContentType(ct);
+        return entity;
     }
 
     /** Convert HTTP status codes to exceptions */ 
     static void exec(Runnable action)  {
-        try { action.run() ; }
-        catch (HttpException ex) { handleHttpException(ex, false) ; }
+        try { action.run(); }
+        catch (HttpException ex) { handleHttpException(ex, false); }
     }
 
     /** Convert HTTP status codes to exceptions */ 
     static <X> X exec(Supplier<X> action)  {
-        try { return action.get() ; }
-        catch (HttpException ex) { handleHttpException(ex, true) ; return null ;}
+        try { return action.get(); }
+        catch (HttpException ex) { handleHttpException(ex, true); return null;}
     }
 
     private static void handleHttpException(HttpException ex, boolean ignore404) {
         if ( ex.getResponseCode() == HttpSC.NOT_FOUND_404 && ignore404 )
-            return  ;
-        throw ex ;
+            return ;
+        throw ex;
     }
 
     /** Engine for the transaction lifecycle.
@@ -416,8 +409,8 @@ public class RDFConnectionRemote implements RDFConnection {
     
     static class TxnLifecycle implements Transactional {
         // MR+SW policy.
-        private ReentrantLock lock = new ReentrantLock() ;
-        private ThreadLocal<ReadWrite> mode = ThreadLocal.withInitial(()->null) ;
+        private ReentrantLock lock = new ReentrantLock();
+        private ThreadLocal<ReadWrite> mode = ThreadLocal.withInitial(()->null);
         @Override
         public void begin(ReadWrite readWrite) {
             if ( readWrite == ReadWrite.WRITE )
@@ -441,23 +434,23 @@ public class RDFConnectionRemote implements RDFConnection {
 
         @Override
         public boolean isInTransaction() {
-            return mode.get() != null ;
+            return mode.get() != null;
         }
 
         @Override
         public void end() {
-            ReadWrite rw = mode.get() ;
+            ReadWrite rw = mode.get();
             if ( rw == null )
-                return ;
+                return;
             if ( rw == ReadWrite.WRITE ) {
-                abort() ;
-                return ;
+                abort();
+                return;
             }
-            mode.set(null) ;
+            mode.set(null);
         }
     }
     
-    private TxnLifecycle inner = new TxnLifecycle() ;
+    private TxnLifecycle inner = new TxnLifecycle();
     
     @Override
     public void begin(ReadWrite readWrite)  { inner.begin(readWrite); }
@@ -469,7 +462,7 @@ public class RDFConnectionRemote implements RDFConnection {
     public void abort()                     { inner.abort(); }
 
     @Override
-    public boolean isInTransaction()        { return inner.isInTransaction() ; }
+    public boolean isInTransaction()        { return inner.isInTransaction(); }
 
     @Override
     public void end()                       { inner.end(); }

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFDatasetAccessConnection.java
----------------------------------------------------------------------
diff --git a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFDatasetAccessConnection.java b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFDatasetAccessConnection.java
index a9bfbd1..a6ba626 100644
--- a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFDatasetAccessConnection.java
+++ b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFDatasetAccessConnection.java
@@ -18,9 +18,9 @@
 
 package org.apache.jena.rdfconnection;
 
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.sparql.core.Transactional ;
+import org.apache.jena.query.Dataset;
+import org.apache.jena.rdf.model.Model;
+import org.apache.jena.sparql.core.Transactional;
 
 /**
  * SPARQL Graph Store Protocol (read operations) and whole dataset access.
@@ -38,20 +38,20 @@ public interface RDFDatasetAccessConnection extends Transactional, AutoCloseable
      * @param graphName URI string for the graph name (null or "default" for the default graph)
      * @return Model
      */
-    public Model fetch(String graphName) ;
+    public Model fetch(String graphName);
     
     /** Fetch the default graph.
      * This is SPARQL Graph Store Protocol HTTP GET or equivalent. 
      * @return Model
      */
-    public Model fetch() ;
+    public Model fetch();
     
     /** Fetch the contents of the dataset */ 
-    public Dataset fetchDataset() ;
+    public Dataset fetchDataset();
     
     /** Test whether this connection is closed or not */
-    public boolean isClosed() ;
+    public boolean isClosed();
     
     /** Close this connection.  Use with try-resource. */ 
-    @Override public void close() ;
+    @Override public void close();
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFDatasetConnection.java
----------------------------------------------------------------------
diff --git a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFDatasetConnection.java b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFDatasetConnection.java
index 688e654..330dc3d 100644
--- a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFDatasetConnection.java
+++ b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/RDFDatasetConnection.java
@@ -18,9 +18,9 @@
 
 package org.apache.jena.rdfconnection;
 
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.sparql.core.Transactional ;
+import org.apache.jena.query.Dataset;
+import org.apache.jena.rdf.model.Model;
+import org.apache.jena.sparql.core.Transactional;
 
 /**
  * SPARQL Graph Store Protocol and whole dataset access.
@@ -38,14 +38,14 @@ public interface RDFDatasetConnection extends RDFDatasetAccessConnection, Transa
      * @param graphName Graph name (null or "default" for the default graph)
      * @param file File of the data.
      */
-    public void load(String graphName, String file) ;
+    public void load(String graphName, String file);
     
     /** Load (add, append) RDF into the default graph of a dataset.
      * This is SPARQL Graph Store Protocol HTTP POST or equivalent. 
      * 
      * @param file File of the data.
      */
-    public void load(String file) ;
+    public void load(String file);
 
     /** Load (add, append) RDF into a named graph in a dataset.
      * This is SPARQL Graph Store Protocol HTTP POST or equivalent. 
@@ -53,14 +53,14 @@ public interface RDFDatasetConnection extends RDFDatasetAccessConnection, Transa
      * @param graphName Graph name (null or "default" for the default graph)
      * @param model Data.
      */
-    public void load(String graphName, Model model) ;
+    public void load(String graphName, Model model);
     
     /** Load (add, append) RDF into the default graph of a dataset.
      * This is SPARQL Graph Store Protocol HTTP POST or equivalent. 
      * 
      * @param model Data.
      */
-    public void load(Model model) ;
+    public void load(Model model);
 
     /** Set the contents of a named graph of a dataset.
      * Any existing data is lost. 
@@ -69,7 +69,7 @@ public interface RDFDatasetConnection extends RDFDatasetAccessConnection, Transa
      * @param graphName Graph name (null or "default" for the default graph)
      * @param file File of the data.
      */
-    public void put(String graphName, String file) ;
+    public void put(String graphName, String file);
     
     /** Set the contents of the default graph of a dataset.
      * Any existing data is lost. 
@@ -77,7 +77,7 @@ public interface RDFDatasetConnection extends RDFDatasetAccessConnection, Transa
      * 
      * @param file File of the data.
      */
-    public void put(String file) ;
+    public void put(String file);
         
     /** Set the contents of a named graph of a dataset.
      * Any existing data is lost. 
@@ -86,7 +86,7 @@ public interface RDFDatasetConnection extends RDFDatasetAccessConnection, Transa
      * @param graphName Graph name (null or "default" for the default graph)
      * @param model Data.
      */
-    public void put(String graphName, Model model) ;
+    public void put(String graphName, Model model);
     
     /** Set the contents of the default graph of a dataset.
      * Any existing data is lost. 
@@ -94,7 +94,7 @@ public interface RDFDatasetConnection extends RDFDatasetAccessConnection, Transa
      * 
      * @param model Data.
      */
-    public void put( Model model) ;
+    public void put( Model model);
         
     /**
      * Delete a graph from the dataset.
@@ -102,49 +102,49 @@ public interface RDFDatasetConnection extends RDFDatasetAccessConnection, Transa
      * 
      * @param graphName
      */
-    public void delete(String graphName) ;
+    public void delete(String graphName);
 
     /**
      * Remove all data from the default graph.
      */ 
-    public void delete() ;
+    public void delete();
     
     /* Load (add, append) RDF triple or quad data into a dataset. Triples wil go into the default graph.
      * This is not a SPARQL Graph Store Protocol operation.
      * It is an HTTP POST equivalent to the dataset.
      */
-    public void loadDataset(String file) ;
+    public void loadDataset(String file);
 
     /* Load (add, append) RDF triple or quad data into a dataset. Triples wil go into the default graph.
      * This is not a SPARQL Graph Store Protocol operation.
      * It is an HTTP POST equivalent to the dataset.
      */
-    public void loadDataset(Dataset dataset) ;
+    public void loadDataset(Dataset dataset);
 
     /* Set RDF triple or quad data as the dataset contents.
      * Triples will go into the default graph, quads in named graphs.
      * This is not a SPARQL Graph Store Protocol operation.
      * It is an HTTP PUT equivalent to the dataset.
      */
-    public void putDataset(String file) ;
+    public void putDataset(String file);
     
     /* Set RDF triple or quad data as the dataset contents.
      * Triples will go into the default graph, quads in named graphs.
      * This is not a SPARQL Graph Store Protocol operation.
      * It is an HTTP PUT equivalent to the dataset.
      */
-    public void putDataset(Dataset dataset) ;
+    public void putDataset(Dataset dataset);
 
     //    /** Clear the dataset - remove all named graphs, clear the default graph. */
-//    public void clearDataset() ;
+//    public void clearDataset();
     
     
     /** Test whether this connection is closed or not */
     @Override
-    public boolean isClosed() ;
+    public boolean isClosed();
     
     /** Close this connection.  Use with try-resource. */ 
     @Override 
-    public void close() ;
+    public void close();
 }
 

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/SparqlQueryConnection.java
----------------------------------------------------------------------
diff --git a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/SparqlQueryConnection.java b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/SparqlQueryConnection.java
index 3c40ae9..0484418 100644
--- a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/SparqlQueryConnection.java
+++ b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/SparqlQueryConnection.java
@@ -18,11 +18,11 @@
 
 package org.apache.jena.rdfconnection;
 
-import java.util.function.Consumer ;
+import java.util.function.Consumer;
 
-import org.apache.jena.query.* ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.sparql.core.Transactional ;
+import org.apache.jena.query.*;
+import org.apache.jena.rdf.model.Model;
+import org.apache.jena.sparql.core.Transactional;
 
 /** SPARQL Query Operations on a connection.
  * 
@@ -36,46 +36,46 @@ public interface SparqlQueryConnection extends Transactional, AutoCloseable
      * @param query
      * @param resultSetAction
      */
-    public void queryResultSet(String query, Consumer<ResultSet> resultSetAction) ;
+    public void queryResultSet(String query, Consumer<ResultSet> resultSetAction);
     
     /**
      * Execute a SELECT query and process the ResultSet with the handler code.  
      * @param query
      * @param resultSetAction
      */
-    public void queryResultSet(Query query, Consumer<ResultSet> resultSetAction) ; 
+    public void queryResultSet(Query query, Consumer<ResultSet> resultSetAction); 
 
     /**
      * Execute a SELECT query and process the rows of the results with the handler code.  
      * @param query
      * @param rowAction
      */
-    public void querySelect(String query, Consumer<QuerySolution> rowAction) ;
+    public void querySelect(String query, Consumer<QuerySolution> rowAction);
     
     /**
      * Execute a SELECT query and process the rows of the results with the handler code.  
      * @param query
      * @param rowAction
      */
-    public void querySelect(Query query, Consumer<QuerySolution> rowAction) ; 
+    public void querySelect(Query query, Consumer<QuerySolution> rowAction); 
 
     /** Execute a CONSTRUCT query and return as a Model */
-    public Model queryConstruct(String query) ;
+    public Model queryConstruct(String query);
     
     /** Execute a CONSTRUCT query and return as a Model */
-    public Model queryConstruct(Query query) ;
+    public Model queryConstruct(Query query);
 
     /** Execute a DESCRIBE query and return as a Model */
-    public Model queryDescribe(String query) ;
+    public Model queryDescribe(String query);
     
     /** Execute a DESCRIBE query and return as a Model */
-    public Model queryDescribe(Query query) ;
+    public Model queryDescribe(Query query);
     
     /** Execute a ASK query and return a boolean */
-    public boolean queryAsk(String query) ;
+    public boolean queryAsk(String query);
 
     /** Execute a ASK query and return a boolean */
-    public boolean queryAsk(Query query) ;
+    public boolean queryAsk(Query query);
     
     /** Setup a SPARQL query execution.
      * 
@@ -86,7 +86,7 @@ public interface SparqlQueryConnection extends Transactional, AutoCloseable
      * @param query
      * @return QueryExecution
      */
-    public QueryExecution query(Query query) ;
+    public QueryExecution query(Query query);
 
     /** Setup a SPARQL query execution.
      * 
@@ -97,9 +97,9 @@ public interface SparqlQueryConnection extends Transactional, AutoCloseable
      * @param queryString 
      * @return QueryExecution
      */
-    public QueryExecution query(String queryString) ;
+    public QueryExecution query(String queryString);
     
     /** Close this connection.  Use with try-resource. */ 
-    @Override public void close() ;
+    @Override public void close();
 }
 

http://git-wip-us.apache.org/repos/asf/jena/blob/53758b5f/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/SparqlUpdateConnection.java
----------------------------------------------------------------------
diff --git a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/SparqlUpdateConnection.java b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/SparqlUpdateConnection.java
index 2428122..70b76e8 100644
--- a/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/SparqlUpdateConnection.java
+++ b/jena-rdfconnection/src/main/java/org/apache/jena/rdfconnection/SparqlUpdateConnection.java
@@ -18,9 +18,9 @@
 
 package org.apache.jena.rdfconnection;
 
-import org.apache.jena.sparql.core.Transactional ;
-import org.apache.jena.update.Update ;
-import org.apache.jena.update.UpdateRequest ;
+import org.apache.jena.sparql.core.Transactional;
+import org.apache.jena.update.Update;
+import org.apache.jena.update.UpdateRequest;
 
 /** SPARQL Update Operations on a connection.
  * 
@@ -33,21 +33,21 @@ public interface SparqlUpdateConnection extends Transactional, AutoCloseable
      * 
      * @param update
      */
-    public void update(Update update) ;
+    public void update(Update update);
 
     /** Execute a SPARQL Update.
      * 
      * @param update
      */
-    public void update(UpdateRequest update) ; 
+    public void update(UpdateRequest update); 
     
     /** Execute a SPARQL Update.
      * 
      * @param updateString
      */
-    public void update(String updateString) ;
+    public void update(String updateString);
     
     /** Close this connection. */ 
-    @Override public void close() ;
+    @Override public void close();
 }