Package org.apache.jena.atlas.io

Examples of org.apache.jena.atlas.io.IndentedWriter


    public static void dump(OutputStream w, NodeTable nodeTable)
    {
        // Better to hack the indexes?
        Iterator<Pair<NodeId, Node>> iter = nodeTable.all() ;
        long count = 0 ;
        IndentedWriter iw = new IndentedWriter(w) ;
        for ( ; iter.hasNext() ; )
        {
            Pair<NodeId, Node> pair = iter.next() ;
            iw.print(pair.car()) ;
            iw.print(" : ") ;
            //iw.print(pair.cdr()) ;
            Node n = pair.cdr() ;
            String $ = stringForNode(n) ;
            iw.print($) ;
            iw.println() ;
            count++ ;
        }
        iw.println() ;
        iw.printf("Total: "+count) ;
        iw.println() ;
        iw.flush() ;
    }
View Full Code Here


    QuerySerializer(OutputStream        _out,
                    FormatterElement    formatterElement,
                    FmtExprSPARQL       formatterExpr,
                    FormatterTemplate   formatterTemplate)
    {
        this(new IndentedWriter(_out),
             formatterElement, formatterExpr, formatterTemplate) ;
    }
View Full Code Here

public class JSWriter
{
    private IndentedWriter out = IndentedWriter.stdout ;
   
    public JSWriter() { this(IndentedWriter.stdout) ; }
    public JSWriter(OutputStream ps) { this(new IndentedWriter(ps)) ; }
View Full Code Here

        }

        @Override
        protected void exec()
        {
            IndentedWriter out = IndentedWriter.stdout ;
            out.println("Sub-commands:") ;
            out.incIndent() ;

            for ( String name : subCommandNames() )
            {
                out.println(name) ;
            }
            out.decIndent() ;
            out.flush() ;
        }
View Full Code Here

   
    IndentedWriter out ;
   
    public JsonWriter() { this(IndentedWriter.stdout) ; }
    @Deprecated
    public JsonWriter(OutputStream ps) { this(new IndentedWriter(ps)) ; }
View Full Code Here

        return $ ;
    }
   
    public void printSSE(PrintStream ps)
    {
        IndentedWriter out = new IndentedWriter(ps) ;
        out.println("(stats") ;
        out.incIndent() ;
        for ( Pattern p : patterns )
        {
            p.output(out) ;
            out.println();
        }
        out.decIndent() ;
        out.println(")") ;
        out.flush();
    }
View Full Code Here

        write(IndentedWriter.stdout, graph) ;
        IndentedWriter.stdout.flush() ;
    }
    public static void write(OutputStream out, Graph graph)
    {
        IndentedWriter iOut = new IndentedWriter(out) ;
        write(iOut, graph) ;
        iOut.flush();
    }
View Full Code Here

        write(IndentedWriter.stdout, model) ;
        IndentedWriter.stdout.flush() ;
    }
    public static void write(OutputStream out, Model model)
    {
        IndentedWriter iOut = new IndentedWriter(out) ;
        write(iOut, model) ;
        iOut.flush();
    }
View Full Code Here

   
   
    public static void write(DatasetGraph dataset) { write(IndentedWriter.stdout, dataset) ; IndentedWriter.stdout.flush() ; }
    public static void write(OutputStream out, DatasetGraph dataset)
    {
        IndentedWriter iOut = new IndentedWriter(out) ;
        write(iOut, dataset) ;
        iOut.flush();
    }
View Full Code Here

    }
   
    public static void write(Triple triple) { write(IndentedWriter.stdout, triple) ; IndentedWriter.stdout.flush() ; }
    public static void write(OutputStream out, Triple triple)
    {
        IndentedWriter iOut = new IndentedWriter(out) ;
        write(iOut, triple) ;
        iOut.flush();
    }
View Full Code Here

TOP

Related Classes of org.apache.jena.atlas.io.IndentedWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.