2
* Copyright (C) 2001-2012 Michael Fuchs
4
* This file is part of herold.
6
* herold is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
11
* herold is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with herold. If not, see <http://www.gnu.org/licenses/>.
19
package org.dbdoclet.xiphias.dom;
21
import org.dbdoclet.log.Logger;
22
import org.w3c.dom.DOMException;
23
import org.w3c.dom.Text;
26
public class TextImpl extends CharacterDataImpl implements Text {
28
private static Logger logger = Logger.getLogger(TextImpl.class);
30
public TextImpl(String text, NodeImpl parent) {
34
setNodeType(TEXT_NODE);
36
setParentNode(parent);
39
logger.debug("Text text=[" + text + "]");
42
public TextImpl(String text) {
47
* The method <code>toString</code> returns the first 24
48
* characters of the text of this node.
50
* If the length of the text is greater than 24 characters, the
51
* text is truncated and three digits are appended.
53
* @return a <code>String</code> value
56
public String toString() {
58
String data = getData();
60
if ((data == null) || (data.length() == 0)) {
64
if (data.length() < 24) {
67
return data.substring(0, 23) + "...";
71
public String getWholeText() {
72
// TODO Auto-generated method stub
76
public boolean isElementContentWhitespace() {
77
// TODO Auto-generated method stub
81
public Text replaceWholeText(String content) throws DOMException {
82
// TODO Auto-generated method stub
86
public Text splitText(int offset) throws DOMException {
87
// TODO Auto-generated method stub