@Override public String process(Object... values) throws IOException { BlankNodeOrIRI resource = (BlankNodeOrIRI) values[0]; GraphNode graphNode = new GraphNode(resource, graph); String mode = null; if (values.length > 1) { mode = (String) values[1]; } ByteArrayOutputStream out = new ByteArrayOutputStream(); callbackRenderer.render(graphNode, context, mode, out); try { return new String(out.toByteArray(), "utf-8"); } catch (UnsupportedEncodingException ex) { throw new RuntimeException(ex); } } }