Class AddeImageDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

public class AddeImageDataSource extends ImageDataSource
A data source for ADDE images. This is a thin wrapper (derived class) around the ImageDataSource which does all of the work.
Version:
$Revision: 1.56 $ $Date: 2007/07/05 18:46:09 $
Author:
Don Murray
  • Field Details

  • Constructor Details

    • AddeImageDataSource

      public AddeImageDataSource()
      The parameterless ctor unpersisting.
    • AddeImageDataSource

      public AddeImageDataSource(DataSourceDescriptor descriptor, String image, Hashtable properties) throws VisADException
      Create a new AddeImageDataSource with an a single image ADDE url.
      Parameters:
      descriptor - The descriptor for this data source.
      image - ADDE Url
      properties - The properties for this data source.
      Throws:
      VisADException - for bad
    • AddeImageDataSource

      public AddeImageDataSource(DataSourceDescriptor descriptor, String[] images, Hashtable properties) throws VisADException
      Create a new AddeImageDataSource with an array (String) image ADDE urls.
      Parameters:
      descriptor - The descriptor for this data source.
      images - Array of ADDE urls.
      properties - The properties for this data source.
      Throws:
      VisADException - for bad
    • AddeImageDataSource

      public AddeImageDataSource(DataSourceDescriptor descriptor, List images, Hashtable properties) throws VisADException
      Create a new AddeImageDataSource with an array (String) image ADDE urls.
      Parameters:
      descriptor - The descriptor for this data source.
      images - Array of ADDE urls.
      properties - The properties for this data source.
      Throws:
      VisADException - for bad
    • AddeImageDataSource

      public AddeImageDataSource(DataSourceDescriptor descriptor, ImageDataset ids, Hashtable properties) throws VisADException
      Create a new AddeImageDataSource with the given dataset.
      Parameters:
      descriptor - The descriptor for this data source.
      ids - The dataset.
      properties - The properties for this data source.
      Throws:
      VisADException - for bad
  • Method Details

    • initAfterUnpersistence

      public void initAfterUnpersistence()
      _more_
      Specified by:
      initAfterUnpersistence in interface DataSource
      Overrides:
      initAfterUnpersistence in class ImageDataSource
    • getDataInner

      protected Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException
      _more_
      Overrides:
      getDataInner in class ImageDataSource
      Parameters:
      dataChoice - _more_
      category - _more_
      dataSelection - _more_
      requestProperties - _more_
      Returns:
      _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getUnitString

      protected String getUnitString(String description)
      _more_
      Parameters:
      description - _more_
      Returns:
      _more_
    • getDescriptors

      protected List getDescriptors(DataChoice dataChoice, DataSelection subset)
      _more_
      Overrides:
      getDescriptors in class ImageDataSource
      Parameters:
      dataChoice - _more_
      subset - _more_
      Returns:
      _more_
    • getImageBoundingBox

      public GeoLocationInfo getImageBoundingBox(int eMag, int lMag, int lines, int elems)
      _more_
      Parameters:
      eMag - _more_
      lMag - _more_
      lines - _more_
      elems - _more_
      Returns:
      _more_
    • getEleMag

      public int getEleMag()
      _more_
      Returns:
      _more_
    • getLineMag

      public int getLineMag()
      _more_
      Returns:
      _more_
    • setEleMag

      public void setEleMag(int mag)
      _more_
      Parameters:
      mag - _more_
    • setLineMag

      public void setLineMag(int mag)
      _more_
      Parameters:
      mag - _more_
    • getPreviewSource

      public String getPreviewSource(String inSource, AreaDirectory aDir)
      _more_
      Parameters:
      inSource - _more_
      aDir - _more_
      Returns:
      _more_
    • getImageDataSourceName

      public String getImageDataSourceName()
      Overwrite base class method to return the name of this class.
      Specified by:
      getImageDataSourceName in class ImageDataSource
      Returns:
      The name.
    • getDataName

      public String getDataName()
      Get the name for this data. Override base class for more info.
      Overrides:
      getDataName in class ImageDataSource
      Returns:
      name for the main data object
    • saveDataToLocalDisk

      protected List saveDataToLocalDisk(String prefix, Object loadId, boolean changeLinks) throws Exception
      Save files to local disk
      Overrides:
      saveDataToLocalDisk in class ImageDataSource
      Parameters:
      prefix - destination dir and file prefix
      loadId - For JobManager
      changeLinks - Change internal file references
      Returns:
      Files copied
      Throws:
      Exception - On badness
    • addDataChoice

      protected void addDataChoice(DataChoice choice)
      _more_
      Overrides:
      addDataChoice in class DataSourceImpl
      Parameters:
      choice - _more_
    • getChoiceName

      public String getChoiceName()
      _more_
      Returns:
      _more_
    • setChoiceName

      public void setChoiceName(String choiceName)
      _more_
      Parameters:
      choiceName - _more_
    • reloadData

      public void reloadData()
      _more_
      Specified by:
      reloadData in interface DataSource
      Overrides:
      reloadData in class ImageDataSource
    • reSetImageDataDescriptor

      public static List reSetImageDataDescriptor(List despList, String locateKey, String locateValue, String PlaceValue, int lines, int elems, int lineMag, int eleMag, String unit, String nav) throws RemoteException, VisADException
      _more_
      Parameters:
      despList - _more_
      locateKey - _more_
      locateValue - _more_
      PlaceValue - _more_
      lines - _more_
      elems - _more_
      lineMag - _more_
      eleMag - _more_
      unit - _more_
      nav - _more_
      Returns:
      _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getLatLonPoints

      public double[] getLatLonPoints(ucar.unidata.geoloc.LatLonPoint[] latLonPoints)
      _more_
      Parameters:
      latLonPoints - _more_
      Returns:
      _more_
    • geoSpaceSubsetD

      public List geoSpaceSubsetD(Rectangle2D rect, String unit, int eMag, int lMag, AREAnav baseAnav, List despList, double maxLat, double minLat, double maxLon, double minLon, int factor, int dlMag, int deMag, String placeValue, boolean isProgressiveResolution, ucar.unidata.geoloc.LatLonPointImpl centerLLP, String nav)
      _more_
      Parameters:
      rect - _more_
      unit - _more_
      eMag - _more_
      lMag - _more_
      baseAnav - _more_
      despList - _more_
      maxLat - _more_
      minLat - _more_
      maxLon - _more_
      minLon - _more_
      factor - _more_
      dlMag - _more_
      deMag - _more_
      placeValue - _more_
      isProgressiveResolution - _more_
      centerLLP - _more_
      nav - _more_
      Returns:
      _more_
    • calculateMagFactor

      public int calculateMagFactor(int dataPoints, int displayPoints)
      _more_
      Parameters:
      dataPoints - _more_
      displayPoints - _more_
      Returns:
      _more_
    • getBaseSource

      public String getBaseSource(String source)
      _more_
      Parameters:
      source - _more_
      Returns:
      _more_
    • replaceKey

      public static String replaceKey(String src, String key, Object val)
      _more_
      Parameters:
      src - _more_
      key - _more_
      val - _more_
      Returns:
      _more_
    • replaceKey

      public static String replaceKey(String src, String oldKey, String newKey, Object val)
      _more_
      Parameters:
      src - _more_
      oldKey - _more_
      newKey - _more_
      val - _more_
      Returns:
      _more_
    • getKey

      public static String getKey(String src, String key)
      _more_
      Parameters:
      src - _more_
      key - _more_
      Returns:
      _more_
    • removeKey

      public static String removeKey(String src, String key)
      _more_
      Parameters:
      src - _more_
      key - _more_
      Returns:
      _more_
    • initOldBundle

      protected void initOldBundle(DataChoice dataChoice, List<AddeImageDescriptor> descriptors, String sourceStr)
      _more_
      Parameters:
      dataChoice - _more_
      descriptors - _more_
      sourceStr - _more_
    • handlePreviewImageError

      protected void handlePreviewImageError(int flag, Exception excp)
      _more_
      Parameters:
      flag - _more_
      excp - _more_
    • getAddeImageDataSelection

      public AddeImageDataSelection getAddeImageDataSelection()
      _more_
      Returns:
      _more_
    • initDataSelectionComponents

      protected void initDataSelectionComponents(List components, DataChoice dataChoice)
      _more_
      Overrides:
      initDataSelectionComponents in class DataSourceImpl
      Parameters:
      components - _more_
      dataChoice - _more_
    • getEMag

      public int getEMag()
      _more_
      Returns:
      _more_
    • getLMag

      public int getLMag()
      _more_
      Returns:
      _more_