Class DataInstance

java.lang.Object
ucar.unidata.data.DataInstance
Direct Known Subclasses:
GridDataInstance, PointDataInstance

public class DataInstance extends Object
A superclass for data instances. It's a wrapper for a Data object that allows quick access to metadata about it.

This class is thread-compatible.

Version:
$Revision: 1.47 $
Author:
IDV development team
  • Field Details

    • log_

      protected static LogUtil.LogCategory log_
      logging category
    • haveBeenInitialized

      protected boolean haveBeenInitialized
      flag for initialization
    • inError

      protected boolean inError
      flag for errors
    • dataChoice

      protected DataChoice dataChoice
      The DataChoice associated with the instance
    • dataSelection

      protected DataSelection dataSelection
      The dataselection for the choice
    • myRequestProperties

      protected Hashtable myRequestProperties
      Extra request properties
  • Constructor Details

  • Method Details

    • init

      protected void init() throws VisADException, RemoteException
      Initialize the instance
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • needsInitialization

      public boolean needsInitialization()
      Does this data instance need to be initialized
      Returns:
      needs to be initialized
    • checkInit

      protected void checkInit()
      Check if this has been initialized. If not, initialize.
    • reInitialize

      public void reInitialize() throws VisADException, RemoteException
      Reinitilize this instance. Set internal fields to null and call init()
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getDataSelection

      public DataSelection getDataSelection()
    • getDataChoice

      public DataChoice getDataChoice()
      Get the DataChoice associated with this instance.
      Returns:
      associated DataChoice
    • setTheData

      public void setTheData(Data d)
      Have this be setTheData so it is not the same signature as getData in case this gets persisted
      Parameters:
      d - data to use
    • getData

      public Data getData() throws VisADException, RemoteException
      Calls getData, passing in the member DataSelection
      Returns:
      the Data for this instance
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getData

      public Data getData(DataSelection dataSelection) throws VisADException, RemoteException
      Get the data using the specified sub selection.
      Parameters:
      dataSelection - sub selection criteria
      Returns:
      the data
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getData

      public Data getData(DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException
      Get the data using the specified sub selection and extra request properties
      Parameters:
      dataSelection - sub selection criteria
      requestProperties - extra request properties
      Returns:
      the data specific to the request
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • setData

      protected void setData(Data newData)
      _more_
      Parameters:
      newData - _more_
    • setDataSelection

      public void setDataSelection(DataSelection dataSelection)
      Set the data selection
      Parameters:
      dataSelection - the data selection
    • dataOk

      public boolean dataOk() throws VisADException, RemoteException
      Is the data held by this DataInstance ok. That is, is it non-null.
      Returns:
      true if the data is okay
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getParamName

      public String getParamName()
      Get the parameter name associated with this instance.
      Returns:
      name of the pararmeter
    • getNextId

      protected static int getNextId()
      Get the next instance id.
      Returns:
      next instance id