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 StringLast point track typestatic final StringPoint track typestatic final Stringsounding ob idstatic final Stringsounding trace idstatic final Stringtime trace idstatic final StringThe whole trackstatic final Stringtrack type identifierprotected Listsounding categoriesprotected Listtrack categoriesFields 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_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 voidaddActions(List actions) _more_voidaddPropertiesTabs(JTabbedPane tabbedPane) Add any extra tabs into the properties tabprotected FieldImplaggregateTracks(List tracks, Object id) Aggregate the list of track databooleanApply properties componentsprotected boolean_more_booleanIs this data source capable of saving its data to local diskprotected TrackAdapterdoMakeAdapter(String file, Hashtable pointDataFilter, int stride, int lastNMinutes) Factory method to make the adapterprotected voidMake theDataChoices associated with this datasetprotected ListMake the list of times associated with this DataSource for DataSelection.voiddoRemove()_more_Create, if needed, and return the list of adapters.protected DateTimeGet the base time to be used for the track.protected StringUtility to extract the choice idprotected StringUtility to extract the choice idprotected StringGet the label for a particular data choiceprotected DatagetDataInner(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.booleanGet the HaveAskedToSubset property.intGet the LastNMinutes property.protected FieldImplgetLastPointOb(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 FieldImplgetPointObTrack(DataChoice dc, DataSelection dataSelection, ucar.ma2.Range range) Gets the point ob track associated with this DataChoicevoidgetPropertiesComponents(List comps) Add the gui components into the list for the properties dialogprotected ListGet the default categories RAOB sounding choicesprotected ListGet the default categories sounding choicesprotected DatagetSoundingOb(DataChoice dc, DataSelection dataSelection) Gets the SoundingOb associated with this DataChoiceprotected DatagetSoundingTrace(DataChoice dc, DataSelection dataSelection) Gets the sounding trace associated with this DataChoiceintGet the Stride property.Gets the sounding trace associated with this DataChoiceprotected ListGet the default categories trace choicesprotected FlatFieldgetTrack(DataChoice dc, DataSelection dataSelection, Hashtable requestProperties) Gets the track associated with this DataChoiceprotected StringgetTrackId(DataChoice dc) Utility to get the track idprotected ListgetTracks(DataChoice dc, DataSelection dataSelection, Hashtable requestProperties) Gets the track associated with this DataChoiceprotected void_more_void_more_protected voidInitialize the categoriesprotected voidInitialize the trackstatic voidGet the point observartion data Test routinemergeTracks(List datas) Merge a List of FieldImpls of point obs into one.voidReset last N minutes fieldvoidreset stride fieldvoidsetHaveAskedToSubset(boolean value) Set the HaveAskedToSubset property.voidsetLastNMinutes(int value) Set the LastNMinutes property.voidSet the source property (filename or URL).voidsetPointDataFilter(Hashtable value) Set the PointDataFilter property.voidsetStride(int value) Set the Stride property.voidsetTraceAdapter(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, updateStateMethods 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, 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, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
doRemovein interfaceDataSource- Overrides:
doRemovein classFilesDataSource
-
addActions
_more_- Overrides:
addActionsin classDataSourceImpl- Parameters:
actions- _more_
-
showSqlShell
public void showSqlShell()_more_ -
initAfter
protected void initAfter()_more_- Overrides:
initAfterin classDataSourceImpl
-
initAfterCreation
public void initAfterCreation()_more_- Specified by:
initAfterCreationin interfaceDataSource- Overrides:
initAfterCreationin 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:
canSaveDataToLocalDiskin interfaceDataSource- Overrides:
canSaveDataToLocalDiskin 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:
getFullDescriptionin interfaceDataSource- Overrides:
getFullDescriptionin 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 theDataChoices associated with this dataset- Overrides:
doMakeDataChoicesin 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:
getDataInnerin 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:
doMakeDateTimesin 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:
setNamein 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:
getPropertiesComponentsin 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:
applyPropertiesin classDataSourceImpl- Returns:
- false if something failed and we need to keep showing the dialog
-
addPropertiesTabs
Add any extra tabs into the properties tab- Overrides:
addPropertiesTabsin 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
-