protected static void printAndInterpretTemplateLines( Collection<String> templateLines, boolean newLineBetweenHits, NodeOrRelationship entity, GraphDatabaseShellServer server, Session session, Output out ) throws ShellException, RemoteException { if ( templateLines.isEmpty() ) { out.println( getDisplayName( server, session, entity, true ) ); } if ( !templateLines.isEmpty() ) { Map<String, Object> data = new HashMap<>(); data.put( "i", entity.getId() ); for ( String command : templateLines ) { String line = TextUtil.templateString( command, data ); server.interpretLine( session.getId(), line, out ); } } if ( newLineBetweenHits ) { out.println(); } }