01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //This file is part of KeY - Integrated Deductive Software Design
09: //Copyright (C) 2001-2003 Universitaet Karlsruhe, Germany
10: // and Chalmers University of Technology, Sweden
11: //
12: //The KeY system is protected by the GNU General Public License.
13: //See LICENSE.TXT for details.
14: //
15:
16: package de.uka.ilkd.key.rule.export.html;
17:
18: import java.io.IOException;
19: import java.io.Writer;
20:
21: public class HTMLFileIndex extends HTMLFile {
22:
23: private static String bodyTemplate = getTemplate("templates/index.html");
24:
25: public HTMLFileIndex(HTMLModel htmlModel,
26: HTMLContainer htmlContainer) {
27: super (htmlModel, htmlContainer, "index.html");
28: }
29:
30: protected String getTitle() {
31: return "rule set classification";
32: }
33:
34: protected String getShortTitle() {
35: return "main page";
36: }
37:
38: protected void write(Writer w) throws IOException {
39: StringBuffer out = new StringBuffer();
40:
41: writeHeader(out);
42:
43: writeTopAnchor(out);
44:
45: writeNavBar(out);
46:
47: writeBody(out);
48:
49: writeFooter(out);
50:
51: w.write(out.toString());
52: }
53:
54: private void writeBody(StringBuffer out) {
55: String body;
56: if (bodyTemplate != null) {
57: body = bodyTemplate.replaceAll("<\\?key +NAVTOP *\\?>",
58: TOPLINK);
59: } else {
60: body = "template not found: index.html";
61: }
62: out.append(body);
63: }
64: }
|