gnu.xml.dom
Class DomNamedNodeMap

java.lang.Object
  extended bygnu.xml.dom.DomNamedNodeMap
All Implemented Interfaces:
org.w3c.dom.NamedNodeMap

public class DomNamedNodeMap
extends java.lang.Object
implements org.w3c.dom.NamedNodeMap

"NamedNodeMap" implementation.

Used mostly to hold element attributes, but sometimes also to list notations or entities.

Version:
$Date: 2001/11/20 04:46:24 $
Author:
David Brownell

Constructor Summary
DomNamedNodeMap(org.w3c.dom.Document owner)
          Constructs an empty map associated with the specified document.
 
Method Summary
 void compact()
          Reduces space utilization for this object.
 int getLength()
          DOM L1 Returns the length of the map.
 org.w3c.dom.Node getNamedItem(java.lang.String name)
          DOM L1 Returns the named item from the map, or null; names are just the nodeName property.
 org.w3c.dom.Node getNamedItemNS(java.lang.String namespaceURI, java.lang.String localName)
          DOM L2 Returns the named item from the map, or null; names are the localName and namespaceURI properties, ignoring any prefix.
 boolean isReadonly()
          Exposes the internal "readonly" flag.
 org.w3c.dom.Node item(int index)
          DOM L1 Returns the indexed item from the map, or null.
 void makeReadonly()
          Sets the internal "readonly" flag so the node and its children can't be changed.
 org.w3c.dom.Node removeNamedItem(java.lang.String name)
          DOM L1 Removes the named item from the map, or reports an exception; names are just the nodeName property.
 org.w3c.dom.Node removeNamedItemNS(java.lang.String namespaceURI, java.lang.String localName)
          DOM L2 Removes the named item from the map, or reports an exception; names are the localName and namespaceURI properties.
 org.w3c.dom.Node setNamedItem(org.w3c.dom.Node arg)
          DOM L1 Stores the named item into the map, optionally overwriting any existing node with that name.
 org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node arg)
          DOM L2 Stores the named item into the map, optionally overwriting any existing node with that fully qualified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomNamedNodeMap

public DomNamedNodeMap(org.w3c.dom.Document owner)
Constructs an empty map associated with the specified document.

Method Detail

compact

public void compact()
Reduces space utilization for this object.


isReadonly

public final boolean isReadonly()
Exposes the internal "readonly" flag. In DOM, all NamedNodeMap objects found in a DocumentType object are read-only (after they are fully constructed), and those holding attributes of a readonly element will also be readonly.


makeReadonly

public void makeReadonly()
Sets the internal "readonly" flag so the node and its children can't be changed.


getNamedItem

public org.w3c.dom.Node getNamedItem(java.lang.String name)
DOM L1 Returns the named item from the map, or null; names are just the nodeName property.

Specified by:
getNamedItem in interface org.w3c.dom.NamedNodeMap

getNamedItemNS

public org.w3c.dom.Node getNamedItemNS(java.lang.String namespaceURI,
                                       java.lang.String localName)
DOM L2 Returns the named item from the map, or null; names are the localName and namespaceURI properties, ignoring any prefix.

Specified by:
getNamedItemNS in interface org.w3c.dom.NamedNodeMap

setNamedItem

public org.w3c.dom.Node setNamedItem(org.w3c.dom.Node arg)
DOM L1 Stores the named item into the map, optionally overwriting any existing node with that name. The name used is just the nodeName attribute.

Specified by:
setNamedItem in interface org.w3c.dom.NamedNodeMap

setNamedItemNS

public org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node arg)
DOM L2 Stores the named item into the map, optionally overwriting any existing node with that fully qualified name. The name used incorporates the localName and namespaceURI properties, and ignores any prefix.

Specified by:
setNamedItemNS in interface org.w3c.dom.NamedNodeMap

removeNamedItem

public org.w3c.dom.Node removeNamedItem(java.lang.String name)
DOM L1 Removes the named item from the map, or reports an exception; names are just the nodeName property.

Specified by:
removeNamedItem in interface org.w3c.dom.NamedNodeMap

removeNamedItemNS

public org.w3c.dom.Node removeNamedItemNS(java.lang.String namespaceURI,
                                          java.lang.String localName)
DOM L2 Removes the named item from the map, or reports an exception; names are the localName and namespaceURI properties.

Specified by:
removeNamedItemNS in interface org.w3c.dom.NamedNodeMap

item

public org.w3c.dom.Node item(int index)
DOM L1 Returns the indexed item from the map, or null.

Specified by:
item in interface org.w3c.dom.NamedNodeMap

getLength

public int getLength()
DOM L1 Returns the length of the map.

Specified by:
getLength in interface org.w3c.dom.NamedNodeMap


Source code is under GPL (with library exception) in the JAXP project at http://www.gnu.org/software/classpathx/jaxp
This documentation was derived from that source code on 2008-04-13.