Examples of ProgressReporter


Examples of org.neo4j.shell.tools.imp.util.ProgressReporter

    }

    @Test
    public void testExportTinyGraphWithKeys() throws Exception {
        createData(1);
        ProgressReporter reporter = new ProgressReporter(null, null);
        String xml = doExport(reporter,true);
        assertEquals(new ElementCounter().update(1, 1, 2), reporter.getTotal());
        assertEquals(TEST_XML_HEADER+TEST_XML_KEYS+TEST_XML_DATA+TEST_XML_FOOTER,xml);
    }
View Full Code Here

Examples of org.neo4j.shell.tools.imp.util.ProgressReporter

    public Continuation execute(AppCommandParser parser, Session session, Output out) throws Exception {
        String fileName = parser.option("i", null);
        Config config = Config.fromOptions(parser);
        CountingReader reader = FileUtils.readerFor(fileName);
        if (reader!=null) {
            int count = execute(reader, new ProgressReporter(reader, out), config);
            out.println("Geoff import of "+fileName+" created "+count+" entities.");
        }
        if (reader!=null) reader.close();
        return Continuation.INPUT_COMPLETE;
    }
View Full Code Here

Examples of org.neo4j.shell.tools.imp.util.ProgressReporter

        String fileName = parser.option("o", null);
        boolean relsBetween = parser.options().containsKey("r");
        BufferedWriter writer = new BufferedWriter(new FileWriter(fileName));

        ProgressReporter reporter = new ProgressReporter(null, out);

        GraphDatabaseService db = getServer().getDb();

        Format exportFormat = new XmlGraphMLFormat(db);
        String query = Config.extractQuery(parser);
        SubGraph graph = query.isEmpty() ? new DatabaseSubGraph(db) : cypherResultSubGraph(query,relsBetween);
        exportFormat.dump(graph, writer, reporter, config);
        writer.close();
        reporter.progress("Wrote to GraphML-file " + fileName);
        return Continuation.INPUT_COMPLETE;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.