Closed dustine32 closed 4 years ago
Uhhh looks scary. Maybe also make a ticket here: https://github.com/geneontology/obographs
Since that is the framework that actually causes the problem.. maybe @julesjacobsen has an idea..
The method OgJsonGenerator.prettyJsonString
will try and write the whole thing as a single String object. You might want to try streaming the output, e.g.
GraphDocument graphDocument = the input ontology
writer.writeValue(Files.newOutputStream(Paths.get("lego.json")), graphDocument);
@julesjacobsen Thanks for the quick response! Is this change something to be made in robot or should I make a ticket in obographs?
Ideally both - obographs should have a method accepting a buffered writer and robot ought to use it. However robot could implement it all internally as obographs is simply providing a very thin convenience wrapper around Jackson.
My preference is for obographs to implement a buffered solution and ROBOT will use it. But if somebody wants to write a PR for ROBOT that solves the problem directly, that should be fine.
Since I just needed the go-lego.json
file for dev, I quickly hacked in @julesjacobsen's suggestion and generated the file along with PRing my change. Feel free to merge or trash as you wish as I'm currently happy. Thanks!
Hey @jamesaoverton , do you know when this change is scheduled to make it into a ROBOT release?
That fix has been merged into master
, and you can download a JAR for the latest master
here:
It will be included in the next release, v1.7.0. I hope to make that release soon, but we don't have a fixed schedule. It mostly depends on feedback about the new export
command in this email thread.
Great thanks @jamesaoverton !
Hi!
I'm trying to use robot (release v1.6.0) to convert go-lego.owl (1.6G file) to go-lego.json but it fails about 5min in with this:
Could this be due to a limit on the input string size? @kltm pointed to https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/StringUTF16.java#L50
Thanks!