I have imported a graph and can confirm that the number of vertex and edges matches the number that should be present. I run the simplepath() compute on the graph and my first question is how to access the path array or map whatever is returned, i think i understand as i add the .toList and print it to the console however i simply get [] an empty array?
What am i doing wrong i need to access the result set that comes back from the path?
my query which is run in Java not in the gramlin console is:
g.V().has("id", "FirstVertexIdValue").shortestPath().with(ShortestPath.target, __.has("id", "EndVertexIdValue")).with(ShortestPath.distance, "weight").toList();
I also run the following and still return an empty array:
g.V("startVertexId").out().simplePath().until(hasId("endVertexId").path().limit(1);
the response when systemOut printed is []
in addition the graphml doc sample is here, its a pretty big doc so i have just included 2 vertex and 2 edges:
<?xml version='1.0' encoding='utf-8'?>
<graphml xmlns='http://graphml.graphdrawing.org/xmlns' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd'>
<key attr.name='weight' attr.type='double' for='edge' id='weight' />
<key attr.name='edgeid' attr.type='string' for='edge' id='edgeid' />
<key attr.name='alpha' attr.type='string' for='edge' id='alpha' />
<key attr.name='intendedpathlonlat' attr.type='string' for='edge' id='intendedpathlonlat' />
<key attr.name='levelid' attr.type='string' for='edge' id='levelid' />
<key attr.name='type' attr.type='string' for='edge' id='type' />
<key attr.name='relatedroutes' attr.type='string' for='node' id='relatedroutes' />
<key attr.name='description' attr.type='string' for='node' id='description' />
<key attr.name='title' attr.type='string' for='node' id='title' />
<key attr.name='on_finish_route' attr.type='string' for='node' id='on_finish_route' />
<key attr.name='on_starting_route' attr.type='string' for='node' id='on_starting_route' />
<key attr.name='level_id' attr.type='string' for='node' id='level_id' />
<key attr.name='waypoint_type' attr.type='string' for='node' id='waypoint_type' />
<key attr.name='name' attr.type='string' for='node' id='name' />
<key attr.name='lon' attr.type='string' for='node' id='lon' />
<key attr.name='lat' attr.type='string' for='node' id='lat' />
<graph edgedefault='directed' id='Station'>
<node id='L08-022'>
<data key='lat'>40.69330963</data>
<data key='lon'>-73.98752537</data>
<data key='name' />
<data key='waypoint_type'>escalator</data>
<data key='level_id'>1080000</data>
<data key='on_starting_route' />
<data key='on_finish_route' />
</node>
<node id='L08-023'>
<data key='lat'>40.69318355</data>
<data key='lon'>-73.98755793</data>
<data key='name' />
<data key='waypoint_type'>stairs</data>
<data key='level_id'>1080000</data>
<data key='on_starting_route' />
<data key='on_finish_route' />
</node>
<edge source='WL10-054' target='L10-029'>
<data key='type'>floor</data>
<data key='weight'>4.22</data>
<data key='levelid'>1100000</data>
<data key='intendedpathlonlat'></data>
<data key='alpha'>0.0</data>
<data key='edgeid'>RL10-059</data>
</edge>
<edge source='WL10-054' target='WL10-053'>
<data key='type'>floor</data>
<data key='weight'>5.69</data>
<data key='levelid'>1100000</data>
<data key='intendedpathlonlat'></data>
<data key='alpha'>0.0</data>
<data key='edgeid'>RL10-060</data>
</edge>
</graph>
</graphml>
A sample of the queries tried:
gremlin> g.V().has('T.id', 'L00-041').shortestPath().with(ShortestPath.target, __.has('T.id', 'L04-070')).with(ShortestPath.distance, 'weight').toList()
gremlin> g.V().has('T.id', 'L04-070').out().values('waypoint_type').fold()
==>[]
gremlin> g.V().has('T.id', 'L04-070').out().fold()
==>[]
gremlin> g.V().has('T.id', 'L04-070').out().values('lat').fold()