use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class FormatterElement method asString.
public static String asString(Element el) {
SerializationContext cxt = new SerializationContext();
IndentedLineBuffer b = new IndentedLineBuffer();
FormatterElement.format(b, cxt, el);
return b.toString();
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class FmtTemplate method asString.
public static String asString(Template template) {
SerializationContext cxt = new SerializationContext();
IndentedLineBuffer b = new IndentedLineBuffer();
FmtTemplate.format(b, cxt, template);
return b.toString();
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class SPARQL_Query method formatForLog.
private String formatForLog(Query query) {
IndentedLineBuffer out = new IndentedLineBuffer();
out.setFlatMode(true);
query.serialize(out);
return out.asString();
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class JSON method toStringFlat.
/** JsonValue to a string with no newlines */
public static String toStringFlat(JsonValue jValue) {
try (IndentedLineBuffer b = new IndentedLineBuffer()) {
b.setFlatMode(true);
JSON.write(b, jValue);
return b.asString();
}
}
use of org.apache.jena.atlas.io.IndentedLineBuffer in project jena by apache.
the class JsonValue method toString.
@Override
public String toString() {
IndentedLineBuffer buff = new IndentedLineBuffer();
output(buff);
return buff.asString();
}
Aggregations