01: /*
02: ItsNat Java Web Application Framework
03: Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
04: Author: Jose Maria Arranz Santamaria
05:
06: This program is free software: you can redistribute it and/or modify
07: it under the terms of the GNU Affero General Public License as published by
08: the Free Software Foundation, either version 3 of the License, or
09: (at your option) any later version. See the GNU Affero General Public
10: License for more details. See the copy of the GNU Affero General Public License
11: included in this program. If not, see <http://www.gnu.org/licenses/>.
12: */
13:
14: package org.itsnat.impl.core;
15:
16: import java.io.Writer;
17: import org.itsnat.impl.core.dom.render.DOMRenderImpl;
18: import org.w3c.dom.Document;
19: import org.w3c.dom.DocumentFragment;
20: import org.w3c.dom.Element;
21: import org.w3c.dom.Node;
22: import org.xml.sax.InputSource;
23:
24: /**
25: *
26: * @author jmarranz
27: */
28: public abstract class MarkupTemplateVersionDelegateImpl {
29: protected MarkupTemplateVersionImpl parent;
30:
31: /**
32: * Creates a new instance of MarkupTemplateVersionDelegateImpl
33: */
34: public MarkupTemplateVersionDelegateImpl(
35: MarkupTemplateVersionImpl parent) {
36: this .parent = parent;
37: }
38:
39: public MarkupTemplateVersionImpl getMarkupTemplateVersion() {
40: return parent;
41: }
42:
43: public String serializeNode(Node node) {
44: // Es derivada en el caso de HTML
45: DOMRenderImpl nodeRender = getMarkupTemplateVersion()
46: .getNodeDOMRender();
47: return nodeRender.serializeNode(node);
48: }
49:
50: public abstract Document parseDocument(InputSource input,
51: String encoding);
52:
53: public abstract boolean declaredAsComponent(Element elem);
54:
55: public abstract boolean isElementNotCacheableByNamespace(
56: Element elem);
57:
58: public abstract DocumentFragment loadDocumentFragmentIncluded(
59: DocFragmentTemplateVersionImpl docFragTemplateIncVersion,
60: Element includeElem);
61:
62: }
|