# HG changeset patch # User dwinter # Date 1309430615 -7200 # Node ID b8333fab0d95d72db9a006f2d71182618982b90b # Parent 1384a0d382fa9e07e6ce4542ed6e08ed4c1a30d6 minor bugs diff -r 1384a0d382fa -r b8333fab0d95 src/de/mpiwg/itgroup/nimanager/importer/Import.java --- a/src/de/mpiwg/itgroup/nimanager/importer/Import.java Thu Jun 30 11:44:24 2011 +0200 +++ b/src/de/mpiwg/itgroup/nimanager/importer/Import.java Thu Jun 30 12:43:35 2011 +0200 @@ -52,11 +52,6 @@ String limit) throws SQLException, ClassNotFoundException { this.mh = mh; this.th = th; - // Class.forName("virtuoso.jdbc4.Driver"); - // String - // connectString="jdbc:virtuoso://virtuoso.mpiwg-berlin.mpg.de:1111/charset=UTF-8"; - // this.con = - // DriverManager.getConnection(connectString,"dwinter","weikiki7"); this.offset = offset; this.limit = limit; @@ -433,8 +428,8 @@ } public static void main(String args[]) throws Exception { - if (args.length < 2) { - System.out.println("usage: import offset limit"); + if (args.length < 4) { + System.out.println("usage: import user pw offset limit "); System.exit(1); } @@ -444,12 +439,11 @@ MetaDataHandler mh = new MetaDataHandler(); TripleStoreHandler th = new TripleStoreHandler( - "jdbc:virtuoso://virtuoso.mpiwg-berlin.mpg.de:1111", "dba", - "wa55er"); + "jdbc:virtuoso://virtuoso.mpiwg-berlin.mpg.de:1111",args[0], args[1]); System.out.println(mh); System.out.println(th); - Import imp = new Import(mh, th, args[0], args[1]); + Import imp = new Import(mh, th, args[2], args[3]); HashMap mapping = new HashMap(); mapping.put("http://xmlns.com/foaf/0.1/surname", diff -r 1384a0d382fa -r b8333fab0d95 src/de/mpiwg/itgroup/nimanager/luceneIndices/Importer.java --- a/src/de/mpiwg/itgroup/nimanager/luceneIndices/Importer.java Thu Jun 30 11:44:24 2011 +0200 +++ b/src/de/mpiwg/itgroup/nimanager/luceneIndices/Importer.java Thu Jun 30 12:43:35 2011 +0200 @@ -116,7 +116,11 @@ static public void importFromMPIWG_persons(String args[]) throws IOException, RepositoryException, TripleStoreHandlerException{ Logger.getRootLogger().setLevel(Level.DEBUG); BasicConfigurator.configure(); - TripleStoreHandler th = new TripleStoreHandler("jdbc:virtuoso://virtuoso.mpiwg-berlin.mpg.de:1111", "dba", "wa55er"); + if (args.length < 2) { + System.out.println("usage: import user pw offset limit "); + System.exit(1); + } + TripleStoreHandler th = new TripleStoreHandler("jdbc:virtuoso://virtuoso.mpiwg-berlin.mpg.de:1111",args[0], args[1]); String[] indexFields=new String[]{"http://xmlns.com/foaf/0.1/name","http://xmlns.com/foaf/0.1/lastName","http://xmlns.com/foaf/0.1/firstName"};