use of org.apache.jena.sparql.serializer.SerializationContext in project jena by apache.
the class PlanBase method output.
@Override
public void output(IndentedWriter out) {
SerializationContext sCxt = new SerializationContext(ARQConstants.getGlobalPrefixMap());
output(out, sCxt);
}
use of org.apache.jena.sparql.serializer.SerializationContext in project jena by apache.
the class tdbreorder method print.
private static void print(BasicPattern bgp) {
IndentedWriter out = IndentedWriter.stdout;
PrefixMapping pmap = SSE.getPrefixMapWrite();
SerializationContext sCxt = SSE.sCxt(pmap);
boolean first = true;
for (Triple t : bgp) {
if (!first)
out.print("\n");
else
first = false;
// Adds (triple ...)
// SSE.write(buff.getIndentedWriter(), t) ;
out.print("(");
WriterNode.outputPlain(out, t, sCxt);
out.print(")");
}
out.flush();
}
use of org.apache.jena.sparql.serializer.SerializationContext in project jena by apache.
the class sse method exec.
@Override
protected void exec(Item item) {
if (!print)
return;
if (item == null) {
System.err.println("No expression");
throw new TerminationException(9);
}
divider();
IndentedWriter out = new IndentedWriter(System.out, lineNumbers);
// Need to check if used.
//PrefixMapping pmap = SSE.getDefaultPrefixMapWrite() ;
PrefixMapping pmap = null;
SerializationContext sCxt = new SerializationContext(pmap);
ItemWriter.write(out, item, sCxt);
//item.output(out) ;
out.ensureStartOfLine();
out.flush();
}
use of org.apache.jena.sparql.serializer.SerializationContext in project jena by apache.
the class SSE method write.
public static void write(IndentedWriter out, Graph graph) {
WriterGraph.output(out, graph, new SerializationContext(graph.getPrefixMapping()));
out.ensureStartOfLine();
}
use of org.apache.jena.sparql.serializer.SerializationContext in project jena by apache.
the class WriterOp method output.
public static void output(IndentedWriter iWriter, Op op, Prologue prologue) {
SerializationContext sCxt = new SerializationContext(prologue);
output(iWriter, op, sCxt);
}
Aggregations