Class AddePointDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

public class AddePointDataSource extends PointDataSource
A data source for ADDE point data
Author:
IDV Development Team
  • Constructor Details

    • AddePointDataSource

      public AddePointDataSource() throws VisADException
      Default contstructor.
      Throws:
      VisADException
    • AddePointDataSource

      public AddePointDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties) throws VisADException
      Create a new AddePointDataSource from the parameters supplied.
      Parameters:
      descriptor - DataSourceDescriptor for this.
      source - Source URL
      properties - Hashtable of properties for the source.
      Throws:
      VisADException - couldn't create the VisAD data
  • Method Details

    • canCreateGrid

      protected boolean canCreateGrid(RealType type)
      Is it ok to create a grid field for the parameter with the given real type
      Overrides:
      canCreateGrid in class PointDataSource
      Parameters:
      type - the type
      Returns:
      ok to create grid
    • getDataName

      public String getDataName()
      Get the name of this data. Override superclass method.
      Overrides:
      getDataName in class PointDataSource
      Returns:
      name of data
    • 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
    • saveDataToLocalDisk

      protected List saveDataToLocalDisk(String prefix, Object loadId, boolean changeLinks) throws Exception
      Save data to local disk
      Overrides:
      saveDataToLocalDisk in class FilesDataSource
      Parameters:
      prefix - Fir dir and prefix
      loadId - For JobManager
      changeLinks - Change internal file references
      Returns:
      The files we made
      Throws:
      Exception - On badness
    • getSample

      protected FieldImpl getSample(DataChoice dataChoice) throws Exception
      Get a sample observation
      Overrides:
      getSample in class PointDataSource
      Parameters:
      dataChoice - choice
      Returns:
      the sample
      Throws:
      Exception - problem getting the sample
    • makeObs

      protected FieldImpl makeObs(DataChoice dataChoice, DataSelection subset, ucar.unidata.geoloc.LatLonRect bbox) throws Exception
      Get the data from the ADDE URL and make the FieldImpl of PointObs from it.
      Specified by:
      makeObs in class PointDataSource
      Parameters:
      dataChoice - data choice
      subset - subsetting selection
      bbox - bounding box. may be null
      Returns:
      data corresponding to the choice and subset
      Throws:
      Exception - problem creating the data
    • makeObs

      protected FieldImpl makeObs(DataChoice dataChoice, DataSelection subset, ucar.unidata.geoloc.LatLonRect bbox, boolean sampleIt) throws Exception
      Parameters:
      dataChoice - data choice
      subset - subsetting selection
      bbox - bounding box. may be null
      sampleIt - flag to just get a sample ob
      Returns:
      the data
      Throws:
      Exception - problem reading data
    • canDoGeoSelection

      public boolean canDoGeoSelection()
      Can this datasource do the geoselection subsetting and decimation
      Specified by:
      canDoGeoSelection in interface DataSource
      Overrides:
      canDoGeoSelection in class DataSourceImpl
      Returns:
      can do geo subsetting
    • canDoGeoSelectionStride

      protected boolean canDoGeoSelectionStride()
      Used for the geo subsetting property gui as to whether to show the stride or not
      Overrides:
      canDoGeoSelectionStride in class DataSourceImpl
      Returns:
      default is true
    • canDoGeoSelectionMap

      protected boolean canDoGeoSelectionMap()
      Used for the geo subsetting property gui as to whether to show the map selection or not
      Overrides:
      canDoGeoSelectionMap in class DataSourceImpl
      Returns:
      default is true
    • equals

      public boolean equals(Object o)
      Check to see if this AddePointDataSource 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()
      HashCode implementation.
      Overrides:
      hashCode in class Object
      Returns:
      hash code
    • setUrl

      public void setUrl(String url)
      Set the ADDE URL used for this object.
      Parameters:
      url - ADDE URL deprecated Use setSource() instead.
    • mainxxx

      public static void mainxxx(String[] args) throws Exception
      main
      Parameters:
      args - args
      Throws:
      Exception - On badness
    • 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
    • getDefaultLevels

      protected List getDefaultLevels()
      Get a list of selected levels. Subclasses should override if they have levels.
      Overrides:
      getDefaultLevels in class PointDataSource
      Returns:
      list of levels (may be empty)
    • doMakeDateTimes

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