public static void executeQuery(Prologue prologue, QueryExecution queryExecution, ResultsFormat outputFormat) {
Query query = queryExecution.getQuery() ;
if ( prologue == null )
prologue = query.getPrologue() ;
if ( prologue == null )
prologue = dftPrologue ;
if ( query.isSelectType() )
doSelectQuery(prologue, queryExecution, outputFormat) ;
else if ( query.isDescribeType() )
doDescribeQuery(prologue, queryExecution, outputFormat) ;
else if ( query.isConstructQuad() )
doConstructQuadsQuery(prologue, queryExecution, outputFormat) ;
else if ( query.isConstructType() )
doConstructQuery(prologue, queryExecution, outputFormat) ;
else if ( query.isAskType() )
doAskQuery(prologue, queryExecution, outputFormat) ;
else if ( query.isJsonType() )
doJsonQuery(prologue, queryExecution, outputFormat) ;
else
throw new QueryException("Unrecognized query form");
}