Package org.openjena.atlas.io

Examples of org.openjena.atlas.io.IndentedLineBuffer


   
    public static String asString(Path path) { return asString(path, null) ; }
   
    public static String asString(Path path, Prologue prologue)
    {
        IndentedLineBuffer buff = new IndentedLineBuffer() ;
        WriterPathVisitor w = new WriterPathVisitor(buff, prologue) ;
        path.visit(w) ;
        w.out.flush();
        return buff.asString() ;
    }
View Full Code Here


public class WriterExpr
{
   
    public static String asString(Expr expr)
    {
        IndentedLineBuffer b = new IndentedLineBuffer() ;
        output(b, expr, null) ;
        return b.asString() ;
    }
View Full Code Here

        fmtSPARQL(iOut, expr, FmtUtils.sCxt()) ;
    }
   
    public static String fmtSPARQL(Expr expr)
    {
        IndentedLineBuffer buff = new IndentedLineBuffer() ;
        fmtSPARQL(buff, expr) ;
        return buff.toString() ;
    }
View Full Code Here

   
    public static String asString(Path path) { return asString(path, null) ; }
   
    public static String asString(Path path, Prologue prologue)
    {
        IndentedLineBuffer buff = new IndentedLineBuffer() ;
        PathWriterWorker w = new PathWriterWorker(buff, prologue) ;
        path.visit(w) ;
        w.out.flush();
        return buff.asString() ;
    }
View Full Code Here

        fmtSPARQL(iOut, exprs, FmtUtils.sCxt()) ;
    }

    public static String fmtSPARQL(ExprList exprs)
    {
        IndentedLineBuffer buff = new IndentedLineBuffer() ;
        fmtSPARQL(buff, exprs) ;
        return buff.toString() ;
    }
View Full Code Here

    }
   
    @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() ;
    }
View Full Code Here

   
    @Override
    public String toString()
    {
        // Using the size of the graphs would be better.
        IndentedLineBuffer out = new IndentedLineBuffer() ;
        WriterGraph.output(out, this, null) ;
        return out.asString() ;
    }
View Full Code Here

    interface Content { void print(IndentedWriter out) ; }
   
    private void output(ServletOutputStream outStream, Content content, boolean lineNumbers) throws IOException
    {
        startFixed(outStream) ;
        IndentedLineBuffer out = new IndentedLineBuffer(lineNumbers) ;
        content.print(out) ;
        out.flush()
        String x = htmlQuote(out.asString()) ;
        byte b[] = x.getBytes("UTF-8") ;
        outStream.write(b) ;
        finishFixed(outStream) ;
    }
View Full Code Here

    interface Content { void print(IndentedWriter out) ; }
   
    private void output(ServletOutputStream outStream, Content content, boolean lineNumbers) throws IOException
    {
        startFixed(outStream) ;
        IndentedLineBuffer out = new IndentedLineBuffer(lineNumbers) ;
        content.print(out) ;
        out.flush()
        String x = htmlQuote(out.asString()) ;
        byte b[] = x.getBytes("UTF-8") ;
        outStream.write(b) ;
        finishFixed(outStream) ;
    }
View Full Code Here

public class TableWriter
{
    public static String asSSE(Table table)
    {
        IndentedLineBuffer out = new IndentedLineBuffer() ;
        TableWriter.output(table, out) ;
        return out.asString() ;
    }
View Full Code Here

TOP

Related Classes of org.openjena.atlas.io.IndentedLineBuffer

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.