01: /**
02: * Title: OpenUSS - Open Source University Support System
03: * Description: BaseTable Presentation Object
04: * Copyright: Copyright (c) B. Lofi Dewanto
05: * Company: University of Muenster
06: * @author B. Lofi Dewanto
07: * @version 1.0
08: */package org.openuss.presentation.enhydra.framework;
09:
10: import org.w3c.dom.*;
11: import org.w3c.dom.html.*;
12:
13: /**
14: * The base table for Enhydra.
15: *
16: * @author B. Lofi Dewanto
17: * @version 1.0
18: */
19: public abstract class BaseTable {
20: // The document for showing this table
21: protected Document mainPage;
22:
23: /**
24: * Constructor.
25: */
26: public BaseTable() {
27: }
28:
29: /**
30: * Constructor.
31: */
32: public BaseTable(Document mainPage) throws BaseTableException {
33: this .mainPage = mainPage;
34: }
35:
36: /**
37: * Set the document.
38: */
39: public void setDocument(Document mainPage) {
40: this .mainPage = mainPage;
41: }
42:
43: /**
44: * Get the result table document.
45: */
46: abstract public Node getTable();
47:
48: /**
49: * Get the result table document.
50: */
51: public Node getTableForDocument() {
52: // Import the table into the current document
53: Node currentNode = mainPage.importNode(this .getTable(), true);
54:
55: return currentNode;
56: }
57: }
|