comparison src/de/mpiwg/itgroup/nimanager/importer/Import.java @ 1:b8333fab0d95

minor bugs
author dwinter
date Thu, 30 Jun 2011 12:43:35 +0200
parents 1384a0d382fa
children e3ecb88314a5
comparison
equal deleted inserted replaced
0:1384a0d382fa 1:b8333fab0d95
50 50
51 public Import(MetaDataHandler mh, TripleStoreHandler th, String offset, 51 public Import(MetaDataHandler mh, TripleStoreHandler th, String offset,
52 String limit) throws SQLException, ClassNotFoundException { 52 String limit) throws SQLException, ClassNotFoundException {
53 this.mh = mh; 53 this.mh = mh;
54 this.th = th; 54 this.th = th;
55 // Class.forName("virtuoso.jdbc4.Driver");
56 // String
57 // connectString="jdbc:virtuoso://virtuoso.mpiwg-berlin.mpg.de:1111/charset=UTF-8";
58 // this.con =
59 // DriverManager.getConnection(connectString,"dwinter","weikiki7");
60 this.offset = offset; 55 this.offset = offset;
61 this.limit = limit; 56 this.limit = limit;
62 57
63 } 58 }
64 59
431 return dbcreation; 426 return dbcreation;
432 427
433 } 428 }
434 429
435 public static void main(String args[]) throws Exception { 430 public static void main(String args[]) throws Exception {
436 if (args.length < 2) { 431 if (args.length < 4) {
437 System.out.println("usage: import offset limit"); 432 System.out.println("usage: import user pw offset limit ");
438 System.exit(1); 433 System.exit(1);
439 } 434 }
440 435
441 Logger.getRootLogger().setLevel(Level.INFO); 436 Logger.getRootLogger().setLevel(Level.INFO);
442 BasicConfigurator.configure(); 437 BasicConfigurator.configure();
443 438
444 MetaDataHandler mh = new MetaDataHandler(); 439 MetaDataHandler mh = new MetaDataHandler();
445 440
446 TripleStoreHandler th = new TripleStoreHandler( 441 TripleStoreHandler th = new TripleStoreHandler(
447 "jdbc:virtuoso://virtuoso.mpiwg-berlin.mpg.de:1111", "dba", 442 "jdbc:virtuoso://virtuoso.mpiwg-berlin.mpg.de:1111",args[0], args[1]);
448 "wa55er");
449 System.out.println(mh); 443 System.out.println(mh);
450 System.out.println(th); 444 System.out.println(th);
451 445
452 Import imp = new Import(mh, th, args[0], args[1]); 446 Import imp = new Import(mh, th, args[2], args[3]);
453 447
454 HashMap<String, String> mapping = new HashMap<String, String>(); 448 HashMap<String, String> mapping = new HashMap<String, String>();
455 mapping.put("http://xmlns.com/foaf/0.1/surname", 449 mapping.put("http://xmlns.com/foaf/0.1/surname",
456 "http://xmlns.com/foaf/0.1/lastName"); 450 "http://xmlns.com/foaf/0.1/lastName");
457 mapping.put("http://xmlns.com/foaf/0.1/givenName", 451 mapping.put("http://xmlns.com/foaf/0.1/givenName",