jsky.science
Interface ScienceObjectNodeModel

All Superinterfaces:
java.util.EventListener, java.beans.PropertyChangeListener, ReplaceablePropertyChangeListener, ScienceObjectModel
All Known Subinterfaces:
Spectrum, Wavelength1DModel
All Known Implementing Classes:
AbstractScienceObjectNode, AbstractWavelength1D, Spectrum1DArray, Wavelength1DArray, Wavelength1DFormula

public interface ScienceObjectNodeModel
extends ScienceObjectModel

Extends the basic ScienceObjectModel (SOM) interface to handle some slightly more complex capabilities not needed for many "SOM's". The two main additional features that implementers of this interface must support is:
a) support for a data source containing a full set of data of which the science object instance has only a slice.
b) support for having additional ScienceObjectModels as "children".

This code was originally developed by NASA, Goddard Space Flight Center, Code 588 for the Scientist's Expert Assistant (SEA) project for Next Generation Space Telescope (NGST).


Field Summary
static java.lang.String DATA_SOURCE_PROPERTY
          Bound property name - should fired when setDataSource() is run
static java.lang.String MORE_DATA_PROPERTY
          Bound property name - should fired when setMoreDataAvailable() is run
 
Fields inherited from interface jsky.science.ScienceObjectModel
NAME_PROPERTY, PENDING_PROPERTY, VALID_PROPERTY
 
Method Summary
 void addChild(ScienceObjectModel so)
          Adds a ScienceObject as a "child" of the current object.
 java.util.List getChildren()
          returns a List of the children of this node
 ScienceObjectNodeModel getDataSource()
          Returns an object that describes the source of the ScienceObjectModel's data.
 boolean isMoreDataAvailable()
          Returns true if more data is available for this science object from its ScienceObjectNodeModel.
 boolean isPending()
          Returns true when the object is in the process of performing an update.
 void removeAllChildren()
          Removes all children from the ScienceObjectModel.
 ScienceObjectModel removeChild(ScienceObjectModel so)
          Removes all occurrences of a ScienceObjectModel as a "child" of the current object automatically will handle removing listening
 ScienceObjectModel replaceChild(ScienceObjectModel so1, ScienceObjectModel so2)
          Replaces all occurrence of the "old" child with the new child in the propertychange listings.
 void requestMoreData()
          Requests that the science object retrieve any extra data that it has available from its data source.
 void retrieveMoreData(ScienceObjectNodeModel forObject)
          Attempts to retrieve more information for the specified ScienceObjectModel and populate the ScienceObjectModel with that extra data.
 void setDataSource(ScienceObjectNodeModel s)
          Sets the source of the ScienceObjectModel's data.
 void setMoreDataAvailable(boolean more)
          Sets whether or not more data is available for this science object from its DataSource.
 
Methods inherited from interface jsky.science.ScienceObjectModel
addPropertyChangeListener, clearAllListeners, clone, firePropertyChange, getException, getLabel, getName, getParent, isHolding, isTracing, isValid, removePropertyChangeListener, setException, setHolding, setName, setParent, setTracing
 
Methods inherited from interface jsky.util.ReplaceablePropertyChangeListener
replaceObject
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Field Detail

MORE_DATA_PROPERTY

static final java.lang.String MORE_DATA_PROPERTY
Bound property name - should fired when setMoreDataAvailable() is run


DATA_SOURCE_PROPERTY

static final java.lang.String DATA_SOURCE_PROPERTY
Bound property name - should fired when setDataSource() is run

Method Detail

requestMoreData

void requestMoreData()
Requests that the science object retrieve any extra data that it has available from its data source.


isMoreDataAvailable

boolean isMoreDataAvailable()
Returns true if more data is available for this science object from its ScienceObjectNodeModel.


getDataSource

ScienceObjectNodeModel getDataSource()
Returns an object that describes the source of the ScienceObjectModel's data.


setDataSource

void setDataSource(ScienceObjectNodeModel s)
Sets the source of the ScienceObjectModel's data.


setMoreDataAvailable

void setMoreDataAvailable(boolean more)
Sets whether or not more data is available for this science object from its DataSource.


retrieveMoreData

void retrieveMoreData(ScienceObjectNodeModel forObject)
Attempts to retrieve more information for the specified ScienceObjectModel and populate the ScienceObjectModel with that extra data. This only makes sense for ScienceObjects where isMoreDataAvailable() is true.

Parameters:
forObject - retrieve more data for this science object

getChildren

java.util.List getChildren()
returns a List of the children of this node


removeChild

ScienceObjectModel removeChild(ScienceObjectModel so)
Removes all occurrences of a ScienceObjectModel as a "child" of the current object automatically will handle removing listening

Parameters:
so - ScienceObjectModel to be added
Returns:
the ScienceObjectModel just removed, or null if so not a existing child

replaceChild

ScienceObjectModel replaceChild(ScienceObjectModel so1,
                                ScienceObjectModel so2)
Replaces all occurrence of the "old" child with the new child in the propertychange listings.

Parameters:
so1 - ScienceObjectModel to be replaced
so2 - new ScienceObjectModel to be "added"
Returns:
the ScienceObjectModel just removed, or null if so1 not a valid child

addChild

void addChild(ScienceObjectModel so)
Adds a ScienceObject as a "child" of the current object. Implementers should automatically will handle propertyChange listening, cloning and loading/writing of all official children

Parameters:
so - ScienceObjectModel to be added

removeAllChildren

void removeAllChildren()
Removes all children from the ScienceObjectModel.


isPending

boolean isPending()
Returns true when the object is in the process of performing an update. Provides a means of allowing delayed updating. See SEA's gov.nasa.gsfc.util.gui.JPanelTogglePending for an example.