Clover coverage report - dom4j - 1.5
Coverage timestamp: vr sep 3 2004 20:47:03 GMT+01:00
file stats: LOC: 230   Methods: 34
NCLOC: 118   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
DOMDocumentType.java - 0% 0% 0%
coverage
 1    /*
 2    * Copyright 2001-2004 (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    * $Id: DOMDocumentType.java,v 1.9 2004/06/25 08:03:35 maartenc Exp $
 8    */
 9   
 10    package org.dom4j.dom;
 11   
 12    import org.dom4j.tree.DefaultDocumentType;
 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    /** <p><code>DOMDocumentType</code> implements a DocumentType node which
 19    * supports the W3C DOM API.</p>
 20    *
 21    * @author <a href="mailto:james.strachan@metastuff.com">James Strachan</a>
 22    * @version $Revision: 1.9 $
 23    */
 24    public class DOMDocumentType extends DefaultDocumentType implements org.w3c.dom.DocumentType {
 25   
 26  0 public DOMDocumentType() {
 27    }
 28   
 29  0 public DOMDocumentType(String elementName, String systemID) {
 30  0 super( elementName, systemID );
 31    }
 32   
 33  0 public DOMDocumentType(String elementName, String publicID, String systemID) {
 34  0 super( elementName, publicID, systemID );
 35    }
 36   
 37   
 38    // org.w3c.dom.Node interface
 39    //-------------------------------------------------------------------------
 40  0 public boolean supports(String feature, String version) {
 41  0 return DOMNodeHelper.supports(this, feature, version);
 42    }
 43   
 44  0 public String getNamespaceURI() {
 45  0 return DOMNodeHelper.getNamespaceURI(this);
 46    }
 47   
 48  0 public String getPrefix() {
 49  0 return DOMNodeHelper.getPrefix(this);
 50    }
 51   
 52  0 public void setPrefix(String prefix) throws DOMException {
 53  0 DOMNodeHelper.setPrefix(this, prefix);
 54    }
 55   
 56  0 public String getLocalName() {
 57  0 return DOMNodeHelper.getLocalName(this);
 58    }
 59   
 60  0 public String getNodeName() {
 61  0 return getName();
 62    }
 63   
 64    //already part of API
 65    //
 66    //public short getNodeType();
 67   
 68   
 69   
 70  0 public String getNodeValue() throws DOMException {
 71  0 return null;
 72    }
 73   
 74  0 public void setNodeValue(String nodeValue) throws DOMException {
 75    }
 76   
 77   
 78  0 public org.w3c.dom.Node getParentNode() {
 79  0 return DOMNodeHelper.getParentNode(this);
 80    }
 81   
 82  0 public NodeList getChildNodes() {
 83  0 return DOMNodeHelper.getChildNodes(this);
 84    }
 85   
 86  0 public org.w3c.dom.Node getFirstChild() {
 87  0 return DOMNodeHelper.getFirstChild(this);
 88    }
 89   
 90  0 public org.w3c.dom.Node getLastChild() {
 91  0 return DOMNodeHelper.getLastChild(this);
 92    }
 93   
 94  0 public org.w3c.dom.Node getPreviousSibling() {
 95  0 return DOMNodeHelper.getPreviousSibling(this);
 96    }
 97   
 98  0 public org.w3c.dom.Node getNextSibling() {
 99  0 return DOMNodeHelper.getNextSibling(this);
 100    }
 101   
 102  0 public NamedNodeMap getAttributes() {
 103  0 return null;
 104    }
 105   
 106  0 public Document getOwnerDocument() {
 107  0 return DOMNodeHelper.getOwnerDocument(this);
 108    }
 109   
 110  0 public org.w3c.dom.Node insertBefore(
 111    org.w3c.dom.Node newChild,
 112    org.w3c.dom.Node refChild
 113    ) throws DOMException {
 114  0 checkNewChildNode(newChild);
 115  0 return DOMNodeHelper.insertBefore(this, newChild, refChild);
 116    }
 117   
 118  0 public org.w3c.dom.Node replaceChild(
 119    org.w3c.dom.Node newChild,
 120    org.w3c.dom.Node oldChild
 121    ) throws DOMException {
 122  0 checkNewChildNode(newChild);
 123  0 return DOMNodeHelper.replaceChild(this, newChild, oldChild);
 124    }
 125   
 126  0 public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild) throws DOMException {
 127  0 return DOMNodeHelper.removeChild(this, oldChild);
 128    }
 129   
 130  0 public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws DOMException {
 131  0 checkNewChildNode(newChild);
 132  0 return DOMNodeHelper.appendChild(this, newChild);
 133    }
 134   
 135  0 private void checkNewChildNode(org.w3c.dom.Node newChild) throws DOMException {
 136  0 throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,
 137    "DocumentType nodes cannot have children");
 138    }
 139   
 140   
 141  0 public boolean hasChildNodes() {
 142  0 return DOMNodeHelper.hasChildNodes(this);
 143    }
 144   
 145  0 public org.w3c.dom.Node cloneNode(boolean deep) {
 146  0 return DOMNodeHelper.cloneNode(this, deep);
 147    }
 148   
 149  0 public void normalize() {
 150  0 DOMNodeHelper.normalize(this);
 151    }
 152   
 153  0 public boolean isSupported(String feature, String version) {
 154  0 return DOMNodeHelper.isSupported(this, feature, version);
 155    }
 156   
 157  0 public boolean hasAttributes() {
 158  0 return DOMNodeHelper.hasAttributes(this);
 159    }
 160   
 161    // org.w3c.dom.DocumentType interface
 162    //-------------------------------------------------------------------------
 163  0 public NamedNodeMap getEntities() {
 164  0 return null;
 165    }
 166   
 167  0 public NamedNodeMap getNotations() {
 168  0 return null;
 169    }
 170   
 171  0 public String getPublicId() {
 172  0 return getPublicID();
 173    }
 174   
 175  0 public String getSystemId() {
 176  0 return getSystemID();
 177    }
 178   
 179  0 public String getInternalSubset() {
 180  0 return getElementName();
 181    }
 182    }
 183   
 184   
 185   
 186   
 187    /*
 188    * Redistribution and use of this software and associated documentation
 189    * ("Software"), with or without modification, are permitted provided
 190    * that the following conditions are met:
 191    *
 192    * 1. Redistributions of source code must retain copyright
 193    * statements and notices. Redistributions must also contain a
 194    * copy of this document.
 195    *
 196    * 2. Redistributions in binary form must reproduce the
 197    * above copyright notice, this list of conditions and the
 198    * following disclaimer in the documentation and/or other
 199    * materials provided with the distribution.
 200    *
 201    * 3. The name "DOM4J" must not be used to endorse or promote
 202    * products derived from this Software without prior written
 203    * permission of MetaStuff, Ltd. For written permission,
 204    * please contact dom4j-info@metastuff.com.
 205    *
 206    * 4. Products derived from this Software may not be called "DOM4J"
 207    * nor may "DOM4J" appear in their names without prior written
 208    * permission of MetaStuff, Ltd. DOM4J is a registered
 209    * trademark of MetaStuff, Ltd.
 210    *
 211    * 5. Due credit should be given to the DOM4J Project -
 212    * http://www.dom4j.org
 213    *
 214    * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
 215    * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
 216    * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 217    * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
 218    * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 219    * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 220    * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 221    * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 222    * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 223    * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 224    * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 225    * OF THE POSSIBILITY OF SUCH DAMAGE.
 226    *
 227    * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
 228    *
 229    * $Id: DOMDocumentType.java,v 1.9 2004/06/25 08:03:35 maartenc Exp $
 230    */