use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.
the class dumpnodetable method dump.
public static void dump(OutputStream w, NodeTable nodeTable) {
// Better to hack the indexes?
Iterator<Pair<NodeId, Node>> iter = nodeTable.all();
long count = 0;
try (IndentedWriter iw = new IndentedWriter(w)) {
for (; iter.hasNext(); ) {
Pair<NodeId, Node> pair = iter.next();
iw.print(pair.car().toString());
iw.print(" : ");
// iw.print(pair.cdr()) ;
Node n = pair.cdr();
String $ = stringForNode(n);
iw.print($);
iw.println();
count++;
}
iw.println();
iw.printf("Total: " + count);
iw.println();
iw.flush();
}
}
use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.
the class CmdGeneral method usage.
public void usage(PrintStream pStr) {
IndentedWriter out = new IndentedWriter(pStr);
out.println(getSummary());
usage.output(out);
}
use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.
the class QueryValidator method output.
private void output(ServletOutputStream outStream, Query query, final Op op, boolean lineNumbers) throws IOException {
final SerializationContext sCxt = new SerializationContext(query);
Content c = new Content() {
@Override
public void print(IndentedWriter out) {
op.output(out, sCxt);
}
};
output(outStream, c, lineNumbers);
}
use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.
the class BinRDF method dump.
/** Debug help - print details of a Thrift stream.
* Destructive on the InputStream.
* @param out OutputStream
* @param in InputStream
*/
public static void dump(OutputStream out, InputStream in) {
IndentedWriter iOut = new IndentedWriter(out);
StreamRowTRDFPrinter printer = new StreamRowTRDFPrinter(iOut);
TProtocol protocol = TRDF.protocol(in);
BinRDF.applyVisitor(protocol, printer);
iOut.flush();
}
use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.
the class DumpOps method dumpBPlusTree.
public static void dumpBPlusTree(PrintStream out, BPlusTree bpt) {
IndentedWriter iw = new IndentedWriter(out);
bpt.dump(iw);
}
Aggregations