Class ComputeCell

java.lang.Object
ucar.unidata.view.sounding.ComputeCell
Direct Known Subclasses:
AddCell, AirDensityProfileCell, AirTemperatureCell, BuoyancyProfileCell, DewPointExtractorCell, DomainEvaluatorCell, DomainExtractorCell, DryTrajectoryCell, EnergyFeatureCell, EnergyProfileCell, EvaluateIntegralCell, IntegrateCell, LayerMeanCell, LclPressureCell, LclTemperatureCell, MaxPressureCell, MixingRatioCell, MixingRatioProfileCell, PotentialTemperatureProfileCell, ProfileCleanerCell, ProfileCombinerCell, ProfileFeatureCell, RealEvaluatorCell, SelectorCell, TuplerCell, VirtualTemperatureProfileCell, WetTrajectoryCell

public abstract class ComputeCell extends Object
Abstract, computational entity with one or more inputs and one output.
Version:
$Revision: 1.9 $ $Date: 2005/08/02 17:01:09 $
Author:
Steven R. Emmerson
  • Constructor Details

  • Method Details

    • getInputRefs

      public final 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 final 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 final boolean disableRef(DataReference ref) throws VisADException, RemoteException
      Disables an input data reference. 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.
    • compute

      protected abstract Data compute(Data[] datums) throws TypeException, VisADException, RemoteException
      Computes the output data objects. This method is invoked by this instance's ActionImpl. It is the subclass's responsibility of to set the output data references.
      Parameters:
      datums - The input data in the same order as during construction (i.e. datums[i] corresponds to inRefs[i].
      Returns:
      The output data objec corresponding to the input data.
      Throws:
      ClassCastException - if an input data reference has the wrong type of VisAD data object (e.g. a Real instead of a Field).
      TypeException - if the internal details of a VisAD data object are wrong (e.g. incompatible unit).
      VisADException - if a VisAD failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • clean

      public final 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.
    • noDataField

      protected static FlatField noDataField(RealType rangeType) throws VisADException, RemoteException
      Convenience method for creating an empty atmospheric profile of a given parameter.
      Parameters:
      rangeType - The type of parameter.
      Returns:
      An empty profile with the parameter as its range type.
      Throws:
      VisADException - if a VisAD failure occurs.
      RemoteException - if a Java RMI failure occurs.