Map<String, Object> params = new HashMap<String, Object>();
params.put( "node", author );
//ExecutionResult result = engine.execute( "start n=node({node}) return n.name", params );
String query = "START author=node({node}) MATCH author-[:"+DBRelationshipTypes.WRITTEN_BY.name()+"]-()-[:"+DBRelationshipTypes.WRITTEN_BY.name()+"]- coAuthor RETURN coAuthor";
ExecutionResult result = engine.execute( query, params);
scala.collection.Iterator<Node> it = result.columnAs("coAuthor");
while (it.hasNext()){
Node coAuthor = it.next();
resCnt++;
}