|
BEA Systems, Inc. | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweblogic.apache.xerces.dom.NamedNodeMapImpl
NamedNodeMaps represent collections of Nodes that can be accessed by name. Entity and Notation nodes are stored in NamedNodeMaps attached to the DocumentType. Attributes are placed in a NamedNodeMap attached to the elem they're related too. However, because attributes require more work, such as firing mutation events, they are stored in a subclass of NamedNodeMapImpl.
Only one Node may be stored per name; attempting to store another will replace the previous value.
NOTE: The "primary" storage key is taken from the NodeName attribute of the node. The "secondary" storage key is the namespaceURI and localName, when accessed by DOM level 2 nodes. All nodes, even DOM Level 2 nodes are stored in a single Vector sorted by the primary "nodename" key.
NOTE: item()'s integer index does _not_ imply that the named nodes must be stored in an array; that's only an access method. Note too that these indices are "live"; if someone changes the map's contents, the indices associated with nodes may change.
This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.
Field Summary | |
protected static short |
CHANGED
Deprecated. |
protected short |
flags
Deprecated. |
protected static short |
HASDEFAULTS
Deprecated. |
protected Vector |
nodes
Deprecated. Nodes. |
protected NodeImpl |
ownerNode
Deprecated. |
protected static short |
READONLY
Deprecated. |
Constructor Summary | |
protected |
NamedNodeMapImpl(NodeImpl ownerNode)
Deprecated. Constructs a named node map. |
Method Summary | |
protected int |
addItem(Node arg)
Deprecated. |
protected void |
cloneContent(NamedNodeMapImpl srcmap)
Deprecated. |
NamedNodeMapImpl |
cloneMap(NodeImpl ownerNode)
Deprecated. Cloning a NamedNodeMap is a DEEP OPERATION; it always clones all the nodes contained in the map. |
protected Vector |
cloneMap(Vector list)
Deprecated. NON-DOM: copy content of this map into the specified vector |
protected int |
findNamePoint(String name,
int start)
Deprecated. Subroutine: Locate the named item, or the point at which said item should be added. |
protected int |
findNamePoint(String namespaceURI,
String name)
Deprecated. This findNamePoint is for DOM Level 2 Namespaces. |
protected Object |
getItem(int index)
Deprecated. |
int |
getLength()
Deprecated. Report how many nodes are currently stored in this NamedNodeMap. |
Node |
getNamedItem(String name)
Deprecated. Retrieve a node by name. |
Node |
getNamedItemNS(String namespaceURI,
String localName)
Deprecated. Introduced in DOM Level 2. |
Node |
item(int index)
Deprecated. Retrieve an item from the map by 0-based index. |
void |
removeAll()
Deprecated. NON-DOM remove all elements from this map |
protected void |
removeItem(int index)
Deprecated. NON-DOM: Remove attribute at specified index |
Node |
removeNamedItem(String name)
Deprecated. |
Node |
removeNamedItemNS(String namespaceURI,
String name)
Deprecated. Introduced in DOM Level 2. |
Node |
setNamedItem(Node arg)
Deprecated. Adds a node using its nodeName attribute. |
Node |
setNamedItemNS(Node arg)
Deprecated. Adds a node using its namespaceURI and localName. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final short CHANGED
protected short flags
protected static final short HASDEFAULTS
protected Vector nodes
protected NodeImpl ownerNode
protected static final short READONLY
Constructor Detail |
protected NamedNodeMapImpl(NodeImpl ownerNode)
Method Detail |
protected int addItem(Node arg)
protected void cloneContent(NamedNodeMapImpl srcmap)
public NamedNodeMapImpl cloneMap(NodeImpl ownerNode)
protected Vector cloneMap(Vector list)
list
- Vector to copy information into.
protected int findNamePoint(String name, int start)
name
- Name of a node to look up.
protected int findNamePoint(String namespaceURI, String name)
protected Object getItem(int index)
public int getLength()
getLength
in interface NamedNodeMap
public Node getNamedItem(String name)
getNamedItem
in interface NamedNodeMap
name
- Name of a node to look up.public Node getNamedItemNS(String namespaceURI, String localName)
Retrieves a node specified by local name and namespace URI.
getNamedItemNS
in interface NamedNodeMap
namespaceURI
- The namespace URI of the node to retrieve.
When it is null or an empty string, this
method behaves like getNamedItem.localName
- The local name of the node to retrieve.
public Node item(int index)
item
in interface NamedNodeMap
index
- Which item to retrieve. Note that indices are just an
enumeration of the current contents; they aren't guaranteed to be
stable, nor do they imply any promises about the order of the
NamedNodeMap's contents. In other words, DO NOT assume either that
index(i) will always refer to the same entry, or that there is any
stable ordering of entries... and be prepared for double-reporting
or skips as insertion and deletion occur.public void removeAll()
protected void removeItem(int index)
public Node removeNamedItem(String name) throws DOMException
removeNamedItem
in interface NamedNodeMap
DOMException
public Node removeNamedItemNS(String namespaceURI, String name) throws DOMException
Removes a node specified by local name and namespace URI.
removeNamedItemNS
in interface NamedNodeMap
namespaceURI
- The namespace URI of the node to remove.
When it is null or an empty string, this
method behaves like removeNamedItem.
NOT_FOUND_ERR:
- Raised if there is no node named
name in the map.
DOMException
public Node setNamedItem(Node arg) throws DOMException
setNamedItem
in interface NamedNodeMap
arg
- A node to store in a named node map. The node will later be
accessible using the value of the namespaceURI and localName
attribute of the node. If a node with those namespace URI and
local name is already present in the map, it is replaced by the new
one.
DOMException
- The exception description.NamedNodeMap.setNamedItem(org.w3c.dom.Node)
public Node setNamedItemNS(Node arg) throws DOMException
setNamedItemNS
in interface NamedNodeMap
arg
- A node to store in a named node map. The node will later be
accessible using the value of the namespaceURI and localName
attribute of the node. If a node with those namespace URI and
local name is already present in the map, it is replaced by the new
one.
DOMException
NamedNodeMap.setNamedItem(org.w3c.dom.Node)
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs91 Copyright 2005 BEA Systems Inc. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |