Package de.zib.scalaris.examples.wikipedia.data.xml.WikiDumpHandler

Examples of de.zib.scalaris.examples.wikipedia.data.xml.WikiDumpHandler.ReportAtShutDown


            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);
View Full Code Here


     */
    static void runXmlHandler(WikiDumpHandler handler, InputSource file)
            throws SAXException, IOException {
        XMLReader reader = XMLReaderFactory.createXMLReader();
        handler.setUp();
        ReportAtShutDown shutdownHook = handler.new ReportAtShutDown();
        Runtime.getRuntime().addShutdownHook(shutdownHook);
        reader.setContentHandler(handler);
        reader.parse(file);
        handler.tearDown();
        shutdownHook.run();
        Runtime.getRuntime().removeShutdownHook(shutdownHook);
    }
View Full Code Here

TOP

Related Classes of de.zib.scalaris.examples.wikipedia.data.xml.WikiDumpHandler.ReportAtShutDown

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.