Class AddeProfilerDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

public class AddeProfilerDataSource extends DataSourceImpl
A data source for Profiler Network data from an ADDE server. Can handle three types of Profiler data requests - for station time/heihgt plots of wind, plan views of wind at a level above MSL, and 3D plots of multistation wind at all levels.
Version:
$Revision: 1.50 $
Author:
MetApps/Unidata
  • Field Details

  • Constructor Details

    • AddeProfilerDataSource

      public AddeProfilerDataSource() throws VisADException
      No argument XML persistence constructor
      Throws:
      VisADException - problem in VisAD
    • AddeProfilerDataSource

      public AddeProfilerDataSource(DataSourceDescriptor descriptor, ArrayList stations, Hashtable properties) throws VisADException
      Create a new AddeProfilerDataSource
      Parameters:
      descriptor - description of source
      stations - stations to get
      properties - extra properties
      Throws:
      VisADException - problem accessing data
  • Method Details

    • initAfterUnpersistence

      public void initAfterUnpersistence()
      Extends method in DataSourceImpl to call local initProfiler ()
      Specified by:
      initAfterUnpersistence in interface DataSource
      Overrides:
      initAfterUnpersistence in class DataSourceImpl
    • 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
      VisADException - VisAD problem
    • recastProfilerSingleStationData

      protected static FieldImpl recastProfilerSingleStationData(FieldImpl input, int obInt) throws VisADException
      Take a FieldImpl of National Profiler Network data obtained from the PointDataAdapter.getData() call based on an ADDE source request, and turn it into a FieldImpl of data of different FunctionType. Input expects (index -> (TIME, Z, DIR, SPD, DAY)); all reals. Want to make FieldImpl with function (DateTime -> ((z)->(dir,spd)) ) suitable for display by a Unidata windBarbDisplayable. Skip some ob times depending on whether have 1 hourly or 6 minute data, and whether want 1 hour, 30 min, 12 min, or 6 min intervals in the displayed data.
      Parameters:
      input - a FieldImpl of NOAA National Profiler Network data obtained from the PointDataAdapter.getData() call based on an ADDE source request.
      obInt - an int how many time values to skip to get desired interval
      Returns:
      FieldImpl of Profiler obs with rearranged function.
      Throws:
      VisADException
    • recastProfilerMultiStationData

      protected static FieldImpl recastProfilerMultiStationData(FieldImpl input, int obInt) throws VisADException, RemoteException
      Take a FieldImpl of National Profiler Network data obtained from the PointDataAdapter.getData() call based on an ADDE source request, and turn it into a FieldImpl of data of different FunctionType. Input expects (index -> (lat, lon, day, TIME, Z, DIR, SPD)); all reals. Want to make FieldImpl with function:
       (DateTime -> ((lat,lon,z)->(dir,spd)) )
       
      suitable for display by a Unidata windBarbDisplayable.

      Skip some ob times depending on whether have 1 hourly or 6 minute data, and whether want 1 hour, 30 min, 12 min, or 6 min intervals in the displayed data.

      level filtering accepts date in altitude range zlevel +/- 125 meters

      Parameters:
      input - a FieldImpl of NOAA National Profiler Network data obtained from the PointDataAdapter.getData() call based on an ADDE source request.
      obInt - an int how many time values to skip to get desired interval
      Returns:
      FieldImpl of Profiler obs with rearranged function.
      Throws:
      RemoteException
      VisADException
    • setSelectedStations

      public void setSelectedStations(List value)
      Set the SelectedStations property.
      Parameters:
      value - The new value for SelectedStations
    • getSelectedStations

      public List getSelectedStations()
      Get the SelectedStations property.
      Returns:
      The SelectedStations
    • equals

      public boolean equals(Object o)
      Check to see if this AddeProfilerDataSource is equal to the object in question.
      Overrides:
      equals in class DataSourceImpl
      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
    • doMakeDateTimes

      protected List doMakeDateTimes()
      Get the list of times for this datasource
      Overrides:
      doMakeDateTimes in class DataSourceImpl
      Returns:
      empty list from this class