org.apache.axiom.om.impl.dom
Class AttributeMap

java.lang.Object
  extended by org.apache.axiom.om.impl.dom.AttributeMap
All Implemented Interfaces:
org.w3c.dom.NamedNodeMap

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

Most of the implementation is taken from org.apache.xerces.dom.NamedNodeMapImpl


Method Summary
protected  int addItem(org.w3c.dom.Node arg)
           
protected  java.util.Vector cloneMap(java.util.Vector list)
          NON-DOM: copy content of this map into the specified vector
protected  int findNamePoint(java.lang.String name, int start)
          From org.apache.xerces.dom.NamedNodeMapImpl

Subroutine: Locates the named item, or the point at which said item should be added.

protected  int findNamePoint(java.lang.String namespaceURI, java.lang.String name)
          This findNamePoint is for DOM Level 2 Namespaces.
protected  java.lang.Object getItem(int index)
           
 int getLength()
          From org.apache.xerces.dom.NamedNodeMapImpl
 org.w3c.dom.Node getNamedItem(java.lang.String name)
           
protected  int getNamedItemIndex(java.lang.String namespaceURI, java.lang.String localName)
           
 org.w3c.dom.Node getNamedItemNS(java.lang.String namespaceURI, java.lang.String localName)
          Introduced in DOM Level 2.
 org.w3c.dom.Node item(int index)
          From org.apache.xerces.dom.NamedNodeMapImpl
protected  boolean precedes(org.w3c.dom.Node a, org.w3c.dom.Node b)
           
 void removeAll()
          NON-DOM remove all elements from this map.
protected  void removeItem(int index)
          NON-DOM: Remove attribute at specified index.
 org.w3c.dom.Node removeNamedItem(java.lang.String name)
           
 org.w3c.dom.Node removeNamedItemNS(java.lang.String namespaceURI, java.lang.String name)
           
 org.w3c.dom.Node setNamedItem(org.w3c.dom.Node attribute)
          Almost a copy of the Xerces impl.
 org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node attribute)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNamedItem

public org.w3c.dom.Node getNamedItem(java.lang.String name)
Specified by:
getNamedItem in interface org.w3c.dom.NamedNodeMap

item

public org.w3c.dom.Node item(int index)
From org.apache.xerces.dom.NamedNodeMapImpl

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

getLength

public int getLength()
From org.apache.xerces.dom.NamedNodeMapImpl

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

getNamedItemNS

public org.w3c.dom.Node getNamedItemNS(java.lang.String namespaceURI,
                                       java.lang.String localName)
Introduced in DOM Level 2. Retrieves a node specified by local name and namespace URI.

Specified by:
getNamedItemNS in interface org.w3c.dom.NamedNodeMap
Parameters:
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.
Returns:
Returns s Node (of any type) with the specified name, or null if the specified name did not identify any node in the map.

removeNamedItem

public org.w3c.dom.Node removeNamedItem(java.lang.String name)
                                 throws org.w3c.dom.DOMException
Specified by:
removeNamedItem in interface org.w3c.dom.NamedNodeMap
Throws:
org.w3c.dom.DOMException

removeNamedItemNS

public org.w3c.dom.Node removeNamedItemNS(java.lang.String namespaceURI,
                                          java.lang.String name)
                                   throws org.w3c.dom.DOMException
Specified by:
removeNamedItemNS in interface org.w3c.dom.NamedNodeMap
Throws:
org.w3c.dom.DOMException

setNamedItem

public org.w3c.dom.Node setNamedItem(org.w3c.dom.Node attribute)
                              throws org.w3c.dom.DOMException
Almost a copy of the Xerces impl.

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

setNamedItemNS

public org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node attribute)
                                throws org.w3c.dom.DOMException
Specified by:
setNamedItemNS in interface org.w3c.dom.NamedNodeMap
Throws:
org.w3c.dom.DOMException

findNamePoint

protected int findNamePoint(java.lang.String name,
                            int start)
From org.apache.xerces.dom.NamedNodeMapImpl

Subroutine: Locates the named item, or the point at which said item should be added.

Parameters:
name - Name of a node to look up.
Returns:
If positive or zero, the index of the found item. If negative, index of the appropriate point at which to insert the item, encoded as -1-index and hence reconvertable by subtracting it from -1. (Encoding because I don't want to recompare the strings but don't want to burn bytes on a datatype to hold a flagged value.)

findNamePoint

protected int findNamePoint(java.lang.String namespaceURI,
                            java.lang.String name)
This findNamePoint is for DOM Level 2 Namespaces.


precedes

protected boolean precedes(org.w3c.dom.Node a,
                           org.w3c.dom.Node b)

removeItem

protected void removeItem(int index)
NON-DOM: Remove attribute at specified index.


getItem

protected java.lang.Object getItem(int index)

addItem

protected int addItem(org.w3c.dom.Node arg)

cloneMap

protected java.util.Vector cloneMap(java.util.Vector list)
NON-DOM: copy content of this map into the specified vector

Parameters:
list - Vector to copy information into.
Returns:
Returns a copy of this node named map.

getNamedItemIndex

protected int getNamedItemIndex(java.lang.String namespaceURI,
                                java.lang.String localName)

removeAll

public void removeAll()
NON-DOM remove all elements from this map.



Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.