Class CDMRadarDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, RadarConstants, XmlPersistable

public class CDMRadarDataSource extends RadarDataSource
A data source for radar data through the netCDF Common Data Model (CDM) Radial Datatype API.
Author:
IDV Development Team
  • Field Details

  • Constructor Details

    • CDMRadarDataSource

      public CDMRadarDataSource()
      Zero-argument constructor for construction via unpersistence.
    • CDMRadarDataSource

      public CDMRadarDataSource(DataSourceDescriptor descriptor, List sources, Hashtable properties) throws VisADException
      Construct a new CDM data source.
      Parameters:
      descriptor - descriptor for this DataSource
      sources - List of filenames
      properties - hashtable of properties
      Throws:
      VisADException - problem creating data
    • CDMRadarDataSource

      public CDMRadarDataSource(DataSourceDescriptor descriptor, String[] sources, Hashtable properties) throws VisADException
      Construct a new CDM data source.
      Parameters:
      descriptor - descriptor for this datasource
      sources - files to read
      properties - hashtable of properties. Includes radar location
      Throws:
      VisADException - couldn't create the data
    • CDMRadarDataSource

      public CDMRadarDataSource(DataSourceDescriptor descriptor, String fileName, Hashtable properties) throws VisADException
      Construct a new CDM data source.
      Parameters:
      descriptor - descriptor for this DataSource
      fileName - name of the DORADE file to read
      properties - hashtable of properties
      Throws:
      VisADException - problem creating data
    • CDMRadarDataSource

      public CDMRadarDataSource(DataSourceDescriptor descriptor, RadarQuery radarQuery, Hashtable properties) throws VisADException
      Construct a new CDM data source.
      Parameters:
      descriptor - descriptor for this DataSource
      radarQuery - Holds the query info
      properties - hashtable of properties
      Throws:
      VisADException - problem creating data
  • Method Details

    • shouldCache

      protected boolean shouldCache(Data data)
      Overwrite base class method so we don't cache to memory
      Overrides:
      shouldCache in class DataSourceImpl
      Parameters:
      data - The data to cache
      Returns:
      should we cache - false
    • reloadData

      public void reloadData(Object object, Hashtable properties)
      Reload the data
      Specified by:
      reloadData in interface DataSource
      Overrides:
      reloadData in class FilesDataSource
      Parameters:
      object - the object
      properties - the properties
    • initAfterUnpersistence

      public void initAfterUnpersistence()
      handle legacy bundles
      Specified by:
      initAfterUnpersistence in interface DataSource
      Overrides:
      initAfterUnpersistence in class RadarDataSource
    • reloadData

      public void reloadData()
      Clear out and reinitialize the date
      Specified by:
      reloadData in interface DataSource
      Overrides:
      reloadData in class FilesDataSource
    • isRealTime

      protected boolean isRealTime()
      Are we doing real time and relative time
      Overrides:
      isRealTime in class RadarDataSource
      Returns:
      is real time
    • getAllTimesForTimeDriver

      public List<DateTime> getAllTimesForTimeDriver(DataChoice dataChoice, DataSelection selection, List<DateTime> timeDriverTimes)
      Get all times for the time driver
      Overrides:
      getAllTimesForTimeDriver in class DataSourceImpl
      Parameters:
      dataChoice - the DataChoice
      selection - the DataSelection
      timeDriverTimes - the time driver times
      Returns:
      the list of times
    • doMakeDataChoices

      public void doMakeDataChoices()
      Make and insert the DataChoice-s for this DataSource.
      Overrides:
      doMakeDataChoices in class DataSourceImpl
    • equals

      public boolean equals(Object o)
      Check to see if this DoradeDataSource 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()
      Get the hash code for this object.
      Overrides:
      hashCode in class Object
      Returns:
      hash code.
    • main

      public static void main(String[] args)
      Test program
      Parameters:
      args - file name
    • makeRadarAdapter

      protected RadarAdapter makeRadarAdapter(String source) throws Exception
      Make the RadarAdapter for this class
      Specified by:
      makeRadarAdapter in class RadarDataSource
      Parameters:
      source - source of the data
      Returns:
      corresponding adapter
      Throws:
      Exception - problem opening the file or creating the data
    • 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
    • canCacheDataToDisk

      public boolean canCacheDataToDisk()
      Can this data source cache its
      Overrides:
      canCacheDataToDisk in class DataSourceImpl
      Returns:
      can cache data to disk
    • getStations

      public NamedStationTable getStations()
      Read in the nexrad stations from the idv/resources/nexradstns.xml resource
      Returns:
      List of of NamedStation-s
    • getAllLevels

      public List getAllLevels(DataChoice dataChoice, DataSelection dataSelection)
      Get the list of all levels available from this DataSource
      Specified by:
      getAllLevels in interface DataSource
      Overrides:
      getAllLevels in class DataSourceImpl
      Parameters:
      dataChoice - The data choice we are getting levels for
      dataSelection - data selection
      Returns:
      List of all available levels