public class AttributeMap extends NamedNodeMapImpl
This class doesn't directly support mutation events, however, it notifies the document when mutations are performed so that the document class do so.
CHANGED, flags, HASDEFAULTS, nodes, ownerNode, READONLY| Modifier | Constructor and Description |
|---|---|
protected |
AttributeMap(ElementImpl ownerNode,
NamedNodeMapImpl defaults)
Constructs a named node map.
|
| Modifier and Type | Method and Description |
|---|---|
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(java.lang.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(java.lang.String namespaceURI,
java.lang.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(java.lang.String name)
Removes a node specified by name.
|
org.w3c.dom.Node |
removeNamedItemNS(java.lang.String namespaceURI,
java.lang.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.
|
cloneMap, findNamePoint, findNamePoint, getItem, getLength, getNamedItem, getNamedItemIndex, getNamedItemNS, item, precedes, removeAll, removeItem, setOwnerDocumentprotected AttributeMap(ElementImpl ownerNode, NamedNodeMapImpl defaults)
public org.w3c.dom.Node setNamedItem(org.w3c.dom.Node arg)
throws org.w3c.dom.DOMException
setNamedItem in interface org.w3c.dom.NamedNodeMapsetNamedItem in class NamedNodeMapImplarg - An Attr node to store in this map.org.w3c.dom.DOMException - The exception description.NamedNodeMap.setNamedItem(org.w3c.dom.Node)public org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node arg)
throws org.w3c.dom.DOMException
setNamedItemNS in interface org.w3c.dom.NamedNodeMapsetNamedItemNS in class NamedNodeMapImplarg - A node to store in a named node map.org.w3c.dom.DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a
different document than the one that created this map.
arg is an
Attr that is already an attribute of another
Element object. The DOM user must explicitly clone
Attr nodes to re-use them in other elements.
NamedNodeMap.setNamedItem(org.w3c.dom.Node)public org.w3c.dom.Node removeNamedItem(java.lang.String name)
throws org.w3c.dom.DOMException
org.w3c.dom.NamedNodeMapremoveNamedItem in interface org.w3c.dom.NamedNodeMapremoveNamedItem in class NamedNodeMapImplname - The nodeName of the node to remove.org.w3c.dom.DOMException - NOT_FOUND_ERR: Raised if there is no node named name in
this map.
protected org.w3c.dom.Node removeItem(org.w3c.dom.Node item,
boolean addDefault)
throws org.w3c.dom.DOMException
item - The node to removeaddDefault - true -- magically add default attributeorg.w3c.dom.DOMExceptionprotected final org.w3c.dom.Node internalRemoveNamedItem(java.lang.String name,
boolean raiseEx)
public org.w3c.dom.Node removeNamedItemNS(java.lang.String namespaceURI,
java.lang.String name)
throws org.w3c.dom.DOMException
Removes an attribute specified by local name and namespace URI.
removeNamedItemNS in interface org.w3c.dom.NamedNodeMapremoveNamedItemNS in class NamedNodeMapImplnamespaceURI - The namespace URI of the node to remove.
When it is null or an empty string, this
method behaves like removeNamedItem.name - The local name of the node to remove. If the
removed attribute is known to have a default
value, an attribute immediately appears
containing the default value.NOT_FOUND_ERR: - Raised if there is no node named
name in the map.org.w3c.dom.DOMException - NOT_FOUND_ERR: Raised if there is no node with the specified
namespaceURI and localName in this map.
protected final org.w3c.dom.Node internalRemoveNamedItemNS(java.lang.String namespaceURI,
java.lang.String name,
boolean raiseEx)
public NamedNodeMapImpl cloneMap(NodeImpl ownerNode)
cloneMap in class NamedNodeMapImplprotected void cloneContent(NamedNodeMapImpl srcmap)
cloneContent in class NamedNodeMapImplprotected void reconcileDefaults(NamedNodeMapImpl defaults)
defaults - The default attributes map to sync with.protected final int addItem(org.w3c.dom.Node arg)
addItem in class NamedNodeMapImplCopyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.