FileDocCategorySizeDatePackage
CommentImpl.javaAPI DocApache Axis 1.42116Sat Apr 22 18:57:28 BST 2006org.apache.axis.message

CommentImpl

public class CommentImpl extends org.apache.axis.message.Text implements Comment, Text
Most of methods are inherited from TEXT, defined for its Interface Marker only
author
Heejune Ahn (cityboy@tmax.co.kr)

Fields Summary
Constructors Summary
public CommentImpl(String text)

        super(text);
    
Methods Summary
public booleanisComment()

        return true;
    
public org.w3c.dom.TextsplitText(int offset)

        int length = textRep.getLength();
        // take the first part, and save the second part for new Text
        // length check and exception will be thrown here, no need to
        // duplicated check
        String tailData = textRep.substringData(offset, length);
        textRep.deleteData(offset, length);

        // insert the first part again as a new node
        Text tailText = new CommentImpl(tailData);
        org.w3c.dom.Node myParent = (org.w3c.dom.Node) getParentNode();
        if (myParent != null) {
            org.w3c.dom.NodeList brothers =
                (org.w3c.dom.NodeList) myParent.getChildNodes();
            for (int i = 0; i < brothers.getLength(); i++) {
                if (brothers.item(i).equals(this)) {
                    myParent.insertBefore(tailText, this);
                    return tailText;
                }
            }
        }
        return tailText;