org.eclipse.ercp.xml.dom
Class NSNodeImpl

java.lang.Object
  extended by org.eclipse.ercp.xml.dom.NodeImpl
      extended by org.eclipse.ercp.xml.dom.NSNodeImpl
All Implemented Interfaces:
Node, NodeList
Direct Known Subclasses:
AttrImpl, TreeNode

public abstract class NSNodeImpl
extends NodeImpl

Implement namespaces needs


Field Summary
protected  java.lang.String localName
           
protected  java.lang.String namespaceURI
           
protected  java.lang.String prefix
           
protected  java.lang.String qualifiedName
           
 
Fields inherited from class org.eclipse.ercp.xml.dom.NodeImpl
ownerDocument
 
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
NSNodeImpl(DocumentImpl ownerDocument)
          Constructor for NSNodeImpl
NSNodeImpl(DocumentImpl ownerDocument, java.lang.String qualifiedName)
           
NSNodeImpl(DocumentImpl ownerDocument, java.lang.String namespaceURI, java.lang.String qualifiedName)
           
 
Method Summary
 java.lang.String getLocalName()
          Returns the local part of the qualified name of this node.
 java.lang.String getNamespaceURI()
          The namespace URI of this node, or null if it is unspecified.
 java.lang.String getNodeName()
          The name of this node, depending on its type; see the table above.
 java.lang.String getPrefix()
          The namespace prefix of this node, or null if it is unspecified.
 void setPrefix(java.lang.String prefix)
           
 
Methods inherited from class org.eclipse.ercp.xml.dom.NodeImpl
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLength, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, item, normalize, removeChild, replaceChild, setNodeValue, spreadOwnerDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
cloneNode, getNodeType
 

Field Detail

prefix

protected java.lang.String prefix

localName

protected java.lang.String localName

namespaceURI

protected java.lang.String namespaceURI

qualifiedName

protected java.lang.String qualifiedName
Constructor Detail

NSNodeImpl

public NSNodeImpl(DocumentImpl ownerDocument)
Constructor for NSNodeImpl


NSNodeImpl

public NSNodeImpl(DocumentImpl ownerDocument,
                  java.lang.String qualifiedName)

NSNodeImpl

public NSNodeImpl(DocumentImpl ownerDocument,
                  java.lang.String namespaceURI,
                  java.lang.String qualifiedName)
Method Detail

getPrefix

public java.lang.String getPrefix()
The namespace prefix of this node, or null if it is unspecified.
Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.

Specified by:
getPrefix in interface Node
Overrides:
getPrefix in class NodeImpl
Throws:
DOMException - INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NAMESPACE_ERR: Raised if the specified prefix is malformed, if the namespaceURI of this node is null, if the specified prefix is "xml" and the namespaceURI of this node is different from " http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from " http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of this node is "xmlns" .
Since:
DOM Level 2

setPrefix

public void setPrefix(java.lang.String prefix)
               throws DOMException
Specified by:
setPrefix in interface Node
Overrides:
setPrefix in class NodeImpl
Throws:
DOMException

getNodeName

public java.lang.String getNodeName()
The name of this node, depending on its type; see the table above.


getLocalName

public java.lang.String getLocalName()
Returns the local part of the qualified name of this node.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.

Specified by:
getLocalName in interface Node
Overrides:
getLocalName in class NodeImpl
Since:
DOM Level 2

getNamespaceURI

public java.lang.String getNamespaceURI()
The namespace URI of this node, or null if it is unspecified.
This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.Per the Namespaces in XML Specification an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace.

Specified by:
getNamespaceURI in interface Node
Overrides:
getNamespaceURI in class NodeImpl
Since:
DOM Level 2