if (filename.endsWith(".db")) {
WikiDumpHandler.println(System.out, "wiki import from " + filename);
WikiDumpPreparedSQLiteToScalaris handler =
new WikiDumpPreparedSQLiteToScalaris(filename);
handler.setUp();
WikiDumpPreparedSQLiteToScalaris.ReportAtShutDown shutdownHook = handler.new ReportAtShutDown();
Runtime.getRuntime().addShutdownHook(shutdownHook);
handler.writeToScalaris();
handler.tearDown();
shutdownHook.run();
Runtime.getRuntime().removeShutdownHook(shutdownHook);
} else {
WikiDumpHandler.println(System.out, "wiki import from " + filename);
WikiDumpHandler.println(System.out, " white list : " + whitelistFile);
WikiDumpHandler.println(System.out, " max revisions : " + maxRevisions);