class RestUtils {

    public static String modelToString(Model model, RDFFormat format, SesameTransformer transformer) {
        long start = System.currentTimeMillis();
        try {
            StringWriter sw = new StringWriter();
            Rio.write(new StatementIterable(model, transformer), sw, format);
            return sw.toString();
        } finally {
            LOG.trace("modelToString took {}ms", System.currentTimeMillis() - start);
        }
    }

}