EAF 7.4 Util

org.enhydra.xml
Class CommentImpl

java.lang.Object
  extended by org.enhydra.xml.NodeImpl
      extended by org.enhydra.xml.CharacterDataImpl
          extended by org.enhydra.xml.CommentImpl
All Implemented Interfaces:
org.w3c.dom.CharacterData, org.w3c.dom.Comment, org.w3c.dom.Node, org.w3c.dom.NodeList

public class CommentImpl
extends CharacterDataImpl
implements org.w3c.dom.Comment

Version:
1.0
Author:
Tweety A class representing a node in a meta-data tree, which implements the

Namespaces are ignored in this implementation. The terms "tag name" and "node name" are always considered to be synonymous.


Field Summary
 
Fields inherited from class org.enhydra.xml.NodeImpl
firstChild, lastChild, nextSibling, nodeName, nodeValue, numChildren, ownerDocument, parent, previousSibling, type
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
CommentImpl(CommentImpl node)
          Constructs a CommentImpl from the given node.
CommentImpl(org.w3c.dom.Node node)
          Constructs a CommentImpl from a given node, as a Node
CommentImpl(java.lang.String value)
          Constructs a CommentImpl from the given node value.
 
Method Summary
protected  void beginToString(java.lang.StringBuffer sb, Indent indent)
          Method beginToString for this class writes the xml comment prefix string and the comment string.
protected  void endToString(java.lang.StringBuffer sb, Indent indent)
          Method endToString writes the xml comment postfix string.
 java.lang.String getNodeName()
          Returns the name ("#comment") associated with this node.
 short getNodeType()
          Returns the node type.
 
Methods inherited from class org.enhydra.xml.CharacterDataImpl
appendData, deleteData, getData, getNamespaceURI, insertData, replaceData, setData, substringData
 
Methods inherited from class org.enhydra.xml.NodeImpl
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, initNodeImplChildren, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, newCommentInstance, newDefaultInstance, newElementInstance, newTextInstance, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.CharacterData
appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringData
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Constructor Detail

CommentImpl

public CommentImpl(CommentImpl node)
Constructs a CommentImpl from the given node.

Parameters:
node, - as a CommentImpl.

CommentImpl

public CommentImpl(java.lang.String value)
Constructs a CommentImpl from the given node value.

Parameters:
value, - as a String.

CommentImpl

public CommentImpl(org.w3c.dom.Node node)
Constructs a CommentImpl from a given node, as a Node

Parameters:
node, - as Node.
Method Detail

getNodeType

public short getNodeType()
Returns the node type.

Specified by:
getNodeType in interface org.w3c.dom.Node
Overrides:
getNodeType in class NodeImpl
Returns:
the COMMENT_NODE node type.

getNodeName

public java.lang.String getNodeName()
Returns the name ("#comment") associated with this node.

Specified by:
getNodeName in interface org.w3c.dom.Node
Overrides:
getNodeName in class NodeImpl
Returns:
the name, as a String.

beginToString

protected void beginToString(java.lang.StringBuffer sb,
                             Indent indent)
Method beginToString for this class writes the xml comment prefix string and the comment string.

Overrides:
beginToString in class NodeImpl
Parameters:
sb - string buffer to add resulting string.
indent - used in formating the output.

endToString

protected void endToString(java.lang.StringBuffer sb,
                           Indent indent)
Method endToString writes the xml comment postfix string.

Overrides:
endToString in class NodeImpl
Parameters:
sb - string buffer to add resulting string.
indent - used in formating the output.

EAF 7.4 Util