org.apache.xerces.dom
Class AttributeMap
- org.w3c.dom.NamedNodeMap, Serializable
public class AttributeMap
AttributeMap inherits from NamedNodeMapImpl and extends it to deal with the
specifics of storing attributes. These are:
- managing ownership of attribute nodes
- managing default attributes
- firing mutation events
This class doesn't directly support mutation events, however, it notifies
the document when mutations are performed so that the document class do so.
$Id: AttributeMap.java 415211 2006-06-18 22:44:11Z mrglavas $
protected int | addItem(org.w3c.dom.Node arg)
|
protected void | cloneContent(NamedNodeMapImpl srcmap) - Override parent's method to set the ownerNode correctly
|
NamedNodeMapImpl | cloneMap(NodeImpl ownerNode) - Cloning a NamedNodeMap is a DEEP OPERATION; it always clones
all the nodes contained in the map.
|
protected org.w3c.dom.Node | internalRemoveNamedItem(String name, boolean raiseEx) - Internal removeNamedItem method allowing to specify whether an exception
must be thrown if the specified name is not found.
|
protected org.w3c.dom.Node | internalRemoveNamedItemNS(String namespaceURI, String name, boolean raiseEx) - Internal removeNamedItemNS method allowing to specify whether an
exception must be thrown if the specified local name and namespace URI
is not found.
|
protected void | reconcileDefaults(NamedNodeMapImpl defaults) - Get this AttributeMap in sync with the given "defaults" map.
|
protected org.w3c.dom.Node | removeItem(org.w3c.dom.Node item, boolean addDefault) - NON-DOM: Remove the node object
NOTE: Specifically removes THIS NODE -- not the node with this
name, nor the node with these contents.
|
org.w3c.dom.Node | removeNamedItem(String name)
|
org.w3c.dom.Node | removeNamedItemNS(String namespaceURI, String name) - Introduced in DOM Level 2.
|
org.w3c.dom.Node | setNamedItem(org.w3c.dom.Node arg) - Adds an attribute using its nodeName attribute.
|
org.w3c.dom.Node | setNamedItemNS(org.w3c.dom.Node arg) - Adds an attribute using its namespaceURI and localName.
|
addItem , cloneContent , cloneMap , cloneMap , findNamePoint , findNamePoint , getItem , getLength , getNamedItem , getNamedItemIndex , getNamedItemNS , item , precedes , removeAll , removeItem , removeNamedItem , removeNamedItemNS , setNamedItem , setNamedItemNS , setOwnerDocument |
internalRemoveNamedItem
protected final org.w3c.dom.Node internalRemoveNamedItem(String name,
boolean raiseEx)
Internal removeNamedItem method allowing to specify whether an exception
must be thrown if the specified name is not found.
internalRemoveNamedItemNS
protected final org.w3c.dom.Node internalRemoveNamedItemNS(String namespaceURI,
String name,
boolean raiseEx)
Internal removeNamedItemNS method allowing to specify whether an
exception must be thrown if the specified local name and namespace URI
is not found.
reconcileDefaults
protected void reconcileDefaults(NamedNodeMapImpl defaults)
Get this AttributeMap in sync with the given "defaults" map.
defaults
- The default attributes map to sync with.
removeItem
protected org.w3c.dom.Node removeItem(org.w3c.dom.Node item,
boolean addDefault)
throws org.w3c.dom.DOMException
NON-DOM: Remove the node object
NOTE: Specifically removes THIS NODE -- not the node with this
name, nor the node with these contents. If node does not belong to
this named node map, we throw a DOMException.
item
- The node to removeaddDefault
- true -- magically add default attribute
org.w3c.dom.DOMException
-
removeNamedItemNS
public org.w3c.dom.Node removeNamedItemNS(String namespaceURI,
String name)
throws org.w3c.dom.DOMException
Introduced in DOM Level 2.
Removes an attribute specified by local name and namespace URI.
- removeNamedItemNS in interface org.w3c.dom.NamedNodeMap
- removeNamedItemNS in interface NamedNodeMapImpl
namespaceURI
- The namespace URI of the node to remove.
When it is null or an empty string, this
method behaves like removeNamedItem.
- Node The node removed from the map if a node with such
a local name and namespace URI exists.
setNamedItem
public org.w3c.dom.Node setNamedItem(org.w3c.dom.Node arg)
throws org.w3c.dom.DOMException
Adds an attribute using its nodeName attribute.
- setNamedItem in interface org.w3c.dom.NamedNodeMap
- setNamedItem in interface NamedNodeMapImpl
arg
- An Attr node to store in this map.
- If the new Node replaces an existing node the replaced Node is
returned, otherwise null is returned.
org.w3c.dom.DOMException
- The exception description.
org.w3c.dom.NamedNodeMap.setNamedItem
setNamedItemNS
public org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node arg)
throws org.w3c.dom.DOMException
Adds an attribute using its namespaceURI and localName.
- setNamedItemNS in interface org.w3c.dom.NamedNodeMap
- setNamedItemNS in interface NamedNodeMapImpl
arg
- A node to store in a named node map.
- If the new Node replaces an existing node the replaced Node is
returned, otherwise null is returned.
org.w3c.dom.NamedNodeMap.setNamedItem
Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.