QuerySerializer(OutputStream _out, FormatterElement formatterElement, FmtExprSPARQL formatterExpr, FormatterTemplate formatterTemplate) { this(new IndentedWriter(_out), formatterElement, formatterExpr, formatterTemplate) ; }
@Override public void startParse(long currLine, long currCol) { out = new IndentedWriter(System.out, true) ; //out.setPadString("> ") ; }
@Override public void write(OutputStream out, DatasetGraph datasetGraph, PrefixMap prefixMap, String baseURI, Context context) { IndentedWriter iOut = new IndentedWriter(out) ; write(iOut, datasetGraph, prefixMap, baseURI, null) ; }
@Override public void write(OutputStream out, DatasetGraph dsg, PrefixMap prefixMap, String baseURI, Context context) { IndentedWriter iOut = new IndentedWriter(out) ; output$(iOut, dsg, prefixMap, baseURI, context) ; }
@Override public void write(OutputStream out, Graph graph, PrefixMap prefixMap, String baseURI, Context context) { IndentedWriter iOut = new IndentedWriter(out) ; output$(iOut, graph, prefixMap, baseURI, context) ; }
public static void dumpBPlusTree(PrintStream out, BPlusTree bpt) { IndentedWriter iw = new IndentedWriter(out) ; bpt.dump(iw) ; }
@Override public void write(OutputStream out, Graph graph, PrefixMap prefixMap, String baseURI, Context context) { IndentedWriter iOut = new IndentedWriter(out) ; write(iOut, graph, prefixMap, baseURI, null) ; }
/** Output the query * * @param out OutputStream * @param syntax Syntax URI */ public void serialize(OutputStream out, Syntax syntax) { IndentedWriter writer = new IndentedWriter(out) ; serialize(writer, syntax) ; writer.flush() ; try { out.flush() ; } catch (Exception ex) { } }
public static void write(OutputStream out, Graph graph) { IndentedWriter iOut = new IndentedWriter(out) ; write(iOut, graph) ; iOut.flush(); }
public void verbose(PrintStream stream) { IndentedWriter out = new IndentedWriter(stream); verbose(out); out.flush(); }
/** Write out a JSON value - pass a JSON Object to get legal exchangeable JSON */ public static void write(OutputStream output, JsonValue jValue) { IndentedWriter iOut = new IndentedWriter(output) ; write(iOut, jValue) ; iOut.flush() ; }
public static void write(OutputStream out, Model model) { IndentedWriter iOut = new IndentedWriter(out) ; write(iOut, model) ; iOut.flush(); }
public void usage(PrintStream pStr) { IndentedWriter out = new IndentedWriter(pStr) ; out.println(getSummary()) ; usage.output(out) ; }
public static void write(OutputStream out, Item item) { IndentedWriter iw = new IndentedWriter(out) ; write(iw, item , null) ; iw.ensureStartOfLine() ; iw.flush(); }
public static void write(OutputStream out, Node node) { IndentedWriter iOut = new IndentedWriter(out) ; write(iOut, node) ; iOut.flush(); } public static void write(IndentedWriter out, Node node)
public static void write(OutputStream out, DatasetGraph dataset) { IndentedWriter iOut = new IndentedWriter(out) ; write(iOut, dataset) ; iOut.flush(); }
public static void write(OutputStream out, Triple triple) { IndentedWriter iOut = new IndentedWriter(out) ; write(iOut, triple) ; iOut.flush(); } public static void write(IndentedWriter out, Triple triple)
public static void write(OutputStream out, Quad quad) { IndentedWriter iOut = new IndentedWriter(out) ; write(iOut, quad) ; iOut.flush(); } public static void write(IndentedWriter out, Quad quad)
/** 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() ; }
@Test public void formatPattern_2_triples() { BasicPattern basicPattern = new BasicPattern() ; basicPattern.add(getTriple()) ; basicPattern.add(getTriple2()) ; ByteArrayOutputStream os = new ByteArrayOutputStream() ; try(IndentedWriter iw = new IndentedWriter(os)) { SerializationContext sc = new SerializationContext() ; FmtUtils.formatPattern(iw, basicPattern, sc) ; } assertEquals("<n1> <n2> \"l3\" .\n" + "<nb1> <nb2> \"lb3\" .", new String(os.toByteArray())) ; }