use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.
the class QueryOutputUtils method printOp.
public static void printOp(Query query, boolean optimize) {
IndentedWriter out = IndentedWriter.stdout;
// Flush done
printOp(out, query, optimize);
}
use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.
the class QueryOutputUtils method printPlan.
// ModQueryOut
public static void printPlan(Query query, QueryExecution qe) {
QueryEngineFactory f = QueryEngineRegistry.findFactory(query, qe.getDataset().asDatasetGraph(), ARQ.getContext());
if (f == null)
Log.error(QueryOutputUtils.class, "printPlan: Unknown engine type: " + Lib.className(qe));
Plan plan = f.create(query, qe.getDataset().asDatasetGraph(), BindingRoot.create(), ARQ.getContext());
SerializationContext sCxt = new SerializationContext(query);
IndentedWriter out = IndentedWriter.stdout;
plan.output(out, sCxt);
out.flush();
}
use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.
the class shacl_parse method printText.
private boolean printText(PrintStream out, PrintStream err, Shapes shapes) {
IndentedWriter iOut = new IndentedWriter(out);
ShLib.printShapes(iOut, shapes);
iOut.ensureStartOfLine();
iOut.flush();
int numShapes = shapes.numShapes();
int numRootShapes = shapes.numRootShapes();
if (isVerbose()) {
System.out.println();
System.out.println("Target shapes: ");
shapes.getShapeMap().forEach((n, shape) -> {
if (shape.hasTarget())
System.out.println(" " + ShLib.displayStr(shape.getShapeNode()));
});
System.out.println("Other Shapes: ");
shapes.getShapeMap().forEach((n, shape) -> {
if (!shape.hasTarget())
System.out.println(" " + ShLib.displayStr(shape.getShapeNode()));
});
}
return true;
}
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 TurtleWriterBase method write.
@Override
public void write(Writer out, Graph graph, PrefixMap prefixMap, String baseURI, Context context) {
IndentedWriter iOut = RiotLib.create(out);
output$(iOut, graph, prefixMap, baseURI, context);
}
Aggregations