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

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.Configuration

public final class Configuration
extends java.lang.Object

This class contains some information that is derived from the session setup, which is an XML Document.

If your node needs information from another node, you have three ways to get it.
1. You can reference the field from the XML setup document. From your load method, you get the Document from your Element, and from there you can get any element in the document.
2. You can get the information from the node directly. You will need to add a public method to the target node to return the field, and you should defer getting the information until your node's "finishSetup" method. "finishSetup" is an empty stub in RtStpsNode. Builder calls it for every node after it has created all nodes and has completed all standard links. You can implement finishSetup in your node. You should not depend on the existence of other nodes when Builder calls your load method.
3. You can add a field to this class, but you probably should not do this unless other nodes need the same field. One node will be responsible for initializing it, so you should not use it until Builder calls your finishSetup method.


Field Summary
private  java.lang.String name
          A name for this configuration.
private  RtStpsNodeFactory nodeFactory
          Use this factory to create RT-STPS nodes.
private  java.util.TreeMap<java.lang.String,Spacecraft> spacecrafts
          Given a spacecraft name (the key), this map returns a Spacecraft object (the value).
private  java.util.TreeMap<java.lang.String,RtStpsNode> stpsNodes
          This is a collection of all RtStpsNodes in this setup.
 
Constructor Summary
Configuration(java.lang.String name, RtStpsNodeFactory factory)
          Create a Configuration.
 
Method Summary
 java.lang.String getName()
          Get the configuration name.
 RtStpsNodeFactory getNodeFactory()
          Get the RT-STPS Node factory.
 java.util.TreeMap<java.lang.String,Spacecraft> getSpacecrafts()
          Get a map of all spacecrafts.
 java.util.TreeMap<java.lang.String,RtStpsNode> getStpsNodes()
          Get a map of all RT-STPS nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

spacecrafts

private java.util.TreeMap<java.lang.String,Spacecraft> spacecrafts
Given a spacecraft name (the key), this map returns a Spacecraft object (the value).


stpsNodes

private java.util.TreeMap<java.lang.String,RtStpsNode> stpsNodes
This is a collection of all RtStpsNodes in this setup. The map returns a RtStpsNode given a unique node name string.


nodeFactory

private RtStpsNodeFactory nodeFactory
Use this factory to create RT-STPS nodes.


name

private java.lang.String name
A name for this configuration.

Constructor Detail

Configuration

public Configuration(java.lang.String name,
                     RtStpsNodeFactory factory)
Create a Configuration.

Parameters:
name - A name for this configuration.
factory - A populated RT-STPS node factory.
Method Detail

getNodeFactory

public final RtStpsNodeFactory getNodeFactory()
Get the RT-STPS Node factory.


getName

public final java.lang.String getName()
Get the configuration name.


getSpacecrafts

public final java.util.TreeMap<java.lang.String,Spacecraft> getSpacecrafts()
Get a map of all spacecrafts.


getStpsNodes

public final java.util.TreeMap<java.lang.String,RtStpsNode> getStpsNodes()
Get a map of all RT-STPS nodes.