Load the graph (or a part of it).

Do not reset the graph.

Property definitions

neo4j $ GraphStore :: load
	# Load the graph (or a part of it).
	#
	# Do not reset the graph.
	fun load is abstract
lib/neo4j/graph/graph.nit:167,2--170,21

neo4j $ Neo4jGraphStore :: load
	redef fun load do
		assert batch_max_size > 0
		fire_started
		var db_nodes = client.nodes_with_label(node_label)
		var nodes = graph.nodes
		var edges = graph.edges
		var i = 0

		total = nodes.length * 2
		done_part = nodes.length
		fire_progressed(done_part, total)
		for node in db_nodes do
			nodes.add(node)
			edges.add_all(node.out_edges)
			i += 1
			if i >= batch_max_size then
				done_part += batch_max_size
				fire_progressed(done_part, total)
			end
		end
		fire_done
	end
lib/neo4j/graph/graph.nit:215,2--236,4

neo4j $ JsonGraphStore :: load
	redef fun load do
		var istream = self.istream
		assert istream isa Reader
		fire_started
		graph.load_json(istream.read_all)
		fire_done
	end
lib/neo4j/graph/json_graph_store.nit:96,2--102,4