View Javadoc
1 /* 2 * Copyright (C) 2002 Carsten Krebs (Team-Konzept GmbH & Co.KG) 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 package com.teamkonzept.dom4jb.dom; 19 20 21 /*** %TODO% ALLES 22 * 23 */ 24 public class DocumentType extends Node 25 implements org.w3c.dom.DocumentType { 26 27 /*** Creates new DocumentType */ 28 public DocumentType( final Document doc ) { 29 super( doc ); 30 } 31 32 public boolean accept( final Filter filter ) { 33 return true; 34 } 35 36 /*** 37 * The public identifier of the external subset. 38 * @since DOM Level 2 39 */ 40 public String getPublicId() { 41 return null; 42 } 43 44 /*** 45 * A <code>NamedNodeMap</code> containing the notations declared in the 46 * DTD. Duplicates are discarded. Every node in this map also implements 47 * the <code>Notation</code> interface. 48 * <br>The DOM Level 2 does not support editing notations, therefore 49 * <code>notations</code> cannot be altered in any way. 50 */ 51 public org.w3c.dom.NamedNodeMap getNotations() { 52 return new NamedNodeMap(); 53 } 54 55 /*** 56 * The name of this node, depending on its type; see the table above. 57 */ 58 public String getNodeName() { 59 return "TEST"; 60 } 61 62 63 /*** 64 * The namespace prefix of this node, or <code>null</code> if it is 65 * unspecified. 66 * <br>Note that setting this attribute, when permitted, changes the 67 * <code>nodeName</code> attribute, which holds the qualified name, as 68 * well as the <code>tagName</code> and <code>name</code> attributes of 69 * the <code>Element</code> and <code>Attr</code> interfaces, when 70 * applicable. 71 * <br>Note also that changing the prefix of an attribute that is known to 72 * have a default value, does not make a new attribute with the default 73 * value and the original prefix appear, since the 74 * <code>namespaceURI</code> and <code>localName</code> do not change. 75 * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and 76 * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 77 * method, such as <code>createElement</code> from the 78 * <code>Document</code> interface, this is always <code>null</code>. 79 * @since DOM Level 2 80 */ 81 public String getPrefix() { 82 return null; 83 } 84 85 /*** 86 * A code representing the type of the underlying object, as defined above. 87 */ 88 public final short getNodeType() { 89 return DOCUMENT_TYPE_NODE; 90 } 91 92 /*** 93 * The namespace URI of this node, or <code>null</code> if it is 94 * unspecified. 95 * <br>This is not a computed value that is the result of a namespace 96 * lookup based on an examination of the namespace declarations in 97 * scope. It is merely the namespace URI given at creation time. 98 * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and 99 * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 100 * method, such as <code>createElement</code> from the 101 * <code>Document</code> interface, this is always <code>null</code>.Per 102 * the Namespaces in XML Specification an attribute does not inherit 103 * its namespace from the element it is attached to. If an attribute is 104 * not explicitly given a namespace, it simply has no namespace. 105 * @since DOM Level 2 106 */ 107 public String getNamespaceURI() { 108 return null; 109 } 110 111 /*** 112 * The name of DTD; i.e., the name immediately following the 113 * <code>DOCTYPE</code> keyword. 114 */ 115 public String getName() { 116 return "TEST"; 117 } 118 119 /*** 120 * A <code>NamedNodeMap</code> containing the general entities, both 121 * external and internal, declared in the DTD. Parameter entities are 122 * not contained. Duplicates are discarded. For example in: 123 * <pre><!DOCTYPE 124 * ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar 125 * "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz"> 126 * ]> <ex/></pre> 127 * the interface provides access to <code>foo</code> 128 * and the first declaration of <code>bar</code> but not the second 129 * declaration of <code>bar</code> or <code>baz</code>. Every node in 130 * this map also implements the <code>Entity</code> interface. 131 * <br>The DOM Level 2 does not support editing entities, therefore 132 * <code>entities</code> cannot be altered in any way. 133 */ 134 public org.w3c.dom.NamedNodeMap getEntities() { 135 return new NamedNodeMap(); 136 } 137 138 /*** 139 * The system identifier of the external subset. 140 * @since DOM Level 2 141 */ 142 public String getSystemId() { 143 return null; 144 } 145 146 /*** 147 * Returns the local part of the qualified name of this node. 148 * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and 149 * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 150 * method, such as <code>createElement</code> from the 151 * <code>Document</code> interface, this is always <code>null</code>. 152 * @since DOM Level 2 153 */ 154 public String getLocalName() { 155 return null; 156 } 157 158 /*** 159 * The internal subset as a string, or <code>null</code> if there is none. 160 * This is does not contain the delimiting square brackets.The actual 161 * content returned depends on how much information is available to the 162 * implementation. This may vary depending on various parameters, 163 * including the XML processor used to build the document. 164 * @since DOM Level 2 165 */ 166 public String getInternalSubset() { 167 return null; 168 } 169 170 /*** 171 * The namespace prefix of this node, or <code>null</code> if it is 172 * unspecified. 173 * <br>Note that setting this attribute, when permitted, changes the 174 * <code>nodeName</code> attribute, which holds the qualified name, as 175 * well as the <code>tagName</code> and <code>name</code> attributes of 176 * the <code>Element</code> and <code>Attr</code> interfaces, when 177 * applicable. 178 * <br>Note also that changing the prefix of an attribute that is known to 179 * have a default value, does not make a new attribute with the default 180 * value and the original prefix appear, since the 181 * <code>namespaceURI</code> and <code>localName</code> do not change. 182 * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and 183 * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 184 * method, such as <code>createElement</code> from the 185 * <code>Document</code> interface, this is always <code>null</code>. 186 * @since DOM Level 2 187 */ 188 public void setPrefix( final String prefix) { 189 throw new UnsupportedOperationException( 190 "Method setPrefix( String ) " 191 + "not yet implemented." 192 ); 193 } 194 }

This page was automatically generated by Maven