ByteArrayOutputStream stream = new ByteArrayOutputStream();
if (mediaType.equals("application/rdf+xml")) {
t.write(stream);
} else if (mediaType.equals("application/turtle")) {
// t.write(stream, "TURTLE");
RDFWriter writer = t.getWriter("TURTLE");
log.debug("Writer for TURTLE: {}", writer);
writer.write(t, stream, null);
} else if (mediaType.equals("text/turtle")) {
t.write(stream, "TURTLE");
} else if (mediaType.equals("text/plain")) {
t.write(stream, "TURTLE");
} else if (mediaType.equals("text/n3")) {