Examples of XmlGraphMLReader


Examples of org.neo4j.shell.tools.imp.format.graphml.XmlGraphMLReader

    private GraphDatabaseService gdb;

    @Before
    public void setUp() throws Exception {
        gdb = new TestGraphDatabaseFactory().newImpermanentDatabase();
        graphMLReader = new XmlGraphMLReader(gdb).storeNodeIds();
    }
View Full Code Here

Examples of org.neo4j.shell.tools.imp.format.graphml.XmlGraphMLReader

                .setConfig(GraphDatabaseSettings.strings_mapped_memory_size,String.valueOf(100*MEGABYTE))
                .setConfig(GraphDatabaseSettings.keep_logical_logs, "false")
                .newGraphDatabase();

        reader = new CountingReader(graphMlFile);
        graphMlReader = new XmlGraphMLReader(db).reporter(new ProgressReporter(reader,new SystemOutput()));
    }
View Full Code Here

Examples of org.neo4j.shell.tools.imp.format.graphml.XmlGraphMLReader

    private long execute(CountingReader reader, int batchSize, String relType, boolean diskSpillCache, boolean readLabels, Output out) throws XMLStreamException, IOException {
        try {
            GraphDatabaseAPI db = getServer().getDb();
            ProgressReporter reporter = new ProgressReporter(reader, out);
            XmlGraphMLReader graphMLReader = new XmlGraphMLReader(db)
                    .batchSize(batchSize).relType(relType)
                    .nodeLabels(readLabels)
                    .reporter(reporter);
            NodeCache cache = diskSpillCache ? MapNodeCache.usingMapDb() : MapNodeCache.usingHashMap();
            return graphMLReader.parseXML(reader, cache);
        } finally {
            reader.close();
        }
    }
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.