KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xsl > grammar > ResultDocument


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xsl.grammar;
21
22 import org.w3c.dom.*;
23
24 /**
25  *
26  * @author asgeir@dimonsoftware.com
27  */

28 public class ResultDocument extends ResultNode implements org.w3c.dom.Document JavaDoc {
29
30     private Document doc;
31
32     /** Creates a new instance of ResultDocument */
33     public ResultDocument(Document peer, String JavaDoc ignorePrefix, String JavaDoc onlyUsePrefix) {
34         super(peer, ignorePrefix, onlyUsePrefix);
35         doc = peer;
36     }
37
38     public Attr createAttribute(String JavaDoc name) throws DOMException {
39         return doc.createAttribute(name);
40     }
41     
42     public Attr createAttributeNS(String JavaDoc namespaceURI, String JavaDoc qualifiedName) throws DOMException {
43         return doc.createAttributeNS(namespaceURI, qualifiedName);
44     }
45     
46     public CDATASection createCDATASection(String JavaDoc data) throws DOMException {
47         return doc.createCDATASection(data);
48     }
49     
50     public Comment createComment(String JavaDoc data) {
51         return doc.createComment(data);
52     }
53     
54     public DocumentFragment createDocumentFragment() {
55          return doc.createDocumentFragment();
56     }
57     
58     public Element createElement(String JavaDoc tagName) throws DOMException {
59         return doc.createElement(tagName);
60     }
61     
62     public Element createElementNS(String JavaDoc namespaceURI, String JavaDoc qualifiedName) throws DOMException {
63         return doc.createElementNS(namespaceURI, qualifiedName);
64     }
65     
66     public EntityReference createEntityReference(String JavaDoc name) throws DOMException {
67         return doc.createEntityReference(name);
68     }
69     
70     public ProcessingInstruction createProcessingInstruction(String JavaDoc target, String JavaDoc data) throws DOMException {
71         return doc.createProcessingInstruction(target, data);
72     }
73     
74     public Text createTextNode(String JavaDoc data) {
75         return doc.createTextNode(data);
76     }
77     
78     public DocumentType getDoctype() {
79         return doc.getDoctype();
80     }
81     
82     public Element getDocumentElement() {
83         return doc.getDocumentElement();
84     }
85     
86     public Element getElementById(String JavaDoc elementId) {
87         return doc.getElementById(elementId);
88     }
89     
90     public NodeList getElementsByTagName(String JavaDoc tagname) {
91         return doc.getElementsByTagName(tagname);
92     }
93     
94     public NodeList getElementsByTagNameNS(String JavaDoc namespaceURI, String JavaDoc localName) {
95         return doc.getElementsByTagNameNS(namespaceURI, localName);
96     }
97     
98     public DOMImplementation getImplementation() {
99         return doc.getImplementation();
100     }
101     
102     public Node importNode(Node importedNode, boolean deep) throws DOMException {
103         return new ResultNode(doc.importNode(importedNode, deep), ignorePrefix, onlyUsePrefix);
104     }
105 }
106
Popular Tags