Class TrackDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable
Direct Known Subclasses:
SondeDataSource, TrajectoryFeatureTypeDataSource

public class TrackDataSource extends FilesDataSource
A data source for balloon and aircraft tracks
Version:
$Revision: 1.90 $ $Date: 2007/08/06 17:02:27 $
Author:
IDV Development Team
  • Field Details

  • Constructor Details

    • TrackDataSource

      public TrackDataSource()
      Default Constructor
    • TrackDataSource

      public TrackDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties) throws VisADException
      Create a TrackDataSource from the specification given.
      Parameters:
      descriptor - descriptor for the DataSource
      source - file location or URL
      properties - extra properties
      Throws:
      VisADException
    • TrackDataSource

      public TrackDataSource(DataSourceDescriptor descriptor, List sources, Hashtable properties) throws VisADException
      Create a TrackDataSource from the specification given.
      Parameters:
      descriptor - data source descriptor
      sources - List of sources of data (filename/URL)
      properties - extra properties for initialization
      Throws:
      VisADException - problem creating the data
    • TrackDataSource

      public TrackDataSource(DataSourceDescriptor descriptor, List sources, String description, Hashtable properties) throws VisADException
      Create a TrackDataSource from the specification given.
      Parameters:
      descriptor - data source descriptor
      sources - List of sources of data (filename/URL)
      description - dataset description
      properties - extra properties for initialization
      Throws:
      VisADException - problem creating the data
  • Method Details

    • doRemove

      public void doRemove()
      _more_
      Specified by:
      doRemove in interface DataSource
      Overrides:
      doRemove in class FilesDataSource
    • addActions

      protected void addActions(List actions)
      _more_
      Overrides:
      addActions in class DataSourceImpl
      Parameters:
      actions - _more_
    • showSqlShell

      public void showSqlShell()
      _more_
    • initAfter

      protected void initAfter()
      _more_
      Overrides:
      initAfter in class DataSourceImpl
    • initAfterCreation

      public void initAfterCreation()
      _more_
      Specified by:
      initAfterCreation in interface DataSource
      Overrides:
      initAfterCreation in class FilesDataSource
    • initCategories

      protected void initCategories()
      Initialize the categories
    • canSaveDataToLocalDisk

      public boolean canSaveDataToLocalDisk()
      Is this data source capable of saving its data to local disk
      Specified by:
      canSaveDataToLocalDisk in interface DataSource
      Overrides:
      canSaveDataToLocalDisk in class DataSourceImpl
      Returns:
      Can save to local disk
    • getFullDescription

      public String getFullDescription()
      Get the full description for this data source. Subclasses should override if they want something other than the default. This is what gets displayed in the details.
      Specified by:
      getFullDescription in interface DataSource
      Overrides:
      getFullDescription in class FilesDataSource
      Returns:
      the full description of this data source (description + name)
    • getTraceCategories

      protected List getTraceCategories()
      Get the default categories trace choices
      Returns:
      list of categories
    • getSoundingCategories

      protected List getSoundingCategories()
      Get the default categories sounding choices
      Returns:
      list of categories
    • getRaobCategories

      protected List getRaobCategories()
      Get the default categories RAOB sounding choices
      Returns:
      list of categories
    • initTrack

      protected void initTrack()
      Initialize the track
    • doMakeAdapter

      protected TrackAdapter doMakeAdapter(String file, Hashtable pointDataFilter, int stride, int lastNMinutes) throws Exception
      Factory method to make the adapter
      Parameters:
      file - file or url
      pointDataFilter - When creating point data this holds the map of variables to use
      stride - string
      lastNMinutes - clipping
      Returns:
      The adapter
      Throws:
      Exception - On badness
    • getAdapters

      public List getAdapters()
      Create, if needed, and return the list of adapters. Will return null if there are no valid adapters.
      Returns:
      List of adapters or null
    • doMakeDataChoices

      protected void doMakeDataChoices()
      Make the DataChoices associated with this dataset
      Overrides:
      doMakeDataChoices in class DataSourceImpl
    • canDoView

      protected boolean canDoView()
      _more_
      Returns:
      _more_
    • getDataChoiceLabel

      protected String getDataChoiceLabel(Object id)
      Get the label for a particular data choice
      Parameters:
      id - id for the choice
      Returns:
      the appropriate label
    • getDataInner

      protected Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException
      Get the VisAD Data object that corresponds to the dataChoice category and dataSelection criteria.
      Overrides:
      getDataInner in class DataSourceImpl
      Parameters:
      dataChoice - choice for data
      category - specific category of data (not used currently)
      dataSelection - additional selection criteria
      requestProperties - extra request properties
      Returns:
      corresponding Data object
      Throws:
      VisADException - unable to create Data object
      RemoteException - (some kind of remote error.
    • getBaseTime

      protected DateTime getBaseTime()
      Get the base time to be used for the track. This is the largest of the end times
      Returns:
      Base time.
    • getMinMaxTime

      protected DateTime[] getMinMaxTime()
      Get the min and max times in the tracks
      Returns:
      man/max times of the tracks
    • aggregateTracks

      protected FieldImpl aggregateTracks(List tracks, Object id) throws VisADException, RemoteException
      Aggregate the list of track data
      Parameters:
      tracks - list of track data
      id - _more_
      Returns:
      Aggregation
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • doMakeDateTimes

      protected List doMakeDateTimes()
      Make the list of times associated with this DataSource for DataSelection.
      Overrides:
      doMakeDateTimes in class DataSourceImpl
      Returns:
      DateTimes as a list.
    • getTracks

      protected List getTracks(DataChoice dc, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException
      Gets the track associated with this DataChoice
      Parameters:
      dc - DataChoice for selection
      dataSelection - sub selection criteria
      requestProperties - selection properties
      Returns:
      associated track
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getTrack

      protected FlatField getTrack(DataChoice dc, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException
      Gets the track associated with this DataChoice
      Parameters:
      dc - DataChoice for selection
      dataSelection - sub selection criteria
      requestProperties - selection properties
      Returns:
      associated track
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getLastPointOb

      protected FieldImpl getLastPointOb(DataChoice dc, DataSelection dataSelection) throws Exception
      Gets the last point ob associated with this track
      Parameters:
      dc - DataChoice for selection
      dataSelection - sub selection criteria
      Returns:
      associated track
      Throws:
      Exception - On badness
    • getPointObTrack

      protected FieldImpl getPointObTrack(DataChoice dc, DataSelection dataSelection, ucar.ma2.Range range) throws VisADException, RemoteException
      Gets the point ob track associated with this DataChoice
      Parameters:
      dc - DataChoice for selection
      dataSelection - sub selection criteria
      range - The data range
      Returns:
      associated track
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getSoundingTrace

      protected Data getSoundingTrace(DataChoice dc, DataSelection dataSelection) throws Exception
      Gets the sounding trace associated with this DataChoice
      Parameters:
      dc - DataChoice for selection
      dataSelection - sub selection criteria
      Returns:
      associated track
      Throws:
      Exception - On badness
    • getTraceAdapter

      public TrackAdapter getTraceAdapter() throws Exception
      Gets the sounding trace associated with this DataChoice
      Returns:
      associated trace adapter
      Throws:
      Exception - On badness
    • setTraceAdapter

      public void setTraceAdapter(TrackAdapter traceAdapter) throws Exception
      Throws:
      Exception
    • getChoiceId

      protected String getChoiceId(DataChoice dc)
      Utility to extract the choice id
      Parameters:
      dc - the data choice
      Returns:
      The id. eg: parameter name
    • getChoiceId0

      protected String getChoiceId0(DataChoice dc)
      Utility to extract the choice id
      Parameters:
      dc - the data choice
      Returns:
      The id. eg: parameter name
    • getTrackId

      protected String getTrackId(DataChoice dc)
      Utility to get the track id
      Parameters:
      dc - data choice
      Returns:
      track id
    • getSoundingOb

      protected Data getSoundingOb(DataChoice dc, DataSelection dataSelection) throws VisADException, RemoteException
      Gets the SoundingOb associated with this DataChoice
      Parameters:
      dc - DataChoice for selection
      dataSelection - sub selection criteria
      Returns:
      SoundingOb
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • setName

      public void setName(String value)
      Set the source property (filename or URL). Used by persistence
      Overrides:
      setName in class DataSourceImpl
      Parameters:
      value - data source
    • main

      public static void main(String[] args) throws Exception
      Get the point observartion data Test routine
      Parameters:
      args - filename
      Throws:
      Exception - problem
    • mergeTracks

      public FlatField mergeTracks(List datas) throws VisADException
      Merge a List of FieldImpls of point obs into one.
      Parameters:
      datas - List of FieldImpls of point obs
      Returns:
      merged FieldImpl
      Throws:
      VisADException - problem getting the data
    • setPointDataFilter

      public void setPointDataFilter(Hashtable value)
      Set the PointDataFilter property.
      Parameters:
      value - The new value for PointDataFilter
    • getPointDataFilter

      public Hashtable getPointDataFilter()
      Get the PointDataFilter property.
      Returns:
      The PointDataFilter
    • 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
    • resetLastNMinutesFld

      public void resetLastNMinutesFld()
      Reset last N minutes field
    • resetStrideFld

      public void resetStrideFld()
      reset stride field
    • 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
    • addPropertiesTabs

      public void addPropertiesTabs(JTabbedPane tabbedPane)
      Add any extra tabs into the properties tab
      Overrides:
      addPropertiesTabs in class DataSourceImpl
      Parameters:
      tabbedPane - The properties tab
    • setStride

      public void setStride(int value)
      Set the Stride property.
      Parameters:
      value - The new value for Stride
    • getStride

      public int getStride()
      Get the Stride property.
      Returns:
      The Stride
    • setHaveAskedToSubset

      public void setHaveAskedToSubset(boolean value)
      Set the HaveAskedToSubset property.
      Parameters:
      value - The new value for HaveAskedToSubset
    • getHaveAskedToSubset

      public boolean getHaveAskedToSubset()
      Get the HaveAskedToSubset property.
      Returns:
      The HaveAskedToSubset
    • setLastNMinutes

      public void setLastNMinutes(int value)
      Set the LastNMinutes property.
      Parameters:
      value - The new value for LastNMinutes
    • getLastNMinutes

      public int getLastNMinutes()
      Get the LastNMinutes property.
      Returns:
      The LastNMinutes