static String getResultInNTriples(Log log, TriplesIterator it) throws AllegroGraphException {
StringWriter sw = new StringWriter();
PrintWriter out = new PrintWriter(sw);
while ( it.hasNext() ) {
Triple triple = it.next();
String objLab = triple.getObjectLabel();
ValueNode obj = triple.getObject();
boolean objIsUri = obj instanceof ResourceNode;
objLab = objIsUri ? '<' +objLab+ '>' : '"' +objLab+ '"';
out.printf("<%s> <%s> %s%n", triple.getSubjectLabel(), triple.getPredicateLabel(), objLab);
}
return sw.toString();
}