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 2017/09/28 16:05:24 UTC
[012/100] [abbrv] [partial] jena git commit: JENA-1397: Rename
modules and set versions
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestDatabaseOps.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestDatabaseOps.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestDatabaseOps.java
new file mode 100644
index 0000000..eab1861
--- /dev/null
+++ b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestDatabaseOps.java
@@ -0,0 +1,173 @@
+/*
+ * 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.seaborne.tdb2.sys;
+
+import static org.junit.Assert.* ;
+import static org.junit.Assert.assertFalse ;
+import static org.junit.Assert.assertNotEquals ;
+import static org.junit.Assert.assertTrue ;
+
+import org.apache.commons.io.FileUtils ;
+import org.apache.jena.atlas.lib.FileOps ;
+import org.apache.jena.graph.Graph ;
+import org.apache.jena.graph.Triple ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.sparql.core.DatasetGraph ;
+import org.apache.jena.sparql.core.Quad ;
+import org.apache.jena.sparql.sse.SSE ;
+import org.junit.After ;
+import org.junit.Before ;
+import org.junit.Test ;
+import org.seaborne.dboe.base.file.Location ;
+import org.seaborne.dboe.jenax.Txn ;
+import org.seaborne.tdb2.ConfigTest ;
+import org.seaborne.tdb2.DatabaseMgr ;
+import org.seaborne.tdb2.store.DatasetGraphSwitchable ;
+import org.seaborne.tdb2.store.DatasetGraphTDB ;
+
+public class TestDatabaseOps
+{
+ static String DIRx = ConfigTest.getCleanDir() ;
+ static Location DIR = Location.create(DIRx);
+
+ static Quad quad1 = SSE.parseQuad("(_ <s> <p> 1)") ;
+ static Quad quad2 = SSE.parseQuad("(_ _:a <p> 2)") ;
+ static Triple triple1 = quad1.asTriple();
+ static Triple triple2 = quad2.asTriple();
+ static Triple triple3 = SSE.parseTriple("(<s> <q> 3)") ;
+
+ @Before
+ public void before() {
+ FileUtils.deleteQuietly(IOX.asFile(DIR));
+ FileOps.ensureDir(DIR.getDirectoryPath());
+ }
+
+ @After
+ public void after() {
+ TDBInternal.reset();
+ FileUtils.deleteQuietly(IOX.asFile(DIR));
+ }
+
+ @Test public void compact_dsg_1() {
+ DatasetGraph dsg = DatabaseMgr.connectDatasetGraph(DIR);
+ DatasetGraphSwitchable dsgs = (DatasetGraphSwitchable)dsg;
+ DatasetGraph dsg1 = dsgs.get();
+ Location loc1 = ((DatasetGraphTDB)dsg1).getLocation();
+
+ Txn.executeWrite(dsg, ()-> {
+ dsg.add(quad2) ;
+ dsg.add(quad1) ;
+ }) ;
+ DatabaseMgr.compact(dsg);
+
+ assertFalse(StoreConnection.isSetup(loc1));
+
+ DatasetGraph dsg2 = dsgs.get();
+ Location loc2 = ((DatasetGraphTDB)dsg2).getLocation();
+
+ assertNotEquals(dsg1, dsg2);
+ assertNotEquals(loc1, loc2);
+
+ Txn.executeRead(dsg, ()-> {
+ assertTrue(dsg.contains(quad2)) ;
+ assertTrue(dsg.contains(quad1)) ;
+ }) ;
+
+ // dsg1 was closed and expelled. We must carefully reopen its storage only.
+ DatasetGraph dsgOld = StoreConnection.connectCreate(loc1).getDatasetGraph();
+
+ Txn.executeWrite(dsgOld, ()->dsgOld.delete(quad2));
+ Txn.executeRead(dsg, ()->assertTrue(dsg.contains(quad2)) );
+ Txn.executeRead(dsg2, ()->assertTrue(dsg2.contains(quad2)) ) ;
+ }
+
+ @Test public void compact_graph_2() {
+ // graphs across compaction.
+ DatasetGraph dsg = DatabaseMgr.connectDatasetGraph(DIR);
+ Graph g = dsg.getDefaultGraph();
+
+ DatasetGraphSwitchable dsgs = (DatasetGraphSwitchable)dsg;
+ DatasetGraph dsg1 = dsgs.get();
+ Location loc1 = ((DatasetGraphTDB)dsg1).getLocation();
+
+ Txn.executeWrite(dsg, ()-> {
+ dsg.add(quad2) ;
+ dsg.add(quad1) ;
+ }) ;
+ DatabaseMgr.compact(dsg);
+ Txn.executeRead(dsg, ()-> {
+ assertEquals(2, g.size());
+ assertTrue(g.contains(triple2));
+ }) ;
+
+ // Check is not attached to the old graph.
+ DatasetGraph dsgOld = StoreConnection.connectCreate(loc1).getDatasetGraph();
+
+ Txn.executeWrite(dsgOld, ()->dsgOld.getDefaultGraph().delete(triple2));
+ Txn.executeRead(dsg, ()->assertTrue(g.contains(triple2)) );
+
+ Txn.executeWrite(dsg, ()->g.add(triple3));
+ Txn.executeRead(dsgOld, ()->assertFalse(dsgOld.getDefaultGraph().contains(triple3)) );
+ }
+
+ @Test public void compact_prefixes_3() {
+ // prefixes axcross compaction.
+ DatasetGraph dsg = DatabaseMgr.connectDatasetGraph(DIR);
+ Graph g = dsg.getDefaultGraph();
+ Txn.executeWrite(dsg, ()-> g.getPrefixMapping().setNsPrefix("ex", "http://example/") );
+
+ DatasetGraphSwitchable dsgs = (DatasetGraphSwitchable)dsg;
+ DatasetGraph dsg1 = dsgs.get();
+ Location loc1 = ((DatasetGraphTDB)dsg1).getLocation();
+
+ DatabaseMgr.compact(dsg);
+
+ Txn.executeRead(dsg, ()-> {
+ assertEquals("ex", g.getPrefixMapping().getNsURIPrefix("http://example/"));
+ assertEquals("http://example/", g.getPrefixMapping().getNsPrefixURI("ex"));
+ }) ;
+
+ // Check is not attached to the old graph.
+ DatasetGraph dsgOld = StoreConnection.connectCreate(loc1).getDatasetGraph();
+
+ Txn.executeWrite(dsgOld, ()->dsgOld.getDefaultGraph().getPrefixMapping().removeNsPrefix("ex"));
+ Txn.executeRead(dsg, ()->assertEquals("http://example/", g.getPrefixMapping().getNsPrefixURI("ex")));
+
+ Txn.executeWrite(dsg, ()->g.getPrefixMapping().setNsPrefix("ex2", "http://exampl2/") );
+ Txn.executeRead(dsgOld, ()->assertNull(dsgOld.getDefaultGraph().getPrefixMapping().getNsPrefixURI("ex")));
+ }
+
+ @Test public void backup_1() {
+ DatasetGraph dsg = DatabaseMgr.connectDatasetGraph(DIR);
+ Txn.executeWrite(dsg, ()-> {
+ dsg.add(quad2) ;
+ dsg.add(quad1) ;
+ }) ;
+ String file1 = DatabaseMgr.backup(dsg);
+ DatasetGraph dsg2 = RDFDataMgr.loadDatasetGraph(file1);
+ Txn.executeRead(dsg, ()-> {
+ assertTrue(dsg.contains(quad1)) ;
+ assertEquals(2, dsg.getDefaultGraph().size());
+ assertTrue(dsg2.getDefaultGraph().isIsomorphicWith(dsg.getDefaultGraph()));
+ }) ;
+ String file2 = DatabaseMgr.backup(dsg);
+ assertNotEquals(file1, file2);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestOps.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestOps.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestOps.java
new file mode 100644
index 0000000..f2a8636
--- /dev/null
+++ b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestOps.java
@@ -0,0 +1,32 @@
+/*
+ * 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.seaborne.tdb2.sys;
+
+import org.seaborne.dboe.base.block.FileMode ;
+import org.seaborne.tdb2.sys.SystemTDB ;
+
+public class TestOps
+{
+ public static void setFileMode(FileMode mode)
+ {
+ SystemTDB.internalSetFileMode(mode) ;
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestSys.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestSys.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestSys.java
new file mode 100644
index 0000000..e9cf1ba
--- /dev/null
+++ b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/sys/TestSys.java
@@ -0,0 +1,33 @@
+/*
+ * 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.seaborne.tdb2.sys;
+
+
+import static org.junit.Assert.*;
+import org.junit.Test ;
+import org.seaborne.tdb2.TDB2 ;
+
+public class TestSys
+{
+ @Test public void sys1()
+ {
+ assertNotNull(TDB2.VERSION) ;
+ assertNotNull(TDB2.BUILD_DATE) ;
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Assembler/tdb-dataset-embed.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Assembler/tdb-dataset-embed.ttl b/jena-db/jena-tdb2/testing/Assembler/tdb-dataset-embed.ttl
new file mode 100644
index 0000000..9edd5a3
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Assembler/tdb-dataset-embed.ttl
@@ -0,0 +1,23 @@
+# 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.
+
+@prefix tdb2: <http://jena.apache.org/2016/tdb#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+<#dataset> rdf:type tdb2:DatasetTDB2 ;
+ tdb2:location "--mem--" ;
+ .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Assembler/tdb-dataset.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Assembler/tdb-dataset.ttl b/jena-db/jena-tdb2/testing/Assembler/tdb-dataset.ttl
new file mode 100644
index 0000000..c9d8d7b
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Assembler/tdb-dataset.ttl
@@ -0,0 +1,23 @@
+# 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.
+
+@prefix tdb2: <http://jena.apache.org/2016/tdb#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+<#dataset> rdf:type tdb2:DatasetTDB2 ;
+ # Do at least one the long way.
+ tdb2:location "target/tdb-testing/DB" ;
+ .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Assembler/tdb-graph-embed.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Assembler/tdb-graph-embed.ttl b/jena-db/jena-tdb2/testing/Assembler/tdb-graph-embed.ttl
new file mode 100644
index 0000000..af3daab
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Assembler/tdb-graph-embed.ttl
@@ -0,0 +1,27 @@
+# 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.
+
+@prefix tdb2: <http://jena.apache.org/2016/tdb#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+<#dataset> rdf:type ja:RDFDataset ;
+ ja:defaultGraph <#graph> ;
+ .
+
+<#graph> rdf:type tdb2:GraphTDB2 ;
+ tdb2:location "--mem--" ;
+ .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Assembler/tdb-graph-ref-dataset.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Assembler/tdb-graph-ref-dataset.ttl b/jena-db/jena-tdb2/testing/Assembler/tdb-graph-ref-dataset.ttl
new file mode 100644
index 0000000..fe256bd
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Assembler/tdb-graph-ref-dataset.ttl
@@ -0,0 +1,31 @@
+# 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.
+
+@prefix tdb2: <http://jena.apache.org/2016/tdb#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+<#dataset> rdf:type ja:RDFDataset ;
+ ja:defaultGraph <#graph> ;
+ .
+
+<#graph> rdf:type tdb2:GraphTDB2 ;
+ tdb2:dataset <#dataset> ;
+ .
+
+<#dataset> rdf:type tdb2:DatasetTDB2 ;
+ tdb2:location "--mem--" ;
+ .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Assembler/tdb-graph.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Assembler/tdb-graph.ttl b/jena-db/jena-tdb2/testing/Assembler/tdb-graph.ttl
new file mode 100644
index 0000000..2ae8396
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Assembler/tdb-graph.ttl
@@ -0,0 +1,27 @@
+# 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.
+
+@prefix tdb2: <http://jena.apache.org/2016/tdb#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+<#dataset> rdf:type ja:RDFDataset ;
+ ja:defaultGraph <#graph> ;
+ .
+
+<#graph> rdf:type tdb2:GraphTDB2 ;
+ tdb2:location "target/tdb-testing/DB" ;
+ .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Assembler/tdb-named-graph-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Assembler/tdb-named-graph-1.ttl b/jena-db/jena-tdb2/testing/Assembler/tdb-named-graph-1.ttl
new file mode 100644
index 0000000..78e40cf
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Assembler/tdb-named-graph-1.ttl
@@ -0,0 +1,29 @@
+
+# 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.
+
+@prefix tdb2: <http://jena.apache.org/2016/tdb#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+<#dataset> rdf:type ja:RDFDataset ;
+ ja:defaultGraph <#graph> ;
+ .
+
+<#graph> rdf:type tdb2:GraphTDB2 ;
+ tdb2:location "--mem--" ;
+ tdb2:graphName "http://example.com/graph" ;
+ .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Assembler/tdb-named-graph-2.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Assembler/tdb-named-graph-2.ttl b/jena-db/jena-tdb2/testing/Assembler/tdb-named-graph-2.ttl
new file mode 100644
index 0000000..ee2feab
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Assembler/tdb-named-graph-2.ttl
@@ -0,0 +1,28 @@
+# 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.
+
+@prefix tdb2: <http://jena.apache.org/2016/tdb#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+<#dataset> rdf:type ja:RDFDataset ;
+ ja:defaultGraph <#graph> ;
+ .
+
+<#graph> rdf:type tdb2:GraphTDB2 ;
+ tdb2:location "--mem--" ;
+ tdb2:graphName "http://example.com/graph" ;
+ .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-00.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-00.rq b/jena-db/jena-tdb2/testing/Basic/basic-00.rq
new file mode 100644
index 0000000..f2341a0
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-00.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example>
+
+SELECT *
+{ ?x ?p ?z }
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-1-O.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-1-O.rq b/jena-db/jena-tdb2/testing/Basic/basic-1-O.rq
new file mode 100644
index 0000000..e1d1da7
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-1-O.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ ?x ?p :z1 }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-1-P.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-1-P.rq b/jena-db/jena-tdb2/testing/Basic/basic-1-P.rq
new file mode 100644
index 0000000..d64b9f9
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-1-P.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ ?x :p1 ?z }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-1-PO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-1-PO.rq b/jena-db/jena-tdb2/testing/Basic/basic-1-PO.rq
new file mode 100644
index 0000000..01fa14a
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-1-PO.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ ?x :p1 :z1 }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-1-S.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-1-S.rq b/jena-db/jena-tdb2/testing/Basic/basic-1-S.rq
new file mode 100644
index 0000000..180188e
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-1-S.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ :x1 ?p ?z }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-1-SO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-1-SO.rq b/jena-db/jena-tdb2/testing/Basic/basic-1-SO.rq
new file mode 100644
index 0000000..a4242fb
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-1-SO.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ :x1 ?p :z1 }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-1-SP.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-1-SP.rq b/jena-db/jena-tdb2/testing/Basic/basic-1-SP.rq
new file mode 100644
index 0000000..37ddfe6
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-1-SP.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ :x1 :p1 ?z }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-1-SPO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-1-SPO.rq b/jena-db/jena-tdb2/testing/Basic/basic-1-SPO.rq
new file mode 100644
index 0000000..41aa20f
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-1-SPO.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT ?v
+{ :x1 :p1 :z1 }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-2-SO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-2-SO.rq b/jena-db/jena-tdb2/testing/Basic/basic-2-SO.rq
new file mode 100644
index 0000000..49c5711
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-2-SO.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ ?x ?p ?x }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-3-O.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-3-O.rq b/jena-db/jena-tdb2/testing/Basic/basic-3-O.rq
new file mode 100644
index 0000000..f7f3f6b
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-3-O.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ ?x ?p :z1a }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-3-P.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-3-P.rq b/jena-db/jena-tdb2/testing/Basic/basic-3-P.rq
new file mode 100644
index 0000000..8c79fa5
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-3-P.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ ?x :p1a ?z }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-3-PO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-3-PO.rq b/jena-db/jena-tdb2/testing/Basic/basic-3-PO.rq
new file mode 100644
index 0000000..a011a1c
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-3-PO.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ ?x :p1 :z1a }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-3-S.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-3-S.rq b/jena-db/jena-tdb2/testing/Basic/basic-3-S.rq
new file mode 100644
index 0000000..8b62930
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-3-S.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ :x1a ?p ?z }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-3-SO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-3-SO.rq b/jena-db/jena-tdb2/testing/Basic/basic-3-SO.rq
new file mode 100644
index 0000000..e71f0b3
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-3-SO.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ :x1 ?p :z1a }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/basic-3-SP.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/basic-3-SP.rq b/jena-db/jena-tdb2/testing/Basic/basic-3-SP.rq
new file mode 100644
index 0000000..3b7ff81
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/basic-3-SP.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT *
+{ :x1a :p1 ?z }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/data-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/data-1.ttl b/jena-db/jena-tdb2/testing/Basic/data-1.ttl
new file mode 100644
index 0000000..d3a3d80
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/data-1.ttl
@@ -0,0 +1,17 @@
+@prefix : <http://example/> .
+
+:x1 :p1 :z1 .
+:x1 :p1 :z2 .
+
+:x1 :p2 :z1 .
+:x1 :p2 :z2 .
+
+:x2 :p1 :z1 .
+:x2 :p1 :z2 .
+
+:x2 :p2 :z1 .
+:x2 :p2 :z2 .
+
+:x :p :x .
+:x :x :x .
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Basic/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Basic/manifest.ttl b/jena-db/jena-tdb2/testing/Basic/manifest.ttl
new file mode 100644
index 0000000..aacbb56
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Basic/manifest.ttl
@@ -0,0 +1,101 @@
+# 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.
+
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
+@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
+
+<> rdf:type mf:Manifest ;
+ rdfs:label "Basic test cases" ;
+ mf:entries
+ (
+ [ mf:name "Basic 00" ;
+ mf:action
+ [ qt:query <basic-00.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic S" ;
+ mf:action
+ [ qt:query <basic-1-S.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic P" ;
+ mf:action
+ [ qt:query <basic-1-P.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic O" ;
+ mf:action
+ [ qt:query <basic-1-O.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic 1 SP" ;
+ mf:action
+ [ qt:query <basic-1-SP.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic 1 SO" ;
+ mf:action
+ [ qt:query <basic-1-SO.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic 1 PO" ;
+ mf:action
+ [ qt:query <basic-1-PO.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic 1 SPO" ;
+ mf:action
+ [ qt:query <basic-1-SPO.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic 2 SO" ;
+ mf:action
+ [ qt:query <basic-2-SO.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+
+ [ mf:name "Basic 3 S" ;
+ mf:action
+ [ qt:query <basic-3-S.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic 3 P" ;
+ mf:action
+ [ qt:query <basic-3-P.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic 3 O" ;
+ mf:action
+ [ qt:query <basic-3-O.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic 3 SP" ;
+ mf:action
+ [ qt:query <basic-3-SP.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic 3 SO" ;
+ mf:action
+ [ qt:query <basic-3-SO.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Basic 3 PO" ;
+ mf:action
+ [ qt:query <basic-3-SO.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ ) .
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Data/solver-data.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Data/solver-data.ttl b/jena-db/jena-tdb2/testing/Data/solver-data.ttl
new file mode 100644
index 0000000..cdbfb19
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Data/solver-data.ttl
@@ -0,0 +1,7 @@
+@prefix : <http://example/> .
+
+:s :p :o .
+:s :p 10 .
+:s :p :x .
+:x :q :y .
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Loader/data-1.nq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Loader/data-1.nq b/jena-db/jena-tdb2/testing/Loader/data-1.nq
new file mode 100644
index 0000000..e9812a6
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Loader/data-1.nq
@@ -0,0 +1 @@
+<s> <p> <o> <g> .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Loader/data-2.nt
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Loader/data-2.nt b/jena-db/jena-tdb2/testing/Loader/data-2.nt
new file mode 100644
index 0000000..81fc25f
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Loader/data-2.nt
@@ -0,0 +1 @@
+<s> <p> <o> .
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Loader/data-3.trig
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Loader/data-3.trig b/jena-db/jena-tdb2/testing/Loader/data-3.trig
new file mode 100644
index 0000000..8000cc1
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Loader/data-3.trig
@@ -0,0 +1,3 @@
+prefix : <http://example/>
+
+:g { :s :p :o }
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Loader/data-4.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Loader/data-4.ttl b/jena-db/jena-tdb2/testing/Loader/data-4.ttl
new file mode 100644
index 0000000..49678f1
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Loader/data-4.ttl
@@ -0,0 +1,4 @@
+prefix : <http://example/>
+
+:s :p :o .
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Pattern/data-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Pattern/data-1.ttl b/jena-db/jena-tdb2/testing/Pattern/data-1.ttl
new file mode 100644
index 0000000..d3a3d80
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Pattern/data-1.ttl
@@ -0,0 +1,17 @@
+@prefix : <http://example/> .
+
+:x1 :p1 :z1 .
+:x1 :p1 :z2 .
+
+:x1 :p2 :z1 .
+:x1 :p2 :z2 .
+
+:x2 :p1 :z1 .
+:x2 :p1 :z2 .
+
+:x2 :p2 :z1 .
+:x2 :p2 :z2 .
+
+:x :p :x .
+:x :x :x .
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Pattern/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Pattern/manifest.ttl b/jena-db/jena-tdb2/testing/Pattern/manifest.ttl
new file mode 100644
index 0000000..094244b
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Pattern/manifest.ttl
@@ -0,0 +1,35 @@
+# 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.
+
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
+@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
+
+<> rdf:type mf:Manifest ;
+ rdfs:label "Patterns" ;
+ mf:entries
+ (
+ [ mf:name "Pattern 1" ;
+ mf:action
+ [ qt:query <pattern-1.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Pattern 2" ;
+ mf:action
+ [ qt:query <pattern-2.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ ) .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Pattern/pattern-1.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Pattern/pattern-1.rq b/jena-db/jena-tdb2/testing/Pattern/pattern-1.rq
new file mode 100644
index 0000000..ca7c8fc
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Pattern/pattern-1.rq
@@ -0,0 +1,7 @@
+PREFIX : <http://example/OTHER>
+
+SELECT *
+{
+ :NoSuchNode ?p ?z .
+ ?x ?p ?z
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Pattern/pattern-2.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Pattern/pattern-2.rq b/jena-db/jena-tdb2/testing/Pattern/pattern-2.rq
new file mode 100644
index 0000000..9b90038
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Pattern/pattern-2.rq
@@ -0,0 +1,8 @@
+PREFIX : <http://example/OTHER>
+
+SELECT *
+{
+ # Test shared variables
+ ?x1 :p1 ?z .
+ ?x2 :p1 ?z .
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Quads/data-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Quads/data-1.ttl b/jena-db/jena-tdb2/testing/Quads/data-1.ttl
new file mode 100644
index 0000000..adc4239
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Quads/data-1.ttl
@@ -0,0 +1,5 @@
+@prefix : <http://example/> .
+
+:x :p 1 .
+
+:x1 :p :x .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Quads/data-2.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Quads/data-2.ttl b/jena-db/jena-tdb2/testing/Quads/data-2.ttl
new file mode 100644
index 0000000..100a7c7
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Quads/data-2.ttl
@@ -0,0 +1,5 @@
+@prefix : <http://example/> .
+
+:x :p 1 .
+
+:x2 :p :x .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Quads/data-dft.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Quads/data-dft.ttl b/jena-db/jena-tdb2/testing/Quads/data-dft.ttl
new file mode 100644
index 0000000..a2ef718
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Quads/data-dft.ttl
@@ -0,0 +1,10 @@
+@prefix : <http://example/> .
+
+:x :p 1 .
+:x :p 2 .
+
+:y :p 1 .
+:y :p :x .
+:y :p :z .
+
+:z :q "abc" .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Quads/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Quads/manifest.ttl b/jena-db/jena-tdb2/testing/Quads/manifest.ttl
new file mode 100644
index 0000000..15a46a7
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Quads/manifest.ttl
@@ -0,0 +1,51 @@
+# 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.
+
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
+@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
+
+<> rdf:type mf:Manifest ;
+ rdfs:label "Quads and quad patterns" ;
+ mf:entries
+ (
+ [ mf:name "Quad-1" ;
+ mf:action
+ [ qt:query <quad-01.rq> ;
+ qt:data <data-dft.ttl> ;
+ qt:graphData <data-1.ttl> ;
+ qt:graphData <data-2.ttl> ;
+ ]
+ ]
+ [ mf:name "Quad-2" ;
+ mf:action
+ [ qt:query <quad-02.rq> ;
+ qt:data <data-dft.ttl> ;
+ qt:graphData <data-1.ttl> ;
+ qt:graphData <data-2.ttl> ;
+ ]
+ ]
+
+ ## Union of named graphs, explicitly named default graph
+ ## Complex patterns.
+
+## [ mf:name "Basic 00" ;
+## mf:action
+## [ qt:query <basic-00.rq> ;
+## qt:data <data-1.ttl> ;
+## qt:graphData ; ]
+## ]
+ ) .
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Quads/quad-01.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Quads/quad-01.rq b/jena-db/jena-tdb2/testing/Quads/quad-01.rq
new file mode 100644
index 0000000..b705fc8
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Quads/quad-01.rq
@@ -0,0 +1,9 @@
+PREFIX : <http://example/>
+PREFIX sys: <urn:x-arq:>
+
+SELECT *
+{
+ {?s ?p ?o } UNION { GRAPH ?g {?s ?p ?o}}
+}
+
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Quads/quad-02.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Quads/quad-02.rq b/jena-db/jena-tdb2/testing/Quads/quad-02.rq
new file mode 100644
index 0000000..ef3bf2f
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Quads/quad-02.rq
@@ -0,0 +1,8 @@
+PREFIX : <http://example/>
+PREFIX sys: <urn:x-arq:>
+
+SELECT *
+{
+ ?s ?p ?x
+ GRAPH ?g {?s1 ?p1 ?x }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/data-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/data-1.ttl b/jena-db/jena-tdb2/testing/UnionGraph/data-1.ttl
new file mode 100644
index 0000000..77be09c
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/data-1.ttl
@@ -0,0 +1,7 @@
+@prefix : <http://example/> .
+
+:x :p 1 .
+:x :p 2 .
+
+
+:y :q :x .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/data-2.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/data-2.ttl b/jena-db/jena-tdb2/testing/UnionGraph/data-2.ttl
new file mode 100644
index 0000000..59ac719
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/data-2.ttl
@@ -0,0 +1,5 @@
+@prefix : <http://example/> .
+
+:x :p 1 .
+:x :p 99 .
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/data-dft.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/data-dft.ttl b/jena-db/jena-tdb2/testing/UnionGraph/data-dft.ttl
new file mode 100644
index 0000000..d64ddd9
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/data-dft.ttl
@@ -0,0 +1,5 @@
+@prefix : <http://example/> .
+
+:x :p 11 .
+:x :p 999 .
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/manifest.ttl b/jena-db/jena-tdb2/testing/UnionGraph/manifest.ttl
new file mode 100644
index 0000000..217d229
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/manifest.ttl
@@ -0,0 +1,107 @@
+# 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.
+
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
+@prefix mfx: <http://jena.hpl.hp.com/2005/05/test-manifest-extra#> .
+@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
+
+<> rdf:type mf:Manifest ;
+ rdfs:label "Union of named graphs" ;
+ mf:entries
+ (
+ [ mf:name "Merge-1" ;
+ rdf:type mfx:TestQuery ;
+ mf:action
+ [ qt:query <merge-1.rq> ;
+ qt:data <data-dft.ttl> ;
+ qt:graphData <data-1.ttl> ;
+ qt:graphData <data-2.ttl> ;
+ ] ;
+ mf:result <merge-1-results.srx>
+ ]
+ [ mf:name "Merge-2" ;
+ rdf:type mfx:TestQuery ;
+ mf:action
+ [ qt:query <merge-2.rq> ;
+ qt:data <data-dft.ttl> ;
+ qt:graphData <data-1.ttl> ;
+ qt:graphData <data-2.ttl> ;
+ ] ;
+ mf:result <merge-2-results.srx>
+ ]
+ [ mf:name "Merge-3" ;
+ rdf:type mfx:TestQuery ;
+ mf:action
+ [ qt:query <merge-3.rq> ;
+ qt:data <data-dft.ttl> ;
+ qt:graphData <data-1.ttl> ;
+ qt:graphData <data-2.ttl> ;
+ ] ;
+ mf:result <merge-3-results.srx>
+ ]
+ [ mf:name "Merge-4" ;
+ rdf:type mfx:TestQuery ;
+ mf:action
+ [ qt:query <merge-4.rq> ;
+ qt:data <data-dft.ttl> ;
+ qt:graphData <data-1.ttl> ;
+ qt:graphData <data-2.ttl> ;
+ ] ;
+ mf:result <merge-4-results.srx>
+ ]
+ [ mf:name "Merge-5" ;
+ rdf:type mfx:TestQuery ;
+ mf:action
+ [ qt:query <merge-5.rq> ;
+ qt:data <data-dft.ttl> ;
+ qt:graphData <data-1.ttl> ;
+ qt:graphData <data-2.ttl> ;
+ ] ;
+ mf:result <merge-5-results.srx>
+ ]
+ [ mf:name "Merge-6" ;
+ rdf:type mfx:TestQuery ;
+ mf:action
+ [ qt:query <merge-6.rq> ;
+ qt:data <data-dft.ttl> ;
+ qt:graphData <data-1.ttl> ;
+ qt:graphData <data-2.ttl> ;
+ ] ;
+ mf:result <merge-6-results.srx>
+ ]
+ # Queries that need more than one SQL query (currently)
+ [ mf:name "Merge-A" ;
+ rdf:type mfx:TestQuery ;
+ mf:action
+ [ qt:query <merge-A.rq> ;
+ qt:data <data-dft.ttl> ;
+ qt:graphData <data-1.ttl> ;
+ qt:graphData <data-2.ttl> ;
+ ] ;
+ mf:result <merge-A-results.srx>
+ ]
+ [ mf:name "Merge-B" ;
+ rdf:type mfx:TestQuery ;
+ mf:action
+ [ qt:query <merge-B.rq> ;
+ qt:data <data-dft.ttl> ;
+ qt:graphData <data-1.ttl> ;
+ qt:graphData <data-2.ttl> ;
+ ] ;
+ mf:result <merge-B-results.srx>
+ ]
+ ).
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-1-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-1-results.srx b/jena-db/jena-tdb2/testing/UnionGraph/merge-1-results.srx
new file mode 100644
index 0000000..f850ec3
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-1-results.srx
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<sparql
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema#"
+ xmlns="http://www.w3.org/2005/sparql-results#" >
+ <head>
+ <variable name="s"/>
+ <variable name="p"/>
+ <variable name="o"/>
+ </head>
+ <results>
+ <result>
+ <binding name="s">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">99</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-1.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-1.rq b/jena-db/jena-tdb2/testing/UnionGraph/merge-1.rq
new file mode 100644
index 0000000..c403064
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-1.rq
@@ -0,0 +1,8 @@
+PREFIX : <http://example/>
+PREFIX arq: <urn:x-arq:>
+
+SELECT *
+{
+ GRAPH arq:UnionGraph { ?s ?p ?o }
+}
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-2-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-2-results.srx b/jena-db/jena-tdb2/testing/UnionGraph/merge-2-results.srx
new file mode 100644
index 0000000..18f9252
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-2-results.srx
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<sparql
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema#"
+ xmlns="http://www.w3.org/2005/sparql-results#" >
+ <head>
+ <variable name="s"/>
+ <variable name="p"/>
+ <variable name="o"/>
+ <variable name="q"/>
+ <variable name="z"/>
+ </head>
+ <results>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="q">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="z">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">99</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="q">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="z">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="q">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="z">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-2.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-2.rq b/jena-db/jena-tdb2/testing/UnionGraph/merge-2.rq
new file mode 100644
index 0000000..27953a6
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-2.rq
@@ -0,0 +1,8 @@
+PREFIX : <http://example/>
+PREFIX arq: <urn:x-arq:>
+
+SELECT *
+{
+ GRAPH arq:UnionGraph { ?s ?p ?o . ?o ?q ?z }
+}
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-3-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-3-results.srx b/jena-db/jena-tdb2/testing/UnionGraph/merge-3-results.srx
new file mode 100644
index 0000000..4a65413
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-3-results.srx
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<sparql
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema#"
+ xmlns="http://www.w3.org/2005/sparql-results#" >
+ <head>
+ <variable name="p"/>
+ </head>
+ <results>
+ <result>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ </result>
+ <result>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ </result>
+ <result>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ </result>
+ <result>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ </result>
+ </results>
+</sparql>
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-3.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-3.rq b/jena-db/jena-tdb2/testing/UnionGraph/merge-3.rq
new file mode 100644
index 0000000..1212926
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-3.rq
@@ -0,0 +1,8 @@
+PREFIX : <http://example/>
+PREFIX arq: <urn:x-arq:>
+
+SELECT *
+{
+ GRAPH arq:UnionGraph { [] ?p [] }
+}
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-4-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-4-results.srx b/jena-db/jena-tdb2/testing/UnionGraph/merge-4-results.srx
new file mode 100644
index 0000000..0b44cb2
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-4-results.srx
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<sparql
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema#"
+ xmlns="http://www.w3.org/2005/sparql-results#" >
+ <head>
+ <variable name="s"/>
+ <variable name="p"/>
+ <variable name="o"/>
+ <variable name="q"/>
+ <variable name="z"/>
+ </head>
+ <results>
+ <result>
+ <binding name="s">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">99</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="q">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="z">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="q">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="z">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">99</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="q">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="z">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-4.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-4.rq b/jena-db/jena-tdb2/testing/UnionGraph/merge-4.rq
new file mode 100644
index 0000000..004f4bc
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-4.rq
@@ -0,0 +1,8 @@
+PREFIX : <http://example/>
+PREFIX arq: <urn:x-arq:>
+
+SELECT *
+{
+ GRAPH arq:UnionGraph
+ { ?s ?p ?o . OPTIONAL { ?o ?q ?z } }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-5-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-5-results.srx b/jena-db/jena-tdb2/testing/UnionGraph/merge-5-results.srx
new file mode 100644
index 0000000..c7d777f
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-5-results.srx
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<sparql xmlns="http://www.w3.org/2005/sparql-results#">
+ <head>
+ <variable name="p"/>
+ <variable name="o"/>
+ </head>
+ <results>
+ <result>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">99</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-5.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-5.rq b/jena-db/jena-tdb2/testing/UnionGraph/merge-5.rq
new file mode 100644
index 0000000..fa9bfe3
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-5.rq
@@ -0,0 +1,8 @@
+PREFIX : <http://example/>
+PREFIX arq: <urn:x-arq:>
+
+SELECT *
+{
+ GRAPH arq:UnionGraph { :x ?p ?o }
+}
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-6-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-6-results.srx b/jena-db/jena-tdb2/testing/UnionGraph/merge-6-results.srx
new file mode 100644
index 0000000..b4d31dc
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-6-results.srx
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<sparql xmlns="http://www.w3.org/2005/sparql-results#">
+ <head>
+ <variable name="x"/>
+ <variable name="p"/>
+ <variable name="v"/>
+ </head>
+ <results>
+ <result>
+ <binding name="x">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="v">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">99</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="x">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="v">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="x">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="v">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-6.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-6.rq b/jena-db/jena-tdb2/testing/UnionGraph/merge-6.rq
new file mode 100644
index 0000000..7819cbb
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-6.rq
@@ -0,0 +1,7 @@
+PREFIX : <http://example/>
+PREFIX arq: <urn:x-arq:>
+
+SELECT *
+{
+ GRAPH arq:UnionGraph { ?x ?p 99 . ?x :p ?v }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-A-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-A-results.srx b/jena-db/jena-tdb2/testing/UnionGraph/merge-A-results.srx
new file mode 100644
index 0000000..1438c25
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-A-results.srx
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<sparql
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema#"
+ xmlns="http://www.w3.org/2005/sparql-results#" >
+ <head>
+ <variable name="s"/>
+ <variable name="p"/>
+ <variable name="o"/>
+ <variable name="q"/>
+ <variable name="z"/>
+ </head>
+ <results>
+ <result>
+ <binding name="s">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">99</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="q">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="z">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">99</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="q">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="z">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="q">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="z">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="o">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-A.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-A.rq b/jena-db/jena-tdb2/testing/UnionGraph/merge-A.rq
new file mode 100644
index 0000000..7bab242
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-A.rq
@@ -0,0 +1,8 @@
+PREFIX : <http://example>
+PREFIX arq: <urn:x-arq:>
+
+SELECT *
+{
+ GRAPH arq:UnionGraph
+ { ?s ?p ?o . OPTIONAL { ?o ?q ?z FILTER(?o != 123) } }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-B-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-B-results.srx b/jena-db/jena-tdb2/testing/UnionGraph/merge-B-results.srx
new file mode 100644
index 0000000..60d7766
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-B-results.srx
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<sparql
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema#"
+ xmlns="http://www.w3.org/2005/sparql-results#" >
+ <head>
+ <variable name="s"/>
+ <variable name="p"/>
+ <variable name="o"/>
+ <variable name="q"/>
+ <variable name="v"/>
+ </head>
+ <results>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="q">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="v">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">11</literal>
+ </binding>
+ </result>
+ <result>
+ <binding name="s">
+ <uri>http://example/y</uri>
+ </binding>
+ <binding name="p">
+ <uri>http://example/q</uri>
+ </binding>
+ <binding name="o">
+ <uri>http://example/x</uri>
+ </binding>
+ <binding name="q">
+ <uri>http://example/p</uri>
+ </binding>
+ <binding name="v">
+ <literal datatype="http://www.w3.org/2001/XMLSchema#integer">999</literal>
+ </binding>
+ </result>
+ </results>
+</sparql>
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/UnionGraph/merge-B.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/UnionGraph/merge-B.rq b/jena-db/jena-tdb2/testing/UnionGraph/merge-B.rq
new file mode 100644
index 0000000..d4aceda
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/UnionGraph/merge-B.rq
@@ -0,0 +1,8 @@
+PREFIX : <http://example>
+PREFIX arq: <urn:x-arq:>
+
+SELECT *
+{
+ GRAPH arq:UnionGraph { ?s ?p ?o . }
+ { ?o ?q ?v }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Update/create-1.ru
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Update/create-1.ru b/jena-db/jena-tdb2/testing/Update/create-1.ru
new file mode 100644
index 0000000..3276ec1
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Update/create-1.ru
@@ -0,0 +1 @@
+CREATE GRAPH <http://example/graph>
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Update/drop-1.ru
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Update/drop-1.ru b/jena-db/jena-tdb2/testing/Update/drop-1.ru
new file mode 100644
index 0000000..2512eb3
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Update/drop-1.ru
@@ -0,0 +1 @@
+DROP GRAPH <http://example/graph>
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Update/update-1.ru
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Update/update-1.ru b/jena-db/jena-tdb2/testing/Update/update-1.ru
new file mode 100644
index 0000000..7a6b737
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Update/update-1.ru
@@ -0,0 +1,3 @@
+PREFIX : <http://example/>
+
+INSERT { :r :p 123 }
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Update/update-2.ru
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Update/update-2.ru b/jena-db/jena-tdb2/testing/Update/update-2.ru
new file mode 100644
index 0000000..41e4ec0
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Update/update-2.ru
@@ -0,0 +1,5 @@
+PREFIX : <http://example/>
+
+CREATE GRAPH <http://example/g1>
+INSERT INTO GRAPH <http://example/g1>
+{ :r :p 123 }
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Update/update-3.ru
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Update/update-3.ru b/jena-db/jena-tdb2/testing/Update/update-3.ru
new file mode 100644
index 0000000..17f8410
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Update/update-3.ru
@@ -0,0 +1,7 @@
+PREFIX : <http://example/>
+
+CREATE GRAPH <http://example/g1>
+INSERT INTO GRAPH <http://example/g1>
+{ :r :p 123 }
+DELETE FROM GRAPH <http://example/g1>
+{ :r :p 123 }
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/data-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/data-1.ttl b/jena-db/jena-tdb2/testing/Values/data-1.ttl
new file mode 100644
index 0000000..27c37dd
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/data-1.ttl
@@ -0,0 +1,23 @@
+@prefix : <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+:x1 :p 1 .
+:x2 :p "1" .
+:x3 :p "1"@en .
+
+:x4 :p 1.5 .
+
+:x5 :p "2008-04-29T09:13:15+01:00"^^xsd:dateTime .
+
+:x6 :p "0008-04-29T09:13:15-01:00"^^xsd:dateTime .
+
+:x7 :p "-3000-04-29T09:13:15Z"^^xsd:dateTime .
+
+# Not encoded inline
+:x8 :p "-3000-04-29T09:13:15Z"^^xsd:dateTime .
+
+:x9 :p "2008-04-29"^^xsd:date .
+
+:x10 :p "2008-04-29Z"^^xsd:date .
+
+:x11 :p "2008-04-29+01:00"^^xsd:date .
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/manifest.ttl b/jena-db/jena-tdb2/testing/Values/manifest.ttl
new file mode 100644
index 0000000..3396af5
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/manifest.ttl
@@ -0,0 +1,76 @@
+# 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.
+
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
+@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
+
+<> rdf:type mf:Manifest ;
+ rdfs:label "Value tests" ;
+ mf:entries
+ (
+ [ mf:name "Value-00" ;
+ mf:action
+ [ qt:query <value-00.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Value-01" ;
+ mf:action
+ [ qt:query <value-01.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Value-02" ;
+ mf:action
+ [ qt:query <value-02.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Value-03" ;
+ mf:action
+ [ qt:query <value-03.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+
+ [ mf:name "Value-04" ;
+ mf:action
+ [ qt:query <value-04.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Value-05" ;
+ mf:action
+ [ qt:query <value-05.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Value-06" ;
+ mf:action
+ [ qt:query <value-06.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Value-07" ;
+ mf:action
+ [ qt:query <value-07.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Value-08" ;
+ mf:action
+ [ qt:query <value-08.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ [ mf:name "Value-09" ;
+ mf:action
+ [ qt:query <value-09.rq> ;
+ qt:data <data-1.ttl> ] ;
+ ]
+ ) .
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/value-00.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/value-00.rq b/jena-db/jena-tdb2/testing/Values/value-00.rq
new file mode 100644
index 0000000..d1fe80b
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/value-00.rq
@@ -0,0 +1 @@
+SELECT * { ?s ?p ?o }
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/value-01.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/value-01.rq b/jena-db/jena-tdb2/testing/Values/value-01.rq
new file mode 100644
index 0000000..664f67a
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/value-01.rq
@@ -0,0 +1 @@
+SELECT * { ?s ?p 1 }
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/value-02.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/value-02.rq b/jena-db/jena-tdb2/testing/Values/value-02.rq
new file mode 100644
index 0000000..5dfe5ec
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/value-02.rq
@@ -0,0 +1 @@
+SELECT * { ?s ?p 1.5 }
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/value-03.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/value-03.rq b/jena-db/jena-tdb2/testing/Values/value-03.rq
new file mode 100644
index 0000000..7134be8
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/value-03.rq
@@ -0,0 +1 @@
+SELECT * { ?s ?p "1" }
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/value-04.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/value-04.rq b/jena-db/jena-tdb2/testing/Values/value-04.rq
new file mode 100644
index 0000000..030116d
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/value-04.rq
@@ -0,0 +1 @@
+SELECT * { ?s ?p "1"@en }
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/value-05.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/value-05.rq b/jena-db/jena-tdb2/testing/Values/value-05.rq
new file mode 100644
index 0000000..fbd8d9b
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/value-05.rq
@@ -0,0 +1,5 @@
+SELECT *
+{
+ ?s ?p ?o .
+ FILTER(?o = 1)
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/value-06.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/value-06.rq b/jena-db/jena-tdb2/testing/Values/value-06.rq
new file mode 100644
index 0000000..8f34124
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/value-06.rq
@@ -0,0 +1,6 @@
+PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
+
+SELECT *
+{
+ ?s ?p "2008-04-29+01:00"^^xsd:date .
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/value-07.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/value-07.rq b/jena-db/jena-tdb2/testing/Values/value-07.rq
new file mode 100644
index 0000000..cafd777
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/value-07.rq
@@ -0,0 +1,6 @@
+PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
+
+SELECT *
+{
+ ?s ?p ?x . FILTER (?x = "2008-04-29+01:00"^^xsd:date) .
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/value-08.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/value-08.rq b/jena-db/jena-tdb2/testing/Values/value-08.rq
new file mode 100644
index 0000000..e6fc284
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/value-08.rq
@@ -0,0 +1,6 @@
+PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
+
+SELECT *
+{
+ ?s ?p "2008-04-29T09:13:15+01:00"^^xsd:dateTime .
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/Values/value-09.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/Values/value-09.rq b/jena-db/jena-tdb2/testing/Values/value-09.rq
new file mode 100644
index 0000000..02dcc20
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/Values/value-09.rq
@@ -0,0 +1,7 @@
+PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
+
+SELECT *
+{
+ # Out of range - not an immediate literal
+ ?s ?p "-3000-04-29T09:13:15Z"^^xsd:dateTime
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/jena-tdb2/testing/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/testing/manifest.ttl b/jena-db/jena-tdb2/testing/manifest.ttl
new file mode 100644
index 0000000..aeaf80e
--- /dev/null
+++ b/jena-db/jena-tdb2/testing/manifest.ttl
@@ -0,0 +1,31 @@
+# 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.
+
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
+@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
+
+<> rdf:type mf:Manifest ;
+ rdfs:label "TDB - Scripts" ;
+ mf:include (
+ <Basic/manifest.ttl>
+ <Pattern/manifest.ttl>
+ <Quads/manifest.ttl>
+ <Values/manifest.ttl>
+ <UnionGraph/manifest.ttl>
+ ) .
+
+
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/pom.xml
----------------------------------------------------------------------
diff --git a/jena-db/pom.xml b/jena-db/pom.xml
index 5d6b72d..be0ab92 100644
--- a/jena-db/pom.xml
+++ b/jena-db/pom.xml
@@ -20,11 +20,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.seaborne.mantis</groupId>
- <artifactId>mantis</artifactId>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-db</artifactId>
<packaging>pom</packaging>
<url>https://github.com/afs/mantis</url>
- <version>0.3.1-SNAPSHOT</version>
+ <version>3.5.0-SNAPSHOT</version>
<name>Mantis :: Database Operation Environment</name>
<description>Mantis :: Database Operation Environment</description>
@@ -64,7 +64,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
<build.time.xsd>${maven.build.timestamp}</build.time.xsd>
- <ver.jena>3.4.0</ver.jena>
+ <ver.jena>3.5.0-SNAPSHOT</ver.jena>
<ver.tdb>${ver.jena}</ver.tdb>
<ver.fuseki>${ver.jena}</ver.fuseki>
<ver.junit>4.12</ver.junit>
@@ -73,14 +73,14 @@
</properties>
<modules>
- <module>dboe-base</module>
- <module>dboe-transaction</module>
- <module>dboe-index</module>
- <module>dboe-index-test</module>
- <module>dboe-trans-data</module>
- <module>tdb2</module>
- <module>tdb2-cmds</module>
- <module>fuseki-tdb2</module>
+ <module>jena-dboe-base</module>
+ <module>jena-dboe-transaction</module>
+ <module>jena-dboe-index</module>
+ <module>jena-dboe-index-test</module>
+ <module>jena-dboe-trans-data</module>
+ <module>jena-tdb2</module>
+ <module>jena-tdb2-cmds</module>
+ <module>jena-fuseki-tdb2</module>
</modules>
<dependencyManagement>
http://git-wip-us.apache.org/repos/asf/jena/blob/1dabea3a/jena-db/tdb2-cmds/.gitignore
----------------------------------------------------------------------
diff --git a/jena-db/tdb2-cmds/.gitignore b/jena-db/tdb2-cmds/.gitignore
deleted file mode 100644
index 731afb6..0000000
--- a/jena-db/tdb2-cmds/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-DB*
-D.*