Closed pablopareja closed 10 years ago
Sure you can use that library, just keep in mind that you will have to use the GraphSONUtility and implement yourself at least part of the logic to export a query to JSON. (we're obviously not exporting the whole DB :smiley: )
The model you mention represents the data types together with their properties, not the data itself of specific instances from specific types that would be the result of a given Gremlin query.
oh.. I was writing almost the same reply! ")
:smile: :stuck_out_tongue:
What's the difference between a Jettison and a Jackson? Which should I use?
They are two different APIs/libraries with similar characteristics, use the one you feel more comfortable with.
Don't choose it randomly, take a look at the first 3 links from the google search "Jettison vs Jackson", it may give you some clues how to chose it for the purposes of the project:
Why not to make a list of pros and cons for the two? And then maybe the choice will be obvious. If not, we'll decide it together :wink:
Jettison
Jackson
From what I've gathered, Jackson seems the obvious choice, do you agree?
absolutely agree! well done :+1:
Ok, imagine that a query iterates a bunch of vertices, using GraphSONUtility I'll just print each one of those vertices into the output file?
well, if the query result is multiple vertices, I guess, the output should be a JSON array of the serialized vertices.
Ok, so I've tested exporting to GraphSON and it worked. I used a simple query using our DSL on the classic TinkerGraph to test it, here's the commit: https://github.com/bio4j/exporter/commit/06f613726d4ab86e9ba738d49db51f7581f85ce5
As GraphML is a specification for the serialization of an entire graph and not the individual elements of a graph, methods that support input and output of single vertices and edges are not supported. I'll have to add the vertices/edges to a graph and export the whole graph. Source
Hey @andre-nunes
Did you already get to work on how to export the results to either XML or JSON? This part of the project is independent from the steps/DSL definition or CLI implementation Do you have a preliminary idea on how you're going to do it? Let me know if you have any question about this :wink: