Java Globus API: Class DomElementSubset

org.globus.xml
Class DomElementSubset

java.lang.Object
  |
  +--org.globus.xml.DomElementSubset
All Implemented Interfaces:
org.w3c.dom.NodeList

public class DomElementSubset
extends java.lang.Object
implements org.w3c.dom.NodeList

This class helps in forming simple element subsets from an XML DOM tree.

Author:
Peter Lane

Constructor Summary
DomElementSubset(org.w3c.dom.Document document)
          Creates an empty DOM tree element subset
 
Method Summary
 void addElementName(java.lang.String elementName)
          Adds an element name to the list comprising the subset
 int getLength()
          Gets the number of elements in the subset
 org.w3c.dom.Node item(int index)
          Gets the element of the subset at the specified index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomElementSubset

public DomElementSubset(org.w3c.dom.Document document)
Creates an empty DOM tree element subset
Parameters:
document - the DOM tree document node from which the element subset will be derived
Method Detail

addElementName

public void addElementName(java.lang.String elementName)
Adds an element name to the list comprising the subset
Parameters:
elementName - the name of the desired DOM element to be added

getLength

public int getLength()
Gets the number of elements in the subset
Specified by:
getLength in interface org.w3c.dom.NodeList
Returns:
the subset size/vector size

item

public org.w3c.dom.Node item(int index)
Gets the element of the subset at the specified index
Specified by:
item in interface org.w3c.dom.NodeList
Parameters:
index - the index of the desired element withing the subset
Returns:
the desired subset element