Package ucar.unidata.data.sounding
Class TrackDataSource
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.data.DataSourceImpl
ucar.unidata.data.FilesDataSource
ucar.unidata.data.sounding.TrackDataSource
- All Implemented Interfaces:
Sharable
,DataSource
,DataSourceFactory
,XmlPersistable
- Direct Known Subclasses:
SondeDataSource
,TrajectoryFeatureTypeDataSource
A data source for balloon and aircraft tracks
- Version:
- $Revision: 1.90 $ $Date: 2007/08/06 17:02:27 $
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Last point track typestatic final String
Point track typestatic final String
sounding ob idstatic final String
sounding trace idstatic final String
time trace idstatic final String
The whole trackstatic final String
track type identifierprotected List
sounding categoriesprotected List
track categoriesFields 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.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_TITLE
-
Constructor Summary
ConstructorsConstructorDescriptionDefault ConstructorTrackDataSource
(DataSourceDescriptor descriptor, String source, Hashtable properties) Create a TrackDataSource from the specification given.TrackDataSource
(DataSourceDescriptor descriptor, List sources, String description, Hashtable properties) Create a TrackDataSource from the specification given.TrackDataSource
(DataSourceDescriptor descriptor, List sources, Hashtable properties) Create a TrackDataSource from the specification given. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addActions
(List actions) _more_void
addPropertiesTabs
(JTabbedPane tabbedPane) Add any extra tabs into the properties tabprotected FieldImpl
aggregateTracks
(List tracks, Object id) Aggregate the list of track databoolean
Apply properties componentsprotected boolean
_more_boolean
Is this data source capable of saving its data to local diskprotected TrackAdapter
doMakeAdapter
(String file, Hashtable pointDataFilter, int stride, int lastNMinutes) Factory method to make the adapterprotected void
Make theDataChoice
s associated with this datasetprotected List
Make the list of times associated with this DataSource for DataSelection.void
doRemove()
_more_Create, if needed, and return the list of adapters.protected DateTime
Get the base time to be used for the track.protected String
Utility to extract the choice idprotected String
Utility to extract the choice idprotected String
Get the label for a particular data choiceprotected Data
getDataInner
(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) Get the VisAD Data object that corresponds to the dataChoice category and dataSelection criteria.Get the full description for this data source.boolean
Get the HaveAskedToSubset property.int
Get the LastNMinutes property.protected FieldImpl
getLastPointOb
(DataChoice dc, DataSelection dataSelection) Gets the last point ob associated with this trackprotected DateTime[]
Get the min and max times in the tracksGet the PointDataFilter property.protected FieldImpl
getPointObTrack
(DataChoice dc, DataSelection dataSelection, ucar.ma2.Range range) Gets the point ob track associated with this DataChoicevoid
getPropertiesComponents
(List comps) Add the gui components into the list for the properties dialogprotected List
Get the default categories RAOB sounding choicesprotected List
Get the default categories sounding choicesprotected Data
getSoundingOb
(DataChoice dc, DataSelection dataSelection) Gets the SoundingOb associated with this DataChoiceprotected Data
getSoundingTrace
(DataChoice dc, DataSelection dataSelection) Gets the sounding trace associated with this DataChoiceint
Get the Stride property.Gets the sounding trace associated with this DataChoiceprotected List
Get the default categories trace choicesprotected FlatField
getTrack
(DataChoice dc, DataSelection dataSelection, Hashtable requestProperties) Gets the track associated with this DataChoiceprotected String
getTrackId
(DataChoice dc) Utility to get the track idprotected List
getTracks
(DataChoice dc, DataSelection dataSelection, Hashtable requestProperties) Gets the track associated with this DataChoiceprotected void
_more_void
_more_protected void
Initialize the categoriesprotected void
Initialize the trackstatic void
Get the point observartion data Test routinemergeTracks
(List datas) Merge a List of FieldImpls of point obs into one.void
Reset last N minutes fieldvoid
reset stride fieldvoid
setHaveAskedToSubset
(boolean value) Set the HaveAskedToSubset property.void
setLastNMinutes
(int value) Set the LastNMinutes property.void
Set the source property (filename or URL).void
setPointDataFilter
(Hashtable value) Set the PointDataFilter property.void
setStride
(int value) Set the Stride property.void
setTraceAdapter
(TrackAdapter traceAdapter) void
_more_Methods inherited from class ucar.unidata.data.FilesDataSource
equals, getDataFileExtension, getDataPaths, getFilePath, getInputStreams, getLocationsForPolling, getPartialDescription, getSource, getSources, haveSources, initAfterUnpersistence, initWithPollingInfo, isFileBased, newFilesFromPolling, processDataFilename, propertiesChanged, reloadData, reloadData, saveDataToLocalDisk, setNewFiles, setSource, setSources, sourcesChanged, updateState
Methods inherited from class ucar.unidata.data.DataSourceImpl
addDataChangeListener, addDataChoice, addReloadTab, applyFieldMask, beginWritingDataToLocalDisk, canAddCurrentName, canCacheDataToDisk, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearCachedData, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getAllLevels, getAllTimesForTimeDriver, 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, 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, setObjectProperties, setObjectProperty, setPassword, setPollingInfo, setPollLocation, setProperties, setProperty, setProperty, setRelativePaths, setTemplateName, setTmpPaths, setUserName, shouldCache, 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, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, 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 Details
-
traceCats
track categories -
soundingCats
sounding categories -
ID_SOUNDINGOB
sounding ob id- See Also:
-
ID_SOUNDINGTRACE
sounding trace id- See Also:
-
ID_TIMETRACE
time trace id- See Also:
-
ID_WHOLETRACE
The whole track- See Also:
-
ID_POINTTRACE
Point track type- See Also:
-
ID_LASTOB
Last point track type- See Also:
-
PROP_TRACKTYPE
track type identifier- See Also:
-
-
Constructor Details
-
TrackDataSource
public TrackDataSource()Default Constructor -
TrackDataSource
public TrackDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties) throws VisADException Create a TrackDataSource from the specification given.- Parameters:
descriptor
- descriptor for the DataSourcesource
- file location or URLproperties
- extra properties- Throws:
VisADException
-
TrackDataSource
public TrackDataSource(DataSourceDescriptor descriptor, List sources, Hashtable properties) throws VisADException Create a TrackDataSource from the specification given.- Parameters:
descriptor
- data source descriptorsources
- List of sources of data (filename/URL)properties
- extra properties for initialization- Throws:
VisADException
- problem creating the data
-
TrackDataSource
public TrackDataSource(DataSourceDescriptor descriptor, List sources, String description, Hashtable properties) throws VisADException Create a TrackDataSource from the specification given.- Parameters:
descriptor
- data source descriptorsources
- List of sources of data (filename/URL)description
- dataset descriptionproperties
- extra properties for initialization- Throws:
VisADException
- problem creating the data
-
-
Method Details
-
doRemove
public void doRemove()_more_- Specified by:
doRemove
in interfaceDataSource
- Overrides:
doRemove
in classFilesDataSource
-
addActions
_more_- Overrides:
addActions
in classDataSourceImpl
- Parameters:
actions
- _more_
-
showSqlShell
public void showSqlShell()_more_ -
initAfter
protected void initAfter()_more_- Overrides:
initAfter
in classDataSourceImpl
-
initAfterCreation
public void initAfterCreation()_more_- Specified by:
initAfterCreation
in interfaceDataSource
- Overrides:
initAfterCreation
in classFilesDataSource
-
initCategories
protected void initCategories()Initialize the categories -
canSaveDataToLocalDisk
public boolean canSaveDataToLocalDisk()Is this data source capable of saving its data to local disk- Specified by:
canSaveDataToLocalDisk
in interfaceDataSource
- Overrides:
canSaveDataToLocalDisk
in classDataSourceImpl
- Returns:
- Can save to local disk
-
getFullDescription
Get the full description for this data source. Subclasses should override if they want something other than the default. This is what gets displayed in the details.- Specified by:
getFullDescription
in interfaceDataSource
- Overrides:
getFullDescription
in classFilesDataSource
- Returns:
- the full description of this data source (description + name)
-
getTraceCategories
Get the default categories trace choices- Returns:
- list of categories
-
getSoundingCategories
Get the default categories sounding choices- Returns:
- list of categories
-
getRaobCategories
Get the default categories RAOB sounding choices- Returns:
- list of categories
-
initTrack
protected void initTrack()Initialize the track -
doMakeAdapter
protected TrackAdapter doMakeAdapter(String file, Hashtable pointDataFilter, int stride, int lastNMinutes) throws Exception Factory method to make the adapter- Parameters:
file
- file or urlpointDataFilter
- When creating point data this holds the map of variables to usestride
- stringlastNMinutes
- clipping- Returns:
- The adapter
- Throws:
Exception
- On badness
-
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
-
doMakeDataChoices
protected void doMakeDataChoices()Make theDataChoice
s associated with this dataset- Overrides:
doMakeDataChoices
in classDataSourceImpl
-
canDoView
protected boolean canDoView()_more_- Returns:
- _more_
-
getDataChoiceLabel
Get the label for a particular data choice- Parameters:
id
- id for the choice- Returns:
- the appropriate label
-
getDataInner
protected Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException Get the VisAD Data object that corresponds to the dataChoice category and dataSelection criteria.- Overrides:
getDataInner
in classDataSourceImpl
- Parameters:
dataChoice
- choice for datacategory
- specific category of data (not used currently)dataSelection
- additional selection criteriarequestProperties
- extra request properties- Returns:
- corresponding Data object
- Throws:
VisADException
- unable to create Data objectRemoteException
- (some kind of remote error.
-
getBaseTime
Get the base time to be used for the track. This is the largest of the end times- Returns:
- Base time.
-
getMinMaxTime
Get the min and max times in the tracks- Returns:
- man/max times of the tracks
-
aggregateTracks
Aggregate the list of track data- Parameters:
tracks
- list of track dataid
- _more_- Returns:
- Aggregation
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
doMakeDateTimes
Make the list of times associated with this DataSource for DataSelection.- Overrides:
doMakeDateTimes
in classDataSourceImpl
- Returns:
- DateTimes as a list.
-
getTracks
protected List getTracks(DataChoice dc, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException Gets the track associated with this DataChoice- Parameters:
dc
- DataChoice for selectiondataSelection
- sub selection criteriarequestProperties
- selection properties- Returns:
- associated track
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getTrack
protected FlatField getTrack(DataChoice dc, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException Gets the track associated with this DataChoice- Parameters:
dc
- DataChoice for selectiondataSelection
- sub selection criteriarequestProperties
- selection properties- Returns:
- associated track
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getLastPointOb
Gets the last point ob associated with this track- Parameters:
dc
- DataChoice for selectiondataSelection
- sub selection criteria- Returns:
- associated track
- Throws:
Exception
- On badness
-
getPointObTrack
protected FieldImpl getPointObTrack(DataChoice dc, DataSelection dataSelection, ucar.ma2.Range range) throws VisADException, RemoteException Gets the point ob track associated with this DataChoice- Parameters:
dc
- DataChoice for selectiondataSelection
- sub selection criteriarange
- The data range- Returns:
- associated track
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getSoundingTrace
Gets the sounding trace associated with this DataChoice- Parameters:
dc
- DataChoice for selectiondataSelection
- sub selection criteria- Returns:
- associated track
- Throws:
Exception
- On badness
-
getTraceAdapter
Gets the sounding trace associated with this DataChoice- Returns:
- associated trace adapter
- Throws:
Exception
- On badness
-
setTraceAdapter
- Throws:
Exception
-
getChoiceId
Utility to extract the choice id- Parameters:
dc
- the data choice- Returns:
- The id. eg: parameter name
-
getChoiceId0
Utility to extract the choice id- Parameters:
dc
- the data choice- Returns:
- The id. eg: parameter name
-
getTrackId
Utility to get the track id- Parameters:
dc
- data choice- Returns:
- track id
-
getSoundingOb
protected Data getSoundingOb(DataChoice dc, DataSelection dataSelection) throws VisADException, RemoteException Gets the SoundingOb associated with this DataChoice- Parameters:
dc
- DataChoice for selectiondataSelection
- sub selection criteria- Returns:
- SoundingOb
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
setName
Set the source property (filename or URL). Used by persistence- Overrides:
setName
in classDataSourceImpl
- Parameters:
value
- data source
-
main
Get the point observartion data Test routine- Parameters:
args
- filename- Throws:
Exception
- problem
-
mergeTracks
Merge a List of FieldImpls of point obs into one.- Parameters:
datas
- List of FieldImpls of point obs- Returns:
- merged FieldImpl
- Throws:
VisADException
- problem getting the data
-
setPointDataFilter
Set the PointDataFilter property.- Parameters:
value
- The new value for PointDataFilter
-
getPointDataFilter
Get the PointDataFilter property.- Returns:
- The PointDataFilter
-
getPropertiesComponents
Add the gui components into the list for the properties dialog- Overrides:
getPropertiesComponents
in classDataSourceImpl
- Parameters:
comps
- List of components
-
resetLastNMinutesFld
public void resetLastNMinutesFld()Reset last N minutes field -
resetStrideFld
public void resetStrideFld()reset stride field -
applyProperties
public boolean applyProperties()Apply properties components- Overrides:
applyProperties
in classDataSourceImpl
- Returns:
- false if something failed and we need to keep showing the dialog
-
addPropertiesTabs
Add any extra tabs into the properties tab- Overrides:
addPropertiesTabs
in classDataSourceImpl
- Parameters:
tabbedPane
- The properties tab
-
setStride
public void setStride(int value) Set the Stride property.- Parameters:
value
- The new value for Stride
-
getStride
public int getStride()Get the Stride property.- Returns:
- The Stride
-
setHaveAskedToSubset
public void setHaveAskedToSubset(boolean value) Set the HaveAskedToSubset property.- Parameters:
value
- The new value for HaveAskedToSubset
-
getHaveAskedToSubset
public boolean getHaveAskedToSubset()Get the HaveAskedToSubset property.- Returns:
- The HaveAskedToSubset
-
setLastNMinutes
public void setLastNMinutes(int value) Set the LastNMinutes property.- Parameters:
value
- The new value for LastNMinutes
-
getLastNMinutes
public int getLastNMinutes()Get the LastNMinutes property.- Returns:
- The LastNMinutes
-