Examples of IndentedWriter


Examples of com.google.gwt.uibinder.rebind.IndentedWriter

    assertEquals("template_html1()", call);

    // Confirm that we write the correct SafeHtmlTemplates interface

    StringWriter s = new StringWriter();
    IndentedWriter n = new IndentedWriter(new PrintWriter(s));
    h.writeInterface(n);

    String[] expectedInterface = {"interface Template extends SafeHtmlTemplates {", //
        "  @Template(\"<DialogBox id='{0}'>this is a dialog box</DialogBox>\")", //
        "  SafeHtml html1(String arg0);", //
        "   ", //
        "}", //
        "", //
        "Template template = GWT.create(Template.class);", //
    };

    assertExpectedStrings(expectedInterface, s.toString());

    // Confirm that we write template caller methods

    s = new StringWriter();
    n = new IndentedWriter(new PrintWriter(s));
    h.writeTemplateCallers(n);

    String[] expectedCaller = {"SafeHtml template_html1() {", //
        "  return template.html1(domId0);", //
        "}"};
View Full Code Here

Examples of com.hp.hpl.jena.sparql.util.IndentedWriter

   
    // Query string.
       
        Query query = QueryFactory.create(queryWSDAI) ;
        // Print with line numbers
        query.serialize(new IndentedWriter(System.out,true)) ;
        System.out.println() ;
       
        // Create a single execution of this query, apply to a model
        // which is wrapped up as a Dataset
       
View Full Code Here

Examples of com.mchange.v2.codegen.IndentedWriter

    public synchronized void generate( ClassInfo info, Property[] props, Writer w) throws IOException
    {
  this.info = info;
  this.props = props;
  Arrays.sort( props, BeangenUtils.PROPERTY_COMPARATOR );
  this.iw = ( w instanceof IndentedWriter ? (IndentedWriter) w : new IndentedWriter(w));

  this.generalImports = new TreeSet();
  if ( info.getGeneralImports() != null )
      generalImports.addAll( Arrays.asList( info.getGeneralImports() ) );
View Full Code Here

Examples of com.mchange.v2.io.IndentedWriter

        if (isClosed())
            return this + "status: Closed.";
        else
        {
            StringWriter sw = new StringWriter(2048);
            IndentedWriter iw = new IndentedWriter( sw );
            try
            {
                iw.print(this);
                iw.println(" status:");
                iw.upIndent();
                iw.println("core stats:");
                iw.upIndent();
                iw.print("num cached statements: ");
                iw.println( this.countCachedStatements() );
                iw.print("num cached statements in use: ");
                iw.println( checkedOut.size() );
                iw.print("num connections with cached statements: ");
                iw.println(cxnStmtMgr.getNumConnectionsWithCachedStatements());
                iw.downIndent();
                iw.println("cached statement dump:");
                iw.upIndent();
                for (Iterator ii = cxnStmtMgr.connectionSet().iterator(); ii.hasNext();)
                {
                    Connection pcon = (Connection) ii.next();
                    iw.print(pcon);
                    iw.println(':');
                    iw.upIndent();
                    for (Iterator jj = cxnStmtMgr.statementSet(pcon).iterator(); jj.hasNext();)
                        iw.println(jj.next());
                    iw.downIndent();
                }

                iw.downIndent();
                iw.downIndent();
                return sw.toString();
            }
            catch (IOException e)
            {
                if (logger.isLoggable(MLevel.SEVERE))
View Full Code Here

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

    }

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

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

    public JSWriter() {
        this(IndentedWriter.stdout) ;
    }

    public JSWriter(OutputStream ps) { this(new IndentedWriter(ps)) ; }
View Full Code Here

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

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

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

    IndentedWriter out ; 
   
    @Override
    public void startParse(long currLine, long currCol)
    {
        out = new IndentedWriter(System.out, true) ;
        //out.setPadString("> ") ;
    }
View Full Code Here

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

        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

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().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
Copyright © 2018 www.massapi.com. 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.