1 5 6 package jena; 7 import jena.cmdline.* ; 8 9 25 26 public class dbdump extends DBcmd 27 { 28 public static final String [] usage = new String [] 29 { 30 "dbdump [--spec spec] | [db_description] [--model name] [--format syntax]" , 31 " where db_description is" , 32 " --db JDBC URL --dbType type" , 33 " --dbUser user --dbPassword password" 34 } ; 35 36 static ArgDecl argDeclFormat = new ArgDecl(true, "format","fmt") ; 37 38 public static void main(String [] args) 39 { 40 dbdump db = new dbdump(); 41 db.setUsage(usage) ; 42 db.cmdLine.add(argDeclFormat) ; 43 44 db.init(args); 46 48 db.exec(); 50 } 51 52 String filename = null ; 53 54 public dbdump() 55 { 56 super("dbdump", false); 57 } 58 59 void exec0() 60 { 61 String syntax = "N-TRIPLES" ; 63 if ( cmdLine.contains(argDeclFormat) ) 64 syntax = cmdLine.getArg(argDeclFormat).getValue() ; 65 if ( debug ) 66 System.out.println("Debug: syntax is "+syntax) ; 67 68 try { 69 getRDBModel().write(System.out, syntax) ; 70 } catch (Exception ex) 71 { 72 System.err.println("Exception: "+ex+" :: "+ex.getMessage()) ; 73 ex.printStackTrace(System.out) ; 74 } 75 76 } 77 78 boolean exec1(String arg) { return false ; } 79 } 80 81 82 83 109 | Popular Tags |