contentType = WebContent.contentTypeTextPlain ;
charset = WebContent.charsetUTF8 ;
}
Lang lang = FusekiLib.langFromContentType(ts.getMediaType()) ;
RDFWriter rdfw = FusekiLib.chooseWriter(lang) ;
if ( rdfw instanceof RDFXMLWriterI )
rdfw.setProperty("showXmlDeclaration", "true") ;
// // Write locally to check it's possible.
// // Time/space tradeoff.
// try {
// OutputStream out = new NullOutputStream() ;
// rdfw.write(model, out, null) ;
// IO.flush(out) ;
// } catch (JenaException ex)
// {
// SPARQL_ServletBase.errorOccurred(ex) ;
// }
// Managed to write it locally
try {
ResponseResultSet.setHttpResponse(request, response, contentType, charset) ;
response.setStatus(HttpSC.OK_200) ;
rdfw.write(model, response.getOutputStream(), null) ;
response.getOutputStream().flush() ;
}
catch (Exception ex) { SPARQL_ServletBase.errorOccurred(ex) ; }
}