ucar.unidata.data.radar
Class RadarDataSource

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.data.DataSourceImpl
          extended by ucar.unidata.data.FilesDataSource
              extended by ucar.unidata.data.radar.RadarDataSource
All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, RadarConstants, XmlPersistable
Direct Known Subclasses:
CDMRadarDataSource, DoradeDataSource, Level2RadarDataSource, NetcdfRadarDataSource

public abstract class RadarDataSource
extends FilesDataSource
implements RadarConstants

A data source for Radar data files. This class holds a List of data sources and a set of RadarAdapter-s to adapte each file.

Version:
$Revision: 1.38 $ $Date: 2007/07/26 19:45:01 $
Author:
Unidata Development Team

Field Summary
static DataCategory CATEGORY_CAPPI
          Radar data appropriate for CAPPIE
static DataCategory CATEGORY_ISOSURFACE
          Radar data appropriate for radar isosurface
static DataCategory CATEGORY_ISOSURFACE_TIME
          Radar data appropriate for radar isosurface
static DataCategory CATEGORY_RASTER_2D
          The 2D radar sweep category
static DataCategory CATEGORY_RASTER_2D_TIME
          The 2D radar sweep category with time
static DataCategory CATEGORY_RHI
          Radar data appropriate for RHI
static DataCategory CATEGORY_SWEEP_2D
          The 2D radar sweep category
static DataCategory CATEGORY_SWEEP_2D_TIME
          The 2D radar sweep category
static DataCategory CATEGORY_SWEEP_3D
          2d sweep category
static DataCategory CATEGORY_SWEEP_3D_TIME
          3d sweep category
static DataCategory CATEGORY_TH
          The radar time height category
static DataCategory CATEGORY_VCS
          Radar data appropriate for radar vertical cross section
static DataCategory CATEGORY_VOLUME
          Radar data appropriate for radar volume
static DataCategory CATEGORY_VWP
          The radar vertical wind profiler category
 
Fields inherited from class ucar.unidata.data.FilesDataSource
adapters, oldSourceFromBundles, sources
 
Fields inherited from class ucar.unidata.data.DataSourceImpl
changeDataPathsCbx, dataCacheKey, dataChoices, geoSelectionPanel, haveBeenUnPersisted, okToContinue, PARAM_SHOW_HIDE, PARAM_SHOW_NO, PARAM_SHOW_YES
 
Fields inherited from interface ucar.unidata.data.radar.RadarConstants
AZIMUTH, ELEVATION_ANGLE, PROP_2DOR3D, PROP_ANGLE, PROP_ANGLES, PROP_AZIMUTH, PROP_CAPPI_LEVEL, PROP_CAPPI_LEVELS, PROP_TIMEHEIGHT, PROP_VCS, PROP_VOLUMEORSWEEP, PROP_VWP, RADAR_MOST_RECENT, RADIAL_VELOCITY_NAME, RANGE, REFLECTIVITY, REFLECTIVITY_NAME, SPECTRUM_WIDTH, SPECTRUM_WIDTH_NAME, STATION_LOCATION, VALUE_2D, VALUE_3D, VALUE_SWEEP, VALUE_VOLUME, VELOCITY
 
Fields inherited from interface ucar.unidata.data.DataSource
MOST_RECENT, ordinalNames, PROP_AUTOCREATEDISPLAY, PROP_BASEDIRECTORY, PROP_CACHEABLE, PROP_DATACHOICENAME, PROP_DISPLAYPROPERTIES, PROP_DOCUMENTLINKS, PROP_FILEPATTERN, PROP_GEOLOCATION, PROP_ICON, PROP_NAME, PROP_POLLINFO, PROP_RESOLVERURL, PROP_SERVICE_HTTP, PROP_SUBPROPERTIES, PROP_TIMELABELS, PROP_TITLE
 
Constructor Summary
RadarDataSource()
          Construct a radar data source.
RadarDataSource(DataSourceDescriptor descriptor, List sources, String description, Hashtable properties)
          Construct a new radar data source.
 
Method Summary
 boolean canSaveDataToLocalDisk()
          Can this data source save its dat to local disk
 void clearCachedData()
          This is called when the CacheManager detects the need ot clear memory.
protected  List doMakeDateTimes()
          Create the list of times associated with this DataSource.
protected  List getAdapters()
          Create, if needed, and return the list of adapters.
protected  Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection subset, Hashtable requestProperties)
          Get the data for the given DataChoice and selection criteria.
protected  List getRadarAdapters()
          Get the list of adapters.
 void initAfterUnpersistence()
          handle legacy bundles
protected abstract  RadarAdapter makeRadarAdapter(String source)
          Make a RadarAdapter from the source
protected  String processDataFilename(String filename, int index)
          Transmogrify the filename
 
Methods inherited from class ucar.unidata.data.FilesDataSource
doRemove, equals, getDataFileExtension, getDataPaths, getFilePath, getFullDescription, getInputStreams, getLocationsForPolling, getPartialDescription, getSource, getSources, haveSources, initAfterCreation, initWithPollingInfo, isFileBased, newFilesFromPolling, propertiesChanged, reloadData, saveDataToLocalDisk, setNewFiles, setSource, setSources, sourcesChanged, updateState
 
Methods inherited from class ucar.unidata.data.DataSourceImpl
addActions, addDataChangeListener, addDataChoice, addPropertiesTabs, applyFieldMask, applyProperties, beginWritingDataToLocalDisk, canCacheDataToDisk, canChangeData, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearFileCache, clearTimes, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeDataChoices, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getAllLevels, getCache, getCacheClearDelay, getCacheDataToDisk, getCompositeDataChoices, getData, getData, getDataCachePath, getDataChangeListeners, getDataChoices, getDataContext, getDataInner, getDataIsEditable, getDataPrefix, getDataSelection, getDataSelectionComponents, getDataSource, getDateTimes, getDateTimeSelection, getDescription, getDescriptor, getErrorMessage, getExtraGeoSelectionComponent, getFileFilterForPolling, getid, getInError, getLocalDirectory, getLocationForPolling, getMostRecentFiles, getName, getNameForDataSource, getNeedToShowErrorToUser, getNextId, getOutstandingGetDataCalls, getPassword, getPathsThatCanBeRelative, getPollingInfo, getProperties, getPropertiesComponents, getPropertiesHeader, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRelativePaths, getSampleDataProjection, getSaveDataFileLabel, getSelectedDateTimes, getSelectedDateTimes, getTimesFromDataSelection, getTmpPaths, getTypeName, getUserName, handlePropertiesAction, hasPollingInfo, holdsDateTimes, holdsIndices, identifiedBy, identifiedByName, incrOutstandingGetDataCalls, initAfter, initDataChoice, initDataSelectionComponents, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeDerivedDataChoices, makeSaveLocalActions, newFileFromPolling, notifyDataChange, putCache, removeCache, removeDataChangeListener, removeDataChoice, removeProperty, replaceDataChoice, resetTmpState, saveDataToLocalDisk, saveDataToLocalDisk, setAlias, setAskToUpdate, setCacheClearDelay, setCacheDataToDisk, setDataEditableStrings, setDataIsEditable, setDataIsRelative, setDataRelativeStrings, setDataSelection, setDateTimeSelection, setDescription, setDescriptor, setDirectory, setInError, setInError, setInError, setName, setObjectProperties, setObjectProperty, setPassword, setPollingInfo, setPollLocation, setProperties, setProperty, setProperty, setRelativePaths, setTemplateName, setTmpPaths, setUserName, shouldCache, showPasswordDialog, showPropertiesDialog, showPropertiesDialog, showPropertiesDialog, showWaitDialog, tick, toString, toStringTruncated, updateDetailsText, writeFieldMaskFile, writeFieldMaskFile
 
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setShareGroup, setSharing, setUniqueId, showSharableDialog
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ucar.unidata.data.DataSource
getUniqueId
 

Field Detail

CATEGORY_RHI

public static final DataCategory CATEGORY_RHI
Radar data appropriate for RHI


CATEGORY_CAPPI

public static final DataCategory CATEGORY_CAPPI
Radar data appropriate for CAPPIE


CATEGORY_VOLUME

public static final DataCategory CATEGORY_VOLUME
Radar data appropriate for radar volume


CATEGORY_VCS

public static final DataCategory CATEGORY_VCS
Radar data appropriate for radar vertical cross section


CATEGORY_ISOSURFACE

public static final DataCategory CATEGORY_ISOSURFACE
Radar data appropriate for radar isosurface


CATEGORY_ISOSURFACE_TIME

public static final DataCategory CATEGORY_ISOSURFACE_TIME
Radar data appropriate for radar isosurface


CATEGORY_SWEEP_3D

public static final DataCategory CATEGORY_SWEEP_3D
2d sweep category


CATEGORY_SWEEP_3D_TIME

public static final DataCategory CATEGORY_SWEEP_3D_TIME
3d sweep category


CATEGORY_SWEEP_2D

public static final DataCategory CATEGORY_SWEEP_2D
The 2D radar sweep category


CATEGORY_SWEEP_2D_TIME

public static final DataCategory CATEGORY_SWEEP_2D_TIME
The 2D radar sweep category


CATEGORY_TH

public static final DataCategory CATEGORY_TH
The radar time height category


CATEGORY_VWP

public static final DataCategory CATEGORY_VWP
The radar vertical wind profiler category


CATEGORY_RASTER_2D

public static final DataCategory CATEGORY_RASTER_2D
The 2D radar sweep category


CATEGORY_RASTER_2D_TIME

public static final DataCategory CATEGORY_RASTER_2D_TIME
The 2D radar sweep category with time

Constructor Detail

RadarDataSource

public RadarDataSource()
Construct a radar data source.


RadarDataSource

public RadarDataSource(DataSourceDescriptor descriptor,
                       List sources,
                       String description,
                       Hashtable properties)
                throws VisADException
Construct a new radar data source.

Parameters:
descriptor - descriptor for this datasource
sources - List of sources of data (filenames, URLs)
description - Description of the files
properties - hashtable of properties. Includes radar location
Throws:
VisADException - couldn't create the data
Method Detail

canSaveDataToLocalDisk

public boolean canSaveDataToLocalDisk()
Can this data source save its dat to local disk

Specified by:
canSaveDataToLocalDisk in interface DataSource
Overrides:
canSaveDataToLocalDisk in class DataSourceImpl
Returns:
can save to local disk

processDataFilename

protected String processDataFilename(String filename,
                                     int index)
Transmogrify the filename

Overrides:
processDataFilename in class FilesDataSource
Parameters:
filename - filename
index - which one
Returns:
new file name

initAfterUnpersistence

public void initAfterUnpersistence()
handle legacy bundles

Specified by:
initAfterUnpersistence in interface DataSource
Overrides:
initAfterUnpersistence in class FilesDataSource

makeRadarAdapter

protected abstract RadarAdapter makeRadarAdapter(String source)
                                          throws Exception
Make a RadarAdapter from the source

Parameters:
source - source (file or URL) of data
Returns:
corresponding RadarAdapter
Throws:
Exception - problem creating the adapter.

clearCachedData

public void clearCachedData()
This is called when the CacheManager detects the need ot clear memory. It is intended to be overwritten by derived classes that are holding cached data that is not in the normal putCache facilities provided by this class since that data is actually managed by the CacheManager

Specified by:
clearCachedData in interface DataSource
Overrides:
clearCachedData in class DataSourceImpl

getAdapters

protected 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

doMakeDateTimes

protected List doMakeDateTimes()
Create the list of times associated with this DataSource.

Overrides:
doMakeDateTimes in class DataSourceImpl
Returns:
list of times.

getDataInner

protected Data getDataInner(DataChoice dataChoice,
                            DataCategory category,
                            DataSelection subset,
                            Hashtable requestProperties)
                     throws VisADException,
                            RemoteException
Get the data for the given DataChoice and selection criteria.

Overrides:
getDataInner in class DataSourceImpl
Parameters:
dataChoice - DataChoice for selection
category - DataCategory for the DataChoice (not used)
subset - subsetting criteria
requestProperties - extra request properties
Returns:
the Data object for the request
Throws:
RemoteException - couldn't create a remote data object
VisADException - couldn't create the data

getRadarAdapters

protected List getRadarAdapters()
Get the list of adapters.

Returns:
list of adapters.