FileDocCategorySizeDatePackage
NodeImpl.javaAPI DocAndroid 1.5 API5552Wed May 06 22:41:06 BST 2009org.apache.harmony.xml.dom

NodeImpl

public abstract class NodeImpl extends Object implements Node
Provides a straightforward implementation of the corresponding W3C DOM interface. The class is used internally only, thus only notable members that are not in the original interface are documented (the W3C docs are quite extensive). Hope that's ok.

Some of the fields may have package visibility, so other classes belonging to the DOM implementation can easily access them while maintaining the DOM tree structure.

This class represents a Node that has neither a parent nor children.

Fields Summary
private static final NodeList
EMPTY_LIST
DocumentImpl
document
Constructors Summary
NodeImpl(DocumentImpl document)


      
        this.document = document;
    
Methods Summary
public org.w3c.dom.NodeappendChild(org.w3c.dom.Node newChild)

        throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, null);
    
public org.w3c.dom.NodecloneNode(boolean deep)

        return document.cloneNode(this, deep);
    
public org.w3c.dom.NamedNodeMapgetAttributes()

        return null;
    
public org.w3c.dom.NodeListgetChildNodes()

        return EMPTY_LIST;
    
public org.w3c.dom.NodegetFirstChild()

        return null;
    
public org.w3c.dom.NodegetLastChild()

        return null;
    
public java.lang.StringgetLocalName()

        return null;
    
public java.lang.StringgetNamespaceURI()

        return null;
    
public org.w3c.dom.NodegetNextSibling()

        return null;
    
public java.lang.StringgetNodeName()

        return null;
    
public abstract shortgetNodeType()

public java.lang.StringgetNodeValue()

        return null;
    
public org.w3c.dom.DocumentgetOwnerDocument()

        return document;
    
public org.w3c.dom.NodegetParentNode()

        return null;
    
public java.lang.StringgetPrefix()

        return null;
    
public org.w3c.dom.NodegetPreviousSibling()

        return null;
    
public booleanhasAttributes()

        return false;
    
public booleanhasChildNodes()

        return false;
    
public org.w3c.dom.NodeinsertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild)

        throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, null);
    
public booleanisSupported(java.lang.String feature, java.lang.String version)

        return DOMImplementationImpl.getInstance().hasFeature(feature, version);
    
private static booleanmatchesName(java.lang.String required, java.lang.String actual, boolean wildcard)
Checks whether a required string matches an actual string. This utility method is used for comparing namespaces and such. It takes into account null arguments and the "*" special case.

param
required The required string.
param
actual The actual string.
return
True if and only if the actual string matches the required one.

        if (wildcard && "*".equals(required)) {
            return true;
        }
        
        if (required == null) {
            return (actual == null);
        }
        
        return required.equals(actual);
    
public booleanmatchesName(java.lang.String name, boolean wildcard)
Checks whether this node's name matches a required name. It takes into account null arguments and the "*" special case.

param
name The required name.
param
wildcard TODO
return
True if and only if the actual name matches the required one.

        return matchesName(name, getNodeName(), wildcard);
    
public booleanmatchesNameNS(java.lang.String namespaceURI, java.lang.String localName, boolean wildcard)
Checks whether this node's namespace and local name match a required pair of namespace and local name. It takes into account null arguments and the "*" special case.

param
namespaceURI The required namespace.
param
localName The required local name.
param
wildcard TODO
return
True if and only if the actual namespace and local name match the required pair of namespace and local name.

        return matchesName(namespaceURI, getNamespaceURI(), wildcard) && matchesName(localName, getLocalName(), wildcard);
    
public voidnormalize()

    
public org.w3c.dom.NoderemoveChild(org.w3c.dom.Node oldChild)

        throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, null);
    
public org.w3c.dom.NodereplaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild)

        throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, null);
    
public voidsetNodeValue(java.lang.String nodeValue)

    
public voidsetPrefix(java.lang.String prefix)