Mercurial > hg > NamedIdentityManager
changeset 1:b8333fab0d95
minor bugs
author | dwinter |
---|---|
date | Thu, 30 Jun 2011 12:43:35 +0200 |
parents | 1384a0d382fa |
children | e3ecb88314a5 |
files | src/de/mpiwg/itgroup/nimanager/importer/Import.java src/de/mpiwg/itgroup/nimanager/luceneIndices/Importer.java |
diffstat | 2 files changed, 9 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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<String, String> mapping = new HashMap<String, String>(); mapping.put("http://xmlns.com/foaf/0.1/surname",
--- 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"};