ice.pilots.html4
Class DAttrMap

java.lang.Object
  extended byice.storm.DynamicObject
      extended byice.storm.DynamicList
          extended byice.pilots.html4.DAttrMap
All Implemented Interfaces:
NamedNodeMap

public class DAttrMap
extends DynamicList
implements NamedNodeMap


Field Summary
protected  DElement element
           
 
Fields inherited from class ice.storm.DynamicObject
NOT_FOUND, SETD_IGNORE, SETD_NOT_FOUND, SETD_OK
 
Constructor Summary
protected DAttrMap(DElement element)
           
 
Method Summary
 Object execDynamicMethod(String name, Object[] args, DynEnv env)
          Perform function-like actions for `name' with the given args.
 Object getDynamicValue(String name, DynEnv env)
          Returns the `key' field or Defs.NOT_FOUND if `name' does not exist.
 int getLength()
          The number of nodes in this map.
 Node getNamedItem(String name)
          Retrieves a node specified by name.
 Node getNamedItemNS(String namespaceURI, String localName)
          Retrieves a node specified by local name and namespace URI.
 Node item(int index)
          Returns the indexth item in the map.
 Node removeNamedItem(String name)
          Removes a node specified by name.
 Node removeNamedItemNS(String namespaceURI, String localName)
          Removes a node specified by local name and namespace URI.
protected  Object script_item(int index, DynEnv env)
          Returns null if not found
protected  Object script_namedItem(String name, DynEnv env)
          Returns null if not found
 int setDynamicValue(String name, Object value, DynEnv env)
          Set field `name' to `value'.
 Node setNamedItem(Node n)
          Adds a node using its nodeName attribute.
 Node setNamedItemNS(Node arg)
          Adds a node using its namespaceURI and localName.
 
Methods inherited from class ice.storm.DynamicList
getEnumeratableIds, getMethodPropertySource, getSlot, getSlot, script_tags
 
Methods inherited from class ice.storm.DynamicObject
deleteSlot, deleteSlot, getDynamicScopeParent, getScriptDataLock, getScriptWrapper, hasSlot, hasSlot, javaReflectionTarget, readOnlySlots, script_toSource, script_toString, setScriptWrapperIfAbsent, setSlot, setSlot, unlinkAllSlots
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

protected DElement element
Constructor Detail

DAttrMap

protected DAttrMap(DElement element)
Method Detail

getNamedItem

public Node getNamedItem(String name)
Description copied from interface: NamedNodeMap
Retrieves a node specified by name.

Specified by:
getNamedItem in interface NamedNodeMap
Returns:
A Node (of any type) with the specified nodeName, or null if it does not identify any node in this map.

setNamedItem

public Node setNamedItem(Node n)
Description copied from interface: NamedNodeMap
Adds a node using its nodeName attribute. If a node with that name is already present in this map, it is replaced by the new one.
As the nodeName attribute is used to derive the name which the node must be stored under, multiple nodes of certain types (those that have a "special" string value) cannot be stored as the names would clash. This is seen as preferable to allowing nodes to be aliased.

Specified by:
setNamedItem in interface NamedNodeMap
Returns:
If the new Node replaces an existing node the replaced Node is returned, otherwise null is returned.

removeNamedItem

public Node removeNamedItem(String name)
Description copied from interface: NamedNodeMap
Removes a node specified by name. When this map contains the attributes attached to an element, if the removed attribute is known to have a default value, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable.

Specified by:
removeNamedItem in interface NamedNodeMap
Returns:
The node removed from this map if a node with such a name exists.

item

public Node item(int index)
Description copied from interface: NamedNodeMap
Returns the indexth item in the map. If index is greater than or equal to the number of nodes in this map, this returns null.

Specified by:
item in interface NamedNodeMap
Returns:
The node at the indexth position in the map, or null if that is not a valid index.

script_item

protected Object script_item(int index,
                             DynEnv env)
Description copied from class: DynamicList
Returns null if not found

Specified by:
script_item in class DynamicList

script_namedItem

protected Object script_namedItem(String name,
                                  DynEnv env)
Description copied from class: DynamicList
Returns null if not found

Specified by:
script_namedItem in class DynamicList

getLength

public int getLength()
Description copied from interface: NamedNodeMap
The number of nodes in this map. The range of valid child node indices is 0 to length-1 inclusive.

Specified by:
getLength in interface NamedNodeMap
Specified by:
getLength in class DynamicList

getNamedItemNS

public Node getNamedItemNS(String namespaceURI,
                           String localName)
Description copied from interface: NamedNodeMap
Retrieves a node specified by local name and namespace URI. HTML-only DOM implementations do not need to implement this method.

Specified by:
getNamedItemNS in interface NamedNodeMap
Returns:
A Node (of any type) with the specified local name and namespace URI, or null if they do not identify any node in this map.

setNamedItemNS

public Node setNamedItemNS(Node arg)
Description copied from interface: NamedNodeMap
Adds a node using its namespaceURI and localName. If a node with that namespace URI and that local name is already present in this map, it is replaced by the new one.
HTML-only DOM implementations do not need to implement this method.

Specified by:
setNamedItemNS in interface NamedNodeMap
Returns:
If the new Node replaces an existing node the replaced Node is returned, otherwise null is returned.

removeNamedItemNS

public Node removeNamedItemNS(String namespaceURI,
                              String localName)
Description copied from interface: NamedNodeMap
Removes a node specified by local name and namespace URI. A removed attribute may be known to have a default value when this map contains the attributes attached to an element, as returned by the attributes attribute of the Node interface. If so, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable.
HTML-only DOM implementations do not need to implement this method.

Specified by:
removeNamedItemNS in interface NamedNodeMap
Returns:
The node removed from this map if a node with such a local name and namespace URI exists.

getDynamicValue

public Object getDynamicValue(String name,
                              DynEnv env)
Description copied from class: DynamicObject
Returns the `key' field or Defs.NOT_FOUND if `name' does not exist. Returns `FUNCTION_MARK' if `name' represent a function that can be invoke via execDynamicMethod. Note that returned `null' indicates that value is present but set to null.

Overrides:
getDynamicValue in class DynamicList

setDynamicValue

public int setDynamicValue(String name,
                           Object value,
                           DynEnv env)
Description copied from class: DynamicObject
Set field `name' to `value'. Use `env' to unwrap `value' to a particular type or store it as is

Overrides:
setDynamicValue in class DynamicList

execDynamicMethod

public Object execDynamicMethod(String name,
                                Object[] args,
                                DynEnv env)
Description copied from class: DynamicObject
Perform function-like actions for `name' with the given args. Returns the result or Defs.NOT_FOUND if name is not associated with function action. Should return result of env.wrapVoid() to indicate method without return value. Use `env' to unwrap `args' elements to a particular type.

Overrides:
execDynamicMethod in class DynamicList