Clover coverage report - dom4j - 1.6.1 Coverage timestamp: ma mei 16 2005 14:23:01 GMT+01:00 FRAMES NO FRAMES |
file stats: | LOC: | 180 |  | Methods: | 26
| NCLOC: | 91 |  | Classes: | 1
Source file | Conditionals | Statements | Methods | TOTAL
DOMNamespace.java | - | 3,8% | 3,8% | 3,8% |

1 |  | /*
2 |  | * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
3 |  | *
4 |  | * This software is open source.
5 |  | * See the bottom of this file for the licence.
6 |  | */
7 |  |
8 |  | package org.dom4j.dom;
9 |  |
10 |  | import org.dom4j.Element;
11 |  | import org.dom4j.tree.DefaultNamespace;
12 |  |
13 |  | import org.w3c.dom.DOMException;
14 |  | import org.w3c.dom.Document;
15 |  | import org.w3c.dom.NamedNodeMap;
16 |  | import org.w3c.dom.NodeList;
17 |  |
18 |  | /**
19 |  | * <p>
20 |  | * <code>DOMNamespace</code> implements a Namespace that is compatable with
21 |  | * the DOM API.
22 |  | * </p>
23 |  | *
24 |  | * @author <a href="mailto:jstrachan@apache.org">James Strachan </a>
25 |  | * @version $Revision: 1.10 $
26 |  | */
27 |  | public class DOMNamespace extends DefaultNamespace implements org.w3c.dom.Node {
28 | 159 | public DOMNamespace(String prefix, String uri) {
29 | 159 | super(prefix, uri);
30 |  | }
31 |  |
32 | 0 | public DOMNamespace(Element parent, String prefix, String uri) {
33 | 0 | super(parent, prefix, uri);
34 |  | }
35 |  |
36 |  | // org.w3c.dom.Node interface
37 |  | // -------------------------------------------------------------------------
38 | 0 | public boolean supports(String feature, String version) {
39 | 0 | return DOMNodeHelper.supports(this, feature, version);
40 |  | }
41 |  |
42 | 0 | public String getNamespaceURI() {
43 | 0 | return DOMNodeHelper.getNamespaceURI(this);
44 |  | }
45 |  |
46 |  | // public String getPrefix() {
47 |  | // return DOMNodeHelper.getPrefix(this);
48 |  | // }
49 | 0 | public void setPrefix(String prefix) throws DOMException {
50 | 0 | DOMNodeHelper.setPrefix(this, prefix);
51 |  | }
52 |  |
53 | 0 | public String getLocalName() {
54 | 0 | return DOMNodeHelper.getLocalName(this);
55 |  | }
56 |  |
57 | 0 | public String getNodeName() {
58 | 0 | return getName();
59 |  | }
60 |  |
61 |  | // already part of API
62 |  | //
63 |  | // public short getNodeType();
64 | 0 | public String getNodeValue() throws DOMException {
65 | 0 | return DOMNodeHelper.getNodeValue(this);
66 |  | }
67 |  |
68 | 0 | public void setNodeValue(String nodeValue) throws DOMException {
69 | 0 | DOMNodeHelper.setNodeValue(this, nodeValue);
70 |  | }
71 |  |
72 | 0 | public org.w3c.dom.Node getParentNode() {
73 | 0 | return DOMNodeHelper.getParentNode(this);
74 |  | }
75 |  |
76 | 0 | public NodeList getChildNodes() {
77 | 0 | return DOMNodeHelper.getChildNodes(this);
78 |  | }
79 |  |
80 | 0 | public org.w3c.dom.Node getFirstChild() {
81 | 0 | return DOMNodeHelper.getFirstChild(this);
82 |  | }
83 |  |
84 | 0 | public org.w3c.dom.Node getLastChild() {
85 | 0 | return DOMNodeHelper.getLastChild(this);
86 |  | }
87 |  |
88 | 0 | public org.w3c.dom.Node getPreviousSibling() {
89 | 0 | return DOMNodeHelper.getPreviousSibling(this);
90 |  | }
91 |  |
92 | 0 | public org.w3c.dom.Node getNextSibling() {
93 | 0 | return DOMNodeHelper.getNextSibling(this);
94 |  | }
95 |  |
96 | 0 | public NamedNodeMap getAttributes() {
97 | 0 | return DOMNodeHelper.getAttributes(this);
98 |  | }
99 |  |
100 | 0 | public Document getOwnerDocument() {
101 | 0 | return DOMNodeHelper.getOwnerDocument(this);
102 |  | }
103 |  |
104 | 0 | public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild,
105 |  | org.w3c.dom.Node refChild) throws DOMException {
106 | 0 | return DOMNodeHelper.insertBefore(this, newChild, refChild);
107 |  | }
108 |  |
109 | 0 | public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild,
110 |  | org.w3c.dom.Node oldChild) throws DOMException {
111 | 0 | return DOMNodeHelper.replaceChild(this, newChild, oldChild);
112 |  | }
113 |  |
114 | 0 | public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
115 |  | throws DOMException {
116 | 0 | return DOMNodeHelper.removeChild(this, oldChild);
117 |  | }
118 |  |
119 | 0 | public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
120 |  | throws DOMException {
121 | 0 | return DOMNodeHelper.appendChild(this, newChild);
122 |  | }
123 |  |
124 | 0 | public boolean hasChildNodes() {
125 | 0 | return DOMNodeHelper.hasChildNodes(this);
126 |  | }
127 |  |
128 | 0 | public org.w3c.dom.Node cloneNode(boolean deep) {
129 | 0 | return DOMNodeHelper.cloneNode(this, deep);
130 |  | }
131 |  |
132 | 0 | public void normalize() {
133 | 0 | DOMNodeHelper.normalize(this);
134 |  | }
135 |  |
136 | 0 | public boolean isSupported(String feature, String version) {
137 | 0 | return DOMNodeHelper.isSupported(this, feature, version);
138 |  | }
139 |  |
140 | 0 | public boolean hasAttributes() {
141 | 0 | return DOMNodeHelper.hasAttributes(this);
142 |  | }
143 |  | }
144 |  |
145 |  | /*
146 |  | * Redistribution and use of this software and associated documentation
147 |  | * ("Software"), with or without modification, are permitted provided that the
148 |  | * following conditions are met:
149 |  | *
150 |  | * 1. Redistributions of source code must retain copyright statements and
151 |  | * notices. Redistributions must also contain a copy of this document.
152 |  | *
153 |  | * 2. Redistributions in binary form must reproduce the above copyright notice,
154 |  | * this list of conditions and the following disclaimer in the documentation
155 |  | * and/or other materials provided with the distribution.
156 |  | *
157 |  | * 3. The name "DOM4J" must not be used to endorse or promote products derived
158 |  | * from this Software without prior written permission of MetaStuff, Ltd. For
159 |  | * written permission, please contact dom4j-info@metastuff.com.
160 |  | *
161 |  | * 4. Products derived from this Software may not be called "DOM4J" nor may
162 |  | * "DOM4J" appear in their names without prior written permission of MetaStuff,
163 |  | * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.
164 |  | *
165 |  | * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org
166 |  | *
167 |  | * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND
168 |  | * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
169 |  | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
170 |  | * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE
171 |  | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
172 |  | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
173 |  | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
174 |  | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
175 |  | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
176 |  | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
177 |  | * POSSIBILITY OF SUCH DAMAGE.
178 |  | *
179 |  | * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
180 |  | */