Class CDMProfilerDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

public class CDMProfilerDataSource extends FilesDataSource
Created by IntelliJ IDEA. User: yuanho Date: Jul 23, 2010 Time: 3:36:26 PM To change this template use File | Settings | File Templates.
  • Constructor Details

  • Method Details

    • initAfterUnpersistence

      public void initAfterUnpersistence()
      Extends method in DataSourceImpl to call local initProfiler ()
      Specified by:
      initAfterUnpersistence in interface DataSource
      Overrides:
      initAfterUnpersistence in class FilesDataSource
    • newFileFromPolling

      public void newFileFromPolling(File f)
      If we are polling some directory this method gets called when there is a new file. We set the file name, clear our state, reload the metadata and tell listeners of the change.
      Overrides:
      newFileFromPolling in class DataSourceImpl
      Parameters:
      f - new File to use.
    • getLocationsForPolling

      protected List getLocationsForPolling()
      Get the location where we poll.
      Overrides:
      getLocationsForPolling in class FilesDataSource
      Returns:
      File to poll on.
    • isMadis

      public boolean isMadis(ucar.nc2.constants.FeatureType wantFeatureType, ucar.nc2.NetcdfFile ds)
      _more_
      Parameters:
      wantFeatureType - _more_
      ds - _more_
      Returns:
      _more_
    • isWPDN

      public boolean isWPDN(ucar.nc2.constants.FeatureType wantFeatureType, ucar.nc2.NetcdfFile ds)
      _more_
      Parameters:
      wantFeatureType - _more_
      ds - _more_
      Returns:
      _more_
    • doMakeDataChoices

      public void doMakeDataChoices()
      Called by DataSourceImpl to make the actual DataChoice(s) and add them to a list of Datachoices; the DataSourceImpl then checks to see if any derived datachoices are possible to derive from these, and shows them if so. Used data supplied in the constructor.
      Overrides:
      doMakeDataChoices in class DataSourceImpl
    • getDataInner

      protected Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException
      Actually get the data identified by the given DataChoce. The default is to call the getDataInner that does not take the requestProperties. This allows other, non unidata.data DataSource-s (that follow the old API) to work.
      Overrides:
      getDataInner in class DataSourceImpl
      Parameters:
      dataChoice - The data choice that identifies the requested data.
      category - The data category of the request.
      dataSelection - Identifies any subsetting of the data.
      requestProperties - Hashtable that holds any detailed request properties.
      Returns:
      The visad.Data object
      Throws:
      RemoteException - Java RMI problem
      RemoteException - _more_
      VisADException - VisAD problem
    • recastProfilerSingleStationData

      protected FieldImpl recastProfilerSingleStationData(FieldImpl input, int obInt) throws VisADException
      _more_
      Parameters:
      input - _more_
      obInt - _more_
      Returns:
      _more_
      Throws:
      VisADException - _more_
    • recastProfilerMultiStationData

      protected FieldImpl recastProfilerMultiStationData(FieldImpl input, int obInt) throws VisADException, RemoteException
      Change the data into a field that includes lat/lon info
      Parameters:
      input - _more_
      obInt - _more_
      Returns:
      field with lat/lon info
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • equals

      public boolean equals(Object o)
      Check to see if this CDMProfilerDataSource is equal to the object in question.
      Overrides:
      equals in class FilesDataSource
      Parameters:
      o - object in question
      Returns:
      true if they are the same or equivalent objects
    • hashCode

      public int hashCode()
      Return the hashcode for this object
      Overrides:
      hashCode in class Object
      Returns:
      hashCode
    • main

      public static void main(String[] args) throws Exception
      Test by running "java ucar.unidata.data.profiler.CDMProfilerDataSource "
      Parameters:
      args - filename
      Throws:
      Exception - problem running this
    • setFileNameOrUrls

      public void setFileNameOrUrls(List<String> value)
      Set the FileNameOrUrl property.
      Parameters:
      value - The new value for FileNameOrUrl
    • getFileNameOrUrls

      public List<String> getFileNameOrUrls()
      Get the FileNameOrUrl property.
      Returns:
      The FileNameOrUrl
    • getPropertiesComponents

      public void getPropertiesComponents(List comps)
      Add the gui components into the list for the properties dialog
      Overrides:
      getPropertiesComponents in class DataSourceImpl
      Parameters:
      comps - List of components
    • applyProperties

      public boolean applyProperties()
      Apply properties components
      Overrides:
      applyProperties in class DataSourceImpl
      Returns:
      false if something failed and we need to keep showing the dialog