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 public abstract class CharacterData extends Node 22 implements org.w3c.dom.CharacterData { 23 24 /*** Creates new CharacterData */ 25 public CharacterData(final Document document) { 26 super(document, null); 27 } 28 29 public String getNodeName() { 30 return ""; 31 } 32 33 public String getPrefix() { 34 return ""; 35 } 36 37 /*** 38 * The namespace prefix of this node, or <code>null</code> if it is 39 * unspecified. 40 * <br>Note that setting this attribute, when permitted, changes the 41 * <code>nodeName</code> attribute, which holds the qualified name, as 42 * well as the <code>tagName</code> and <code>name</code> attributes of 43 * the <code>Element</code> and <code>Attr</code> interfaces, when 44 * applicable. 45 * <br>Note also that changing the prefix of an attribute that is known to 46 * have a default value, does not make a new attribute with the default 47 * value and the original prefix appear, since the 48 * <code>namespaceURI</code> and <code>localName</code> do not change. 49 * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and 50 * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 51 * method, such as <code>createElement</code> from the 52 * <code>Document</code> interface, this is always <code>null</code>. 53 * @since DOM Level 2 54 */ 55 public void setPrefix(final String prefix) { 56 /* NOP */ 57 } 58 59 /*** 60 * @see org.w3c.dom.Node#getLocalName() 61 */ 62 public String getLocalName() { 63 return ""; 64 } 65 66 /*** 67 * @see org.w3c.dom.Node#getNamespaceURI() 68 */ 69 public String getNamespaceURI() { 70 return ""; 71 } 72 73 /*** 74 * @see org.w3c.dom.Node#getNodeValue() 75 */ 76 public String getNodeValue() { 77 return getData(); 78 } 79 80 /*** 81 * @see org.w3c.dom.NodeList#getLength() 82 */ 83 public int getLength() { 84 return getData().length(); 85 } 86 87 /*** 88 * @see org.w3c.dom.CharacterData#setData(String) 89 */ 90 public void setData(final String data) { 91 throw new UnsupportedOperationException( 92 "Method setData(String) " + "not yet implemented."); 93 } 94 95 /*** 96 * @see org.w3c.dom.CharacterData#substringData(int, int) 97 */ 98 public String substringData(final int offset, final int count) { 99 return getData().substring(offset, offset + count); 100 } 101 102 /*** 103 * @see org.w3c.dom.CharacterData#appendData(String) 104 */ 105 public void appendData(final String arg) { 106 throw new UnsupportedOperationException( 107 "Method appendData(String) " + "not yet implemented."); 108 } 109 110 /*** 111 * @see org.w3c.dom.CharacterData#deleteData(int, int) 112 */ 113 public void deleteData(final int offset, final int count) { 114 throw new UnsupportedOperationException( 115 "Method deleteData(int, int) " + "not yet implemented."); 116 } 117 118 /*** 119 * @see org.w3c.dom.CharacterData#insertData(int, String) 120 */ 121 public void insertData(final int offset, final String arg) { 122 throw new UnsupportedOperationException( 123 "Method insertData(int, String) " + "not yet implemented."); 124 } 125 126 /*** 127 * @see org.w3c.dom.CharacterData#replaceData(int, int, String) 128 */ 129 public void replaceData( 130 final int offset, 131 final int count, 132 final String arg) { 133 throw new UnsupportedOperationException( 134 "Method replaceData(int, int, String) " + "not yet implemented."); 135 136 } 137 }

This page was automatically generated by Maven