ucar.unidata.view.sounding
Class DataCell

java.lang.Object
  extended by ucar.unidata.view.sounding.DataCell

public abstract class DataCell
extends Object

Abstract, computational entity with one or more inputs and one output.

Version:
$Revision: 1.6 $ $Date: 2005/05/13 18:33:27 $
Author:
Steven R. Emmerson

Constructor Summary
protected DataCell(String name, DataReference outRef)
          Constructs from a name for the instance and the input and output data references.
 
Method Summary
 void clean()
          Cleans this instance.
 boolean disableRef(DataReference ref)
          Disables an input data reference that was specified during construction.
 void enableAllInputRefs()
          Enables all input data references.
 DataReference[] getInputRefs()
          Returns the input data references.
 DataReference getOutputRef()
          Returns the data references to the output data objects.
 String toString()
          Returns a string representation of this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataCell

protected DataCell(String name,
                   DataReference outRef)
            throws VisADException,
                   RemoteException
Constructs from a name for the instance and the input and output data references. The name of the ActionImpl will be the name of this instance with the suffix ".action". The input and output data references arrays are cloned.

Parameters:
name - The name for the instance.
outRef - The output DataReference.
Throws:
NullPointerException - if any argument is null or if an input or output data reference is null.
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
Method Detail

getInputRefs

public DataReference[] getInputRefs()
Returns the input data references. The returned array is not backed by this instance.

Returns:
The input data references.

getOutputRef

public final DataReference getOutputRef()
Returns the data references to the output data objects. The array is not backed by this instance.

Returns:
The references to the output data objects.

enableAllInputRefs

public void enableAllInputRefs()
                        throws VisADException,
                               RemoteException
Enables all input data references. An enabled input data reference will trigger recomputation of the output data object when the referenced, input data object changes.

Throws:
NullPointerException - if an input data reference is null.
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.

disableRef

public boolean disableRef(DataReference ref)
                   throws VisADException,
                          RemoteException
Disables an input data reference that was specified during construction. A disabled input data reference will not trigger recomputation of the output data object when the referenced, input data object changes.

Parameters:
ref - The input data reference to disable.
Returns:
True if and only if the input data reference was enabled when this method was invoked.
Throws:
NullPointerException - if the argument is null.
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.

clean

public void clean()
           throws VisADException,
                  RemoteException
Cleans this instance. All data references are removed from this instance's ActionImpl and the action is stopped. This instance may be reused after invoking this method,

Throws:
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.

toString

public final String toString()
Returns a string representation of this instance. The instance's name is returned.

Overrides:
toString in class Object
Returns:
A string representation of this instance.