} else {
acceptedTypes = MarmottaHttpUtils.parseAcceptHeader(request.getHeader("Accept"));
}
ContentType _bestType = null;
RDFFormat _format = null;
for (ContentType ct : acceptedTypes) {
final RDFFormat f = Rio.getWriterFormatForMIMEType(ct.getMime());
if (f != null) {
_bestType = ct;
_format = f;
break;
}
}
if (_bestType == null || _format == null) {
// FIXME: todo
return Response.status(Status.BAD_REQUEST).entity("Could not determine Format").build();
}
final RDFFormat format = _format;
final ContentType returnType = _bestType;
final StreamingOutput entity = new StreamingOutput() {
@Override
public void write(OutputStream outputStream) throws IOException,