Package org.apache.jena.atlas.io

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


        return $ ;
    }
   
    public void printSSE(OutputStream 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


        if ( f == null )
            System.err.println("printPlan: Unknown engine type: "+Utils.className(qe)) ;
       
        Plan plan = f.create(query, qe.getDataset().asDatasetGraph(), BindingRoot.create(), ARQ.getContext()) ;
        SerializationContext sCxt = new SerializationContext(query) ;
        IndentedWriter out = IndentedWriter.stdout ;
   
        plan.output(out, sCxt) ;
        out.flush();
    }
View Full Code Here

        out.flush();
    }

    public static void printQuery(Query query)
    {
        IndentedWriter out = IndentedWriter.stdout ;
        printQuery(out, query) ;
    }
View Full Code Here

        out.flush() ;
    }

    public static void printOp(Query query, boolean optimize)
    {
        IndentedWriter out = IndentedWriter.stdout ;
        printOp(out, query, optimize) ; // Flush done
    }
View Full Code Here

        out.flush();
    }

    public static void printQuad(Query query, boolean printOptimized)
    {
        IndentedWriter out = IndentedWriter.stdout ;
        printQuad(out, query, printOptimized) ; // Flush done
    }
View Full Code Here

        private IndentedWriter out ;
        PrintSqlNodes(IndentedWriter out)
        { this.out = out ; }

        PrintSqlNodes()
        { this.out = new IndentedWriter(System.out) ; }
View Full Code Here

        private IndentedWriter out ;
        PrintSQL(IndentedWriter out)
        { this.out = out ; }

        PrintSQL()
        { this.out = new IndentedWriter(System.out) ; }
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

        print(bgp2) ;
        System.out.println() ;
    }
   
    private static void print(BasicPattern bgp) {
        IndentedWriter out = IndentedWriter.stdout;
       
        PrefixMapping pmap = new PrefixMappingImpl() ;
        pmap.setNsPrefixes(SSE.defaultPrefixMapWrite) ;
//        pmap.setNsPrefix("ppi", "http://landregistry.data.gov.uk/def/ppi/") ;
//        pmap.setNsPrefix("common", "http://landregistry.data.gov.uk/def/common/") ;
       
        SerializationContext sCxt = SSE.sCxt(pmap) ;
       
        boolean first = true ;
        for ( Triple t : bgp )
        {
            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();
       
    }
View Full Code Here

    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().toString()) ;
            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

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.