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: public class HTMLFragment {
19:
20: private HTMLFile file;
21:
22: private Object key;
23:
24: public HTMLFragment(HTMLFile file, Object key) {
25: this .file = file;
26: this .key = key;
27: }
28:
29: /**
30: * @return Returns the file.
31: */
32: public HTMLFile getFile() {
33: return file;
34: }
35:
36: /**
37: * @param file
38: * The file to set.
39: */
40: public void setFile(HTMLFile file) {
41: this .file = file;
42: }
43:
44: /**
45: * @return Returns the key.
46: */
47: public Object getKey() {
48: return key;
49: }
50:
51: public String getId() {
52: if (key == null) {
53: return null;
54: }
55: if (file == null) {
56: return "";
57: }
58: return file.getFragmentId(this);
59: }
60: }
|