Package ucar.unidata.data.radar
Class CDMRadarDataSource
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.data.DataSourceImpl
ucar.unidata.data.FilesDataSource
ucar.unidata.data.radar.RadarDataSource
ucar.unidata.data.radar.CDMRadarDataSource
- All Implemented Interfaces:
Sharable,DataSource,DataSourceFactory,RadarConstants,XmlPersistable
A data source for radar data through the netCDF Common Data Model (CDM)
Radial Datatype API.
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringThis holds the RadarQuery in the propertiesFields inherited from class ucar.unidata.data.radar.RadarDataSource
CATEGORY_CAPPI, CATEGORY_ISOSURFACE, CATEGORY_ISOSURFACE_TIME, CATEGORY_RASTER_2D, CATEGORY_RASTER_2D_TIME, CATEGORY_RHI, CATEGORY_RHISWEEP, CATEGORY_SWEEP_2D, CATEGORY_SWEEP_2D_TIME, CATEGORY_SWEEP_3D, CATEGORY_SWEEP_3D_TIME, CATEGORY_TH, CATEGORY_VCS, CATEGORY_VOLUME, CATEGORY_VWP, TimeDriver, useDriverTimeFields inherited from class ucar.unidata.data.FilesDataSource
adapters, oldSourceFromBundles, sourcesFields inherited from class ucar.unidata.data.DataSourceImpl
changeDataPathsCbx, dataCacheKey, dataChoices, geoSelectionPanel, haveBeenUnPersisted, okToContinue, PARAM_SHOW_HIDE, PARAM_SHOW_NO, PARAM_SHOW_YESFields inherited from interface ucar.unidata.data.DataSource
DATAPATH_DATE_FORMAT, DATAPATH_DATE_PATTERN, 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_TIMESTRIDE, PROP_TITLEFields inherited from interface ucar.unidata.data.radar.RadarConstants
AZIMUTH, AZIMUTH_ANGLE, ELEVATION_ANGLE, PROP_2DOR3D, PROP_ANGLE, PROP_ANGLES, PROP_AZIMUTH, PROP_AZIMUTHS, PROP_CAPPI_LEVEL, PROP_CAPPI_LEVELS, PROP_TIMEHEIGHT, PROP_VCS, PROP_VCS_END, PROP_VCS_START, 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 -
Constructor Summary
ConstructorsConstructorDescriptionZero-argument constructor for construction via unpersistence.CDMRadarDataSource(DataSourceDescriptor descriptor, String[] sources, Hashtable properties) Construct a new CDM data source.CDMRadarDataSource(DataSourceDescriptor descriptor, String fileName, Hashtable properties) Construct a new CDM data source.CDMRadarDataSource(DataSourceDescriptor descriptor, List sources, Hashtable properties) Construct a new CDM data source.CDMRadarDataSource(DataSourceDescriptor descriptor, RadarQuery radarQuery, Hashtable properties) Construct a new CDM data source. -
Method Summary
Modifier and TypeMethodDescriptionbooleanApply properties componentsbooleanCan this data source cache itsvoidMake and insert theDataChoice-s for thisDataSource.booleanCheck to see if thisDoradeDataSourceis equal to the object in question.getAllLevels(DataChoice dataChoice, DataSelection dataSelection) Get the list of all levels available from this DataSourcegetAllTimesForTimeDriver(DataChoice dataChoice, DataSelection selection, List<DateTime> timeDriverTimes) Get all times for the time drivervoidgetPropertiesComponents(List comps) Add the gui components into the list for the properties dialogRead in the nexrad stations from the idv/resources/nexradstns.xml resourceinthashCode()Get the hash code for this object.voidhandle legacy bundlesprotected booleanAre we doing real time and relative timestatic voidTest programprotected RadarAdaptermakeRadarAdapter(String source) Make the RadarAdapter for this classvoidClear out and reinitialize the datevoidreloadData(Object object, Hashtable properties) Reload the dataprotected booleanshouldCache(Data data) Overwrite base class method so we don't cache to memoryMethods inherited from class ucar.unidata.data.radar.RadarDataSource
canSaveDataToLocalDisk, clearCachedData, doMakeDateTimes, doRemove, getAdapters, getDataInner, getRadarAdapters, processDataFilenameMethods inherited from class ucar.unidata.data.FilesDataSource
getDataFileExtension, getDataPaths, getFilePath, getFullDescription, getInputStreams, getLocationsForPolling, getPartialDescription, getSource, getSources, haveSources, initAfterCreation, initWithPollingInfo, isFileBased, newFilesFromPolling, propertiesChanged, saveDataToLocalDisk, setNewFiles, setSource, setSources, sourcesChanged, updateStateMethods inherited from class ucar.unidata.data.DataSourceImpl
addActions, addDataChangeListener, addDataChoice, addPropertiesTabs, addReloadTab, applyFieldMask, beginWritingDataToLocalDisk, canAddCurrentName, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getCache, getCache, getCacheClearDelay, getCacheDataToDisk, getCompositeDataChoices, getData, getData, getDataCachePath, getDataChangeListeners, getDataChoices, getDataContext, getDataInner, getDataIsEditable, getDataPrefix, getDataSelection, getDataSelectionComponents, getDataSource, getDateTimes, getDateTimeSelection, getDefaultSave, getDescription, getDescriptor, getErrorMessage, getEverChangedName, getExtraGeoSelectionComponent, getExtraTimesComponent, getFileFilterForPolling, getid, getIdv, getInError, getLocalDirectory, getLocationForPolling, getMostRecentFiles, getName, getNameForDataSource, getNeedToShowErrorToUser, getNextId, getOutstandingGetDataCalls, getPassword, getPathsThatCanBeRelative, getPollingInfo, getProperties, 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, putCache, reloadProperties, removeCache, removeDataChangeListener, removeDataChoice, removeProperty, replaceDataChoice, resetTmpState, saveDataToLocalDisk, saveDataToLocalDisk, selectTimesFromList, setAlias, setAskToUpdate, setCacheClearDelay, setCacheDataToDisk, setDataEditableStrings, setDataIsEditable, setDataIsRelative, setDataRelativeStrings, setDataSelection, setDateTimeSelection, setDefaultSave, setDescription, setDescriptor, setDirectory, setEverChangedName, 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, writeFieldMaskFileMethods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialogMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ucar.unidata.data.DataSource
getUniqueId
-
Field Details
-
PROP_RADARQUERY
This holds the RadarQuery in the properties- See Also:
-
LevelII
- See Also:
-
-
Constructor Details
-
CDMRadarDataSource
public CDMRadarDataSource()Zero-argument constructor for construction via unpersistence. -
CDMRadarDataSource
public CDMRadarDataSource(DataSourceDescriptor descriptor, List sources, Hashtable properties) throws VisADException Construct a new CDM data source.- Parameters:
descriptor- descriptor for thisDataSourcesources- List of filenamesproperties- hashtable of properties- Throws:
VisADException- problem creating data
-
CDMRadarDataSource
public CDMRadarDataSource(DataSourceDescriptor descriptor, String[] sources, Hashtable properties) throws VisADException Construct a new CDM data source.- Parameters:
descriptor- descriptor for this datasourcesources- files to readproperties- hashtable of properties. Includes radar location- Throws:
VisADException- couldn't create the data
-
CDMRadarDataSource
public CDMRadarDataSource(DataSourceDescriptor descriptor, String fileName, Hashtable properties) throws VisADException Construct a new CDM data source.- Parameters:
descriptor- descriptor for thisDataSourcefileName- name of the DORADE file to readproperties- hashtable of properties- Throws:
VisADException- problem creating data
-
CDMRadarDataSource
public CDMRadarDataSource(DataSourceDescriptor descriptor, RadarQuery radarQuery, Hashtable properties) throws VisADException Construct a new CDM data source.- Parameters:
descriptor- descriptor for thisDataSourceradarQuery- Holds the query infoproperties- hashtable of properties- Throws:
VisADException- problem creating data
-
-
Method Details
-
shouldCache
Overwrite base class method so we don't cache to memory- Overrides:
shouldCachein classDataSourceImpl- Parameters:
data- The data to cache- Returns:
- should we cache - false
-
reloadData
Reload the data- Specified by:
reloadDatain interfaceDataSource- Overrides:
reloadDatain classFilesDataSource- Parameters:
object- the objectproperties- the properties
-
initAfterUnpersistence
public void initAfterUnpersistence()handle legacy bundles- Specified by:
initAfterUnpersistencein interfaceDataSource- Overrides:
initAfterUnpersistencein classRadarDataSource
-
reloadData
public void reloadData()Clear out and reinitialize the date- Specified by:
reloadDatain interfaceDataSource- Overrides:
reloadDatain classFilesDataSource
-
isRealTime
protected boolean isRealTime()Are we doing real time and relative time- Overrides:
isRealTimein classRadarDataSource- Returns:
- is real time
-
getAllTimesForTimeDriver
public List<DateTime> getAllTimesForTimeDriver(DataChoice dataChoice, DataSelection selection, List<DateTime> timeDriverTimes) Get all times for the time driver- Overrides:
getAllTimesForTimeDriverin classDataSourceImpl- Parameters:
dataChoice- the DataChoiceselection- the DataSelectiontimeDriverTimes- the time driver times- Returns:
- the list of times
-
doMakeDataChoices
public void doMakeDataChoices()Make and insert theDataChoice-s for thisDataSource.- Overrides:
doMakeDataChoicesin classDataSourceImpl
-
equals
Check to see if thisDoradeDataSourceis equal to the object in question.- Overrides:
equalsin classFilesDataSource- Parameters:
o- object in question- Returns:
- true if they are the same or equivalent objects
-
hashCode
public int hashCode()Get the hash code for this object. -
main
Test program- Parameters:
args- file name
-
makeRadarAdapter
Make the RadarAdapter for this class- Specified by:
makeRadarAdapterin classRadarDataSource- Parameters:
source- source of the data- Returns:
- corresponding adapter
- Throws:
Exception- problem opening the file or creating the data
-
getPropertiesComponents
Add the gui components into the list for the properties dialog- Overrides:
getPropertiesComponentsin classDataSourceImpl- Parameters:
comps- List of components
-
applyProperties
public boolean applyProperties()Apply properties components- Overrides:
applyPropertiesin classDataSourceImpl- Returns:
- false if something failed and we need to keep showing the dialog
-
canCacheDataToDisk
public boolean canCacheDataToDisk()Can this data source cache its- Overrides:
canCacheDataToDiskin classDataSourceImpl- Returns:
- can cache data to disk
-
getStations
Read in the nexrad stations from the idv/resources/nexradstns.xml resource- Returns:
- List of of
NamedStation-s
-
getAllLevels
Get the list of all levels available from this DataSource- Specified by:
getAllLevelsin interfaceDataSource- Overrides:
getAllLevelsin classDataSourceImpl- Parameters:
dataChoice- The data choice we are getting levels fordataSelection- data selection- Returns:
- List of all available levels
-