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/10/03 18:22:49 UTC
[1/7] jena git commit: JENA-1397: Move index-test commands to
jena-integration-tests
Repository: jena
Updated Branches:
refs/heads/jena-tdb2 a3a52f0d3 -> 77aa65661
JENA-1397: Move index-test commands to jena-integration-tests
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/4df2b898
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/4df2b898
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/4df2b898
Branch: refs/heads/jena-tdb2
Commit: 4df2b89841ccb110a61b287c3dff14c8240908c6
Parents: a3a52f0
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Oct 3 17:04:59 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Oct 3 17:04:59 2017 +0100
----------------------------------------------------------------------
.../jena/dboe/index/test/BaseSoakTest.java | 141 -------------------
.../trans/bplustree/soak/CmdTestBPlusTree.java | 105 --------------
.../soak/CmdTestBPlusTreeRewriter.java | 68 ---------
jena-integration-tests/pom.xml | 15 +-
.../src/test/java/dboe/BaseSoakTest.java | 141 +++++++++++++++++++
.../src/test/java/dboe/CmdTestBPlusTree.java | 104 ++++++++++++++
.../java/dboe/CmdTestBPlusTreeRewriter.java | 67 +++++++++
7 files changed, 326 insertions(+), 315 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/4df2b898/jena-db/jena-dboe-index-test/src/main/java/org/apache/jena/dboe/index/test/BaseSoakTest.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-index-test/src/main/java/org/apache/jena/dboe/index/test/BaseSoakTest.java b/jena-db/jena-dboe-index-test/src/main/java/org/apache/jena/dboe/index/test/BaseSoakTest.java
deleted file mode 100644
index 6e46c02..0000000
--- a/jena-db/jena-dboe-index-test/src/main/java/org/apache/jena/dboe/index/test/BaseSoakTest.java
+++ /dev/null
@@ -1,141 +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.dboe.index.test;
-
-import java.util.List ;
-
-import jena.cmd.CmdException ;
-import jena.cmd.CmdGeneral ;
-
-import org.apache.jena.atlas.lib.Lib ;
-import org.apache.jena.atlas.lib.RandomLib ;
-import org.apache.jena.atlas.logging.LogCtl ;
-
-public abstract class BaseSoakTest extends CmdGeneral {
- static { LogCtl.setLog4j() ; }
-
- protected final int MinOrder = 2 ;
- protected final int MinSize = 1 ;
- protected int MaxOrder = -1 ;
- protected int MaxSize = -1 ;
- protected int NumTest = -1 ;
-
- protected BaseSoakTest(String[] argv) {
- super(argv) ;
- }
-
- protected abstract void before() ;
- protected abstract void after() ;
-
- @Override
- protected String getSummary() {
- return "Usage: "+Lib.className(this)+" maxOrder maxSize NumTests" ;
- }
-
- @Override
- protected void processModulesAndArgs() {
- List<String> args = super.getPositional() ;
- if ( args.size() != 3 )
- throw new CmdException("Usage: maxOrder maxSize NumTests") ;
-
- try { MaxOrder = Integer.parseInt(args.get(0)) ; }
- catch (NumberFormatException ex)
- { throw new CmdException("Bad number for MaxOrder") ; }
-
- try { MaxSize = Integer.parseInt(args.get(1)) ; }
- catch (NumberFormatException ex)
- { throw new CmdException("Bad number for MaxSize") ; }
-
- try { NumTest = Integer.parseInt(args.get(2)) ; }
- catch (NumberFormatException ex)
- { throw new CmdException("Bad number for NumTest") ; }
- }
-
- @Override
- protected void exec() {
- int successes = 0 ;
- int failures = 0 ;
-
- // Number of dots.
- int numOnLine = 50 ;
- int testsPerTick ;
- if ( NumTest < 20 )
- testsPerTick = 5 ;
- else if ( NumTest < 200 )
- testsPerTick = 50 ;
- else
- testsPerTick = 500 ;
-
-
- // ---- Format for line counter.
- int numLines = (int)Math.ceil( ((double)NumTest) / (testsPerTick * numOnLine) ) ;
- // Start of last line.
- int z = (numLines-1)*(testsPerTick * numOnLine) ;
- int digits = 1 ;
- if ( z > 0 )
- digits = 1+(int)Math.floor(Math.log10(z));
- String format = "[%"+digits+"d] " ;
-
- System.out.printf("TEST : %,d tests : Max Order=%d Max Items=%,d [tests per tick=%d]\n", NumTest, MaxOrder, MaxSize, testsPerTick) ;
-
- before() ;
-
- int testCount = 1 ;
-
- for ( testCount = 1 ; testCount <= NumTest ; testCount++ ) {
- if ( testCount % testsPerTick == 0 )
- System.out.print(".") ;
- if ( testCount % (testsPerTick * numOnLine) == 0 )
- System.out.println("") ;
- if ( testCount % (testsPerTick * numOnLine) == 1 )
- System.out.printf(format, testCount-1) ;
-
- int idx = testCount - 1 ;
- int order = ( MinOrder == MaxOrder ) ? MinOrder : MinOrder + RandomLib.random.nextInt(MaxOrder-MinOrder) ;
- int size = ( MinSize == MaxSize ) ? MinSize : MinSize + RandomLib.random.nextInt(MaxSize-MinSize) ; try {
- //System.out.printf("TEST : %,d : Order=%-2d : Size=%d\n", testCount, order, size) ;
- runOneTest(testCount, order, size) ;
- successes++ ;
- }
- catch (AssertionError | RuntimeException ex) {
- System.err.printf("-- Fail: (order=%d, size=%d)\n", order, size) ;
- ex.printStackTrace(System.err) ;
- System.err.printf("--------------------------\n") ;
- failures++ ;
- }
- }
-
- // Did the last loop print a new line?
- if ( (testCount-1) % (testsPerTick*numOnLine) != 0 )
- System.out.println();
-
- after() ;
- System.err.flush() ;
- System.out.flush() ;
- System.out.printf("DONE : %,d tests : Success=%,d ; Failures=%,d\n", NumTest, successes, failures);
- }
-
- protected abstract void runOneTest(int testCount, int order, int size, boolean debug) ;
-
- protected abstract void runOneTest(int testCount, int order, int size) ;
-
- @Override
- protected String getCommandName() { return Lib.className(this) ; }
-}
-
http://git-wip-us.apache.org/repos/asf/jena/blob/4df2b898/jena-db/jena-dboe-trans-data/src/test/java/org/apache/jena/dboe/trans/bplustree/soak/CmdTestBPlusTree.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-trans-data/src/test/java/org/apache/jena/dboe/trans/bplustree/soak/CmdTestBPlusTree.java b/jena-db/jena-dboe-trans-data/src/test/java/org/apache/jena/dboe/trans/bplustree/soak/CmdTestBPlusTree.java
deleted file mode 100644
index 497d43e..0000000
--- a/jena-db/jena-dboe-trans-data/src/test/java/org/apache/jena/dboe/trans/bplustree/soak/CmdTestBPlusTree.java
+++ /dev/null
@@ -1,105 +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.dboe.trans.bplustree.soak;
-
-import org.apache.jena.dboe.base.file.BlockAccessMem;
-import org.apache.jena.dboe.index.test.BaseSoakTest;
-import org.apache.jena.dboe.index.test.IndexTestLib;
-import org.apache.jena.dboe.sys.Sys;
-import org.apache.jena.dboe.sys.SystemIndex;
-import org.apache.jena.dboe.trans.bplustree.BPT;
-import org.apache.jena.dboe.trans.bplustree.BPlusTree;
-import org.apache.jena.dboe.trans.bplustree.BPlusTreeFactory;
-import org.apache.jena.dboe.trans.bplustree.BlockTracker;
-
-public class CmdTestBPlusTree extends BaseSoakTest
-{
- static public void main(String... argv) {
- //argv = new String[] {"50", "150", "1000000"} ;
-// System.setProperty("bpt:checking", "false") ;
-// System.setProperty("bpt:duplication", "true") ;
- new CmdTestBPlusTree(argv).mainRun() ;
- }
-
- protected CmdTestBPlusTree(String[] argv) {
- super(argv) ;
- }
-
- @Override
- protected void before() {
- SystemIndex.setNullOut(true) ;
- BlockTracker.collectHistory = false ;
- // Forced mode
- if ( true ) {
- BlockAccessMem.SafeMode = true ;
- BPT.CheckingNode = trueOrFalse("bpt:checking", false) ;
- boolean duplication = trueOrFalse("bpt:duplication", false) ;
- BPT.forcePromoteModes = true ;
- BPT.promoteDuplicateNodes = duplication ;
- BPT.promoteDuplicateRecords = duplication ;
- }
- if ( false ) {
- // Transactions.
- }
-
- System.out.printf(" BPT.CheckingNode = %s\n", BPT.CheckingNode) ;
- System.out.printf(" BPT.forcePromoteModes = %s\n", BPT.forcePromoteModes) ;
- System.out.printf(" BPT.promoteDuplicateNodes = %s\n", BPT.promoteDuplicateRecords) ;
- System.out.printf(" BPT.promoteDuplicateRecords = %s\n", BPT.promoteDuplicateRecords) ;
- }
-
- private boolean trueOrFalse(String property, boolean dftValue) {
- String s = System.getProperty(property) ;
- if ( s == null )
- return dftValue ;
- if ( s.equalsIgnoreCase("true") || s.equalsIgnoreCase("T") || s.equalsIgnoreCase("1") )
- return true ;
- if ( s.equalsIgnoreCase("false") || s.equalsIgnoreCase("F") || s.equalsIgnoreCase("0") )
- return false ;
- System.err.println("Not recognized: "+property+"="+s);
- return dftValue ;
- }
-
- @Override
- protected void after() {}
-
- @Override
- protected void runOneTest(int testCount, int order, int size, boolean debug) {
- runOneTest(testCount, order, size) ;
- }
-
- @Override
- protected void runOneTest(int testCount, int order, int size) {
-// //System.err.println("runOneTest("+order+","+size+")") ;
- BPlusTree bpt = BPlusTreeFactory.makeMem(order, Sys.SizeOfInt, 0) ;
- bpt = BPlusTreeFactory.addTracking(bpt) ;
- bpt.nonTransactional() ;
- IndexTestLib.randTest(bpt, 5*size, size, true);
- bpt.close() ;
-
- // Transaction.
-// BPlusTree bpt = BPlusTreeFactory.makeMem(order, SystemLz.SizeOfInt, 0) ;
-// Journal journal = Journal.create(Location.mem()) ;
-// Transactional holder = TransactionalFactory.create(journal, bpt) ;
-// holder.begin(ReadWrite.WRITE);
-// IndexTestLib.randTest(bpt, 5*size, size, true);
-// holder.commit() ;
-// holder.end() ;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/4df2b898/jena-db/jena-dboe-trans-data/src/test/java/org/apache/jena/dboe/trans/bplustree/soak/CmdTestBPlusTreeRewriter.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-trans-data/src/test/java/org/apache/jena/dboe/trans/bplustree/soak/CmdTestBPlusTreeRewriter.java b/jena-db/jena-dboe-trans-data/src/test/java/org/apache/jena/dboe/trans/bplustree/soak/CmdTestBPlusTreeRewriter.java
deleted file mode 100644
index c0ee77a..0000000
--- a/jena-db/jena-dboe-trans-data/src/test/java/org/apache/jena/dboe/trans/bplustree/soak/CmdTestBPlusTreeRewriter.java
+++ /dev/null
@@ -1,68 +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.dboe.trans.bplustree.soak;
-
-import org.apache.jena.dboe.base.record.RecordFactory;
-import org.apache.jena.dboe.index.test.BaseSoakTest;
-import org.apache.jena.dboe.sys.SystemIndex;
-import org.apache.jena.dboe.trans.bplustree.BPT;
-import org.apache.jena.dboe.trans.bplustree.rewriter.TestBPlusTreeRewriterNonTxn;
-
-public class CmdTestBPlusTreeRewriter extends BaseSoakTest
-{
- static public void main(String... argv) {
- new CmdTestBPlusTreeRewriter(argv).mainRun() ;
- }
-
- protected CmdTestBPlusTreeRewriter(String[] argv) {
- super(argv) ;
- }
-
- static int KeySize = 4 ;
- static int ValueSize = 8 ;
-
- @Override
- protected void before() {
- SystemIndex.setNullOut(true) ;
- // Forced mode
- if ( false ) {
- BPT.forcePromoteModes = true ;
- BPT.promoteDuplicateNodes = true ;
- BPT.promoteDuplicateRecords = true ;
- }
- if ( false ) {
- // Transactions.
- }
- }
-
- @Override
- protected void after() { }
-
- @Override
- protected void runOneTest(int testCount, int order, int size, boolean debug) {
- runOneTest(testCount, order, size) ;
- }
-
- @Override
- protected void runOneTest(int testCount, int order, int size) {
- RecordFactory recordFactory = new RecordFactory(KeySize, ValueSize) ;
- TestBPlusTreeRewriterNonTxn.runOneTest(order, size, recordFactory, false) ;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/4df2b898/jena-integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/jena-integration-tests/pom.xml b/jena-integration-tests/pom.xml
index 5285247..b6f7fc9 100644
--- a/jena-integration-tests/pom.xml
+++ b/jena-integration-tests/pom.xml
@@ -27,7 +27,7 @@
<name>Apache Jena - Integration Testing</name>
<version>3.5.0-SNAPSHOT</version>
- <description>Apache Jena - Integration Testing</description>
+ <description>Apache Jena - Integration testing and test tools</description>
<parent>
<groupId>org.apache.jena</groupId>
@@ -66,6 +66,13 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-cmds</artifactId>
+ <version>3.5.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+
<!-- The test artifacts to go with apache-jena-libs -->
<dependency>
<groupId>org.apache.jena</groupId>
@@ -74,6 +81,12 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-dboe-index-test</artifactId>
+ <version>3.5.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.jena</groupId>
http://git-wip-us.apache.org/repos/asf/jena/blob/4df2b898/jena-integration-tests/src/test/java/dboe/BaseSoakTest.java
----------------------------------------------------------------------
diff --git a/jena-integration-tests/src/test/java/dboe/BaseSoakTest.java b/jena-integration-tests/src/test/java/dboe/BaseSoakTest.java
new file mode 100644
index 0000000..0e6556b
--- /dev/null
+++ b/jena-integration-tests/src/test/java/dboe/BaseSoakTest.java
@@ -0,0 +1,141 @@
+/*
+ * 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 dboe;
+
+import java.util.List ;
+
+import jena.cmd.CmdException ;
+import jena.cmd.CmdGeneral ;
+
+import org.apache.jena.atlas.lib.Lib ;
+import org.apache.jena.atlas.lib.RandomLib ;
+import org.apache.jena.atlas.logging.LogCtl ;
+
+public abstract class BaseSoakTest extends CmdGeneral {
+ static { LogCtl.setLog4j() ; }
+
+ protected final int MinOrder = 2 ;
+ protected final int MinSize = 1 ;
+ protected int MaxOrder = -1 ;
+ protected int MaxSize = -1 ;
+ protected int NumTest = -1 ;
+
+ protected BaseSoakTest(String[] argv) {
+ super(argv) ;
+ }
+
+ protected abstract void before() ;
+ protected abstract void after() ;
+
+ @Override
+ protected String getSummary() {
+ return "Usage: "+Lib.className(this)+" maxOrder maxSize NumTests" ;
+ }
+
+ @Override
+ protected void processModulesAndArgs() {
+ List<String> args = super.getPositional() ;
+ if ( args.size() != 3 )
+ throw new CmdException("Usage: maxOrder maxSize NumTests") ;
+
+ try { MaxOrder = Integer.parseInt(args.get(0)) ; }
+ catch (NumberFormatException ex)
+ { throw new CmdException("Bad number for MaxOrder") ; }
+
+ try { MaxSize = Integer.parseInt(args.get(1)) ; }
+ catch (NumberFormatException ex)
+ { throw new CmdException("Bad number for MaxSize") ; }
+
+ try { NumTest = Integer.parseInt(args.get(2)) ; }
+ catch (NumberFormatException ex)
+ { throw new CmdException("Bad number for NumTest") ; }
+ }
+
+ @Override
+ protected void exec() {
+ int successes = 0 ;
+ int failures = 0 ;
+
+ // Number of dots.
+ int numOnLine = 50 ;
+ int testsPerTick ;
+ if ( NumTest < 20 )
+ testsPerTick = 5 ;
+ else if ( NumTest < 200 )
+ testsPerTick = 50 ;
+ else
+ testsPerTick = 500 ;
+
+
+ // ---- Format for line counter.
+ int numLines = (int)Math.ceil( ((double)NumTest) / (testsPerTick * numOnLine) ) ;
+ // Start of last line.
+ int z = (numLines-1)*(testsPerTick * numOnLine) ;
+ int digits = 1 ;
+ if ( z > 0 )
+ digits = 1+(int)Math.floor(Math.log10(z));
+ String format = "[%"+digits+"d] " ;
+
+ System.out.printf("TEST : %,d tests : Max Order=%d Max Items=%,d [tests per tick=%d]\n", NumTest, MaxOrder, MaxSize, testsPerTick) ;
+
+ before() ;
+
+ int testCount = 1 ;
+
+ for ( testCount = 1 ; testCount <= NumTest ; testCount++ ) {
+ if ( testCount % testsPerTick == 0 )
+ System.out.print(".") ;
+ if ( testCount % (testsPerTick * numOnLine) == 0 )
+ System.out.println("") ;
+ if ( testCount % (testsPerTick * numOnLine) == 1 )
+ System.out.printf(format, testCount-1) ;
+
+ int idx = testCount - 1 ;
+ int order = ( MinOrder == MaxOrder ) ? MinOrder : MinOrder + RandomLib.random.nextInt(MaxOrder-MinOrder) ;
+ int size = ( MinSize == MaxSize ) ? MinSize : MinSize + RandomLib.random.nextInt(MaxSize-MinSize) ; try {
+ //System.out.printf("TEST : %,d : Order=%-2d : Size=%d\n", testCount, order, size) ;
+ runOneTest(testCount, order, size) ;
+ successes++ ;
+ }
+ catch (AssertionError | RuntimeException ex) {
+ System.err.printf("-- Fail: (order=%d, size=%d)\n", order, size) ;
+ ex.printStackTrace(System.err) ;
+ System.err.printf("--------------------------\n") ;
+ failures++ ;
+ }
+ }
+
+ // Did the last loop print a new line?
+ if ( (testCount-1) % (testsPerTick*numOnLine) != 0 )
+ System.out.println();
+
+ after() ;
+ System.err.flush() ;
+ System.out.flush() ;
+ System.out.printf("DONE : %,d tests : Success=%,d ; Failures=%,d\n", NumTest, successes, failures);
+ }
+
+ protected abstract void runOneTest(int testCount, int order, int size, boolean debug) ;
+
+ protected abstract void runOneTest(int testCount, int order, int size) ;
+
+ @Override
+ protected String getCommandName() { return Lib.className(this) ; }
+}
+
http://git-wip-us.apache.org/repos/asf/jena/blob/4df2b898/jena-integration-tests/src/test/java/dboe/CmdTestBPlusTree.java
----------------------------------------------------------------------
diff --git a/jena-integration-tests/src/test/java/dboe/CmdTestBPlusTree.java b/jena-integration-tests/src/test/java/dboe/CmdTestBPlusTree.java
new file mode 100644
index 0000000..e1c0a2c
--- /dev/null
+++ b/jena-integration-tests/src/test/java/dboe/CmdTestBPlusTree.java
@@ -0,0 +1,104 @@
+/*
+ * 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 dboe;
+
+import org.apache.jena.dboe.base.file.BlockAccessMem;
+import org.apache.jena.dboe.index.test.IndexTestLib;
+import org.apache.jena.dboe.sys.Sys;
+import org.apache.jena.dboe.sys.SystemIndex;
+import org.apache.jena.dboe.trans.bplustree.BPT;
+import org.apache.jena.dboe.trans.bplustree.BPlusTree;
+import org.apache.jena.dboe.trans.bplustree.BPlusTreeFactory;
+import org.apache.jena.dboe.trans.bplustree.BlockTracker;
+
+public class CmdTestBPlusTree extends BaseSoakTest
+{
+ static public void main(String... argv) {
+ //argv = new String[] {"50", "150", "1000000"} ;
+// System.setProperty("bpt:checking", "false") ;
+// System.setProperty("bpt:duplication", "true") ;
+ new CmdTestBPlusTree(argv).mainRun() ;
+ }
+
+ protected CmdTestBPlusTree(String[] argv) {
+ super(argv) ;
+ }
+
+ @Override
+ protected void before() {
+ SystemIndex.setNullOut(true) ;
+ BlockTracker.collectHistory = false ;
+ // Forced mode
+ if ( true ) {
+ BlockAccessMem.SafeMode = true ;
+ BPT.CheckingNode = trueOrFalse("bpt:checking", false) ;
+ boolean duplication = trueOrFalse("bpt:duplication", false) ;
+ BPT.forcePromoteModes = true ;
+ BPT.promoteDuplicateNodes = duplication ;
+ BPT.promoteDuplicateRecords = duplication ;
+ }
+ if ( false ) {
+ // Transactions.
+ }
+
+ System.out.printf(" BPT.CheckingNode = %s\n", BPT.CheckingNode) ;
+ System.out.printf(" BPT.forcePromoteModes = %s\n", BPT.forcePromoteModes) ;
+ System.out.printf(" BPT.promoteDuplicateNodes = %s\n", BPT.promoteDuplicateRecords) ;
+ System.out.printf(" BPT.promoteDuplicateRecords = %s\n", BPT.promoteDuplicateRecords) ;
+ }
+
+ private boolean trueOrFalse(String property, boolean dftValue) {
+ String s = System.getProperty(property) ;
+ if ( s == null )
+ return dftValue ;
+ if ( s.equalsIgnoreCase("true") || s.equalsIgnoreCase("T") || s.equalsIgnoreCase("1") )
+ return true ;
+ if ( s.equalsIgnoreCase("false") || s.equalsIgnoreCase("F") || s.equalsIgnoreCase("0") )
+ return false ;
+ System.err.println("Not recognized: "+property+"="+s);
+ return dftValue ;
+ }
+
+ @Override
+ protected void after() {}
+
+ @Override
+ protected void runOneTest(int testCount, int order, int size, boolean debug) {
+ runOneTest(testCount, order, size) ;
+ }
+
+ @Override
+ protected void runOneTest(int testCount, int order, int size) {
+// //System.err.println("runOneTest("+order+","+size+")") ;
+ BPlusTree bpt = BPlusTreeFactory.makeMem(order, Sys.SizeOfInt, 0) ;
+ bpt = BPlusTreeFactory.addTracking(bpt) ;
+ bpt.nonTransactional() ;
+ IndexTestLib.randTest(bpt, 5*size, size, true);
+ bpt.close() ;
+
+ // Transaction.
+// BPlusTree bpt = BPlusTreeFactory.makeMem(order, SystemLz.SizeOfInt, 0) ;
+// Journal journal = Journal.create(Location.mem()) ;
+// Transactional holder = TransactionalFactory.create(journal, bpt) ;
+// holder.begin(ReadWrite.WRITE);
+// IndexTestLib.randTest(bpt, 5*size, size, true);
+// holder.commit() ;
+// holder.end() ;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/4df2b898/jena-integration-tests/src/test/java/dboe/CmdTestBPlusTreeRewriter.java
----------------------------------------------------------------------
diff --git a/jena-integration-tests/src/test/java/dboe/CmdTestBPlusTreeRewriter.java b/jena-integration-tests/src/test/java/dboe/CmdTestBPlusTreeRewriter.java
new file mode 100644
index 0000000..6f0f976
--- /dev/null
+++ b/jena-integration-tests/src/test/java/dboe/CmdTestBPlusTreeRewriter.java
@@ -0,0 +1,67 @@
+/*
+ * 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 dboe;
+
+import org.apache.jena.dboe.base.record.RecordFactory;
+import org.apache.jena.dboe.sys.SystemIndex;
+import org.apache.jena.dboe.trans.bplustree.BPT;
+import org.apache.jena.dboe.trans.bplustree.rewriter.TestBPlusTreeRewriterNonTxn;
+
+public class CmdTestBPlusTreeRewriter extends BaseSoakTest
+{
+ static public void main(String... argv) {
+ new CmdTestBPlusTreeRewriter(argv).mainRun() ;
+ }
+
+ protected CmdTestBPlusTreeRewriter(String[] argv) {
+ super(argv) ;
+ }
+
+ static int KeySize = 4 ;
+ static int ValueSize = 8 ;
+
+ @Override
+ protected void before() {
+ SystemIndex.setNullOut(true) ;
+ // Forced mode
+ if ( false ) {
+ BPT.forcePromoteModes = true ;
+ BPT.promoteDuplicateNodes = true ;
+ BPT.promoteDuplicateRecords = true ;
+ }
+ if ( false ) {
+ // Transactions.
+ }
+ }
+
+ @Override
+ protected void after() { }
+
+ @Override
+ protected void runOneTest(int testCount, int order, int size, boolean debug) {
+ runOneTest(testCount, order, size) ;
+ }
+
+ @Override
+ protected void runOneTest(int testCount, int order, int size) {
+ RecordFactory recordFactory = new RecordFactory(KeySize, ValueSize) ;
+ TestBPlusTreeRewriterNonTxn.runOneTest(order, size, recordFactory, false) ;
+ }
+
+}
[7/7] jena git commit: JENA_1397: Put TDB2 into the main build
Posted by an...@apache.org.
JENA_1397: Put TDB2 into the main build
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/77aa6566
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/77aa6566
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/77aa6566
Branch: refs/heads/jena-tdb2
Commit: 77aa65661b04d2ef5a3f031a69ddce7929922294
Parents: b729916
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Oct 3 17:40:25 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Oct 3 19:22:32 2017 +0100
----------------------------------------------------------------------
apache-jena-libs/pom.xml | 6 +++
jena-db/jena-dboe-base/pom.xml | 2 +-
jena-db/jena-dboe-index-test/pom.xml | 8 +--
jena-db/jena-dboe-index/pom.xml | 2 +-
jena-db/jena-dboe-trans-data/pom.xml | 2 +-
jena-db/jena-dboe-transaction/pom.xml | 2 +-
jena-db/jena-tdb2/pom.xml | 2 +-
jena-db/pom.xml | 4 +-
jena-integration-tests/pom.xml | 9 ++++
pom.xml | 78 ++++++++++++++++++------------
10 files changed, 70 insertions(+), 45 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/77aa6566/apache-jena-libs/pom.xml
----------------------------------------------------------------------
diff --git a/apache-jena-libs/pom.xml b/apache-jena-libs/pom.xml
index ad9d6bc..b9d91f1 100644
--- a/apache-jena-libs/pom.xml
+++ b/apache-jena-libs/pom.xml
@@ -48,6 +48,12 @@
<dependency>
<groupId>org.apache.jena</groupId>
+ <artifactId>jena-tdb2</artifactId>
+ <version>3.5.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.jena</groupId>
<artifactId>jena-rdfconnection</artifactId>
<version>3.5.0-SNAPSHOT</version>
</dependency>
http://git-wip-us.apache.org/repos/asf/jena/blob/77aa6566/jena-db/jena-dboe-base/pom.xml
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/pom.xml b/jena-db/jena-dboe-base/pom.xml
index f017b53..ee0cd34 100644
--- a/jena-db/jena-dboe-base/pom.xml
+++ b/jena-db/jena-dboe-base/pom.xml
@@ -22,7 +22,7 @@
<artifactId>jena-dboe-base</artifactId>
<packaging>jar</packaging>
- <name>Apache Jena (${project.artifactId})</name>
+ <name>Apache Jena - DBOE Base</name>
<parent>
<groupId>org.apache.jena</groupId>
http://git-wip-us.apache.org/repos/asf/jena/blob/77aa6566/jena-db/jena-dboe-index-test/pom.xml
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-index-test/pom.xml b/jena-db/jena-dboe-index-test/pom.xml
index a076277..b946017 100644
--- a/jena-db/jena-dboe-index-test/pom.xml
+++ b/jena-db/jena-dboe-index-test/pom.xml
@@ -22,7 +22,7 @@
<artifactId>jena-dboe-index-test</artifactId>
<packaging>jar</packaging>
- <name>Apache Jena (${project.artifactId})</name>
+ <name>Apache Jena - DBOE Index test suite</name>
<parent>
<groupId>org.apache.jena</groupId>
@@ -39,12 +39,6 @@
</dependency>
<dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-cmds</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
<!-- Bring junit into scope-compile -->
<groupId>junit</groupId>
<artifactId>junit</artifactId>
http://git-wip-us.apache.org/repos/asf/jena/blob/77aa6566/jena-db/jena-dboe-index/pom.xml
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-index/pom.xml b/jena-db/jena-dboe-index/pom.xml
index f3127aa..cc7cb17 100644
--- a/jena-db/jena-dboe-index/pom.xml
+++ b/jena-db/jena-dboe-index/pom.xml
@@ -22,7 +22,7 @@
<artifactId>jena-dboe-index</artifactId>
<packaging>jar</packaging>
- <name>Apache Jena (${project.artifactId})</name>
+ <name>Apache Jena - DBOE Indexes</name>
<parent>
<groupId>org.apache.jena</groupId>
http://git-wip-us.apache.org/repos/asf/jena/blob/77aa6566/jena-db/jena-dboe-trans-data/pom.xml
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-trans-data/pom.xml b/jena-db/jena-dboe-trans-data/pom.xml
index 044f3a3..3aae6a2 100644
--- a/jena-db/jena-dboe-trans-data/pom.xml
+++ b/jena-db/jena-dboe-trans-data/pom.xml
@@ -21,7 +21,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>jena-dboe-trans-data</artifactId>
<packaging>jar</packaging>
- <name>Apache Jena (${project.artifactId})</name>
+ <name>Apache Jena - DBOE Transactional Datastructures</name>
<parent>
<groupId>org.apache.jena</groupId>
http://git-wip-us.apache.org/repos/asf/jena/blob/77aa6566/jena-db/jena-dboe-transaction/pom.xml
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-transaction/pom.xml b/jena-db/jena-dboe-transaction/pom.xml
index 94591ef..e159b28 100644
--- a/jena-db/jena-dboe-transaction/pom.xml
+++ b/jena-db/jena-dboe-transaction/pom.xml
@@ -21,7 +21,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>jena-dboe-transaction</artifactId>
<packaging>jar</packaging>
- <name>Apache Jena (${project.artifactId})</name>
+ <name>Apache Jena - DBOE Transactions</name>
<parent>
<groupId>org.apache.jena</groupId>
http://git-wip-us.apache.org/repos/asf/jena/blob/77aa6566/jena-db/jena-tdb2/pom.xml
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/pom.xml b/jena-db/jena-tdb2/pom.xml
index 940ca9c..69f3eb2 100644
--- a/jena-db/jena-tdb2/pom.xml
+++ b/jena-db/jena-tdb2/pom.xml
@@ -23,7 +23,7 @@
<artifactId>jena-tdb2</artifactId>
<packaging>jar</packaging>
- <name>Apache Jena (${project.artifactId})</name>
+ <name>Apache Jena - TDB2</name>
<parent>
<groupId>org.apache.jena</groupId>
http://git-wip-us.apache.org/repos/asf/jena/blob/77aa6566/jena-db/pom.xml
----------------------------------------------------------------------
diff --git a/jena-db/pom.xml b/jena-db/pom.xml
index dae8cff..d5026ed 100644
--- a/jena-db/pom.xml
+++ b/jena-db/pom.xml
@@ -23,7 +23,7 @@
<artifactId>jena-db</artifactId>
<packaging>pom</packaging>
<version>3.5.0-SNAPSHOT</version>
- <name>Apache Jena :: Database Operation Environment</name>
+ <name>Apache Jena - Database Operation Environment</name>
<url>http://jena.apache.org/</url>
<parent>
@@ -47,8 +47,6 @@
<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>
<dependencies>
http://git-wip-us.apache.org/repos/asf/jena/blob/77aa6566/jena-integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/jena-integration-tests/pom.xml b/jena-integration-tests/pom.xml
index b6f7fc9..534d623 100644
--- a/jena-integration-tests/pom.xml
+++ b/jena-integration-tests/pom.xml
@@ -70,6 +70,7 @@
<groupId>org.apache.jena</groupId>
<artifactId>jena-cmds</artifactId>
<version>3.5.0-SNAPSHOT</version>
+
<scope>test</scope>
</dependency>
@@ -87,6 +88,14 @@
<artifactId>jena-dboe-index-test</artifactId>
<version>3.5.0-SNAPSHOT</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-dboe-trans-data</artifactId>
+ <version>3.5.0-SNAPSHOT</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.jena</groupId>
http://git-wip-us.apache.org/repos/asf/jena/blob/77aa6566/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 68706eb..d09eef9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,49 +63,57 @@
It only builds the modules shipped in apache-jena binaries.
-->
<id>dev</id>
- <!-- The maven artifacts of the basic modules -->
+ <!-- The maven artifacts of the core development modules
+ See profile bootstrap for a first build from empty.
+ -->
<modules>
<module>jena-project</module>
- <!-- <module>jena-shaded-guava</module> -->
- <!-- <module>jena-iri</module> -->
+ <!-- <module>jena-shaded-guava</module> -->
+ <!-- <module>jena-iri</module> -->
<module>jena-base</module>
<module>jena-core</module>
<module>jena-arq</module>
<module>jena-rdfconnection</module>
<module>jena-tdb</module>
- <module>apache-jena-libs</module>
- <module>jena-cmds</module>
<module>jena-db</module>
+ <module>apache-jena-libs</module>
+
<module>jena-text</module>
- <!--<module>jena-text-es</module>-->
- <module>jena-spatial</module>
- <!--<module>jena-fuseki1</module>-->
+ <!-- <module>jena-text-es</module> -->
+ <!-- <module>jena-spatial</module> -->
+
+ <module>jena-cmds</module>
<module>jena-fuseki2</module>
<module>jena-integration-tests</module>
- <module>jena-permissions</module>
+ <!-- Binary distribution -->
+ <!-- <module>apache-jena</module> -->
- <!-- Slow to build - exclude from dev build -->
- <!-- <module>jena-jdbc</module> -->
+ <!-- <module>jena-fuseki1</module> -->
+ <!-- <module>jena-csv</module> -->
+ <!-- <module>jena-sdb</module> -->
<!-- <module>jena-maven-tools</module> -->
- <!-- <module>apache-jena-libs</module> -->
- <!-- <module>apache-jena</module> -->
- <!-- <module>jena-elephas</module> -->
- <!-- <module>jena-extras</module> -->
+
+ <!-- <module>jena-permissions</module> -->
+ <!-- <module>jena-extras</module> -->
+ <!-- <module>jena-jdbc</module> -->
+ <!-- <module>jena-elephas</module> -->
+ <!-- <module>apache-jena-osgi</module> -->
+
</modules>
</profile>
<profile>
- <!-- From the start, up until profile "dev".
+ <!-- Build to get started, up to Fuseki2.
+ Includes modules skipped by "dev".
Use this (or a full build) when building locally
and there are no SNAPSHOTs in the "snapshots" repository.
This profile does a more complete "dev" build,
does not assume anything is already built,
and does not include the longer running modules.
-->
-
<id>bootstrap</id>
<modules>
<module>jena-project</module>
@@ -115,15 +123,17 @@
<module>jena-core</module>
<module>jena-arq</module>
<module>jena-rdfconnection</module>
- <module>jena-tdb</module>
+ <module>jena-tdb</module>
+ <module>jena-db</module>
<module>apache-jena-libs</module>
- <module>jena-cmds</module>
- <module>jena-db</module>
<module>jena-text</module>
<!--<module>jena-text-es</module>-->
<module>jena-spatial</module>
- <!--<module>jena-fuseki1</module>-->
+
+ <module>jena-cmds</module>
<module>jena-fuseki2</module>
+
+ <module>jena-integration-tests</module>
</modules>
</profile>
@@ -141,30 +151,29 @@
</property>
</activation>
<modules>
+ <!-- Parent - maven setup -->
<module>jena-project</module>
+
+ <!-- Basic modules -->
<module>jena-shaded-guava</module>
<module>jena-iri</module>
<module>jena-base</module>
+ <!-- Main modules -->
<module>jena-core</module>
<module>jena-arq</module>
<module>jena-rdfconnection</module>
<module>jena-tdb</module>
+ <module>jena-db</module>
<module>apache-jena-libs</module>
- <module>jena-cmds</module>
<module>jena-text</module>
<module>jena-text-es</module>
<module>jena-spatial</module>
- <module>jena-csv</module>
- <module>jena-sdb</module>
-
- <module>jena-fuseki1</module>
+ <module>jena-cmds</module>
<module>jena-fuseki2</module>
- <module>apache-jena</module>
-
<!--
Tests of artifacts that require additional
modules built later in the build process.
@@ -172,12 +181,21 @@
test remote client APIs.
-->
<module>jena-integration-tests</module>
+
+ <!-- Binary distribution -->
+ <module>apache-jena</module>
+
+ <!-- Old modules -->
+ <module>jena-fuseki1</module>
+ <module>jena-csv</module>
+ <module>jena-sdb</module>
+ <module>jena-maven-tools</module>
+ <!-- Other -->
<module>jena-permissions</module>
<module>jena-extras</module>
- <module>jena-maven-tools</module>
-
+ <!-- Slow building modules -->
<module>jena-jdbc</module>
<module>jena-elephas</module>
<module>apache-jena-osgi</module>
[3/7] jena git commit: RAT settings and setup
Posted by an...@apache.org.
RAT settings and setup
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/2f2e95f1
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/2f2e95f1
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/2f2e95f1
Branch: refs/heads/jena-tdb2
Commit: 2f2e95f1bada9f478ee975109c84f814e4205222
Parents: a4fba10
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Oct 3 17:38:04 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Oct 3 17:38:04 2017 +0100
----------------------------------------------------------------------
jena-fuseki2/jena-fuseki-basic/pom.xml | 93 +++++---------------
.../jena-fuseki-basic/sparqler/data/books.ttl | 2 +
.../jena-fuseki-basic/sparqler/data/empty.nt | 3 +-
.../sparqler/data/sparql-data.ttl | 1 +
4 files changed, 26 insertions(+), 73 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/2f2e95f1/jena-fuseki2/jena-fuseki-basic/pom.xml
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-basic/pom.xml b/jena-fuseki2/jena-fuseki-basic/pom.xml
index 5ae24c1..2edc7e3 100644
--- a/jena-fuseki2/jena-fuseki-basic/pom.xml
+++ b/jena-fuseki2/jena-fuseki-basic/pom.xml
@@ -176,80 +176,29 @@
</execution>
</executions>
</plugin>
-
-
<plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <executions>
- <execution>
- <id>rat-checks</id>
- <phase>validate</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <excludeSubProjects>true</excludeSubProjects>
- <excludes>
- <exclude>**/sparqler/**</exclude>
- <exclude>**/.project</exclude>
- <exclude>**/.settings/**</exclude>
- <exclude>**/.classpath</exclude>
- <exclude>**/*.log</exclude>
- <exclude>**/README.*</exclude>
- <exclude>**/META-INF/services/*</exclude>
- <!--
- Javadoc add-ons files are required to be simple and our javadoc configuration
- will ensure appropriate license and copyright statements are inserted
- into generated documentation anyway so no need to put license statements in these
- files
- -->
- <exclude>**/src/main/**/*.html</exclude>
- <exclude>**/DEPENDENCIES</exclude>
- <!--
- Text and Markdown files are typically used only for documentation purposes
- and license declarations are usually spurious in these files since often they
- will refer to the LICENSE/NOTICE for users to find the actual licenses
- -->
- <exclude>**/*.txt</exclude>
- <exclude>**/*.md</exclude>
- <exclude>**/*.mdtext</exclude>
-
- <!--
- META-INF services files can include comments but a license header would be
- unecessarily clutter so we exclude these
- -->
- <exclude>**/META-INF/services/*</exclude>
-
- <!--
- Jena historically has large numbers of small test file
- with no license headers. Such small files are not required
- to have headers.
-
- In addition, there are files with different Licenses
- (e.g. W3C Software Licence, W3C Test Suite License) as
- noted in the code tree.
- -->
- <exclude>**/testing/**/*</exclude>
-
- <exclude>**/log4j.properties</exclude>
- <exclude>**/log4j-testing.properties</exclude>
- <exclude>**/DB/**/*</exclude>
- <!-- TDB config files JSON - no comments allowed -->
- <exclude>**/tdb*.cfg</exclude>
- <!-- Exclude anything created during the build (plugin generated files) ->-->
- <exclude>**/target/**/*</exclude>
- <!-- MSHADE-124 -->
- <exclude>**/dependency-reduced-pom.xml</exclude>
- </excludes>
- </configuration>
- </plugin>
-
-
- </plugins>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>rat-checks</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <excludeSubProjects>true</excludeSubProjects>
+ <excludes>
+ <exclude>**/sparqler/**</exclude>
+ <exclude>**/dependency-reduced-pom.xml</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
+ </plugins>
</build>
http://git-wip-us.apache.org/repos/asf/jena/blob/2f2e95f1/jena-fuseki2/jena-fuseki-basic/sparqler/data/books.ttl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/data/books.ttl b/jena-fuseki2/jena-fuseki-basic/sparqler/data/books.ttl
index cece401..ed8882b 100644
--- a/jena-fuseki2/jena-fuseki-basic/sparqler/data/books.ttl
+++ b/jena-fuseki2/jena-fuseki-basic/sparqler/data/books.ttl
@@ -1,3 +1,5 @@
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> .
@prefix ns: <http://example.org/ns#> .
http://git-wip-us.apache.org/repos/asf/jena/blob/2f2e95f1/jena-fuseki2/jena-fuseki-basic/sparqler/data/empty.nt
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/data/empty.nt b/jena-fuseki2/jena-fuseki-basic/sparqler/data/empty.nt
index 739dd79..f07e71e 100644
--- a/jena-fuseki2/jena-fuseki-basic/sparqler/data/empty.nt
+++ b/jena-fuseki2/jena-fuseki-basic/sparqler/data/empty.nt
@@ -1 +1,2 @@
-# This is empty (except for this line!).
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+# This is empty
http://git-wip-us.apache.org/repos/asf/jena/blob/2f2e95f1/jena-fuseki2/jena-fuseki-basic/sparqler/data/sparql-data.ttl
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/data/sparql-data.ttl b/jena-fuseki2/jena-fuseki-basic/sparqler/data/sparql-data.ttl
index d38ecd9..a3631d0 100755
--- a/jena-fuseki2/jena-fuseki-basic/sparqler/data/sparql-data.ttl
+++ b/jena-fuseki2/jena-fuseki-basic/sparqler/data/sparql-data.ttl
@@ -1,3 +1,4 @@
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
## People
## Books + Prices
## Reviews
[5/7] jena git commit: Move tdb2-cmds to jena-cmds
Posted by an...@apache.org.
Move tdb2-cmds to jena-cmds
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/d64b4d54
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/d64b4d54
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/d64b4d54
Branch: refs/heads/jena-tdb2
Commit: d64b4d54f1d826d128b26513ef5c40579f288582
Parents: 2f2e95f
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Oct 3 17:38:52 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Oct 3 17:38:52 2017 +0100
----------------------------------------------------------------------
jena-db/jena-tdb2-cmds/.gitignore | 2 -
jena-db/jena-tdb2-cmds/pom.xml | 68 -------
.../src/main/java/tdb2/Intro.java | 31 ----
.../src/main/java/tdb2/cmdline/CmdSub.java | 71 --------
.../src/main/java/tdb2/cmdline/CmdTDB.java | 84 ---------
.../src/main/java/tdb2/cmdline/CmdTDBGraph.java | 81 ---------
.../src/main/java/tdb2/cmdline/ModLocation.java | 55 ------
.../src/main/java/tdb2/cmdline/ModModel.java | 66 -------
.../main/java/tdb2/cmdline/ModTDBAssembler.java | 89 ----------
.../main/java/tdb2/cmdline/ModTDBDataset.java | 138 ---------------
.../src/main/java/tdb2/tdbbackup.java | 55 ------
.../src/main/java/tdb2/tdbcompact.java | 48 -----
.../src/main/java/tdb2/tdbdump.java | 66 -------
.../src/main/java/tdb2/tdbloader.java | 175 -------------------
.../src/main/java/tdb2/tdbquery.java | 51 ------
.../src/main/java/tdb2/tdbstats.java | 99 -----------
.../src/main/java/tdb2/tdbupdate.java | 56 ------
.../src/main/resources/META-INF/LICENSE | 175 -------------------
.../src/main/resources/META-INF/NOTICE | 8 -
.../org/apache/jena/tdb/tdb-properties.xml | 8 -
jena-db/jena-tdb2-cmds/tdb2 | 100 -----------
.../testing/Assembler/tdb-dataset-embed.ttl | 23 ---
.../testing/Assembler/tdb-dataset.ttl | 23 ---
.../testing/Assembler/tdb-graph-embed.ttl | 27 ---
.../testing/Assembler/tdb-graph-ref-dataset.ttl | 31 ----
.../testing/Assembler/tdb-graph.ttl | 27 ---
.../testing/Assembler/tdb-named-graph-1.ttl | 29 ---
.../testing/Assembler/tdb-named-graph-2.ttl | 28 ---
.../jena-tdb2-cmds/testing/Basic/basic-00.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-1-O.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-1-P.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-1-PO.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-1-S.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-1-SO.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-1-SP.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-1-SPO.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-2-SO.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-3-O.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-3-P.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-3-PO.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-3-S.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-3-SO.rq | 4 -
.../jena-tdb2-cmds/testing/Basic/basic-3-SP.rq | 4 -
jena-db/jena-tdb2-cmds/testing/Basic/data-1.ttl | 17 --
.../jena-tdb2-cmds/testing/Basic/manifest.ttl | 101 -----------
.../jena-tdb2-cmds/testing/Data/solver-data.ttl | 7 -
jena-db/jena-tdb2-cmds/testing/Loader/data-1.nq | 1 -
jena-db/jena-tdb2-cmds/testing/Loader/data-2.nt | 1 -
.../jena-tdb2-cmds/testing/Loader/data-3.trig | 3 -
.../jena-tdb2-cmds/testing/Loader/data-4.ttl | 4 -
.../jena-tdb2-cmds/testing/Pattern/data-1.ttl | 17 --
.../jena-tdb2-cmds/testing/Pattern/manifest.ttl | 35 ----
.../jena-tdb2-cmds/testing/Pattern/pattern-1.rq | 7 -
.../jena-tdb2-cmds/testing/Pattern/pattern-2.rq | 8 -
jena-db/jena-tdb2-cmds/testing/Quads/data-1.ttl | 5 -
jena-db/jena-tdb2-cmds/testing/Quads/data-2.ttl | 5 -
.../jena-tdb2-cmds/testing/Quads/data-dft.ttl | 10 --
.../jena-tdb2-cmds/testing/Quads/manifest.ttl | 51 ------
jena-db/jena-tdb2-cmds/testing/Quads/quad-01.rq | 9 -
jena-db/jena-tdb2-cmds/testing/Quads/quad-02.rq | 8 -
.../testing/UnionGraph/data-1.ttl | 7 -
.../testing/UnionGraph/data-2.ttl | 5 -
.../testing/UnionGraph/data-dft.ttl | 5 -
.../testing/UnionGraph/manifest.ttl | 107 ------------
.../testing/UnionGraph/merge-1-results.srx | 57 ------
.../testing/UnionGraph/merge-1.rq | 8 -
.../testing/UnionGraph/merge-2-results.srx | 66 -------
.../testing/UnionGraph/merge-2.rq | 8 -
.../testing/UnionGraph/merge-3-results.srx | 31 ----
.../testing/UnionGraph/merge-3.rq | 8 -
.../testing/UnionGraph/merge-4-results.srx | 99 -----------
.../testing/UnionGraph/merge-4.rq | 8 -
.../testing/UnionGraph/merge-5-results.srx | 33 ----
.../testing/UnionGraph/merge-5.rq | 8 -
.../testing/UnionGraph/merge-6-results.srx | 43 -----
.../testing/UnionGraph/merge-6.rq | 7 -
.../testing/UnionGraph/merge-A-results.srx | 99 -----------
.../testing/UnionGraph/merge-A.rq | 8 -
.../testing/UnionGraph/merge-B-results.srx | 49 ------
.../testing/UnionGraph/merge-B.rq | 8 -
.../jena-tdb2-cmds/testing/Update/create-1.ru | 1 -
jena-db/jena-tdb2-cmds/testing/Update/drop-1.ru | 1 -
.../jena-tdb2-cmds/testing/Update/update-1.ru | 3 -
.../jena-tdb2-cmds/testing/Update/update-2.ru | 5 -
.../jena-tdb2-cmds/testing/Update/update-3.ru | 7 -
.../jena-tdb2-cmds/testing/Values/data-1.ttl | 23 ---
.../jena-tdb2-cmds/testing/Values/manifest.ttl | 76 --------
.../jena-tdb2-cmds/testing/Values/value-00.rq | 1 -
.../jena-tdb2-cmds/testing/Values/value-01.rq | 1 -
.../jena-tdb2-cmds/testing/Values/value-02.rq | 1 -
.../jena-tdb2-cmds/testing/Values/value-03.rq | 1 -
.../jena-tdb2-cmds/testing/Values/value-04.rq | 1 -
.../jena-tdb2-cmds/testing/Values/value-05.rq | 5 -
.../jena-tdb2-cmds/testing/Values/value-06.rq | 6 -
.../jena-tdb2-cmds/testing/Values/value-07.rq | 6 -
.../jena-tdb2-cmds/testing/Values/value-08.rq | 6 -
.../jena-tdb2-cmds/testing/Values/value-09.rq | 7 -
jena-db/jena-tdb2-cmds/testing/manifest.ttl | 31 ----
98 files changed, 2909 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/.gitignore
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/.gitignore b/jena-db/jena-tdb2-cmds/.gitignore
deleted file mode 100644
index 731afb6..0000000
--- a/jena-db/jena-tdb2-cmds/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-DB*
-D.*
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/pom.xml
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/pom.xml b/jena-db/jena-tdb2-cmds/pom.xml
deleted file mode 100644
index 09d60c9..0000000
--- a/jena-db/jena-tdb2-cmds/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- 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.
--->
-
-<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>
-
- <artifactId>jena-tdb2-cmds</artifactId>
- <packaging>jar</packaging>
- <name>Apache Jena (${project.artifactId})</name>
-
- <parent>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-db</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- </parent>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-tdb2</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-cmds</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-tdb</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- Require a logging implementation
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
-
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
--->
-
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/Intro.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/Intro.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/Intro.java
deleted file mode 100644
index f8fd6e0..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/Intro.java
+++ /dev/null
@@ -1,31 +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 tdb2;
-
-public class Intro {
- public static void main(String...a) {
- System.err.println("Commands available:");
- System.err.println(" tdb2.tdbloader");
- System.err.println(" tdb2.tdbquery");
- System.err.println(" tdb2.tdbupdate");
- System.err.println(" tdb2.tdbdump");
- System.err.println(" tdb2.tdbstats");
-
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdSub.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdSub.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdSub.java
deleted file mode 100644
index bda20c5..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdSub.java
+++ /dev/null
@@ -1,71 +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 tdb2.cmdline;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import jena.cmd.CmdException;
-
-public class CmdSub {
- public interface Exec {
- public void exec(String[] argv) ;
- }
- private Map<String, Exec> dispatch = new HashMap<>() ;
-
- private String subCmd ;
- private String args[] ;
-
- public CmdSub(String... argv) {
- subCmd = subCommand(argv) ;
- args = cmdline(argv) ;
- }
-
- protected void exec() {
- Exec exec = dispatch.get(subCmd) ;
- if ( exec == null )
- throw new CmdException("No subcommand: " + subCmd) ;
- exec.exec(args) ;
- }
-
- protected static String[] cmdline(String... argv) {
- String[] a = new String[argv.length - 1] ;
- System.arraycopy(argv, 1, a, 0, argv.length - 1) ;
- return a ;
- }
-
- protected static String subCommand(String... argv) {
- if ( argv.length == 0 )
- throw new CmdException("Missing subcommand") ;
-
- String subCmd = argv[0] ;
- if ( subCmd.startsWith("-") )
- throw new CmdException("Argument found where subcommand expected") ;
- return subCmd ;
- }
-
- protected void addSubCommand(String subCmdName, Exec exec) {
- dispatch.put(subCmdName, exec) ;
- }
-
- protected Collection<String> subCommandNames() {
- return dispatch.keySet() ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdTDB.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdTDB.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdTDB.java
deleted file mode 100644
index ed6f0f0..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdTDB.java
+++ /dev/null
@@ -1,84 +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 tdb2.cmdline;
-
-import arq.cmdline.CmdARQ ;
-import org.apache.jena.Jena ;
-import org.apache.jena.atlas.lib.Lib ;
-import org.apache.jena.atlas.logging.LogCtl ;
-import org.apache.jena.dboe.base.file.Location;
-import org.apache.jena.query.ARQ ;
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.system.JenaSystem ;
-import org.apache.jena.tdb2.TDB2;
-import org.apache.jena.tdb2.store.DatasetGraphSwitchable;
-import org.apache.jena.tdb2.sys.TDBInternal;
-
-public abstract class CmdTDB extends CmdARQ
-{
- protected final ModTDBDataset tdbDatasetAssembler = new ModTDBDataset() ;
-
- private static boolean initialized = false ;
-
- protected CmdTDB(String[] argv) {
- super(argv) ;
- init() ;
- super.addModule(tdbDatasetAssembler) ;
- super.modVersion.addClass(Jena.class) ;
- super.modVersion.addClass(ARQ.class) ;
- super.modVersion.addClass(TDB2.class) ;
- }
-
- public static synchronized void init() {
- // In case called from elsewhere.
- JenaSystem.init() ;
- if (initialized)
- return ;
- // attempt once.
- initialized = true ;
- LogCtl.setCmdLogging() ;
- }
-
- @Override
- protected void processModulesAndArgs() {
- super.processModulesAndArgs() ;
- }
-
- protected Location getLocation() {
- return tdbDatasetAssembler.getLocation() ;
- }
-
- protected DatasetGraph getDatasetGraph() {
- return getDataset().asDatasetGraph() ;
- }
-
- protected DatasetGraphSwitchable getDatabaseContainer() {
- return TDBInternal.getDatabaseContainer(getDatasetGraph());
- }
-
- protected Dataset getDataset() {
- return tdbDatasetAssembler.getDataset() ;
- }
-
- @Override
- protected String getCommandName() {
- return Lib.className(this) ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdTDBGraph.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdTDBGraph.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdTDBGraph.java
deleted file mode 100644
index ba86ec8..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/CmdTDBGraph.java
+++ /dev/null
@@ -1,81 +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 tdb2.cmdline;
-
-import jena.cmd.ArgDecl;
-import jena.cmd.CmdException;
-import org.apache.jena.atlas.lib.Lib ;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.graph.NodeFactory ;
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.tdb2.store.GraphTDB;
-import tdb2.cmdline.CmdTDB;
-
-public abstract class CmdTDBGraph extends CmdTDB
-{
- private static final ArgDecl argNamedGraph = new ArgDecl(ArgDecl.HasValue, "graph") ;
- protected String graphName = null ;
-
- protected CmdTDBGraph(String[] argv)
- {
- super(argv) ;
- super.add(argNamedGraph, "--graph=IRI", "Act on a named graph") ;
- }
-
- @Override
- protected void processModulesAndArgs()
- {
- super.processModulesAndArgs() ;
- if ( contains(argNamedGraph) )
- graphName = getValue(argNamedGraph) ;
- }
-
- protected Model getModel()
- {
- Dataset ds = tdbDatasetAssembler.getDataset() ;
-
- if ( graphName != null )
- {
- Model m = ds.getNamedModel(graphName) ;
- if ( m == null )
- throw new CmdException("No such named graph (is this a TDB dataset?)") ;
- return m ;
- }
- else
- return ds.getDefaultModel() ;
- }
-
- public Node getGraphName() { return graphName == null ? null : NodeFactory.createURI(graphName) ; }
-
- protected GraphTDB getGraph()
- {
- if ( graphName != null )
- return (GraphTDB)tdbDatasetAssembler.getDataset().getNamedModel(graphName).getGraph() ;
- else
- return (GraphTDB)tdbDatasetAssembler.getDataset().getDefaultModel().getGraph() ;
- }
-
- @Override
- protected String getCommandName()
- {
- return Lib.className(this) ;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModLocation.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModLocation.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModLocation.java
deleted file mode 100644
index 5e48c16..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModLocation.java
+++ /dev/null
@@ -1,55 +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 tdb2.cmdline;
-
-import jena.cmd.ArgDecl;
-import jena.cmd.CmdArgModule;
-import jena.cmd.CmdGeneral;
-import jena.cmd.ModBase;
-import org.apache.jena.dboe.base.file.Location;
-
-public class ModLocation extends ModBase
-{
- public ModLocation() {}
-
- protected final ArgDecl locationDecl = new ArgDecl(ArgDecl.HasValue, "location", "loc") ;
- protected Location location = null ;
-
- @Override
- public void registerWith(CmdGeneral cmdLine)
- {
- cmdLine.getUsage().startCategory("Location") ;
- cmdLine.add(locationDecl, "--loc=DIR", "Location (a directory)") ;
- }
-
- public void checkCommandLine(CmdArgModule cmdLine)
- {}
-
- @Override
- public void processArgs(CmdArgModule cmdLine)
- {
- if ( cmdLine.contains(locationDecl) )
- {
- String dir = cmdLine.getValue(locationDecl) ;
- location = Location.create(dir) ;
- }
- }
-
- public Location getLocation() { return location ; }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModModel.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModModel.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModModel.java
deleted file mode 100644
index eca9612..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModModel.java
+++ /dev/null
@@ -1,66 +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 tdb2.cmdline;
-
-import jena.cmd.ArgDecl;
-import jena.cmd.CmdArgModule;
-import jena.cmd.CmdGeneral;
-import jena.cmd.ModBase;
-
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.util.FileManager ;
-
-/** Name a model */
-public class ModModel extends ModBase
-{
- protected ArgDecl modelArgDecl = null ;
- private Model model = null ;
-
- //public ModModel() { this("model") ; }
- public ModModel(String argName, String ... altNames)
- {
- modelArgDecl = new ArgDecl(ArgDecl.HasValue, argName) ;
- for ( String x : altNames )
- modelArgDecl.addName(x) ;
- }
-
- public ArgDecl getArg()
- {
- return modelArgDecl ;
- }
-
- @Override
- public void registerWith(CmdGeneral cmdLine)
- {
- cmdLine.add(modelArgDecl, "--"+modelArgDecl.getKeyName()+"=filename", "Filename for a model") ;
- }
-
- @Override
- public void processArgs(CmdArgModule cmdLine)
- {
- if ( cmdLine.contains(modelArgDecl) )
- {
- String filename = cmdLine.getValue(modelArgDecl) ;
- model = FileManager.get().loadModel(filename) ;
- }
- }
-
- public Model getModel() { return model ; }
-
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModTDBAssembler.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModTDBAssembler.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModTDBAssembler.java
deleted file mode 100644
index 636a13f..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModTDBAssembler.java
+++ /dev/null
@@ -1,89 +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 tdb2.cmdline;
-
-import java.io.File;
-
-import jena.cmd.CmdArgModule;
-import jena.cmd.CmdException;
-import jena.cmd.CmdGeneral;
-import org.apache.jena.dboe.base.file.Location;
-import tdb2.cmdline.ModLocation;
-import arq.cmdline.ModAssembler;
-
-/** Extends ModAssembler to include --tdb.
- * Defaulting to "tdb.ttl" is done in ModTDBDataset because it interacts
- * with --location
- */
-public class ModTDBAssembler extends ModAssembler
-{
- private ModLocation modLocation = new ModLocation() ;
-
- public static final String defaultAssemblerFile = "tdb.ttl" ;
- protected boolean useDefaultAssemblerFile = false ;
-
- public ModTDBAssembler()
- {
- super() ;
- ModAssembler.assemblerDescDecl.addName("tdb") ;
- }
-
- @Override
- public void processArgs(CmdArgModule cmdLine)
- {
- int count = 0 ;
-
- modLocation.processArgs(cmdLine) ;
- super.processArgs(cmdLine) ;
- if ( super.getAssemblerFile() != null ) count++ ;
- if ( modLocation.getLocation() != null ) count++ ;
-
- if ( count == 0 )
- {
- useDefaultAssemblerFile = true ;
- // throw new CmdException("No assembler file and no location") ;
- }
-
- if ( count > 1 )
- throw new CmdException("Only one of an assembler file and a location") ;
- }
-
- @Override
- public void registerWith(CmdGeneral cmdLine)
- {
- super.registerWith(cmdLine) ;
- cmdLine.addModule(modLocation) ;
- //cmdLine.getUsage().startCategory("Dataset") ;
- cmdLine.getUsage().addUsage("--tdb=", "Assembler description file") ;
- }
-
- public Location getLocation() { return modLocation.getLocation() ; }
-
- @Override
- public String getAssemblerFile()
- {
- if ( useDefaultAssemblerFile )
- {
- File f = new File(defaultAssemblerFile) ;
- if ( f.exists() )
- return defaultAssemblerFile ;
- }
- return super.getAssemblerFile() ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModTDBDataset.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModTDBDataset.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModTDBDataset.java
deleted file mode 100644
index 3fd82d3..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/cmdline/ModTDBDataset.java
+++ /dev/null
@@ -1,138 +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 tdb2.cmdline;
-
-import java.util.ArrayList ;
-import java.util.List ;
-
-import arq.cmdline.ModDataset ;
-import jena.cmd.ArgDecl;
-import jena.cmd.CmdArgModule;
-import jena.cmd.CmdException;
-import jena.cmd.CmdGeneral;
-import org.apache.jena.atlas.logging.Log ;
-import org.apache.jena.dboe.base.file.Location;
-import org.apache.jena.query.* ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.shared.JenaException ;
-import org.apache.jena.sparql.core.assembler.AssemblerUtils ;
-import org.apache.jena.sparql.core.assembler.DatasetAssemblerVocab ;
-import org.apache.jena.tdb2.TDB2Factory;
-import org.apache.jena.tdb2.assembler.VocabTDB2;
-import org.apache.jena.tdb2.store.DatasetGraphTDB;
-import org.apache.jena.util.FileManager ;
-
-public class ModTDBDataset extends ModDataset
-{
- // Mixes assembler, location and "tdb"
- // Can make a single model or a dataset
-
- private ArgDecl argMem = new ArgDecl(ArgDecl.HasValue, "mem", "data") ;
- private ModTDBAssembler modAssembler = new ModTDBAssembler() ;
- private String inMemFile = null ;
-
- public ModTDBDataset() {}
-
- @Override
- public void registerWith(CmdGeneral cmdLine)
- {
- cmdLine.add(argMem, "--mem=FILE", "Execute on an in-memory TDB database (for testing)") ;
- cmdLine.addModule(modAssembler) ;
- }
-
- @Override
- public void processArgs(CmdArgModule cmdLine)
- {
- inMemFile = cmdLine.getValue(argMem) ;
- modAssembler.processArgs(cmdLine) ;
- }
-
- @Override
- public Dataset createDataset() {
- if ( inMemFile != null ) {
- Dataset ds = TDB2Factory.createDataset();
- RDFDataMgr.read(ds, inMemFile);
- return ds;
- }
-
- if ( modAssembler.getAssemblerFile() != null ) {
- Dataset thing = null;
- // Two variants: plain dataset with TDB2 dataset or plain building
- // (which may go wrong later if TDB2 directly is needed).
- try {
- thing = (Dataset)AssemblerUtils.build(modAssembler.getAssemblerFile(), VocabTDB2.tDatasetTDB);
- if ( thing != null && !(thing.asDatasetGraph() instanceof DatasetGraphTDB) )
- Log.warn(this, "Unexpected: Not a TDB2 dataset for type DatasetTDB2");
-
- if ( thing == null )
- // Should use assembler inheritance but how do we assert
- // the subclass relationship in a program?
- thing = (Dataset)AssemblerUtils.build(modAssembler.getAssemblerFile(), DatasetAssemblerVocab.tDataset);
- }
- catch (JenaException ex) {
- throw ex;
- }
- catch (Exception ex) {
- throw new CmdException("Error creating", ex);
- }
- return thing;
- }
-
- if ( modAssembler.getLocation() == null )
- throw new CmdException("No assembler file nor location provided");
-
- // No assembler - use location to find a database.
- Dataset ds = TDB2Factory.connectDataset(modAssembler.getLocation());
- return ds;
- }
-
- public Location getLocation()
- {
- List<String> x = locations() ;
- if ( x.size() == 0 )
- return null ;
- return Location.create(x.get(0)) ;
- }
-
- public List<String> locations()
- {
- List<String> locations = new ArrayList<>() ;
-
- if ( modAssembler.getLocation() != null )
- locations.add(modAssembler.getLocation().getDirectoryPath()) ;
-
- // Extract the location from the assember file.
- if ( modAssembler.getAssemblerFile() != null )
- {
- // Find and clear all locations
- Model m = FileManager.get().loadModel(modAssembler.getAssemblerFile()) ;
- Query query = QueryFactory.create("PREFIX tdb: <http://jena.hpl.hp.com/2008/tdb#> SELECT ?dir { [] tdb:location ?dir FILTER (isURI(?dir)) }") ;
- try(QueryExecution qExec = QueryExecutionFactory.create(query, m)) {
- for (ResultSet rs = qExec.execSelect() ; rs.hasNext() ; )
- {
- String x = rs.nextSolution().getResource("dir").getURI() ;
- locations.add(x) ;
- }
- }
- }
-
- return locations ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbbackup.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbbackup.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbbackup.java
deleted file mode 100644
index c0046a8..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbbackup.java
+++ /dev/null
@@ -1,55 +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 tdb2;
-
-import arq.cmdline.ModLangOutput ;
-import org.apache.jena.tdb2.store.DatasetGraphSwitchable;
-import org.apache.jena.tdb2.sys.DatabaseOps;
-import tdb2.cmdline.CmdTDB;
-
-public class tdbbackup extends CmdTDB
-{
- static ModLangOutput modLangOutput = new ModLangOutput() ;
-
- static public void main(String... argv)
- {
- CmdTDB.init() ;
- new tdbbackup(argv).mainRun() ;
- }
-
- protected tdbbackup(String[] argv)
- {
- super(argv) ;
- addModule(modLangOutput) ;
- }
-
- @Override
- protected String getSummary()
- {
- return getCommandName()+" : Backup a TDB dataset" ;
- }
-
- @Override
- protected void exec()
- {
- DatasetGraphSwitchable dsg = getDatabaseContainer();
- String fn = DatabaseOps.backup(dsg);
- System.out.println("Backup written to "+fn);
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbcompact.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbcompact.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbcompact.java
deleted file mode 100644
index 59f2425..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbcompact.java
+++ /dev/null
@@ -1,48 +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 tdb2;
-
-import org.apache.jena.tdb2.store.DatasetGraphSwitchable;
-import org.apache.jena.tdb2.sys.DatabaseOps;
-import tdb2.cmdline.CmdTDB;
-
-public class tdbcompact extends CmdTDB {
- static public void main(String... argv) {
- CmdTDB.init() ;
- new tdbcompact(argv).mainRun() ;
- }
-
- protected tdbcompact(String[] argv) {
- super(argv) ;
- }
-
- @Override
- protected String getSummary() {
- return getCommandName() + " : Compact a TDB2 dataset" ;
- }
-
- @Override
- protected void exec() {
- DatasetGraphSwitchable dsg = getDatabaseContainer() ;
- long start = System.currentTimeMillis();
- DatabaseOps.compact(dsg) ;
- long finish = System.currentTimeMillis();
- System.out.printf("Compacted in %.3fs", (finish-start)/1000.0);
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbdump.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbdump.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbdump.java
deleted file mode 100644
index e8bd728..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbdump.java
+++ /dev/null
@@ -1,66 +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 tdb2;
-
-import arq.cmdline.ModLangOutput ;
-import jena.cmd.CmdException ;
-import org.apache.jena.dboe.jenax.Txn;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.riot.RDFFormat ;
-import org.apache.jena.riot.RDFLanguages ;
-import org.apache.jena.sparql.core.DatasetGraph ;
-import tdb2.cmdline.CmdTDB;
-
-public class tdbdump extends CmdTDB
-{
- static ModLangOutput modLangOutput = new ModLangOutput() ;
-
- static public void main(String... argv) {
- CmdTDB.init() ;
- new tdbdump(argv).mainRun() ;
- }
-
- protected tdbdump(String[] argv) {
- super(argv) ;
- addModule(modLangOutput) ;
- }
-
- @Override
- protected String getSummary() {
- return getCommandName() + " : Write a dataset to stdout (defaults to N-Quads)" ;
- }
-
- @Override
- protected void exec() {
- DatasetGraph dsg = getDatasetGraph() ;
- // Prefer stream over fully pretty output formats.
- RDFFormat fmt = modLangOutput.getOutputStreamFormat() ;
- // Stream writing happens naturally - no need to call StreamRDFWriter.
- //if ( fmt != null && StreamRDFWriter.registered(fmt) )
- if ( fmt == null )
- fmt = modLangOutput.getOutputFormatted() ;
- if ( fmt == null )
- // Default.
- fmt = RDFFormat.NQUADS ;
- if ( ! RDFLanguages.isQuads(fmt.getLang() ))
- throw new CmdException("Databases can be dumped only in quad formats (e.g. Trig, N-Quads), not "+fmt.getLang()) ;
- RDFFormat fmtFinal = fmt ;
- Txn.executeRead(dsg, ()->RDFDataMgr.write(System.out, dsg, fmtFinal));
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbloader.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbloader.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbloader.java
deleted file mode 100644
index f31cb70..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbloader.java
+++ /dev/null
@@ -1,175 +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 tdb2 ;
-
-import java.util.List ;
-
-import jena.cmd.ArgDecl;
-import jena.cmd.CmdException;
-import org.apache.jena.atlas.lib.FileOps;
-import org.apache.jena.atlas.lib.NotImplemented;
-import org.apache.jena.atlas.lib.ProgressMonitor;
-import org.apache.jena.graph.Graph;
-import org.apache.jena.query.ARQ ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr;
-import org.apache.jena.riot.RDFLanguages ;
-import org.apache.jena.riot.system.ProgressStreamRDF;
-import org.apache.jena.riot.system.StreamRDF;
-import org.apache.jena.riot.system.StreamRDFLib;
-import org.apache.jena.sparql.core.DatasetGraph;
-import org.apache.jena.system.Txn;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import tdb2.cmdline.CmdTDB;
-import tdb2.cmdline.CmdTDBGraph;
-
-public class tdbloader extends CmdTDBGraph {
- // private static final ArgDecl argParallel = new ArgDecl(ArgDecl.NoValue, "parallel") ;
- // private static final ArgDecl argIncremental = new ArgDecl(ArgDecl.NoValue, "incr", "incremental") ;
- private static final ArgDecl argNoStats = new ArgDecl(ArgDecl.NoValue, "nostats") ;
- private static final ArgDecl argStats = new ArgDecl(ArgDecl.HasValue, "stats") ;
-
- private boolean showProgress = true ;
- private boolean generateStats = true ;
-
- static public void main(String... argv) {
- CmdTDB.init() ;
- new tdbloader(argv).mainRun() ;
- }
-
- protected tdbloader(String[] argv) {
- super(argv) ;
- super.add(argNoStats, "--nostats", "Switch off statistics gathering") ;
- super.add(argStats) ; // Hidden argument
- }
-
- @Override
- protected void processModulesAndArgs() {
- super.processModulesAndArgs() ;
- }
-
- @Override
- protected String getSummary() {
- return getCommandName() + " [--desc DATASET | -loc DIR] FILE ..." ;
- }
-
- @Override
- protected void exec() {
- if ( isVerbose() ) {
- System.out.println("Java maximum memory: " + Runtime.getRuntime().maxMemory()) ;
- System.out.println(ARQ.getContext()) ;
- }
- if ( isVerbose() )
- showProgress = true ;
- if ( isQuiet() )
- showProgress = false ;
- if ( super.contains(argStats) ) {
- if ( ! hasValueOfTrue(argStats) && ! hasValueOfFalse(argStats) )
- throw new CmdException("Not a boolean value: "+getValue(argStats)) ;
- generateStats = super.hasValueOfTrue(argStats) ;
- }
-
- if ( super.contains(argNoStats))
- generateStats = false ;
-
- List<String> urls = getPositional() ;
- if ( urls.size() == 0 )
- urls.add("-") ;
-
- if ( graphName == null ) {
- loadQuads(urls) ;
- return ;
- }
-
- // There's a --graph.
- // Check/warn that there are no quads formats mentioned
- // (RIOT will take the default graph from quads).
-
- for ( String url : urls ) {
- Lang lang = RDFLanguages.filenameToLang(url) ;
- if ( lang != null && RDFLanguages.isQuads(lang) ) {
- System.err.println("Warning: Quads format given - only the default graph is loaded into the graph for --graph") ;
- break ;
- }
- }
-
- loadNamedGraph(urls) ;
- }
-
-// void loadDefaultGraph(List<String> urls) {
-// GraphTDB graph = getGraph() ;
-// TDBLoader.load(graph, urls, showProgress) ;
-// return ;
-// }
-
- void loadNamedGraph(List<String> urls) {
- Graph graph = getGraph() ;
- TDBLoader.load(graph, urls, showProgress) ;
- return ;
- }
-
- void loadQuads(List<String> urls) {
- TDBLoader.load(getDatasetGraph(), urls, showProgress, generateStats) ;
- return ;
- }
-
- /** Tick point for messages during loading of data */
- public static int DataTickPoint = 50 * 1000 ;
- /** Tick point for messages during secondary index creation */
- public static long IndexTickPoint = 100 * 1000 ;
-
- /** Number of ticks per super tick */
- public static int superTick = 10 ;
-
- private static Logger LOG = LoggerFactory.getLogger("TDB2");
-
- static class TDBLoader {
-
- public static void load(DatasetGraph dsg, List<String> urls, boolean showProgress, boolean generateStats) {
- Txn.executeWrite(dsg, ()->{
- urls.forEach((x)->loadOne(dsg, x, showProgress));
- });
- }
-
- private static void loadOne(DatasetGraph dsg, String x, boolean showProgress) {
- StreamRDF dest = StreamRDFLib.dataset(dsg);
- StreamRDF sink = dest;
- ProgressMonitor monitor = null;
- if ( showProgress ) {
- String basename = FileOps.splitDirFile(x).get(1);
- monitor = ProgressMonitor.create(LOG, basename, DataTickPoint, superTick);
- sink = new ProgressStreamRDF(sink, monitor);
- }
- if ( monitor!= null )
- monitor.start();
- sink.start();
- RDFDataMgr.parse(sink, x);
- sink.finish();
- if ( monitor!= null ) {
- monitor.finish();
- monitor.finishMessage();
- }
- }
-
- public static void load(Graph graph, List<String> urls, boolean showProgress) {
- throw new NotImplemented();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbquery.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbquery.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbquery.java
deleted file mode 100644
index fffe597..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbquery.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tdb2;
-
-import arq.query;
-import arq.cmdline.ModDataset;
-import tdb2.cmdline.CmdTDB;
-import tdb2.cmdline.ModTDBDataset;
-
-public class tdbquery extends query {
- // Inherits from arq.query so is not a CmdTDB. Mixins for Java!
- public static void main(String... argv) {
- CmdTDB.init();
- new tdbquery(argv).mainRun();
- }
-
- public tdbquery(String[] argv) {
- super(argv);
- }
-
- @Override
- protected String getSummary() {
- return getCommandName() + " --loc=<path> --query=<query>";
- }
-
-// @Override
-// protected void processModulesAndArgs() {
-// super.processModulesAndArgs();
-// }
-
- @Override
- protected ModDataset setModDataset() {
- return new ModTDBDataset();
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbstats.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbstats.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbstats.java
deleted file mode 100644
index 19797d0..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbstats.java
+++ /dev/null
@@ -1,99 +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 tdb2;
-
-import java.util.Iterator ;
-
-import org.apache.jena.atlas.lib.tuple.Tuple ;
-import org.apache.jena.atlas.logging.Log ;
-import org.apache.jena.dboe.jenax.Txn;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.sparql.core.Quad ;
-import org.apache.jena.tdb2.solver.SolverLib;
-import org.apache.jena.tdb2.solver.stats.Stats;
-import org.apache.jena.tdb2.solver.stats.StatsCollectorNodeId;
-import org.apache.jena.tdb2.solver.stats.StatsResults;
-import org.apache.jena.tdb2.store.DatasetGraphTDB;
-import org.apache.jena.tdb2.store.NodeId;
-import org.apache.jena.tdb2.store.nodetable.NodeTable;
-import org.apache.jena.tdb2.store.nodetupletable.NodeTupleTable;
-import org.apache.jena.tdb2.sys.TDBInternal;
-import tdb2.cmdline.CmdTDB;
-import tdb2.cmdline.CmdTDBGraph;
-
-public class tdbstats extends CmdTDBGraph {
- static public void main(String... argv) {
- CmdTDB.init();
- new tdbstats(argv).mainRun();
- }
-
- protected tdbstats(String[] argv) {
- super(argv);
- }
-
- @Override
- protected String getSummary() {
- return null;
- }
-
- public static StatsResults stats(DatasetGraphTDB dsg, Node gn) {
- return Txn.calculateRead(dsg, ()->stats$(dsg, gn));
- }
-
- private static StatsResults stats$(DatasetGraphTDB dsg, Node gn) {
-
- NodeTable nt = dsg.getTripleTable().getNodeTupleTable().getNodeTable();
- StatsCollectorNodeId stats = new StatsCollectorNodeId(nt);
-
- if ( gn == null ) {
- Iterator<Tuple<NodeId>> iter = dsg.getTripleTable().getNodeTupleTable().findAll();
- for ( ; iter.hasNext() ; ) {
- Tuple<NodeId> t = iter.next();
- stats.record(null, t.get(0), t.get(1), t.get(2));
- }
- } else {
- // If the union graph, then we need to scan all quads but with uniqueness.
- boolean unionGraph = Quad.isUnionGraph(gn) ;
- NodeId gnid = null ;
- if ( !unionGraph ) {
- gnid = nt.getNodeIdForNode(gn);
- if ( NodeId.isDoesNotExist(gnid) )
- Log.warn(tdbstats.class, "No such graph: " + gn);
- }
-
- NodeTupleTable ntt = dsg.getQuadTable().getNodeTupleTable();
- Iterator<Tuple<NodeId>> iter = unionGraph
- ? SolverLib.unionGraph(ntt)
- : ntt.find(gnid, null, null, null) ;
- for ( ; iter.hasNext() ; ) {
- Tuple<NodeId> t = iter.next();
- stats.record(t.get(0), t.get(1), t.get(2), t.get(3));
- }
- }
- return stats.results();
- }
-
- @Override
- protected void exec() {
- DatasetGraphTDB dsg = TDBInternal.getDatasetGraphTDB(getDatasetGraph());
- Node gn = getGraphName();
- StatsResults results = stats(dsg, gn);
- Stats.write(System.out, results);
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbupdate.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbupdate.java b/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbupdate.java
deleted file mode 100644
index c40c245..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/java/tdb2/tdbupdate.java
+++ /dev/null
@@ -1,56 +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 tdb2;
-
-import arq.cmdline.ModDataset;
-import jena.cmd.CmdException;
-import org.apache.jena.sparql.core.DatasetGraph;
-import org.apache.jena.tdb2.TDB2;
-import tdb2.cmdline.CmdTDB;
-import tdb2.cmdline.ModTDBDataset;
-
-public class tdbupdate extends arq.update {
- // Inherits from arq.update so is not a CmdTDB. Mixins for Java!
- public static void main(String... argv) {
- CmdTDB.init();
- new tdbupdate(argv).mainRun();
- }
-
- public tdbupdate(String[] argv) {
- super(argv);
- // Because this inherits from an ARQ command
- CmdTDB.init();
- super.modVersion.addClass(TDB2.class);
- }
-
- @Override
- protected void processModulesAndArgs() {
- super.processModulesAndArgs();
- }
-
- @Override
- protected ModDataset setModeDataset() {
- return new ModTDBDataset();
- }
-
- @Override
- protected DatasetGraph dealWithNoDataset() {
- throw new CmdException("No dataset provided");
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/resources/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/resources/META-INF/LICENSE b/jena-db/jena-tdb2-cmds/src/main/resources/META-INF/LICENSE
deleted file mode 100644
index 67db858..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/resources/META-INF/LICENSE
+++ /dev/null
@@ -1,175 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/resources/META-INF/NOTICE b/jena-db/jena-tdb2-cmds/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index 0b2d10d..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,8 +0,0 @@
-Apache Jena - Database Operating Environment
-
-Portions of this software were originally based on the following:
-
- - Copyright 2013-2017 Andy Seaborne
- - Copyright 2014-2015 Epimorphics Ltd.
-
-These have been licensed to the Apache Software Foundation under a software grant.
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/src/main/resources/org/apache/jena/tdb/tdb-properties.xml
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/src/main/resources/org/apache/jena/tdb/tdb-properties.xml b/jena-db/jena-tdb2-cmds/src/main/resources/org/apache/jena/tdb/tdb-properties.xml
deleted file mode 100644
index 67d8255..0000000
--- a/jena-db/jena-tdb2-cmds/src/main/resources/org/apache/jena/tdb/tdb-properties.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
-<!-- Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 -->
-<properties version="1.0">
- <comment>TDB System Properties</comment>
- <entry key="org.apache.jena.tdb.version">${project.version}</entry>
- <entry key="org.apache.jena.tdb.build.datetime">${build.time.xsd}</entry>
-</properties>
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/tdb2
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/tdb2 b/jena-db/jena-tdb2-cmds/tdb2
deleted file mode 100755
index 170f8bb..0000000
--- a/jena-db/jena-tdb2-cmds/tdb2
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/env bash
-## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
-
-## Usage: tdb2
-## Sets up the java enviroment to run Jena-based commands.
-
-CP=
-
-#JENA_CP="$(jena)"
-## If Jena development, this needs to be different.
-JENA_CP="$HOME/jlib/apache-jena/lib/"'*'
-
-## Log4j
-LOG4J_CP="/home/afs/.m2/repo/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-1.7.25.jar:/home/afs/.m2/repo/log4j/log4j/1.2.17/log4j-1.2.17.jar"
-## JUL
-JUL_CP="/home/afs/.m2/repo/org/slf4j/slf4j-jdk14/1.7.25/slf4j-jdk14-1.7.25.jar"
-
-H="$HOME/JenaTDB2/jena-db"
-D=
-
-# modules
-# Not jena-dboe-index-test
-read -r -d '' MODULES << EOM
-jena-dboe-base
-jena-dboe-index
-jena-dboe-transaction
-jena-dboe-trans-data
-jena-tdb2
-jena-tdb2-cmds
-EOM
-
-if true # if in development area ./
-then
- for X in $MODULES
- do
- [[ $D = "" ]] || D="$D:"
- D="${D}$H/$X/target/classes"
- done
-else
- ## @@ By artifacts ...
- echo "Not implemented: classpath by artifacts" 2>&1
- exit 9
-fi
-
-
-TDB2_CP="$D"
-
-if [[ -e logging.properties ]]
-then
- LOGGING_JUL=-Djava.util.logging.config.file=logging.properties
-fi
-if [[ -e log4j.properties ]]
-then
- LOGGING_LOG4J=-Dlog4j.configuration=file:log4j.properties
-fi
-
-if [[ $# = 0 ]]
-then
- echo "Class path: $TDB2_CP:${JENA_CP}"
- exit
- #echo "No class to run" 1>&2
- #exit 1
-else
- CMD="$1"
- shift
-fi
-
-# Map CMD to class name
-TDB2_PKG="tdb2"
-
-# Alternative names.
-## case $CMD in
-## ???
-## CMD=tdb2.$CMD
-## ;;
-## *) ;;
-## esac
-
-# Map to class name.
-case $CMD in
- "")
- ;;
- tdbbackup | tdbdump | tdbloader | tdbquery | tdbstats | tdbupdate | tdbcompact)
- CMD_CLS="$TDB2_PKG"."$CMD"
- ;;
-## tools.*)
-## CMD_CLS="${BASE_PKG}"."$CMD"
-## ;;
- *)
- echo "Unknown command $CMD" 2>&1
- exit 1
- ;;
-
-esac
-
-## echo "TDB2_CP=$TDB2_CP"
-## echo "JENA_CP=$JENA_CP"
-#echo java $JVM_ARGS $LOGGING_LOG4J $LOGGING_JUL -cp "$TDB2_CP:${JENA_CP}" "$CMD_CLS" "$@"
-
-java $JVM_ARGS $LOGGING_LOG4J $LOGGING_JUL -cp "$TDB2_CP:${JENA_CP}" "$CMD_CLS" "$@"
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-dataset-embed.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-dataset-embed.ttl b/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-dataset-embed.ttl
deleted file mode 100644
index 9edd5a3..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-dataset-embed.ttl
+++ /dev/null
@@ -1,23 +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.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-dataset.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-dataset.ttl b/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-dataset.ttl
deleted file mode 100644
index c9d8d7b..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-dataset.ttl
+++ /dev/null
@@ -1,23 +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.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph-embed.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph-embed.ttl b/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph-embed.ttl
deleted file mode 100644
index af3daab..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph-embed.ttl
+++ /dev/null
@@ -1,27 +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.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph-ref-dataset.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph-ref-dataset.ttl b/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph-ref-dataset.ttl
deleted file mode 100644
index fe256bd..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph-ref-dataset.ttl
+++ /dev/null
@@ -1,31 +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.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph.ttl b/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph.ttl
deleted file mode 100644
index 2ae8396..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-graph.ttl
+++ /dev/null
@@ -1,27 +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.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-named-graph-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-named-graph-1.ttl b/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-named-graph-1.ttl
deleted file mode 100644
index 78e40cf..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-named-graph-1.ttl
+++ /dev/null
@@ -1,29 +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.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-named-graph-2.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-named-graph-2.ttl b/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-named-graph-2.ttl
deleted file mode 100644
index ee2feab..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Assembler/tdb-named-graph-2.ttl
+++ /dev/null
@@ -1,28 +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.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-00.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-00.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-00.rq
deleted file mode 100644
index f2341a0..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-00.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example>
-
-SELECT *
-{ ?x ?p ?z }
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-O.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-O.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-O.rq
deleted file mode 100644
index e1d1da7..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-O.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ ?x ?p :z1 }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-P.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-P.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-P.rq
deleted file mode 100644
index d64b9f9..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-P.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ ?x :p1 ?z }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-PO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-PO.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-PO.rq
deleted file mode 100644
index 01fa14a..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-PO.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ ?x :p1 :z1 }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-S.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-S.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-S.rq
deleted file mode 100644
index 180188e..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-S.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ :x1 ?p ?z }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SO.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SO.rq
deleted file mode 100644
index a4242fb..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SO.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ :x1 ?p :z1 }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SP.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SP.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SP.rq
deleted file mode 100644
index 37ddfe6..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SP.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ :x1 :p1 ?z }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SPO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SPO.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SPO.rq
deleted file mode 100644
index 41aa20f..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-1-SPO.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT ?v
-{ :x1 :p1 :z1 }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-2-SO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-2-SO.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-2-SO.rq
deleted file mode 100644
index 49c5711..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-2-SO.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ ?x ?p ?x }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-O.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-O.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-O.rq
deleted file mode 100644
index f7f3f6b..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-O.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ ?x ?p :z1a }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-P.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-P.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-P.rq
deleted file mode 100644
index 8c79fa5..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-P.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ ?x :p1a ?z }
\ No newline at end of file
[6/7] jena git commit: Remove Fuseki+TDB2 special build
Posted by an...@apache.org.
Remove Fuseki+TDB2 special build
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/b7299165
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/b7299165
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/b7299165
Branch: refs/heads/jena-tdb2
Commit: b729916523e6691f64bda3ae8c4fbb032ad92fc2
Parents: d64b4d5
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Oct 3 17:39:23 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Oct 3 17:39:23 2017 +0100
----------------------------------------------------------------------
jena-db/jena-fuseki-tdb2/pom.xml | 123 -------------------
.../org/apache/jena/cmd_x/FusekiTDB2Cmd.java | 36 ------
2 files changed, 159 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/b7299165/jena-db/jena-fuseki-tdb2/pom.xml
----------------------------------------------------------------------
diff --git a/jena-db/jena-fuseki-tdb2/pom.xml b/jena-db/jena-fuseki-tdb2/pom.xml
deleted file mode 100644
index 40efffa..0000000
--- a/jena-db/jena-fuseki-tdb2/pom.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- 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.
--->
-
-<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>
-
- <name>Apache Jena (${project.artifactId})</name>
- <artifactId>jena-fuseki-tdb2-server</artifactId>
-
- <parent>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-db</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- </parent>
-
- <packaging>jar</packaging>
- <description>Apache Jena Fuseki combined with Apache Jena/TDB2</description>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-tdb2</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- </dependency>
-
- <!-- Include commands as well! -->
- <dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-tdb2-cmds</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-cmds</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-fuseki-basic</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <configuration>
- <shadedArtifactAttached>false</shadedArtifactAttached>
- <transformers>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
- <mainClass>org.apache.jena.fuseki.cmds.FusekiBasicCmd</mainClass>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
- <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
- <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
- <addHeader>false</addHeader>
- </transformer>
- </transformers>
- <filters>
- <filter>
- <artifact>*:*</artifact>
- <excludes>
- <!-- Some jars are signed but shading breaks that.
- Don't include signing files.
- -->
- <exclude>META-INF/*.SF</exclude>
- <exclude>META-INF/*.DSA</exclude>
- <exclude>META-INF/*.RSA</exclude>
- </excludes>
- </filter>
- </filters>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <!--<phase /><!- - Switch off -->
- <goals>
- <goal>shade</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
-
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/jena/blob/b7299165/jena-db/jena-fuseki-tdb2/src/main/java/org/apache/jena/cmd_x/FusekiTDB2Cmd.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-fuseki-tdb2/src/main/java/org/apache/jena/cmd_x/FusekiTDB2Cmd.java b/jena-db/jena-fuseki-tdb2/src/main/java/org/apache/jena/cmd_x/FusekiTDB2Cmd.java
deleted file mode 100644
index 79896dc..0000000
--- a/jena-db/jena-fuseki-tdb2/src/main/java/org/apache/jena/cmd_x/FusekiTDB2Cmd.java
+++ /dev/null
@@ -1,36 +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.cmd_x;
-
-import org.apache.jena.fuseki.Fuseki;
-import org.apache.jena.fuseki.FusekiLogging;
-
-public class FusekiTDB2Cmd {
-
- public static void main(String... args) {
- FusekiLogging.setLogging() ;
- Fuseki.serverLog.info("Fuseki-TDB2 integration");
-
- // Full server.
- //org.apache.jena.fuseki.cmd.FusekiCmd.main(args);
- // Basic server
- org.apache.jena.fuseki.cmds.FusekiBasicCmd.main(args);
- }
-
-}
[4/7] jena git commit: Move tdb2-cmds to jena-cmds
Posted by an...@apache.org.
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-PO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-PO.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-PO.rq
deleted file mode 100644
index a011a1c..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-PO.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ ?x :p1 :z1a }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-S.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-S.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-S.rq
deleted file mode 100644
index 8b62930..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-S.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ :x1a ?p ?z }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-SO.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-SO.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-SO.rq
deleted file mode 100644
index e71f0b3..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-SO.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ :x1 ?p :z1a }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-SP.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-SP.rq b/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-SP.rq
deleted file mode 100644
index 3b7ff81..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/basic-3-SP.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT *
-{ :x1a :p1 ?z }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/data-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/data-1.ttl b/jena-db/jena-tdb2-cmds/testing/Basic/data-1.ttl
deleted file mode 100644
index d3a3d80..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/data-1.ttl
+++ /dev/null
@@ -1,17 +0,0 @@
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Basic/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Basic/manifest.ttl b/jena-db/jena-tdb2-cmds/testing/Basic/manifest.ttl
deleted file mode 100644
index aacbb56..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Basic/manifest.ttl
+++ /dev/null
@@ -1,101 +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.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Data/solver-data.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Data/solver-data.ttl b/jena-db/jena-tdb2-cmds/testing/Data/solver-data.ttl
deleted file mode 100644
index cdbfb19..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Data/solver-data.ttl
+++ /dev/null
@@ -1,7 +0,0 @@
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Loader/data-1.nq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Loader/data-1.nq b/jena-db/jena-tdb2-cmds/testing/Loader/data-1.nq
deleted file mode 100644
index e9812a6..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Loader/data-1.nq
+++ /dev/null
@@ -1 +0,0 @@
-<s> <p> <o> <g> .
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Loader/data-2.nt
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Loader/data-2.nt b/jena-db/jena-tdb2-cmds/testing/Loader/data-2.nt
deleted file mode 100644
index 81fc25f..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Loader/data-2.nt
+++ /dev/null
@@ -1 +0,0 @@
-<s> <p> <o> .
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Loader/data-3.trig
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Loader/data-3.trig b/jena-db/jena-tdb2-cmds/testing/Loader/data-3.trig
deleted file mode 100644
index 8000cc1..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Loader/data-3.trig
+++ /dev/null
@@ -1,3 +0,0 @@
-prefix : <http://example/>
-
-:g { :s :p :o }
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Loader/data-4.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Loader/data-4.ttl b/jena-db/jena-tdb2-cmds/testing/Loader/data-4.ttl
deleted file mode 100644
index 49678f1..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Loader/data-4.ttl
+++ /dev/null
@@ -1,4 +0,0 @@
-prefix : <http://example/>
-
-:s :p :o .
-
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Pattern/data-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Pattern/data-1.ttl b/jena-db/jena-tdb2-cmds/testing/Pattern/data-1.ttl
deleted file mode 100644
index d3a3d80..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Pattern/data-1.ttl
+++ /dev/null
@@ -1,17 +0,0 @@
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Pattern/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Pattern/manifest.ttl b/jena-db/jena-tdb2-cmds/testing/Pattern/manifest.ttl
deleted file mode 100644
index 094244b..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Pattern/manifest.ttl
+++ /dev/null
@@ -1,35 +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.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Pattern/pattern-1.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Pattern/pattern-1.rq b/jena-db/jena-tdb2-cmds/testing/Pattern/pattern-1.rq
deleted file mode 100644
index ca7c8fc..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Pattern/pattern-1.rq
+++ /dev/null
@@ -1,7 +0,0 @@
-PREFIX : <http://example/OTHER>
-
-SELECT *
-{
- :NoSuchNode ?p ?z .
- ?x ?p ?z
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Pattern/pattern-2.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Pattern/pattern-2.rq b/jena-db/jena-tdb2-cmds/testing/Pattern/pattern-2.rq
deleted file mode 100644
index 9b90038..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Pattern/pattern-2.rq
+++ /dev/null
@@ -1,8 +0,0 @@
-PREFIX : <http://example/OTHER>
-
-SELECT *
-{
- # Test shared variables
- ?x1 :p1 ?z .
- ?x2 :p1 ?z .
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Quads/data-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Quads/data-1.ttl b/jena-db/jena-tdb2-cmds/testing/Quads/data-1.ttl
deleted file mode 100644
index adc4239..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Quads/data-1.ttl
+++ /dev/null
@@ -1,5 +0,0 @@
-@prefix : <http://example/> .
-
-:x :p 1 .
-
-:x1 :p :x .
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Quads/data-2.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Quads/data-2.ttl b/jena-db/jena-tdb2-cmds/testing/Quads/data-2.ttl
deleted file mode 100644
index 100a7c7..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Quads/data-2.ttl
+++ /dev/null
@@ -1,5 +0,0 @@
-@prefix : <http://example/> .
-
-:x :p 1 .
-
-:x2 :p :x .
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Quads/data-dft.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Quads/data-dft.ttl b/jena-db/jena-tdb2-cmds/testing/Quads/data-dft.ttl
deleted file mode 100644
index a2ef718..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Quads/data-dft.ttl
+++ /dev/null
@@ -1,10 +0,0 @@
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Quads/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Quads/manifest.ttl b/jena-db/jena-tdb2-cmds/testing/Quads/manifest.ttl
deleted file mode 100644
index 15a46a7..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Quads/manifest.ttl
+++ /dev/null
@@ -1,51 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Quads/quad-01.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Quads/quad-01.rq b/jena-db/jena-tdb2-cmds/testing/Quads/quad-01.rq
deleted file mode 100644
index b705fc8..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Quads/quad-01.rq
+++ /dev/null
@@ -1,9 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Quads/quad-02.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Quads/quad-02.rq b/jena-db/jena-tdb2-cmds/testing/Quads/quad-02.rq
deleted file mode 100644
index ef3bf2f..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Quads/quad-02.rq
+++ /dev/null
@@ -1,8 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-1.ttl b/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-1.ttl
deleted file mode 100644
index 77be09c..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-1.ttl
+++ /dev/null
@@ -1,7 +0,0 @@
-@prefix : <http://example/> .
-
-:x :p 1 .
-:x :p 2 .
-
-
-:y :q :x .
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-2.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-2.ttl b/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-2.ttl
deleted file mode 100644
index 59ac719..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-2.ttl
+++ /dev/null
@@ -1,5 +0,0 @@
-@prefix : <http://example/> .
-
-:x :p 1 .
-:x :p 99 .
-
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-dft.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-dft.ttl b/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-dft.ttl
deleted file mode 100644
index d64ddd9..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/data-dft.ttl
+++ /dev/null
@@ -1,5 +0,0 @@
-@prefix : <http://example/> .
-
-:x :p 11 .
-:x :p 999 .
-
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/manifest.ttl b/jena-db/jena-tdb2-cmds/testing/UnionGraph/manifest.ttl
deleted file mode 100644
index 217d229..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/manifest.ttl
+++ /dev/null
@@ -1,107 +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.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-1-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-1-results.srx b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-1-results.srx
deleted file mode 100644
index f850ec3..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-1-results.srx
+++ /dev/null
@@ -1,57 +0,0 @@
-<?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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-1.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-1.rq b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-1.rq
deleted file mode 100644
index c403064..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-1.rq
+++ /dev/null
@@ -1,8 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-2-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-2-results.srx b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-2-results.srx
deleted file mode 100644
index 18f9252..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-2-results.srx
+++ /dev/null
@@ -1,66 +0,0 @@
-<?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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-2.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-2.rq b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-2.rq
deleted file mode 100644
index 27953a6..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-2.rq
+++ /dev/null
@@ -1,8 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-3-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-3-results.srx b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-3-results.srx
deleted file mode 100644
index 4a65413..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-3-results.srx
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-3.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-3.rq b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-3.rq
deleted file mode 100644
index 1212926..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-3.rq
+++ /dev/null
@@ -1,8 +0,0 @@
-PREFIX : <http://example/>
-PREFIX arq: <urn:x-arq:>
-
-SELECT *
-{
- GRAPH arq:UnionGraph { [] ?p [] }
-}
-
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-4-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-4-results.srx b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-4-results.srx
deleted file mode 100644
index 0b44cb2..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-4-results.srx
+++ /dev/null
@@ -1,99 +0,0 @@
-<?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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-4.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-4.rq b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-4.rq
deleted file mode 100644
index 004f4bc..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-4.rq
+++ /dev/null
@@ -1,8 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-5-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-5-results.srx b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-5-results.srx
deleted file mode 100644
index c7d777f..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-5-results.srx
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-5.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-5.rq b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-5.rq
deleted file mode 100644
index fa9bfe3..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-5.rq
+++ /dev/null
@@ -1,8 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-6-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-6-results.srx b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-6-results.srx
deleted file mode 100644
index b4d31dc..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-6-results.srx
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-6.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-6.rq b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-6.rq
deleted file mode 100644
index 7819cbb..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-6.rq
+++ /dev/null
@@ -1,7 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-A-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-A-results.srx b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-A-results.srx
deleted file mode 100644
index 1438c25..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-A-results.srx
+++ /dev/null
@@ -1,99 +0,0 @@
-<?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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-A.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-A.rq b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-A.rq
deleted file mode 100644
index 7bab242..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-A.rq
+++ /dev/null
@@ -1,8 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-B-results.srx
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-B-results.srx b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-B-results.srx
deleted file mode 100644
index 60d7766..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-B-results.srx
+++ /dev/null
@@ -1,49 +0,0 @@
-<?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/d64b4d54/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-B.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-B.rq b/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-B.rq
deleted file mode 100644
index d4aceda..0000000
--- a/jena-db/jena-tdb2-cmds/testing/UnionGraph/merge-B.rq
+++ /dev/null
@@ -1,8 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Update/create-1.ru
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Update/create-1.ru b/jena-db/jena-tdb2-cmds/testing/Update/create-1.ru
deleted file mode 100644
index 3276ec1..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Update/create-1.ru
+++ /dev/null
@@ -1 +0,0 @@
-CREATE GRAPH <http://example/graph>
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Update/drop-1.ru
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Update/drop-1.ru b/jena-db/jena-tdb2-cmds/testing/Update/drop-1.ru
deleted file mode 100644
index 2512eb3..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Update/drop-1.ru
+++ /dev/null
@@ -1 +0,0 @@
-DROP GRAPH <http://example/graph>
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Update/update-1.ru
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Update/update-1.ru b/jena-db/jena-tdb2-cmds/testing/Update/update-1.ru
deleted file mode 100644
index 7a6b737..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Update/update-1.ru
+++ /dev/null
@@ -1,3 +0,0 @@
-PREFIX : <http://example/>
-
-INSERT { :r :p 123 }
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Update/update-2.ru
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Update/update-2.ru b/jena-db/jena-tdb2-cmds/testing/Update/update-2.ru
deleted file mode 100644
index 41e4ec0..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Update/update-2.ru
+++ /dev/null
@@ -1,5 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Update/update-3.ru
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Update/update-3.ru b/jena-db/jena-tdb2-cmds/testing/Update/update-3.ru
deleted file mode 100644
index 17f8410..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Update/update-3.ru
+++ /dev/null
@@ -1,7 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/data-1.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/data-1.ttl b/jena-db/jena-tdb2-cmds/testing/Values/data-1.ttl
deleted file mode 100644
index 27c37dd..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/data-1.ttl
+++ /dev/null
@@ -1,23 +0,0 @@
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/manifest.ttl b/jena-db/jena-tdb2-cmds/testing/Values/manifest.ttl
deleted file mode 100644
index 3396af5..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/manifest.ttl
+++ /dev/null
@@ -1,76 +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.
-
-@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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/value-00.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/value-00.rq b/jena-db/jena-tdb2-cmds/testing/Values/value-00.rq
deleted file mode 100644
index d1fe80b..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/value-00.rq
+++ /dev/null
@@ -1 +0,0 @@
-SELECT * { ?s ?p ?o }
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/value-01.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/value-01.rq b/jena-db/jena-tdb2-cmds/testing/Values/value-01.rq
deleted file mode 100644
index 664f67a..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/value-01.rq
+++ /dev/null
@@ -1 +0,0 @@
-SELECT * { ?s ?p 1 }
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/value-02.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/value-02.rq b/jena-db/jena-tdb2-cmds/testing/Values/value-02.rq
deleted file mode 100644
index 5dfe5ec..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/value-02.rq
+++ /dev/null
@@ -1 +0,0 @@
-SELECT * { ?s ?p 1.5 }
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/value-03.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/value-03.rq b/jena-db/jena-tdb2-cmds/testing/Values/value-03.rq
deleted file mode 100644
index 7134be8..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/value-03.rq
+++ /dev/null
@@ -1 +0,0 @@
-SELECT * { ?s ?p "1" }
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/value-04.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/value-04.rq b/jena-db/jena-tdb2-cmds/testing/Values/value-04.rq
deleted file mode 100644
index 030116d..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/value-04.rq
+++ /dev/null
@@ -1 +0,0 @@
-SELECT * { ?s ?p "1"@en }
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/value-05.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/value-05.rq b/jena-db/jena-tdb2-cmds/testing/Values/value-05.rq
deleted file mode 100644
index fbd8d9b..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/value-05.rq
+++ /dev/null
@@ -1,5 +0,0 @@
-SELECT *
-{
- ?s ?p ?o .
- FILTER(?o = 1)
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/value-06.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/value-06.rq b/jena-db/jena-tdb2-cmds/testing/Values/value-06.rq
deleted file mode 100644
index 8f34124..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/value-06.rq
+++ /dev/null
@@ -1,6 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/value-07.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/value-07.rq b/jena-db/jena-tdb2-cmds/testing/Values/value-07.rq
deleted file mode 100644
index cafd777..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/value-07.rq
+++ /dev/null
@@ -1,6 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/value-08.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/value-08.rq b/jena-db/jena-tdb2-cmds/testing/Values/value-08.rq
deleted file mode 100644
index e6fc284..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/value-08.rq
+++ /dev/null
@@ -1,6 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/Values/value-09.rq
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/Values/value-09.rq b/jena-db/jena-tdb2-cmds/testing/Values/value-09.rq
deleted file mode 100644
index 02dcc20..0000000
--- a/jena-db/jena-tdb2-cmds/testing/Values/value-09.rq
+++ /dev/null
@@ -1,7 +0,0 @@
-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/d64b4d54/jena-db/jena-tdb2-cmds/testing/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2-cmds/testing/manifest.ttl b/jena-db/jena-tdb2-cmds/testing/manifest.ttl
deleted file mode 100644
index aeaf80e..0000000
--- a/jena-db/jena-tdb2-cmds/testing/manifest.ttl
+++ /dev/null
@@ -1,31 +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.
-
-@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>
- ) .
-
-
[2/7] jena git commit: JENA-1397: TDB2 commands
Posted by an...@apache.org.
JENA-1397: TDB2 commands
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/a4fba10b
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/a4fba10b
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/a4fba10b
Branch: refs/heads/jena-tdb2
Commit: a4fba10bd83a8931f650756a79a1390bef0d9e9b
Parents: 4df2b89
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Oct 3 17:15:18 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Oct 3 17:15:18 2017 +0100
----------------------------------------------------------------------
.../src/main/java/tdb2/cmdline/CmdSub.java | 71 ++++++++
.../src/main/java/tdb2/cmdline/CmdTDB.java | 84 +++++++++
.../src/main/java/tdb2/cmdline/CmdTDBGraph.java | 81 +++++++++
.../src/main/java/tdb2/cmdline/ModLocation.java | 55 ++++++
.../src/main/java/tdb2/cmdline/ModModel.java | 66 +++++++
.../main/java/tdb2/cmdline/ModTDBAssembler.java | 89 ++++++++++
.../main/java/tdb2/cmdline/ModTDBDataset.java | 138 +++++++++++++++
jena-cmds/src/main/java/tdb2/tdbbackup.java | 55 ++++++
jena-cmds/src/main/java/tdb2/tdbcompact.java | 48 +++++
jena-cmds/src/main/java/tdb2/tdbdump.java | 66 +++++++
jena-cmds/src/main/java/tdb2/tdbloader.java | 175 +++++++++++++++++++
jena-cmds/src/main/java/tdb2/tdbquery.java | 51 ++++++
jena-cmds/src/main/java/tdb2/tdbstats.java | 99 +++++++++++
jena-cmds/src/main/java/tdb2/tdbupdate.java | 56 ++++++
14 files changed, 1134 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/cmdline/CmdSub.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/cmdline/CmdSub.java b/jena-cmds/src/main/java/tdb2/cmdline/CmdSub.java
new file mode 100644
index 0000000..bda20c5
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/cmdline/CmdSub.java
@@ -0,0 +1,71 @@
+/*
+ * 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 tdb2.cmdline;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import jena.cmd.CmdException;
+
+public class CmdSub {
+ public interface Exec {
+ public void exec(String[] argv) ;
+ }
+ private Map<String, Exec> dispatch = new HashMap<>() ;
+
+ private String subCmd ;
+ private String args[] ;
+
+ public CmdSub(String... argv) {
+ subCmd = subCommand(argv) ;
+ args = cmdline(argv) ;
+ }
+
+ protected void exec() {
+ Exec exec = dispatch.get(subCmd) ;
+ if ( exec == null )
+ throw new CmdException("No subcommand: " + subCmd) ;
+ exec.exec(args) ;
+ }
+
+ protected static String[] cmdline(String... argv) {
+ String[] a = new String[argv.length - 1] ;
+ System.arraycopy(argv, 1, a, 0, argv.length - 1) ;
+ return a ;
+ }
+
+ protected static String subCommand(String... argv) {
+ if ( argv.length == 0 )
+ throw new CmdException("Missing subcommand") ;
+
+ String subCmd = argv[0] ;
+ if ( subCmd.startsWith("-") )
+ throw new CmdException("Argument found where subcommand expected") ;
+ return subCmd ;
+ }
+
+ protected void addSubCommand(String subCmdName, Exec exec) {
+ dispatch.put(subCmdName, exec) ;
+ }
+
+ protected Collection<String> subCommandNames() {
+ return dispatch.keySet() ;
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/cmdline/CmdTDB.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/cmdline/CmdTDB.java b/jena-cmds/src/main/java/tdb2/cmdline/CmdTDB.java
new file mode 100644
index 0000000..ed6f0f0
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/cmdline/CmdTDB.java
@@ -0,0 +1,84 @@
+/*
+ * 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 tdb2.cmdline;
+
+import arq.cmdline.CmdARQ ;
+import org.apache.jena.Jena ;
+import org.apache.jena.atlas.lib.Lib ;
+import org.apache.jena.atlas.logging.LogCtl ;
+import org.apache.jena.dboe.base.file.Location;
+import org.apache.jena.query.ARQ ;
+import org.apache.jena.query.Dataset ;
+import org.apache.jena.sparql.core.DatasetGraph ;
+import org.apache.jena.system.JenaSystem ;
+import org.apache.jena.tdb2.TDB2;
+import org.apache.jena.tdb2.store.DatasetGraphSwitchable;
+import org.apache.jena.tdb2.sys.TDBInternal;
+
+public abstract class CmdTDB extends CmdARQ
+{
+ protected final ModTDBDataset tdbDatasetAssembler = new ModTDBDataset() ;
+
+ private static boolean initialized = false ;
+
+ protected CmdTDB(String[] argv) {
+ super(argv) ;
+ init() ;
+ super.addModule(tdbDatasetAssembler) ;
+ super.modVersion.addClass(Jena.class) ;
+ super.modVersion.addClass(ARQ.class) ;
+ super.modVersion.addClass(TDB2.class) ;
+ }
+
+ public static synchronized void init() {
+ // In case called from elsewhere.
+ JenaSystem.init() ;
+ if (initialized)
+ return ;
+ // attempt once.
+ initialized = true ;
+ LogCtl.setCmdLogging() ;
+ }
+
+ @Override
+ protected void processModulesAndArgs() {
+ super.processModulesAndArgs() ;
+ }
+
+ protected Location getLocation() {
+ return tdbDatasetAssembler.getLocation() ;
+ }
+
+ protected DatasetGraph getDatasetGraph() {
+ return getDataset().asDatasetGraph() ;
+ }
+
+ protected DatasetGraphSwitchable getDatabaseContainer() {
+ return TDBInternal.getDatabaseContainer(getDatasetGraph());
+ }
+
+ protected Dataset getDataset() {
+ return tdbDatasetAssembler.getDataset() ;
+ }
+
+ @Override
+ protected String getCommandName() {
+ return Lib.className(this) ;
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/cmdline/CmdTDBGraph.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/cmdline/CmdTDBGraph.java b/jena-cmds/src/main/java/tdb2/cmdline/CmdTDBGraph.java
new file mode 100644
index 0000000..ba86ec8
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/cmdline/CmdTDBGraph.java
@@ -0,0 +1,81 @@
+/*
+ * 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 tdb2.cmdline;
+
+import jena.cmd.ArgDecl;
+import jena.cmd.CmdException;
+import org.apache.jena.atlas.lib.Lib ;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.graph.NodeFactory ;
+import org.apache.jena.query.Dataset ;
+import org.apache.jena.rdf.model.Model ;
+import org.apache.jena.tdb2.store.GraphTDB;
+import tdb2.cmdline.CmdTDB;
+
+public abstract class CmdTDBGraph extends CmdTDB
+{
+ private static final ArgDecl argNamedGraph = new ArgDecl(ArgDecl.HasValue, "graph") ;
+ protected String graphName = null ;
+
+ protected CmdTDBGraph(String[] argv)
+ {
+ super(argv) ;
+ super.add(argNamedGraph, "--graph=IRI", "Act on a named graph") ;
+ }
+
+ @Override
+ protected void processModulesAndArgs()
+ {
+ super.processModulesAndArgs() ;
+ if ( contains(argNamedGraph) )
+ graphName = getValue(argNamedGraph) ;
+ }
+
+ protected Model getModel()
+ {
+ Dataset ds = tdbDatasetAssembler.getDataset() ;
+
+ if ( graphName != null )
+ {
+ Model m = ds.getNamedModel(graphName) ;
+ if ( m == null )
+ throw new CmdException("No such named graph (is this a TDB dataset?)") ;
+ return m ;
+ }
+ else
+ return ds.getDefaultModel() ;
+ }
+
+ public Node getGraphName() { return graphName == null ? null : NodeFactory.createURI(graphName) ; }
+
+ protected GraphTDB getGraph()
+ {
+ if ( graphName != null )
+ return (GraphTDB)tdbDatasetAssembler.getDataset().getNamedModel(graphName).getGraph() ;
+ else
+ return (GraphTDB)tdbDatasetAssembler.getDataset().getDefaultModel().getGraph() ;
+ }
+
+ @Override
+ protected String getCommandName()
+ {
+ return Lib.className(this) ;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/cmdline/ModLocation.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/cmdline/ModLocation.java b/jena-cmds/src/main/java/tdb2/cmdline/ModLocation.java
new file mode 100644
index 0000000..5e48c16
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/cmdline/ModLocation.java
@@ -0,0 +1,55 @@
+/*
+ * 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 tdb2.cmdline;
+
+import jena.cmd.ArgDecl;
+import jena.cmd.CmdArgModule;
+import jena.cmd.CmdGeneral;
+import jena.cmd.ModBase;
+import org.apache.jena.dboe.base.file.Location;
+
+public class ModLocation extends ModBase
+{
+ public ModLocation() {}
+
+ protected final ArgDecl locationDecl = new ArgDecl(ArgDecl.HasValue, "location", "loc") ;
+ protected Location location = null ;
+
+ @Override
+ public void registerWith(CmdGeneral cmdLine)
+ {
+ cmdLine.getUsage().startCategory("Location") ;
+ cmdLine.add(locationDecl, "--loc=DIR", "Location (a directory)") ;
+ }
+
+ public void checkCommandLine(CmdArgModule cmdLine)
+ {}
+
+ @Override
+ public void processArgs(CmdArgModule cmdLine)
+ {
+ if ( cmdLine.contains(locationDecl) )
+ {
+ String dir = cmdLine.getValue(locationDecl) ;
+ location = Location.create(dir) ;
+ }
+ }
+
+ public Location getLocation() { return location ; }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/cmdline/ModModel.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/cmdline/ModModel.java b/jena-cmds/src/main/java/tdb2/cmdline/ModModel.java
new file mode 100644
index 0000000..eca9612
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/cmdline/ModModel.java
@@ -0,0 +1,66 @@
+/*
+ * 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 tdb2.cmdline;
+
+import jena.cmd.ArgDecl;
+import jena.cmd.CmdArgModule;
+import jena.cmd.CmdGeneral;
+import jena.cmd.ModBase;
+
+import org.apache.jena.rdf.model.Model ;
+import org.apache.jena.util.FileManager ;
+
+/** Name a model */
+public class ModModel extends ModBase
+{
+ protected ArgDecl modelArgDecl = null ;
+ private Model model = null ;
+
+ //public ModModel() { this("model") ; }
+ public ModModel(String argName, String ... altNames)
+ {
+ modelArgDecl = new ArgDecl(ArgDecl.HasValue, argName) ;
+ for ( String x : altNames )
+ modelArgDecl.addName(x) ;
+ }
+
+ public ArgDecl getArg()
+ {
+ return modelArgDecl ;
+ }
+
+ @Override
+ public void registerWith(CmdGeneral cmdLine)
+ {
+ cmdLine.add(modelArgDecl, "--"+modelArgDecl.getKeyName()+"=filename", "Filename for a model") ;
+ }
+
+ @Override
+ public void processArgs(CmdArgModule cmdLine)
+ {
+ if ( cmdLine.contains(modelArgDecl) )
+ {
+ String filename = cmdLine.getValue(modelArgDecl) ;
+ model = FileManager.get().loadModel(filename) ;
+ }
+ }
+
+ public Model getModel() { return model ; }
+
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/cmdline/ModTDBAssembler.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/cmdline/ModTDBAssembler.java b/jena-cmds/src/main/java/tdb2/cmdline/ModTDBAssembler.java
new file mode 100644
index 0000000..636a13f
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/cmdline/ModTDBAssembler.java
@@ -0,0 +1,89 @@
+/*
+ * 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 tdb2.cmdline;
+
+import java.io.File;
+
+import jena.cmd.CmdArgModule;
+import jena.cmd.CmdException;
+import jena.cmd.CmdGeneral;
+import org.apache.jena.dboe.base.file.Location;
+import tdb2.cmdline.ModLocation;
+import arq.cmdline.ModAssembler;
+
+/** Extends ModAssembler to include --tdb.
+ * Defaulting to "tdb.ttl" is done in ModTDBDataset because it interacts
+ * with --location
+ */
+public class ModTDBAssembler extends ModAssembler
+{
+ private ModLocation modLocation = new ModLocation() ;
+
+ public static final String defaultAssemblerFile = "tdb.ttl" ;
+ protected boolean useDefaultAssemblerFile = false ;
+
+ public ModTDBAssembler()
+ {
+ super() ;
+ ModAssembler.assemblerDescDecl.addName("tdb") ;
+ }
+
+ @Override
+ public void processArgs(CmdArgModule cmdLine)
+ {
+ int count = 0 ;
+
+ modLocation.processArgs(cmdLine) ;
+ super.processArgs(cmdLine) ;
+ if ( super.getAssemblerFile() != null ) count++ ;
+ if ( modLocation.getLocation() != null ) count++ ;
+
+ if ( count == 0 )
+ {
+ useDefaultAssemblerFile = true ;
+ // throw new CmdException("No assembler file and no location") ;
+ }
+
+ if ( count > 1 )
+ throw new CmdException("Only one of an assembler file and a location") ;
+ }
+
+ @Override
+ public void registerWith(CmdGeneral cmdLine)
+ {
+ super.registerWith(cmdLine) ;
+ cmdLine.addModule(modLocation) ;
+ //cmdLine.getUsage().startCategory("Dataset") ;
+ cmdLine.getUsage().addUsage("--tdb=", "Assembler description file") ;
+ }
+
+ public Location getLocation() { return modLocation.getLocation() ; }
+
+ @Override
+ public String getAssemblerFile()
+ {
+ if ( useDefaultAssemblerFile )
+ {
+ File f = new File(defaultAssemblerFile) ;
+ if ( f.exists() )
+ return defaultAssemblerFile ;
+ }
+ return super.getAssemblerFile() ;
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/cmdline/ModTDBDataset.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/cmdline/ModTDBDataset.java b/jena-cmds/src/main/java/tdb2/cmdline/ModTDBDataset.java
new file mode 100644
index 0000000..3fd82d3
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/cmdline/ModTDBDataset.java
@@ -0,0 +1,138 @@
+/*
+ * 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 tdb2.cmdline;
+
+import java.util.ArrayList ;
+import java.util.List ;
+
+import arq.cmdline.ModDataset ;
+import jena.cmd.ArgDecl;
+import jena.cmd.CmdArgModule;
+import jena.cmd.CmdException;
+import jena.cmd.CmdGeneral;
+import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.dboe.base.file.Location;
+import org.apache.jena.query.* ;
+import org.apache.jena.rdf.model.Model ;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.shared.JenaException ;
+import org.apache.jena.sparql.core.assembler.AssemblerUtils ;
+import org.apache.jena.sparql.core.assembler.DatasetAssemblerVocab ;
+import org.apache.jena.tdb2.TDB2Factory;
+import org.apache.jena.tdb2.assembler.VocabTDB2;
+import org.apache.jena.tdb2.store.DatasetGraphTDB;
+import org.apache.jena.util.FileManager ;
+
+public class ModTDBDataset extends ModDataset
+{
+ // Mixes assembler, location and "tdb"
+ // Can make a single model or a dataset
+
+ private ArgDecl argMem = new ArgDecl(ArgDecl.HasValue, "mem", "data") ;
+ private ModTDBAssembler modAssembler = new ModTDBAssembler() ;
+ private String inMemFile = null ;
+
+ public ModTDBDataset() {}
+
+ @Override
+ public void registerWith(CmdGeneral cmdLine)
+ {
+ cmdLine.add(argMem, "--mem=FILE", "Execute on an in-memory TDB database (for testing)") ;
+ cmdLine.addModule(modAssembler) ;
+ }
+
+ @Override
+ public void processArgs(CmdArgModule cmdLine)
+ {
+ inMemFile = cmdLine.getValue(argMem) ;
+ modAssembler.processArgs(cmdLine) ;
+ }
+
+ @Override
+ public Dataset createDataset() {
+ if ( inMemFile != null ) {
+ Dataset ds = TDB2Factory.createDataset();
+ RDFDataMgr.read(ds, inMemFile);
+ return ds;
+ }
+
+ if ( modAssembler.getAssemblerFile() != null ) {
+ Dataset thing = null;
+ // Two variants: plain dataset with TDB2 dataset or plain building
+ // (which may go wrong later if TDB2 directly is needed).
+ try {
+ thing = (Dataset)AssemblerUtils.build(modAssembler.getAssemblerFile(), VocabTDB2.tDatasetTDB);
+ if ( thing != null && !(thing.asDatasetGraph() instanceof DatasetGraphTDB) )
+ Log.warn(this, "Unexpected: Not a TDB2 dataset for type DatasetTDB2");
+
+ if ( thing == null )
+ // Should use assembler inheritance but how do we assert
+ // the subclass relationship in a program?
+ thing = (Dataset)AssemblerUtils.build(modAssembler.getAssemblerFile(), DatasetAssemblerVocab.tDataset);
+ }
+ catch (JenaException ex) {
+ throw ex;
+ }
+ catch (Exception ex) {
+ throw new CmdException("Error creating", ex);
+ }
+ return thing;
+ }
+
+ if ( modAssembler.getLocation() == null )
+ throw new CmdException("No assembler file nor location provided");
+
+ // No assembler - use location to find a database.
+ Dataset ds = TDB2Factory.connectDataset(modAssembler.getLocation());
+ return ds;
+ }
+
+ public Location getLocation()
+ {
+ List<String> x = locations() ;
+ if ( x.size() == 0 )
+ return null ;
+ return Location.create(x.get(0)) ;
+ }
+
+ public List<String> locations()
+ {
+ List<String> locations = new ArrayList<>() ;
+
+ if ( modAssembler.getLocation() != null )
+ locations.add(modAssembler.getLocation().getDirectoryPath()) ;
+
+ // Extract the location from the assember file.
+ if ( modAssembler.getAssemblerFile() != null )
+ {
+ // Find and clear all locations
+ Model m = FileManager.get().loadModel(modAssembler.getAssemblerFile()) ;
+ Query query = QueryFactory.create("PREFIX tdb: <http://jena.hpl.hp.com/2008/tdb#> SELECT ?dir { [] tdb:location ?dir FILTER (isURI(?dir)) }") ;
+ try(QueryExecution qExec = QueryExecutionFactory.create(query, m)) {
+ for (ResultSet rs = qExec.execSelect() ; rs.hasNext() ; )
+ {
+ String x = rs.nextSolution().getResource("dir").getURI() ;
+ locations.add(x) ;
+ }
+ }
+ }
+
+ return locations ;
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/tdbbackup.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/tdbbackup.java b/jena-cmds/src/main/java/tdb2/tdbbackup.java
new file mode 100644
index 0000000..c0046a8
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/tdbbackup.java
@@ -0,0 +1,55 @@
+/*
+ * 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 tdb2;
+
+import arq.cmdline.ModLangOutput ;
+import org.apache.jena.tdb2.store.DatasetGraphSwitchable;
+import org.apache.jena.tdb2.sys.DatabaseOps;
+import tdb2.cmdline.CmdTDB;
+
+public class tdbbackup extends CmdTDB
+{
+ static ModLangOutput modLangOutput = new ModLangOutput() ;
+
+ static public void main(String... argv)
+ {
+ CmdTDB.init() ;
+ new tdbbackup(argv).mainRun() ;
+ }
+
+ protected tdbbackup(String[] argv)
+ {
+ super(argv) ;
+ addModule(modLangOutput) ;
+ }
+
+ @Override
+ protected String getSummary()
+ {
+ return getCommandName()+" : Backup a TDB dataset" ;
+ }
+
+ @Override
+ protected void exec()
+ {
+ DatasetGraphSwitchable dsg = getDatabaseContainer();
+ String fn = DatabaseOps.backup(dsg);
+ System.out.println("Backup written to "+fn);
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/tdbcompact.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/tdbcompact.java b/jena-cmds/src/main/java/tdb2/tdbcompact.java
new file mode 100644
index 0000000..59f2425
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/tdbcompact.java
@@ -0,0 +1,48 @@
+/*
+ * 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 tdb2;
+
+import org.apache.jena.tdb2.store.DatasetGraphSwitchable;
+import org.apache.jena.tdb2.sys.DatabaseOps;
+import tdb2.cmdline.CmdTDB;
+
+public class tdbcompact extends CmdTDB {
+ static public void main(String... argv) {
+ CmdTDB.init() ;
+ new tdbcompact(argv).mainRun() ;
+ }
+
+ protected tdbcompact(String[] argv) {
+ super(argv) ;
+ }
+
+ @Override
+ protected String getSummary() {
+ return getCommandName() + " : Compact a TDB2 dataset" ;
+ }
+
+ @Override
+ protected void exec() {
+ DatasetGraphSwitchable dsg = getDatabaseContainer() ;
+ long start = System.currentTimeMillis();
+ DatabaseOps.compact(dsg) ;
+ long finish = System.currentTimeMillis();
+ System.out.printf("Compacted in %.3fs", (finish-start)/1000.0);
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/tdbdump.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/tdbdump.java b/jena-cmds/src/main/java/tdb2/tdbdump.java
new file mode 100644
index 0000000..e8bd728
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/tdbdump.java
@@ -0,0 +1,66 @@
+/*
+ * 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 tdb2;
+
+import arq.cmdline.ModLangOutput ;
+import jena.cmd.CmdException ;
+import org.apache.jena.dboe.jenax.Txn;
+import org.apache.jena.riot.RDFDataMgr ;
+import org.apache.jena.riot.RDFFormat ;
+import org.apache.jena.riot.RDFLanguages ;
+import org.apache.jena.sparql.core.DatasetGraph ;
+import tdb2.cmdline.CmdTDB;
+
+public class tdbdump extends CmdTDB
+{
+ static ModLangOutput modLangOutput = new ModLangOutput() ;
+
+ static public void main(String... argv) {
+ CmdTDB.init() ;
+ new tdbdump(argv).mainRun() ;
+ }
+
+ protected tdbdump(String[] argv) {
+ super(argv) ;
+ addModule(modLangOutput) ;
+ }
+
+ @Override
+ protected String getSummary() {
+ return getCommandName() + " : Write a dataset to stdout (defaults to N-Quads)" ;
+ }
+
+ @Override
+ protected void exec() {
+ DatasetGraph dsg = getDatasetGraph() ;
+ // Prefer stream over fully pretty output formats.
+ RDFFormat fmt = modLangOutput.getOutputStreamFormat() ;
+ // Stream writing happens naturally - no need to call StreamRDFWriter.
+ //if ( fmt != null && StreamRDFWriter.registered(fmt) )
+ if ( fmt == null )
+ fmt = modLangOutput.getOutputFormatted() ;
+ if ( fmt == null )
+ // Default.
+ fmt = RDFFormat.NQUADS ;
+ if ( ! RDFLanguages.isQuads(fmt.getLang() ))
+ throw new CmdException("Databases can be dumped only in quad formats (e.g. Trig, N-Quads), not "+fmt.getLang()) ;
+ RDFFormat fmtFinal = fmt ;
+ Txn.executeRead(dsg, ()->RDFDataMgr.write(System.out, dsg, fmtFinal));
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/tdbloader.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/tdbloader.java b/jena-cmds/src/main/java/tdb2/tdbloader.java
new file mode 100644
index 0000000..f31cb70
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/tdbloader.java
@@ -0,0 +1,175 @@
+/*
+ * 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 tdb2 ;
+
+import java.util.List ;
+
+import jena.cmd.ArgDecl;
+import jena.cmd.CmdException;
+import org.apache.jena.atlas.lib.FileOps;
+import org.apache.jena.atlas.lib.NotImplemented;
+import org.apache.jena.atlas.lib.ProgressMonitor;
+import org.apache.jena.graph.Graph;
+import org.apache.jena.query.ARQ ;
+import org.apache.jena.riot.Lang ;
+import org.apache.jena.riot.RDFDataMgr;
+import org.apache.jena.riot.RDFLanguages ;
+import org.apache.jena.riot.system.ProgressStreamRDF;
+import org.apache.jena.riot.system.StreamRDF;
+import org.apache.jena.riot.system.StreamRDFLib;
+import org.apache.jena.sparql.core.DatasetGraph;
+import org.apache.jena.system.Txn;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import tdb2.cmdline.CmdTDB;
+import tdb2.cmdline.CmdTDBGraph;
+
+public class tdbloader extends CmdTDBGraph {
+ // private static final ArgDecl argParallel = new ArgDecl(ArgDecl.NoValue, "parallel") ;
+ // private static final ArgDecl argIncremental = new ArgDecl(ArgDecl.NoValue, "incr", "incremental") ;
+ private static final ArgDecl argNoStats = new ArgDecl(ArgDecl.NoValue, "nostats") ;
+ private static final ArgDecl argStats = new ArgDecl(ArgDecl.HasValue, "stats") ;
+
+ private boolean showProgress = true ;
+ private boolean generateStats = true ;
+
+ static public void main(String... argv) {
+ CmdTDB.init() ;
+ new tdbloader(argv).mainRun() ;
+ }
+
+ protected tdbloader(String[] argv) {
+ super(argv) ;
+ super.add(argNoStats, "--nostats", "Switch off statistics gathering") ;
+ super.add(argStats) ; // Hidden argument
+ }
+
+ @Override
+ protected void processModulesAndArgs() {
+ super.processModulesAndArgs() ;
+ }
+
+ @Override
+ protected String getSummary() {
+ return getCommandName() + " [--desc DATASET | -loc DIR] FILE ..." ;
+ }
+
+ @Override
+ protected void exec() {
+ if ( isVerbose() ) {
+ System.out.println("Java maximum memory: " + Runtime.getRuntime().maxMemory()) ;
+ System.out.println(ARQ.getContext()) ;
+ }
+ if ( isVerbose() )
+ showProgress = true ;
+ if ( isQuiet() )
+ showProgress = false ;
+ if ( super.contains(argStats) ) {
+ if ( ! hasValueOfTrue(argStats) && ! hasValueOfFalse(argStats) )
+ throw new CmdException("Not a boolean value: "+getValue(argStats)) ;
+ generateStats = super.hasValueOfTrue(argStats) ;
+ }
+
+ if ( super.contains(argNoStats))
+ generateStats = false ;
+
+ List<String> urls = getPositional() ;
+ if ( urls.size() == 0 )
+ urls.add("-") ;
+
+ if ( graphName == null ) {
+ loadQuads(urls) ;
+ return ;
+ }
+
+ // There's a --graph.
+ // Check/warn that there are no quads formats mentioned
+ // (RIOT will take the default graph from quads).
+
+ for ( String url : urls ) {
+ Lang lang = RDFLanguages.filenameToLang(url) ;
+ if ( lang != null && RDFLanguages.isQuads(lang) ) {
+ System.err.println("Warning: Quads format given - only the default graph is loaded into the graph for --graph") ;
+ break ;
+ }
+ }
+
+ loadNamedGraph(urls) ;
+ }
+
+// void loadDefaultGraph(List<String> urls) {
+// GraphTDB graph = getGraph() ;
+// TDBLoader.load(graph, urls, showProgress) ;
+// return ;
+// }
+
+ void loadNamedGraph(List<String> urls) {
+ Graph graph = getGraph() ;
+ TDBLoader.load(graph, urls, showProgress) ;
+ return ;
+ }
+
+ void loadQuads(List<String> urls) {
+ TDBLoader.load(getDatasetGraph(), urls, showProgress, generateStats) ;
+ return ;
+ }
+
+ /** Tick point for messages during loading of data */
+ public static int DataTickPoint = 50 * 1000 ;
+ /** Tick point for messages during secondary index creation */
+ public static long IndexTickPoint = 100 * 1000 ;
+
+ /** Number of ticks per super tick */
+ public static int superTick = 10 ;
+
+ private static Logger LOG = LoggerFactory.getLogger("TDB2");
+
+ static class TDBLoader {
+
+ public static void load(DatasetGraph dsg, List<String> urls, boolean showProgress, boolean generateStats) {
+ Txn.executeWrite(dsg, ()->{
+ urls.forEach((x)->loadOne(dsg, x, showProgress));
+ });
+ }
+
+ private static void loadOne(DatasetGraph dsg, String x, boolean showProgress) {
+ StreamRDF dest = StreamRDFLib.dataset(dsg);
+ StreamRDF sink = dest;
+ ProgressMonitor monitor = null;
+ if ( showProgress ) {
+ String basename = FileOps.splitDirFile(x).get(1);
+ monitor = ProgressMonitor.create(LOG, basename, DataTickPoint, superTick);
+ sink = new ProgressStreamRDF(sink, monitor);
+ }
+ if ( monitor!= null )
+ monitor.start();
+ sink.start();
+ RDFDataMgr.parse(sink, x);
+ sink.finish();
+ if ( monitor!= null ) {
+ monitor.finish();
+ monitor.finishMessage();
+ }
+ }
+
+ public static void load(Graph graph, List<String> urls, boolean showProgress) {
+ throw new NotImplemented();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/tdbquery.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/tdbquery.java b/jena-cmds/src/main/java/tdb2/tdbquery.java
new file mode 100644
index 0000000..fffe597
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/tdbquery.java
@@ -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.
+ */
+
+package tdb2;
+
+import arq.query;
+import arq.cmdline.ModDataset;
+import tdb2.cmdline.CmdTDB;
+import tdb2.cmdline.ModTDBDataset;
+
+public class tdbquery extends query {
+ // Inherits from arq.query so is not a CmdTDB. Mixins for Java!
+ public static void main(String... argv) {
+ CmdTDB.init();
+ new tdbquery(argv).mainRun();
+ }
+
+ public tdbquery(String[] argv) {
+ super(argv);
+ }
+
+ @Override
+ protected String getSummary() {
+ return getCommandName() + " --loc=<path> --query=<query>";
+ }
+
+// @Override
+// protected void processModulesAndArgs() {
+// super.processModulesAndArgs();
+// }
+
+ @Override
+ protected ModDataset setModDataset() {
+ return new ModTDBDataset();
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/tdbstats.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/tdbstats.java b/jena-cmds/src/main/java/tdb2/tdbstats.java
new file mode 100644
index 0000000..19797d0
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/tdbstats.java
@@ -0,0 +1,99 @@
+/*
+ * 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 tdb2;
+
+import java.util.Iterator ;
+
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.dboe.jenax.Txn;
+import org.apache.jena.graph.Node ;
+import org.apache.jena.sparql.core.Quad ;
+import org.apache.jena.tdb2.solver.SolverLib;
+import org.apache.jena.tdb2.solver.stats.Stats;
+import org.apache.jena.tdb2.solver.stats.StatsCollectorNodeId;
+import org.apache.jena.tdb2.solver.stats.StatsResults;
+import org.apache.jena.tdb2.store.DatasetGraphTDB;
+import org.apache.jena.tdb2.store.NodeId;
+import org.apache.jena.tdb2.store.nodetable.NodeTable;
+import org.apache.jena.tdb2.store.nodetupletable.NodeTupleTable;
+import org.apache.jena.tdb2.sys.TDBInternal;
+import tdb2.cmdline.CmdTDB;
+import tdb2.cmdline.CmdTDBGraph;
+
+public class tdbstats extends CmdTDBGraph {
+ static public void main(String... argv) {
+ CmdTDB.init();
+ new tdbstats(argv).mainRun();
+ }
+
+ protected tdbstats(String[] argv) {
+ super(argv);
+ }
+
+ @Override
+ protected String getSummary() {
+ return null;
+ }
+
+ public static StatsResults stats(DatasetGraphTDB dsg, Node gn) {
+ return Txn.calculateRead(dsg, ()->stats$(dsg, gn));
+ }
+
+ private static StatsResults stats$(DatasetGraphTDB dsg, Node gn) {
+
+ NodeTable nt = dsg.getTripleTable().getNodeTupleTable().getNodeTable();
+ StatsCollectorNodeId stats = new StatsCollectorNodeId(nt);
+
+ if ( gn == null ) {
+ Iterator<Tuple<NodeId>> iter = dsg.getTripleTable().getNodeTupleTable().findAll();
+ for ( ; iter.hasNext() ; ) {
+ Tuple<NodeId> t = iter.next();
+ stats.record(null, t.get(0), t.get(1), t.get(2));
+ }
+ } else {
+ // If the union graph, then we need to scan all quads but with uniqueness.
+ boolean unionGraph = Quad.isUnionGraph(gn) ;
+ NodeId gnid = null ;
+ if ( !unionGraph ) {
+ gnid = nt.getNodeIdForNode(gn);
+ if ( NodeId.isDoesNotExist(gnid) )
+ Log.warn(tdbstats.class, "No such graph: " + gn);
+ }
+
+ NodeTupleTable ntt = dsg.getQuadTable().getNodeTupleTable();
+ Iterator<Tuple<NodeId>> iter = unionGraph
+ ? SolverLib.unionGraph(ntt)
+ : ntt.find(gnid, null, null, null) ;
+ for ( ; iter.hasNext() ; ) {
+ Tuple<NodeId> t = iter.next();
+ stats.record(t.get(0), t.get(1), t.get(2), t.get(3));
+ }
+ }
+ return stats.results();
+ }
+
+ @Override
+ protected void exec() {
+ DatasetGraphTDB dsg = TDBInternal.getDatasetGraphTDB(getDatasetGraph());
+ Node gn = getGraphName();
+ StatsResults results = stats(dsg, gn);
+ Stats.write(System.out, results);
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/a4fba10b/jena-cmds/src/main/java/tdb2/tdbupdate.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/tdb2/tdbupdate.java b/jena-cmds/src/main/java/tdb2/tdbupdate.java
new file mode 100644
index 0000000..c40c245
--- /dev/null
+++ b/jena-cmds/src/main/java/tdb2/tdbupdate.java
@@ -0,0 +1,56 @@
+/*
+ * 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 tdb2;
+
+import arq.cmdline.ModDataset;
+import jena.cmd.CmdException;
+import org.apache.jena.sparql.core.DatasetGraph;
+import org.apache.jena.tdb2.TDB2;
+import tdb2.cmdline.CmdTDB;
+import tdb2.cmdline.ModTDBDataset;
+
+public class tdbupdate extends arq.update {
+ // Inherits from arq.update so is not a CmdTDB. Mixins for Java!
+ public static void main(String... argv) {
+ CmdTDB.init();
+ new tdbupdate(argv).mainRun();
+ }
+
+ public tdbupdate(String[] argv) {
+ super(argv);
+ // Because this inherits from an ARQ command
+ CmdTDB.init();
+ super.modVersion.addClass(TDB2.class);
+ }
+
+ @Override
+ protected void processModulesAndArgs() {
+ super.processModulesAndArgs();
+ }
+
+ @Override
+ protected ModDataset setModeDataset() {
+ return new ModTDBDataset();
+ }
+
+ @Override
+ protected DatasetGraph dealWithNoDataset() {
+ throw new CmdException("No dataset provided");
+ }
+}