Package java.io

Examples of java.io.PrintWriter.printf()


        f.println("<ggobidata count=\"2\">");
        f.println("<data name=\"points\">");
        f.println("<variables count=\"1\">");
        f.println("  <realvariable name=\"x\" nickname=\"x\" />");
        f.println("</variables>");
        f.printf("<records count=\"%d\">\n", hapax.getIndex().documentCount());
        int n = 0;
        for (String doc: hapax.getIndex().documents()) {
            f.printf("<record id=\"%d\" label=\"%s\"> 0 </record>\n",
                    ++n,
                    new File(doc).getName());
View Full Code Here


        f.println("  <realvariable name=\"x\" nickname=\"x\" />");
        f.println("</variables>");
        f.printf("<records count=\"%d\">\n", hapax.getIndex().documentCount());
        int n = 0;
        for (String doc: hapax.getIndex().documents()) {
            f.printf("<record id=\"%d\" label=\"%s\"> 0 </record>\n",
                    ++n,
                    new File(doc).getName());
        }
        f.print("</records>\n</data>\n\n");
        f.println("<data name=\"distance\">");
View Full Code Here

                if (Matrix.indexOf(row) >= each.index) continue;
                if (each.value > THRESHOLD) tally++;
            }
        }
        System.out.println(tally);
        f.printf("<records count=\"%d\" glyph=\"fr 1\" color=\"0\">\n", tally);
        for (Vector row: corr.rows()) {
            for (Entry each: row.entries()) {
                if (Matrix.indexOf(row) >= each.index) continue;
                if (each.value > THRESHOLD) {
                    f.printf("<record source=\"%d\" destination=\"%d\"> %f </record>\n",
View Full Code Here

        f.printf("<records count=\"%d\" glyph=\"fr 1\" color=\"0\">\n", tally);
        for (Vector row: corr.rows()) {
            for (Entry each: row.entries()) {
                if (Matrix.indexOf(row) >= each.index) continue;
                if (each.value > THRESHOLD) {
                    f.printf("<record source=\"%d\" destination=\"%d\"> %f </record>\n",
                            Matrix.indexOf(row)+1,
                            each.index+1,
                            metrize(each.value));
                }
            }
View Full Code Here

            + "<input type='hidden' name='tenantId' value=''/>" + "</form>");
        pw.println("<script type='text/javascript'>");
        pw.println("function cmdsubmit(action, tenantId) {" + " document.forms['cmd'].action.value = action;"
            + " document.forms['cmd'].tenantId.value = tenantId;" + " document.forms['cmd'].submit();" + "} "
            + "function createsubmit() {" + " document.forms['editorForm'].submit();" + "} " + "</script>");
        pw.printf("<p class='statline ui-state-highlight'>Apache Sling Tenant Support</p>");

        pw.println("<div class='ui-widget-header ui-corner-top buttonGroup'>");
        pw.println("<span style='float: left; margin-left: 1em'>Add New Tenant </span>");
        pw.println("<button class='ui-state-default ui-corner-all' onclick='javascript:createsubmit();'> Create </button></div></td></tr>");
        pw.println("</div>");
View Full Code Here

        int count = 0;
        while (tenants.hasNext()) {
            count++;
            Tenant tenant = tenants.next();
            if (count == 1) {
                pw.printf("<p class='statline ui-state-highlight'>Registered Tenants</p>");
            }
            pw.println("<div class='ui-widget-header ui-corner-top buttonGroup'>");
            pw.printf("<span style='float: left; margin-left: 1em'>Tenant : %s </span>", escape(tenant.getName()));
            this.printForm(pw, tenant, "Remove", "remove");
            pw.println("</div>");
View Full Code Here

            Tenant tenant = tenants.next();
            if (count == 1) {
                pw.printf("<p class='statline ui-state-highlight'>Registered Tenants</p>");
            }
            pw.println("<div class='ui-widget-header ui-corner-top buttonGroup'>");
            pw.printf("<span style='float: left; margin-left: 1em'>Tenant : %s </span>", escape(tenant.getName()));
            this.printForm(pw, tenant, "Remove", "remove");
            pw.println("</div>");
            pw.println("<table class='nicetable'><tbody>");

            pw.printf("<tr><td style='width: 30%%;'>Identifier</td><td>%s</td></tr>", escape(tenant.getId()));
View Full Code Here

            pw.printf("<span style='float: left; margin-left: 1em'>Tenant : %s </span>", escape(tenant.getName()));
            this.printForm(pw, tenant, "Remove", "remove");
            pw.println("</div>");
            pw.println("<table class='nicetable'><tbody>");

            pw.printf("<tr><td style='width: 30%%;'>Identifier</td><td>%s</td></tr>", escape(tenant.getId()));
            pw.printf("<tr><td style='width: 30%%;'>Name</td><td>%s</td></tr>", escape(tenant.getName()));
            pw.printf("<tr><td style='width: 30%%;'>Description</td><td>%s</td></tr>", escape(tenant.getDescription()));
            pw.println("</tbody></table>");
        }
        // no existing tenants
View Full Code Here

            this.printForm(pw, tenant, "Remove", "remove");
            pw.println("</div>");
            pw.println("<table class='nicetable'><tbody>");

            pw.printf("<tr><td style='width: 30%%;'>Identifier</td><td>%s</td></tr>", escape(tenant.getId()));
            pw.printf("<tr><td style='width: 30%%;'>Name</td><td>%s</td></tr>", escape(tenant.getName()));
            pw.printf("<tr><td style='width: 30%%;'>Description</td><td>%s</td></tr>", escape(tenant.getDescription()));
            pw.println("</tbody></table>");
        }
        // no existing tenants
        if (count == 0) {
View Full Code Here

            pw.println("</div>");
            pw.println("<table class='nicetable'><tbody>");

            pw.printf("<tr><td style='width: 30%%;'>Identifier</td><td>%s</td></tr>", escape(tenant.getId()));
            pw.printf("<tr><td style='width: 30%%;'>Name</td><td>%s</td></tr>", escape(tenant.getName()));
            pw.printf("<tr><td style='width: 30%%;'>Description</td><td>%s</td></tr>", escape(tenant.getDescription()));
            pw.println("</tbody></table>");
        }
        // no existing tenants
        if (count == 0) {
            pw.printf("<p class='statline ui-state-highlight'>There are not registered tenants</p>");
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.