Search in sources :

Example 11 with IndentedWriter

use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.

the class TurtleWriterBase method write.

@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);
}
Also used : IndentedWriter(org.apache.jena.atlas.io.IndentedWriter)

Example 12 with IndentedWriter

use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.

the class TriGWriterBase method write.

@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);
}
Also used : IndentedWriter(org.apache.jena.atlas.io.IndentedWriter)

Example 13 with IndentedWriter

use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.

the class ThriftRDF method dump.

/**
 * 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);
    apply(protocol, z -> TRDF.visit(z, printer));
    iOut.flush();
}
Also used : IndentedWriter(org.apache.jena.atlas.io.IndentedWriter) TProtocol(org.apache.thrift.protocol.TProtocol)

Example 14 with IndentedWriter

use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.

the class WriterTriX method write.

// Graph
@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);
}
Also used : IndentedWriter(org.apache.jena.atlas.io.IndentedWriter)

Example 15 with IndentedWriter

use of org.apache.jena.atlas.io.IndentedWriter in project jena by apache.

the class WriterTriX method write.

// Dataset
@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);
}
Also used : IndentedWriter(org.apache.jena.atlas.io.IndentedWriter)

Aggregations

IndentedWriter (org.apache.jena.atlas.io.IndentedWriter)57 SerializationContext (org.apache.jena.sparql.serializer.SerializationContext)5 TerminationException (org.apache.jena.cmd.TerminationException)4 Node (org.apache.jena.graph.Node)4 PrefixMapping (org.apache.jena.shared.PrefixMapping)4 CmdException (org.apache.jena.cmd.CmdException)3 Triple (org.apache.jena.graph.Triple)3 Syntax (org.apache.jena.query.Syntax)3 IOException (java.io.IOException)2 ServletOutputStream (javax.servlet.ServletOutputStream)2 Pair (org.apache.jena.atlas.lib.Pair)2 RiotException (org.apache.jena.riot.RiotException)2 RiotNotFoundException (org.apache.jena.riot.RiotNotFoundException)2 NodeFormatter (org.apache.jena.riot.out.NodeFormatter)2 NodeFormatterTTL (org.apache.jena.riot.out.NodeFormatterTTL)2 JenaException (org.apache.jena.shared.JenaException)2 ARQException (org.apache.jena.sparql.ARQException)2 Var (org.apache.jena.sparql.core.Var)2 Plan (org.apache.jena.sparql.engine.Plan)2 Expr (org.apache.jena.sparql.expr.Expr)2