Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. sg = g.V().has('country', 'US').has('region',without('US-HI', 'US-AL')).outE('route').where(inV().has('region',without('US-HI', 'US-AL')).has('country', 'US')).subgraph('us').cap('us').next()
  2. file = new FileOutputStream("/tmp/airroutes_us.json")
  3. mapper = GraphSONMapper.build().addCustomModule(org.janusgraph.graphdb.tinkerpop.io.graphson.JanusGraphSONModuleV2d0.getInstance()).create()
  4. writer = GraphSONWriter.build().mapper(mapper).create()
  5. writer.writeGraph(file, sg)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement