Class ShapeFileDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

public class ShapeFileDataSource extends FilesDataSource
DataSource for Shapefiles.
Version:
$Revision: 1.28 $ $Date: 2007/04/16 20:34:52 $
Author:
IDV development team
  • Field Details

  • Constructor Details

    • ShapeFileDataSource

      public ShapeFileDataSource()
      Dummy constructor so this object can get unpersisted.
    • ShapeFileDataSource

      public ShapeFileDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties) throws VisADException
      Create a ShapeFileDataSource from the specification given.
      Parameters:
      descriptor - descriptor for the data source
      source - of file file name (or directory)
      properties - extra properties
      Throws:
      VisADException - some problem occurred creating data
  • Method Details

    • reloadData

      public void reloadData()
      _more_
      Specified by:
      reloadData in interface DataSource
      Overrides:
      reloadData in class FilesDataSource
    • canDoGeoSelection

      public boolean canDoGeoSelection()
      _more_
      Specified by:
      canDoGeoSelection in interface DataSource
      Overrides:
      canDoGeoSelection in class DataSourceImpl
      Returns:
      _more_
    • canDoGeoSelectionStride

      protected boolean canDoGeoSelectionStride()
      _more_
      Overrides:
      canDoGeoSelectionStride in class DataSourceImpl
      Returns:
      _more_
    • doMakeGeoSubsetPropertiesComponent

      protected JComponent doMakeGeoSubsetPropertiesComponent()
      _more_
      Overrides:
      doMakeGeoSubsetPropertiesComponent in class DataSourceImpl
      Returns:
      _more_
    • applyProperties

      public boolean applyProperties()
      _more_
      Overrides:
      applyProperties in class DataSourceImpl
      Returns:
      _more_
    • 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
    • initAfterUnpersistence

      public void initAfterUnpersistence()
      Initialize if being unpersisted.
      Specified by:
      initAfterUnpersistence in interface DataSource
      Overrides:
      initAfterUnpersistence in class FilesDataSource
    • doMakeDataChoices

      protected void doMakeDataChoices()
      Create the data choices associated with this source.
      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
    • readMap

      public static Data readMap(String filename) throws Exception
      _more_
      Parameters:
      filename - _more_
      Returns:
      _more_
      Throws:
      Exception - _more_
    • shouldCache

      protected boolean shouldCache(Data data)
      See if this DataSource should cache or not
      Overrides:
      shouldCache in class DataSourceImpl
      Parameters:
      data - Data to cache
      Returns:
      false
    • doMakeDateTimes

      protected List doMakeDateTimes()
      Create a list of times for this data source. Since shapefiles don't have any times, return an empty List.
      Overrides:
      doMakeDateTimes in class DataSourceImpl
      Returns:
      an empty List
    • setCoarseness

      public void setCoarseness(double value)
      Set the Coarseness property.
      Parameters:
      value - The new value for Coarseness
    • getCoarseness

      public double getCoarseness()
      Get the Coarseness property.
      Returns:
      The Coarseness