outputFormat = RDFFormat.SPARQL;
mediaType = new MediaType("application", "sparql-results+xml");
} else {
throw new IllegalArgumentException("unknown format: " + format);
}
it.toStream(out, outputFormat);
return Response.ok(out.toString("UTF-8"), mediaType).build();
} catch (ServerException e) {
return handleException(e, flash);
} catch (TrippiException e) {
return handleException(e, flash);