ucar.unidata.data.radar
Class Level2RadarDataSource

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
                  extended by ucar.unidata.data.radar.Level2RadarDataSource
All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, RadarConstants, XmlPersistable

public class Level2RadarDataSource
extends RadarDataSource

A data source for Archive Level II Radar data files.

Version:
$Revision: 1.63 $ $Date: 2006/12/01 20:42:38 $
Author:
Don Murray

Field Summary
 
Fields 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_SWEEP_2D, CATEGORY_SWEEP_2D_TIME, CATEGORY_SWEEP_3D, CATEGORY_SWEEP_3D_TIME, CATEGORY_TH, CATEGORY_VCS, CATEGORY_VOLUME, CATEGORY_VWP
 
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
Level2RadarDataSource()
          Construct a new Level II data source.
Level2RadarDataSource(DataSourceDescriptor descriptor, List sources, Hashtable properties)
          Construct a new Level II data source.
Level2RadarDataSource(DataSourceDescriptor descriptor, String[] sources, Hashtable properties)
          Construct a new Level II data source.
Level2RadarDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties)
          Construct a new Level II data source.
 
Method Summary
 boolean applyProperties()
          Apply properties components
 void doMakeDataChoices()
          Make the set of DataChoices associated with this DataSource.
 boolean equals(Object o)
          Check to see if this NetcdfRadarDataSource is equal to the object in question.
 List getAllLevels(DataChoice dataChoice, DataSelection dataSelection)
          Get the list of all levels available from this DataSource
 void getPropertiesComponents(List comps)
          Add the gui components into the list for the properties dialog
 NamedStationTable getStations()
          Read in the nexrad stations from the idv/resources/nexradstns.xml resource
 int hashCode()
          Get the hash code for this object.
static void main(String[] args)
          Main routine for testing.
protected  RadarAdapter makeRadarAdapter(String source)
          Make a RadarAdapter from the source
 
Methods inherited from class ucar.unidata.data.radar.RadarDataSource
canSaveDataToLocalDisk, clearCachedData, doMakeDateTimes, getAdapters, getDataInner, getRadarAdapters, initAfterUnpersistence, processDataFilename
 
Methods inherited from class ucar.unidata.data.FilesDataSource
doRemove, 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, beginWritingDataToLocalDisk, canCacheDataToDisk, canChangeData, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearFileCache, clearTimes, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, 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, 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, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ucar.unidata.data.DataSource
getUniqueId
 

Constructor Detail

Level2RadarDataSource

public Level2RadarDataSource()
Construct a new Level II data source.


Level2RadarDataSource

public Level2RadarDataSource(DataSourceDescriptor descriptor,
                             String source,
                             Hashtable properties)
                      throws VisADException
Construct a new Level II data source.

Parameters:
descriptor - descriptor for this datasource
source - file to read
properties - hashtable of properties. Includes radar location
Throws:
VisADException - couldn't create the data

Level2RadarDataSource

public Level2RadarDataSource(DataSourceDescriptor descriptor,
                             String[] sources,
                             Hashtable properties)
                      throws VisADException
Construct a new Level II data source.

Parameters:
descriptor - descriptor for this datasource
sources - files to read
properties - hashtable of properties. Includes radar location
Throws:
VisADException - couldn't create the data

Level2RadarDataSource

public Level2RadarDataSource(DataSourceDescriptor descriptor,
                             List sources,
                             Hashtable properties)
                      throws VisADException
Construct a new Level II data source.

Parameters:
descriptor - descriptor for this datasource
sources - files to read
properties - hashtable of properties. Includes radar location
Throws:
VisADException - couldn't create the data
Method Detail

doMakeDataChoices

public void doMakeDataChoices()
Make the set of DataChoices associated with this DataSource.

Overrides:
doMakeDataChoices in class DataSourceImpl

equals

public boolean equals(Object o)
Check to see if this NetcdfRadarDataSource is equal to the object in question.

Overrides:
equals in class FilesDataSource
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.

Overrides:
hashCode in class Object
Returns:
hash code.

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

makeRadarAdapter

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

Specified by:
makeRadarAdapter in class RadarDataSource
Parameters:
source - source (file or URL) of data
Returns:
corresponding RadarAdapter
Throws:
Exception - problem creating the adapter.

main

public static void main(String[] args)
                 throws Exception
Main routine for testing.

Parameters:
args - list of file names
Throws:
Exception - problem occurred

getStations

public NamedStationTable getStations()
Read in the nexrad stations from the idv/resources/nexradstns.xml resource

Returns:
List of of NamedStation-s

getAllLevels

public List getAllLevels(DataChoice dataChoice,
                         DataSelection dataSelection)
Get the list of all levels available from this DataSource

Specified by:
getAllLevels in interface DataSource
Overrides:
getAllLevels in class DataSourceImpl
Parameters:
dataChoice - The data choice we are getting levels for
dataSelection - data selection
Returns:
List of all available levels