use of org.apache.jena.riot.out.quoted.QuotedStringOutput in project jena by apache.
the class NodeFormatterTTL_MultiLine method writeLexicalMultiLine.
/**
* Output a string and run the Runnable at the same indentation level
*/
private void writeLexicalMultiLine(AWriter writer, String str, Runnable action) {
QuotedStringOutput escapeProc = chooseEscapeProcessor(str);
int indent = -1;
IndentedWriter iw = null;
if (writer instanceof IndentedWriter) {
iw = (IndentedWriter) writer;
iw.pad();
indent = iw.getAbsoluteIndent();
iw.setAbsoluteIndent(0);
}
escapeProc.writeStrMultiLine(writer, str);
if (action != null)
action.run();
if (indent >= 0)
iw.setAbsoluteIndent(indent);
}
use of org.apache.jena.riot.out.quoted.QuotedStringOutput in project jena by apache.
the class NodeFormatterTTL_MultiLine method writeLexicalSingleLine.
/**
* Output a string and run the Runnable at the same indentation level
*/
private void writeLexicalSingleLine(AWriter writer, String str, Runnable action) {
QuotedStringOutput proc = chooseEscapeProcessor(str);
proc.writeStr(writer, str);
if (action != null)
action.run();
}
Aggregations