org.enhydra.xml
Class ElementImpl

java.lang.Object
  extended byorg.enhydra.xml.NodeImpl
      extended byorg.enhydra.xml.ElementImpl
All Implemented Interfaces:
org.w3c.dom.Element, org.w3c.dom.Node, org.w3c.dom.NodeList
Direct Known Subclasses:
HashMapElement

public class ElementImpl
extends NodeImpl
implements org.w3c.dom.Element

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
protected  java.util.HashMap attributes
          A HashMap of AttrImpl nodes representing attributes.
 
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_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
  ElementImpl()
          Constructs an empty ElementImpl.
  ElementImpl(org.w3c.dom.Document ownerDoc, java.lang.String name)
          Constructs an ElementImpl with the given document owner and node name.
protected ElementImpl(org.w3c.dom.Document ownerDoc, java.lang.String nodeName, short type, java.lang.String value)
          Constructs an ElementImpl with the given document owner, node name, node type and node value.
  ElementImpl(ElementImpl element)
          Constructs a ElementImpl from the given node, without creating entire children subtree.
  ElementImpl(org.w3c.dom.Node node)
          Constructs an ElementImpl from a given node (creates the children subtree too), as a Node
  ElementImpl(org.w3c.dom.Node node, boolean deep)
          Constructs an ElementImpl from a given node, as a Node, and deep as boolean.
 
Method Summary
 org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
          Adds the node newChild to the end of the list of children of this node.
protected  void beginToString(java.lang.StringBuffer sb, Indent indent)
          Method beginToString for this class writes the xml begining tag string and all attributes.
protected  void checkNode(org.w3c.dom.Node node)
          Check that the node is either null or an NodeImpl.
 org.w3c.dom.Node cloneNode(boolean deep)
          Returns a duplicate of this node.
 short compareDocumentPosition(org.w3c.dom.Node other)
           
protected  void endToString(java.lang.StringBuffer sb, Indent indent)
          Method endToString for this class writes the xml ending tag string.
 java.lang.String getAttribute(java.lang.String name)
          Returns the value of the attribute with given name.
 org.w3c.dom.Attr getAttributeNode(java.lang.String name)
          Returns attribute value with given name of this node.
 org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI, java.lang.String localName)
          Equivalent to getAttributeNode(localName).
 java.lang.String getAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
          Equivalent to getAttribute(localName).
 org.w3c.dom.NamedNodeMap getAttributes()
          Returns all attribute nodes of this node.
 java.lang.String getBaseURI()
           
 org.w3c.dom.NodeList getChildNodes()
          Returns all child nodes of this node, or null if the node has no children.
 org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
          Returns all Element nodes with given name, searching by all sub nodes from this node.
 org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
          Equivalent to getElementsByTagName(localName).
 java.lang.Object getFeature(java.lang.String feature, java.lang.String version)
           
 org.w3c.dom.Node getFirstChild()
          Returns the first child of this node, or null if the node has no children.
 org.w3c.dom.Node getLastChild()
          Returns the last child of this node, or null if the node has no children.
 int getLength()
          Returns number of child nodes.
 java.lang.String getLocalName()
          Equivalent to getNodeName.
 java.lang.String getNamespaceURI()
           
 org.w3c.dom.Node getNextSibling()
          Returns the next sibling of this node, or null if the node has no next sibling.
 java.lang.String getNodeName()
          Returns the name associated with this node.
 short getNodeType()
          Returns the node type.
 java.lang.String getNodeValue()
          Returns the value associated with this node.
 org.w3c.dom.Document getOwnerDocument()
          Returns null, since NodeImpls do not belong to any Document.
 org.w3c.dom.Node getParentNode()
          Returns the parent of this node.
 java.lang.String getPrefix()
          Returns null, since namespaces are not supported.
 org.w3c.dom.Node getPreviousSibling()
          Returns the previous sibling of this node, or null if this node has no previous sibling.
 TypeInfo getSchemaTypeInfo()
           
 java.lang.String getTagName()
          Returns tag name of this node.
 java.lang.String getTextContent()
           
 java.lang.Object getUserData(java.lang.String key)
           
 boolean hasAttribute(java.lang.String name)
          Returns true, if this node has attribute with given name, otherwise false.
 boolean hasAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
          Equivalent to hasAttribute(localName).
 boolean hasAttributes()
          Returns true, if this node has attributes, otherwise false.
 boolean hasChildNodes()
          Returns true if this node has child nodes.
 boolean hasElementChildNodes()
          Returns true if this node has children nodes.
protected  void initNodeImplChildren(org.w3c.dom.Node node)
          Creates the children subtree and adds to this node.
 org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild)
          Inserts the node newChild before the existing child node refChild.
 boolean isDefaultNamespace(java.lang.String namespaceURI)
           
 boolean isEqualNode(org.w3c.dom.Node arg)
           
 boolean isSameNode(org.w3c.dom.Node other)
           
 boolean isSupported(java.lang.String feature, java.lang.String version)
          Returns false since DOM features are not supported.
 org.w3c.dom.Node item(int index)
          Returns child node with the given index.
 java.lang.String lookupNamespaceURI(java.lang.String prefix)
           
 java.lang.String lookupPrefix(java.lang.String namespaceURI)
           
protected  org.w3c.dom.Node newCommentInstance(org.w3c.dom.Node node)
          Creates new instance of the CommentImpl class.
protected  org.w3c.dom.Node newDefaultInstance(org.w3c.dom.Node node)
          Creates new instance of the NodeImpl class.
protected  org.w3c.dom.Node newElementInstance(org.w3c.dom.Node node)
          Creates new instance of the ElementImpl class.
static org.w3c.dom.Element newInstance(org.w3c.dom.Document document)
          Creates new instance of ElementImpl from a given document as a Document.
protected  org.w3c.dom.Node newTextInstance(org.w3c.dom.Node node)
          Creates new instance of the TextImpl class.
 void normalize()
          Does nothing, since NodeImpls do not contain Text children.
 void removeAttribute(java.lang.String name)
          Removes attribute with the given name.
 org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr)
          Remove attribute from this node.
 void removeAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
          Equivalent to removeAttribute(localName).
 org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
          Removes the child node indicated by oldChild from the list of children, and returns it.
 org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild)
          Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
 void setAttribute(java.lang.String name, java.lang.String value)
          To the name attribute set value to value.
 org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr newAttr)
          Add new attribute to this node.
 org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr)
          Equivalent to setAttributeNode(newAttr).
 void setAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String value)
          Equivalent to setAttribute(qualifiedName, value).
 void setIdAttribute(java.lang.String name, boolean isId)
           
 void setIdAttributeNode(org.w3c.dom.Attr idAttr, boolean isId)
           
 void setIdAttributeNS(java.lang.String namespaceURI, java.lang.String localName, boolean isId)
           
 void setNodeValue(java.lang.String nodeValue)
          Sets the node value of this node.
 void setPrefix(java.lang.String prefix)
          Does nothing, since namespaces are not supported.
 void setTextContent(java.lang.String textContent)
           
 java.lang.Object setUserData(java.lang.String key, java.lang.Object data, UserDataHandler handler)
           
 java.lang.String toString()
          Returns String representation of this node.
 java.lang.String toString(java.lang.String tab)
          Returns String representation of this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attributes

protected java.util.HashMap attributes
A HashMap of AttrImpl nodes representing attributes.

Constructor Detail

ElementImpl

public ElementImpl()
Constructs an empty ElementImpl.


ElementImpl

public ElementImpl(ElementImpl element)
Constructs a ElementImpl from the given node, without creating entire children subtree.

Parameters:
element - , as a ElementImpl.

ElementImpl

public ElementImpl(org.w3c.dom.Document ownerDoc,
                   java.lang.String name)
Constructs an ElementImpl with the given document owner and node name.

Parameters:
ownerDoc - the document owner of the node, as a Document.
name - is the name of the node, as a String.

ElementImpl

protected ElementImpl(org.w3c.dom.Document ownerDoc,
                      java.lang.String nodeName,
                      short type,
                      java.lang.String value)
Constructs an ElementImpl with the given document owner, node name, node type and node value.

Parameters:
ownerDoc - the document owner of the node, as a Document.
nodeName - the name of the node, as a String.
type - the type of the node, as a short.
value - the value of the node, as a String.

ElementImpl

public ElementImpl(org.w3c.dom.Node node)
Constructs an ElementImpl from a given node (creates the children subtree too), as a Node

Parameters:
node - , as a Node.

ElementImpl

public ElementImpl(org.w3c.dom.Node node,
                   boolean deep)
Constructs an ElementImpl from a given node, as a Node, and deep as boolean.

Parameters:
node - , as a Node.
deep - if true, recursively clone the subtree under the specified node; if false, clone only the node itself.
Method Detail

newInstance

public static org.w3c.dom.Element newInstance(org.w3c.dom.Document document)
Creates new instance of ElementImpl from a given document as a Document.

Parameters:
document - document.
Returns:
new Element node as a root of the Document.

insertBefore

public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild,
                                     org.w3c.dom.Node refChild)
Inserts the node newChild before the existing child node refChild. If refChild is null, insert newChild at the end of the list of children.

Specified by:
insertBefore in interface org.w3c.dom.Node
Overrides:
insertBefore in class NodeImpl
Parameters:
newChild - the Node to insert.
refChild - the reference Node.
Returns:
the node being inserted.
Throws:
java.lang.IllegalArgumentException - if newChild is null.

replaceChild

public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild,
                                     org.w3c.dom.Node oldChild)
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.

Specified by:
replaceChild in interface org.w3c.dom.Node
Overrides:
replaceChild in class NodeImpl
Parameters:
newChild - the Node to insert.
oldChild - the Node to be replaced.
Returns:
the node replaced.
Throws:
java.lang.IllegalArgumentException - if newChild is null.

removeChild

public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
Removes the child node indicated by oldChild from the list of children, and returns it.

Specified by:
removeChild in interface org.w3c.dom.Node
Overrides:
removeChild in class NodeImpl
Parameters:
oldChild - the Node to be removed.
Returns:
the node removed.
Throws:
java.lang.IllegalArgumentException - if oldChild is null.

cloneNode

public org.w3c.dom.Node cloneNode(boolean deep)
Returns a duplicate of this node. The duplicate node has no parent (getParentNode returns null). If a shallow clone is being performed (deep is false), the new node will not have any children or siblings. If a deep clone is being performed, the new node will form the root of a complete cloned subtree.

Specified by:
cloneNode in interface org.w3c.dom.Node
Overrides:
cloneNode in class NodeImpl
Parameters:
deep - if true, recursively clone the subtree under the specified node; if false, clone only the node itself.
Returns:
the duplicate node.

getTagName

public java.lang.String getTagName()
Returns tag name of this node.

Specified by:
getTagName in interface org.w3c.dom.Element
Returns:
tag name of this node as a String.

getAttributes

public org.w3c.dom.NamedNodeMap getAttributes()
Returns all attribute nodes of this node.

Specified by:
getAttributes in interface org.w3c.dom.Node
Overrides:
getAttributes in class NodeImpl
Returns:
all attribute nodes of this node as a NamedNodeMap.

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Returns the value of the attribute with given name.

Specified by:
getAttribute in interface org.w3c.dom.Element
Parameters:
name - name of attribute.
Returns:
value of attribute.

getAttributeNS

public java.lang.String getAttributeNS(java.lang.String namespaceURI,
                                       java.lang.String localName)
Equivalent to getAttribute(localName).

Specified by:
getAttributeNS in interface org.w3c.dom.Element
Parameters:
namespaceURI - is name space
localName - is string
Returns:
node
See Also:
setAttributeNS(java.lang.String, java.lang.String, java.lang.String)

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
To the name attribute set value to value.

Specified by:
setAttribute in interface org.w3c.dom.Element
Parameters:
name - attribute value.
value - new attribute value.

setAttributeNS

public void setAttributeNS(java.lang.String namespaceURI,
                           java.lang.String qualifiedName,
                           java.lang.String value)
Equivalent to setAttribute(qualifiedName, value).

Specified by:
setAttributeNS in interface org.w3c.dom.Element
Parameters:
namespaceURI - is name space of the node
qualifiedName - is string
value - is value of the node
See Also:
getAttributeNS(java.lang.String, java.lang.String)

removeAttribute

public void removeAttribute(java.lang.String name)
Removes attribute with the given name.

Specified by:
removeAttribute in interface org.w3c.dom.Element
Parameters:
name - attribute name.

hasAttributes

public boolean hasAttributes()
Returns true, if this node has attributes, otherwise false.

Specified by:
hasAttributes in interface org.w3c.dom.Node
Overrides:
hasAttributes in class NodeImpl
Returns:
true if node has attributes, otherwise false..

hasAttribute

public boolean hasAttribute(java.lang.String name)
Returns true, if this node has attribute with given name, otherwise false.

Specified by:
hasAttribute in interface org.w3c.dom.Element
Parameters:
name - is name of the node
Returns:
true if node has given attribute, otherwise false..

removeAttributeNS

public void removeAttributeNS(java.lang.String namespaceURI,
                              java.lang.String localName)
Equivalent to removeAttribute(localName).

Specified by:
removeAttributeNS in interface org.w3c.dom.Element
Parameters:
namespaceURI - is name space of the node
localName - is name of the node

getAttributeNode

public org.w3c.dom.Attr getAttributeNode(java.lang.String name)
Returns attribute value with given name of this node.

Specified by:
getAttributeNode in interface org.w3c.dom.Element
Parameters:
name - name of attribute.
Returns:
value of attribute.

getAttributeNodeNS

public org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI,
                                           java.lang.String localName)
Equivalent to getAttributeNode(localName).

Specified by:
getAttributeNodeNS in interface org.w3c.dom.Element
Parameters:
namespaceURI - is name space of the node
localName - is name of the node
Returns:
node
See Also:
setAttributeNodeNS(org.w3c.dom.Attr)

setAttributeNode

public org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr newAttr)
                                  throws org.w3c.dom.DOMException
Add new attribute to this node.

Specified by:
setAttributeNode in interface org.w3c.dom.Element
Parameters:
newAttr - new attribute.
Returns:
new attribute as AttrImpl
Throws:
org.w3c.dom.DOMException

setAttributeNodeNS

public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr)
Equivalent to setAttributeNode(newAttr).

Specified by:
setAttributeNodeNS in interface org.w3c.dom.Element
Parameters:
newAttr - is attribute of the node
Returns:
node
See Also:
getAttributeNodeNS(java.lang.String, java.lang.String)

removeAttributeNode

public org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr)
Remove attribute from this node.

Specified by:
removeAttributeNode in interface org.w3c.dom.Element
Parameters:
oldAttr - attribute that will be removed.
Returns:
old attribute as AttrImpl.

hasAttributeNS

public boolean hasAttributeNS(java.lang.String namespaceURI,
                              java.lang.String localName)
Equivalent to hasAttribute(localName).

Specified by:
hasAttributeNS in interface org.w3c.dom.Element
Parameters:
namespaceURI - is name space of the node
localName - is name of the node
Returns:
node

getElementsByTagName

public org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
Returns all Element nodes with given name, searching by all sub nodes from this node.

Specified by:
getElementsByTagName in interface org.w3c.dom.Element
Parameters:
name - tag name.
Returns:
all Element vith given name as NodeList.

getElementsByTagNameNS

public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
                                                   java.lang.String localName)
Equivalent to getElementsByTagName(localName).

Specified by:
getElementsByTagNameNS in interface org.w3c.dom.Element
Parameters:
namespaceURI - is name space of the node
localName - is name of the node
Returns:
node

hasElementChildNodes

public boolean hasElementChildNodes()
Returns true if this node has children nodes.

Returns:
true if this node has children.

beginToString

protected void beginToString(java.lang.StringBuffer sb,
                             Indent indent)
Method beginToString for this class writes the xml begining tag string and all attributes.

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 for this class writes the xml ending tag string.

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

getSchemaTypeInfo

public TypeInfo getSchemaTypeInfo()

setIdAttribute

public void setIdAttribute(java.lang.String name,
                           boolean isId)
                    throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

setIdAttributeNode

public void setIdAttributeNode(org.w3c.dom.Attr idAttr,
                               boolean isId)
                        throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

setIdAttributeNS

public void setIdAttributeNS(java.lang.String namespaceURI,
                             java.lang.String localName,
                             boolean isId)
                      throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

appendChild

public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
Description copied from class: NodeImpl
Adds the node newChild to the end of the list of children of this node.

Specified by:
appendChild in interface org.w3c.dom.Node
Overrides:
appendChild in class NodeImpl
Parameters:
newChild - the Node to insert.
Returns:
the node added.

checkNode

protected void checkNode(org.w3c.dom.Node node)
                  throws org.w3c.dom.DOMException
Description copied from class: NodeImpl
Check that the node is either null or an NodeImpl.

Overrides:
checkNode in class NodeImpl
Parameters:
node - , as a Node.
Throws:
org.w3c.dom.DOMException - if node is not an instance of NodeImpl.

compareDocumentPosition

public short compareDocumentPosition(org.w3c.dom.Node other)
                              throws org.w3c.dom.DOMException
Overrides:
compareDocumentPosition in class NodeImpl
Throws:
org.w3c.dom.DOMException

getBaseURI

public java.lang.String getBaseURI()
Overrides:
getBaseURI in class NodeImpl

getChildNodes

public org.w3c.dom.NodeList getChildNodes()
Description copied from class: NodeImpl
Returns all child nodes of this node, or null if the node has no children.

Specified by:
getChildNodes in interface org.w3c.dom.Node
Overrides:
getChildNodes in class NodeImpl
Returns:
all child nodes of this node, as a Node, or null.

getFeature

public java.lang.Object getFeature(java.lang.String feature,
                                   java.lang.String version)
Overrides:
getFeature in class NodeImpl

getFirstChild

public org.w3c.dom.Node getFirstChild()
Description copied from class: NodeImpl
Returns the first child of this node, or null if the node has no children.

Specified by:
getFirstChild in interface org.w3c.dom.Node
Overrides:
getFirstChild in class NodeImpl
Returns:
the first child, as a Node, or null

getLastChild

public org.w3c.dom.Node getLastChild()
Description copied from class: NodeImpl
Returns the last child of this node, or null if the node has no children.

Specified by:
getLastChild in interface org.w3c.dom.Node
Overrides:
getLastChild in class NodeImpl
Returns:
the last child, as a Node, or null.

getLength

public int getLength()
Description copied from class: NodeImpl
Returns number of child nodes.

Specified by:
getLength in interface org.w3c.dom.NodeList
Overrides:
getLength in class NodeImpl
Returns:
all number of child nodes.

getLocalName

public java.lang.String getLocalName()
Description copied from class: NodeImpl
Equivalent to getNodeName.

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

getNamespaceURI

public java.lang.String getNamespaceURI()
                                 throws org.w3c.dom.DOMException
Specified by:
getNamespaceURI in interface org.w3c.dom.Node
Overrides:
getNamespaceURI in class NodeImpl
Returns:
null, since namespaces are not supported.
Throws:
org.w3c.dom.DOMException

getNextSibling

public org.w3c.dom.Node getNextSibling()
Description copied from class: NodeImpl
Returns the next sibling of this node, or null if the node has no next sibling.

Specified by:
getNextSibling in interface org.w3c.dom.Node
Overrides:
getNextSibling in class NodeImpl
Returns:
the next sibling, as a Node, or null.

getNodeName

public java.lang.String getNodeName()
Description copied from class: NodeImpl
Returns the name associated with this node.

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

getNodeType

public short getNodeType()
Description copied from class: NodeImpl
Returns the node type.

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

getNodeValue

public java.lang.String getNodeValue()
Description copied from class: NodeImpl
Returns the value associated with this node.

Specified by:
getNodeValue in interface org.w3c.dom.Node
Overrides:
getNodeValue in class NodeImpl
Returns:
the node value, as a String.

getOwnerDocument

public org.w3c.dom.Document getOwnerDocument()
Description copied from class: NodeImpl
Returns null, since NodeImpls do not belong to any Document.

Specified by:
getOwnerDocument in interface org.w3c.dom.Node
Overrides:
getOwnerDocument in class NodeImpl
Returns:
document owner as Document.

getParentNode

public org.w3c.dom.Node getParentNode()
Description copied from class: NodeImpl
Returns the parent of this node. A null value indicates that the node is the root of its own tree. To add a node to an existing tree, use one of the insertBefore, replaceChild, or appendChild methods.

Specified by:
getParentNode in interface org.w3c.dom.Node
Overrides:
getParentNode in class NodeImpl
Returns:
the parent, as a Node.
See Also:
NodeImpl.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node), NodeImpl.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node), NodeImpl.appendChild(org.w3c.dom.Node)

getPrefix

public java.lang.String getPrefix()
Description copied from class: NodeImpl
Returns null, since namespaces are not supported.

Specified by:
getPrefix in interface org.w3c.dom.Node
Overrides:
getPrefix in class NodeImpl
Returns:
null.
See Also:
NodeImpl.setPrefix(java.lang.String)

getPreviousSibling

public org.w3c.dom.Node getPreviousSibling()
Description copied from class: NodeImpl
Returns the previous sibling of this node, or null if this node has no previous sibling.

Specified by:
getPreviousSibling in interface org.w3c.dom.Node
Overrides:
getPreviousSibling in class NodeImpl
Returns:
the previous sibling, as a Node, or null.

getTextContent

public java.lang.String getTextContent()
                                throws org.w3c.dom.DOMException
Overrides:
getTextContent in class NodeImpl
Throws:
org.w3c.dom.DOMException

getUserData

public java.lang.Object getUserData(java.lang.String key)
Overrides:
getUserData in class NodeImpl

hasChildNodes

public boolean hasChildNodes()
Description copied from class: NodeImpl
Returns true if this node has child nodes.

Specified by:
hasChildNodes in interface org.w3c.dom.Node
Overrides:
hasChildNodes in class NodeImpl
Returns:
true if this node has children.

initNodeImplChildren

protected void initNodeImplChildren(org.w3c.dom.Node node)
Description copied from class: NodeImpl
Creates the children subtree and adds to this node. (this part had to be splited from the constructor)

Overrides:
initNodeImplChildren in class NodeImpl
Parameters:
node - a Node.

isDefaultNamespace

public boolean isDefaultNamespace(java.lang.String namespaceURI)
Overrides:
isDefaultNamespace in class NodeImpl

isEqualNode

public boolean isEqualNode(org.w3c.dom.Node arg)
Overrides:
isEqualNode in class NodeImpl

isSameNode

public boolean isSameNode(org.w3c.dom.Node other)
Overrides:
isSameNode in class NodeImpl

isSupported

public boolean isSupported(java.lang.String feature,
                           java.lang.String version)
Description copied from class: NodeImpl
Returns false since DOM features are not supported.

Specified by:
isSupported in interface org.w3c.dom.Node
Overrides:
isSupported in class NodeImpl
Parameters:
feature - a String, which is ignored.
version - a String, which is ignored.
Returns:
false.

item

public org.w3c.dom.Node item(int index)
Description copied from class: NodeImpl
Returns child node with the given index.

Specified by:
item in interface org.w3c.dom.NodeList
Overrides:
item in class NodeImpl
Parameters:
index - represents index
Returns:
child node with the given index.

lookupNamespaceURI

public java.lang.String lookupNamespaceURI(java.lang.String prefix)
Overrides:
lookupNamespaceURI in class NodeImpl

lookupPrefix

public java.lang.String lookupPrefix(java.lang.String namespaceURI)
Overrides:
lookupPrefix in class NodeImpl

newCommentInstance

protected org.w3c.dom.Node newCommentInstance(org.w3c.dom.Node node)
Description copied from class: NodeImpl
Creates new instance of the CommentImpl class.

Overrides:
newCommentInstance in class NodeImpl
Parameters:
node - , as a Node.
Returns:
Node new instance of the CommentImpl class.

newDefaultInstance

protected org.w3c.dom.Node newDefaultInstance(org.w3c.dom.Node node)
Description copied from class: NodeImpl
Creates new instance of the NodeImpl class.

Overrides:
newDefaultInstance in class NodeImpl
Parameters:
node - , as a Node.
Returns:
Node new instance of the NodeImpl class.

newElementInstance

protected org.w3c.dom.Node newElementInstance(org.w3c.dom.Node node)
Description copied from class: NodeImpl
Creates new instance of the ElementImpl class.

Overrides:
newElementInstance in class NodeImpl
Parameters:
node - , as a Node.
Returns:
Node new instance of the ElementImpl class.

newTextInstance

protected org.w3c.dom.Node newTextInstance(org.w3c.dom.Node node)
Description copied from class: NodeImpl
Creates new instance of the TextImpl class.

Overrides:
newTextInstance in class NodeImpl
Parameters:
node - , as a Node.
Returns:
Node new instance of the TextImpl class.

normalize

public void normalize()
Description copied from class: NodeImpl
Does nothing, since NodeImpls do not contain Text children.

Specified by:
normalize in interface org.w3c.dom.Node
Overrides:
normalize in class NodeImpl

setNodeValue

public void setNodeValue(java.lang.String nodeValue)
Description copied from class: NodeImpl
Sets the node value of this node.

Specified by:
setNodeValue in interface org.w3c.dom.Node
Overrides:
setNodeValue in class NodeImpl
Parameters:
nodeValue - new node value, as a String.

setPrefix

public void setPrefix(java.lang.String prefix)
Description copied from class: NodeImpl
Does nothing, since namespaces are not supported.

Specified by:
setPrefix in interface org.w3c.dom.Node
Overrides:
setPrefix in class NodeImpl
Parameters:
prefix - a String, which is ignored.
See Also:
NodeImpl.getPrefix()

setTextContent

public void setTextContent(java.lang.String textContent)
                    throws org.w3c.dom.DOMException
Overrides:
setTextContent in class NodeImpl
Throws:
org.w3c.dom.DOMException

setUserData

public java.lang.Object setUserData(java.lang.String key,
                                    java.lang.Object data,
                                    UserDataHandler handler)
Overrides:
setUserData in class NodeImpl

toString

public java.lang.String toString()
Description copied from class: NodeImpl
Returns String representation of this node.

Overrides:
toString in class NodeImpl
Returns:
String representation of this node.

toString

public java.lang.String toString(java.lang.String tab)
Description copied from class: NodeImpl
Returns String representation of this node.

Overrides:
toString in class NodeImpl
Parameters:
tab - tab for node indentation.
Returns:
String representation of this node.


Copyright © 2002-2007 Together - the Workgroup. All Rights Reserved.