assertNotNull(channel);
trackingService.attachServiceChannel(emergency.getId(), channel.getId());
CypherParser parser = new CypherParser();
ExecutionEngine engine = new ExecutionEngine(trackingService.getGraphDb());
//Give me all the vehicle associated with the procedures that are part of the emergency that was created by this phoneCallId
Query query = parser.parse("start n=(calls, 'callId:" + call.getId() + "') match (n)-[r:CREATES]->(x)-[i:INSTANTIATE]-> (w) -[u:USE]->v return v");
ExecutionResult result = engine.execute(query);
Iterator<Node> n_column = result.columnAs("v");
System.out.println("results: " + result);
assertEquals(2, result.size());
while (n_column.hasNext()) {
Node currentNode = n_column.next();
for (String key : currentNode.getPropertyKeys()) {
System.out.println("Property (" + key + "): " + currentNode.getProperty(key));
}
}
query = parser.parse("start v=(vehicles, 'vehicleId:" + vehicle.getId() + "') match (v) <-[USE]- (w) return w");
//query = parser.parse("start s=(procedures, 'procedureId:" + procedure.getId() + "') match (s) <-[SUB]- (p) return p");
result = engine.execute(query);
n_column = result.columnAs("w");