Package org.mcavallo.opencloud.formatters

Examples of org.mcavallo.opencloud.formatters.HTMLFormatter.html()


       
        System.out.println("<h2>KMeans k=" + cloudMap.size() + "</h2>");
        for (Map.Entry<Integer, Cloud> entry : cloudMap.entrySet()) {
            Integer clusterId = entry.getKey();
            formatter.setHtmlTemplateTop("<h3>Cluster ID: &nbsp;" + clusterId + "</h3>");
            System.out.println(formatter.html(entry.getValue()));
        }
    }
   
    public void writeCloudsHTML(Map<Integer,Cloud> cloudMap, String outputPath) {
        HTMLFormatter formatter = new HTMLFormatter();
View Full Code Here


            writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputPath), "UTF-8"));
            writer.write("<h2>KMeans k=" + cloudMap.size() + "</h2>\n");
            for (Map.Entry<Integer, Cloud> entry : cloudMap.entrySet()) {
                Integer clusterId = entry.getKey();
                formatter.setHtmlTemplateTop("<h3>Cluster ID: &nbsp;" + clusterId + "</h3>");
                writer.write(formatter.html(entry.getValue()));
                writer.newLine();
            }
        } catch (UnsupportedEncodingException e) {
            LOG.error("UTF-8 is unsupported?", e);
        } catch (FileNotFoundException e) {
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.