Milyn-Smooks Version 0.4

org.milyn.delivery
Class ElementList

java.lang.Object
  extended byorg.milyn.delivery.ElementList

public class ElementList
extends java.lang.Object

ElementList.

An element list is used to store a list of references to elements that colaborate with each other during one of the phases of content delivery. ElementList instances are accessed via the ContainerRequest.getElementList(String) method. These lists are cleared at the end of the assembly and transformation phases. Therefore, they can't be used to attach element references for use between these delivery phases.

Author:
tfennelly

Constructor Summary
ElementList()
           
 
Method Summary
 void addElement(org.w3c.dom.Element element)
          Add the supplied element to this list.
 void addElement(java.lang.Object key, org.w3c.dom.Element element)
          Add the supplied element to this list using the specified key.
 org.w3c.dom.Element getElement(java.lang.Object key)
          Get the element stored under the specified key.
 java.util.Collection getElements()
          Get the element stored in this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementList

public ElementList()
Method Detail

addElement

public void addElement(org.w3c.dom.Element element)
Add the supplied element to this list.

If the element has an "id" or "name" attribute this will be used as the element key in the list, otherwise the element index will be used.

Parameters:
element - The element to be added.

addElement

public void addElement(java.lang.Object key,
                       org.w3c.dom.Element element)
Add the supplied element to this list using the specified key.

Parameters:
key - Key under which to store the element.
element - The element to be added.

getElement

public org.w3c.dom.Element getElement(java.lang.Object key)
Get the element stored under the specified key.

Parameters:
key - Key under which the element element is stored.
Returns:
The element stored under the specified key, or null if none stored under that key.

getElements

public java.util.Collection getElements()
Get the element stored in this list.

Returns:
The element list as a Collection.

Milyn-Smooks Version 0.4