Since you already have identifiers, you can get the identifiers and their fwd relationships in pieces (out of 5) with cypher, the csv delimiter is '|'
To test the use of neo4j-shell Syntax: neo4j-shell <infile> outfile
infile for node looks like
START n=node(1,2,3,4,5) return ID(n),n.name?,n.property?; START n=node(6,7,8,9,10) return ID(n),n.name?,n.property?; ....
infile for reln looks like
START n=node(1,2,3,4,5) MATCH n-[r]->m RETURN ID(n),ID(m),TYPE(r),r.someprop?; START n=node(6,7,8,9,10) MATCH n-[r]->m RETURN ID(n),ID(m),TYPE(r),r.someprop?; ....
To do the same in the Java API, just run it in a for loop.