use of org.apache.jena.sparql.serializer.SerializationContext in project jena by apache.
the class Explain method formatQuads.
// public static void explainHTTP(String message, String request, Context
// context)
// {
// if ( explaining(InfoLevel.ALL, logExec,context) )
// {
// IndentedLineBuffer iBuff = new IndentedLineBuffer() ;
// if ( true )
// iBuff.incIndent() ;
// else
// iBuff.setFlatMode(true) ;
// ???
// iBuff.flush() ;
// String str = iBuff.toString() ;
// _explain(logExec, message, str, false) ;
// }
// }
// TEMP : quad list that looks right.
// Remove when QuadPatterns roll through from ARQ.
private static void formatQuads(IndentedLineBuffer out, QuadPattern quads) {
SerializationContext sCxt = SSE.sCxt(SSE.getPrefixMapWrite());
boolean first = true;
for (Quad qp : quads) {
if (!first) {
if (!MultiLinesForPatterns)
out.print(" ");
} else
first = false;
out.print("(");
if (qp.getGraph() == null)
out.print("_");
else
WriterNode.output(out, qp.getGraph(), sCxt);
out.print(" ");
WriterNode.output(out, qp.getSubject(), sCxt);
out.print(" ");
WriterNode.output(out, qp.getPredicate(), sCxt);
out.print(" ");
WriterNode.output(out, qp.getObject(), sCxt);
out.print(")");
if (MultiLinesForPatterns)
out.println();
}
}
use of org.apache.jena.sparql.serializer.SerializationContext in project jena by apache.
the class Explain method formatTriples.
private static void formatTriples(IndentedLineBuffer out, BasicPattern triples) {
SerializationContext sCxt = SSE.sCxt(SSE.getPrefixMapWrite());
boolean first = true;
for (Triple qp : triples) {
if (!first && !MultiLinesForPatterns)
out.print(" ");
first = false;
WriterNode.outputPlain(out, qp, sCxt);
if (MultiLinesForPatterns)
out.println();
}
}
Aggregations