public static void output(ServletOutputStream outStream, Consumer<IndentedLineBuffer> content, boolean lineNumbers) throws IOException { startFixed(outStream) ; IndentedLineBuffer out = new IndentedLineBuffer(lineNumbers) ; content.accept(out) ; out.flush() ; String x = htmlQuote(out.asString()) ; byte b[] = x.getBytes("UTF-8") ; outStream.write(b) ; finishFixed(outStream) ; }
public static void output(ServletOutputStream outStream, Consumer<IndentedLineBuffer> content, boolean lineNumbers) throws IOException { startFixed(outStream) ; IndentedLineBuffer out = new IndentedLineBuffer(lineNumbers) ; content.accept(out) ; out.flush() ; String x = htmlQuote(out.asString()) ; byte b[] = x.getBytes("UTF-8") ; outStream.write(b) ; finishFixed(outStream) ; }
@Override public void handle(Patch patch) { IndentedLineBuffer x = new IndentedLineBuffer() ; RDFChanges scData = new RDFChangesWriteUpdate(x) ; patch.play(scData); x.flush(); String reqStr = x.asString() ; updateEndpoints.forEach((ep)->{ try { HttpOp.execHttpPost(ep, WebContent.contentTypeSPARQLUpdate, reqStr) ; } catch (HttpException ex) { DPS.LOG.warn("Failed to send to "+ep) ; } }) ; } }
public static void explain(String message, QuadPattern quads, Context context) { if ( explaining(InfoLevel.ALL, logExec, context) ) { try (IndentedLineBuffer iBuff = new IndentedLineBuffer()) { if ( MultiLinesForPatterns ) iBuff.incIndent() ; formatQuads(iBuff, quads) ; iBuff.flush() ; String str = iBuff.toString() ; _explain(logExec, message, str, false) ; } } }
public static void explain(String message, BasicPattern bgp, Context context) { if ( explaining(InfoLevel.ALL, logExec, context) ) { try (IndentedLineBuffer iBuff = new IndentedLineBuffer()) { if ( MultiLinesForPatterns ) iBuff.incIndent() ; formatTriples(iBuff, bgp) ; iBuff.flush() ; String str = iBuff.toString() ; _explain(logExec, message, str, false) ; } } }
public static void explain(String message, QuadPattern quads, Context context) { if ( explaining(InfoLevel.ALL, logExec,context) ) { IndentedLineBuffer iBuff = new IndentedLineBuffer() ; if ( true ) iBuff.incIndent() ; else iBuff.setFlatMode(true) ; formatQuads(iBuff, quads) ; iBuff.flush() ; String str = iBuff.toString() ; _explain(logExec, message, str, false) ; } }
@Override public String toString() { IndentedLineBuffer out = new IndentedLineBuffer() ; SerializationContext sCxt = SSE.sCxt((SSE.defaultPrefixMapWrite)) ; boolean first = true ; for (Quad quad : quads) { if ( !first ) out.print(" ") ; else first = false ; // Adds (triple ...) // SSE.write(buff.getIndentedWriter(), t) ; out.print("(") ; WriterNode.outputPlain(out, quad, sCxt) ; out.print(")") ; } out.flush() ; return out.toString() ; } }
@Override public String toString() { IndentedLineBuffer out = new IndentedLineBuffer() ; SerializationContext sCxt = SSE.sCxt(SSE.defaultPrefixMapWrite) ; boolean first = true ; for ( Triple t : triples ) { 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(); return out.toString() ; } }
@Override public String toString() { IndentedLineBuffer out = new IndentedLineBuffer() ; SerializationContext sCxt = SSE.sCxt(SSE.getPrefixMapString()) ; boolean first = true ; for ( Triple t : triples ) { 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() ; return out.toString() ; } }
@Override public String toString() { IndentedLineBuffer out = new IndentedLineBuffer() ; SerializationContext sCxt = SSE.sCxt((SSE.getPrefixMapWrite())) ; boolean first = true ; for (Quad quad : quads) { if ( !first ) out.print(" ") ; else first = false ; // Adds (quad ...) // SSE.write(buff.getIndentedWriter(), t) ; out.print("(") ; WriterNode.outputPlain(out, quad, sCxt) ; out.print(")") ; } out.flush() ; return out.toString() ; } }