@SuppressWarnings("unchecked")
public void render(Map model, HttpServletRequest request, HttpServletResponse response)
throws IOException
{
RDFWriterFactory rdfWriterFactory = (RDFWriterFactory)model.get(FACTORY_KEY);
RDFFormat rdfFormat = rdfWriterFactory.getRDFFormat();
response.setStatus(SC_OK);
setContentType(response, rdfFormat);
setContentDisposition(model, response, rdfFormat);
OutputStream out = response.getOutputStream();
try {
RDFWriter rdfWriter = rdfWriterFactory.getWriter(out);
GraphQueryResult graphQueryResult = (GraphQueryResult)model.get(QUERY_RESULT_KEY);
QueryResultUtil.report(graphQueryResult, rdfWriter);
}
catch (QueryEvaluationException e) {
logger.error("Query evaluation error", e);