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();
}
}