jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [6/8] jena git commit: Deal cleanly with no datasets provide - devolve to individual commands.
Date Thu, 27 Aug 2015 11:46:19 GMT
Deal cleanly with no datasets provide - devolve to individual commands.

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

Branch: refs/heads/master
Commit: b8aba8b1c88b3784eb6d9e704f1b622f29e38d71
Parents: 5c9092d
Author: Andy Seaborne <andy@apache.org>
Authored: Tue Aug 25 12:31:49 2015 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Tue Aug 25 12:31:49 2015 +0100

----------------------------------------------------------------------
 jena-tdb/src/main/java/tdb/tdbupdate.java | 35 ++++++++++++++++++--------
 1 file changed, 24 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/b8aba8b1/jena-tdb/src/main/java/tdb/tdbupdate.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/tdb/tdbupdate.java b/jena-tdb/src/main/java/tdb/tdbupdate.java
index 2d25620..464ec2e 100644
--- a/jena-tdb/src/main/java/tdb/tdbupdate.java
+++ b/jena-tdb/src/main/java/tdb/tdbupdate.java
@@ -18,31 +18,44 @@
 
 package tdb;
 
+import arq.cmdline.ModDataset ;
+import jena.cmd.CmdException ;
+import org.apache.jena.sparql.core.DatasetGraph ;
 import org.apache.jena.tdb.TDB ;
 import org.apache.jena.tdb.transaction.TransactionManager ;
 import tdb.cmdline.CmdTDB ;
+import tdb.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() ;
+ {
+        CmdTDB.init();
         // Do everything with flushing transactions.
-        TransactionManager.QueueBatchSize = 0 ;
-        new tdbupdate(argv).mainRun() ;
+        TransactionManager.QueueBatchSize = 0;
+        new tdbupdate(argv).mainRun();
     }
-    
-    public tdbupdate(String[] argv) 
-    {
-        super(argv) ;
+
+    public tdbupdate(String[] argv) {
+        super(argv);
         // Because this inherits from an ARQ command
-        CmdTDB.init() ;
-        super.modVersion.addClass(TDB.class) ;
+        CmdTDB.init();
+        super.modVersion.addClass(TDB.class);
     }
 
     @Override
     protected void processModulesAndArgs() {
-        super.processModulesAndArgs() ;
+        super.processModulesAndArgs();
+    }
+
+    @Override
+    protected ModDataset setModeDataset() {
+        return new ModTDBDataset();
+    }
+    
+    @Override
+    protected DatasetGraph dealWithNoDataset() {
+        throw new CmdException("No dataset provided") ;
     }
 }


Mime
View raw message