private int writeDist(int i, AllMatches match) throws jplag.ExitException { HTMLFile f = openHTMLFile(root, "match" + i + "-dist.html"); writeHTMLHeader(f, msg.getString("Report.Token_Distribution")); f.println("<BODY>"); match.distributionReport(f, msg); f.println("</BODY>\n</HTML>"); f.close(); return f.bytesWritten(); }
private int copySubmissions() throws jplag.ExitException { int bytes = 0; for (Iterator<Submission> i = program.clusters.neededSubmissions.iterator(); i.hasNext();) { Submission sub = i.next(); int index = this.program.clusters.submissions.indexOf(sub); HTMLFile f = openHTMLFile(root, "submission" + index + ".html"); writeHTMLHeader(f, sub.name); f.println("<BODY BGCOLOR=\"#ffffff\">"); String[] files = sub.files; String text[][] = sub.readFiles(files); for (int j = 0; j < files.length; j++) { f.println("<HR>\n<H3><CENTER>" + files[j] + "</CENTER></H3><HR>"); if (this.language.isPreformated()) f.println("<PRE>"); for (int k = 0; k < text[j].length; k++) { f.print(text[j][k]); if (!this.language.isPreformated()) f.println("<BR>"); else f.println(); } if (language.isPreformated()) f.println("</PRE>"); } f.println("</BODY>\n</HTML>"); f.close(); bytes += f.bytesWritten(); } return bytes; }
writeHTMLHeader(f, (j == 0 ? match.subA : match.subB).name); f.println("<BODY>");
private int writeFrames(int i, AllMatches match) throws jplag.ExitException { HTMLFile f = openHTMLFile(root, "match" + i + ".html"); writeHTMLHeader(f, TagParser.parse(msg.getString("Report.Matches_for_X1_AND_X2"), new String[] { match.subName(0), match.subName(1) })); f.println("<FRAMESET ROWS=\"130,*\">\n <FRAMESET COLS=\"30%,70%\">"); f.println(" <FRAME SRC=\"match" + i + "-link.html\" NAME=\"link\" " + "FRAMEBORDER=0>"); f.println(" <FRAME SRC=\"match" + i + "-top.html\" NAME=\"top\" " + "FRAMEBORDER=0>"); f.println(" </FRAMESET>"); f.println(" <FRAMESET COLS=\"50%,50%\">"); f.println(" <FRAME SRC=\"match" + i + "-0.html\" NAME=\"0\">"); f.println(" <FRAME SRC=\"match" + i + "-1.html\" NAME=\"1\">"); f.println(" </FRAMESET>\n</FRAMESET>\n</HTML>"); f.close(); return f.bytesWritten(); }
private int writeLink(int i, AllMatches match) throws jplag.ExitException { HTMLFile f = openHTMLFile(root, "match" + i + "-link.html"); writeHTMLHeader(f, msg.getString("Report.Links")); f.println("<BODY>\n <H3 ALIGN=\"center\">" + TagParser.parse(msg.getString("Report.Matches_for_X1_AND_X2"), new String[] { match.subName(0), match.subName(1) }) + "</H3>"); f.println(" <H1 align=\"center\">" + match.roundedPercent() + "%</H1>\n<CENTER>"); f.println(" <A HREF=\"index.html#matches\" TARGET=\"_top\">" + msg.getString("Report.INDEX") + "</A> - "); f.println(" <A HREF=\"help-" + program.getCountryTag() + ".html\" TARGET=\"_top\">" + msg.getString("Report.HELP") + "</A></CENTER>"); f.println("</BODY>\n</HTML>"); f.close(); return f.bytesWritten(); }
writeHTMLHeader(f, msg.getString("Report.Clustering_Results")); String clustertype = msg.getString("Report.Type") + ": " + program.clusters.getType(); f.println("<BODY>\n<H2>" + msg.getString("Report.Clustering_Results") + " (" + clustertype + ")</H2>"); f.println("<H3><A HREF=\"cluster" + threshold + ".html\">" + clustertitle + "</A></H3>"); HTMLFile f2 = openHTMLFile(root, "cluster" + threshold + ".html"); writeHTMLHeader(f2, clustertitle); f2.println("<BODY>\n<H2>" + clustertitle + " (" + clustertype + ")</H2>"); String text = program.clusters.printClusters(clustering, threshold, f2); f.println("<H3><A HREF=\"cluster" + (int) threshold + ".html\">" + clustertitle + "</A></H3>"); HTMLFile f2 = openHTMLFile(root, "cluster" + (int) threshold + ".html"); writeHTMLHeader(f2, clustertitle); f2.println("<BODY>\n<H2>" + clustertitle + " (" + clustertype + ")</H2>"); String text = program.clusters.printClusters(clustering, (int) threshold, f2);
public void writeIndexBegin(HTMLFile f, String title) { writeHTMLHeader(f, title); f.println("<BODY BGCOLOR=#ffffff LINK=#000088 VLINK=#000000 TEXT=#000000>"); f.println("<TABLE ALIGN=center CELLPADDING=2 CELLSPACING=1>");