Class EOLProfilerDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

public class EOLProfilerDataSource extends DataSourceImpl
A data source for EOL profiler data
Version:
$Revision: 1.4 $
Author:
Unidata Development Team
  • Constructor Details

    • EOLProfilerDataSource

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

      public EOLProfilerDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties) throws VisADException
      Create a new EOLProfilerDataSource
      Parameters:
      descriptor - description of source
      source - source of the data
      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
    • newFileFromPolling

      public void newFileFromPolling(File f)
      If we are polling some directory this method gets called when there is a new file. We set the file name, clear our state, reload the metadata and tell listeners of the change.
      Overrides:
      newFileFromPolling in class DataSourceImpl
      Parameters:
      f - new File to use.
    • getLocationsForPolling

      protected List getLocationsForPolling()
      Get the location where we poll.
      Overrides:
      getLocationsForPolling in class DataSourceImpl
      Returns:
      File to poll on.
    • 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
    • equals

      public boolean equals(Object o)
      Check to see if this EOLProfilerDataSource 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
    • main

      public static void main(String[] args) throws Exception
      Test by running "java ucar.unidata.data.profiler.EOLProfilerDataSource "
      Parameters:
      args - filename
      Throws:
      Exception - problem running this
    • setFileNameOrUrl

      public void setFileNameOrUrl(String value)
      Set the FileNameOrUrl property.
      Parameters:
      value - The new value for FileNameOrUrl
    • getFileNameOrUrl

      public String getFileNameOrUrl()
      Get the FileNameOrUrl property.
      Returns:
      The FileNameOrUrl
    • 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