gov.nasa.gsfc.drl.rtstps.core
Class RtStpsNodeFactory

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.TreeMap<java.lang.String,RtStpsNode>
          extended by gov.nasa.gsfc.drl.rtstps.core.RtStpsNodeFactory
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,RtStpsNode>, java.util.NavigableMap<java.lang.String,RtStpsNode>, java.util.SortedMap<java.lang.String,RtStpsNode>

public class RtStpsNodeFactory
extends java.util.TreeMap<java.lang.String,RtStpsNode>

This class is an RT-STPS node factory. It maps unique node ids to blank instances of nodes. The node id is the element tag in the xml configuration file and is a class variable. (It is not the same as a link name, which is the unique name given to one instance of a node.) To create a node, pass an id, and the factory returns a clone of the mapped node.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
private static long serialVersionUID
           
 
Constructor Summary
RtStpsNodeFactory()
           
 
Method Summary
 void addNode(java.lang.String id, RtStpsNode node)
          Add an RT-STPS node (RtStpsNode) object to the factory.
 RtStpsNode create(org.w3c.dom.Element element, Configuration config)
          Create an RtStpsNode.
 RtStpsNode create(java.lang.String id)
          Create an RtStpsNode.
 
Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, size, subMap, subMap, tailMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

RtStpsNodeFactory

public RtStpsNodeFactory()
Method Detail

addNode

public void addNode(java.lang.String id,
                    RtStpsNode node)
             throws RtStpsException
Add an RT-STPS node (RtStpsNode) object to the factory. This node is an empty template and should have significant state because it will be cloned to create useable instances.

Parameters:
id - A node type name, which often matches a element tag name. It must be unique.
node - The RT-STPS node
Throws:
RtStpsException

create

public RtStpsNode create(java.lang.String id)
                  throws RtStpsException
Create an RtStpsNode.

Parameters:
id - A node type name.
Returns:
An RtStpsNode. It is not initialized, so you must load it.
Throws:
RtStpsException

create

public RtStpsNode create(org.w3c.dom.Element element,
                         Configuration config)
                  throws RtStpsException
Create an RtStpsNode.

Parameters:
element - An XML element from the RT-STPS configuration file. The element tag name is the RT-STPS Node id.
config - A collection of configuration items.
Returns:
An RtStpsNode. It is initialized.
Throws:
RtStpsException