Package ucar.unidata.data.profiler
Class CDMProfilerDataSource
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.data.DataSourceImpl
ucar.unidata.data.FilesDataSource
ucar.unidata.data.profiler.CDMProfilerDataSource
- All Implemented Interfaces:
Sharable
,DataSource
,DataSourceFactory
,XmlPersistable
Created by IntelliJ IDEA.
User: yuanho
Date: Jul 23, 2010
Time: 3:36:26 PM
To change this template use File | Settings | File Templates.
-
Field Summary
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.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
ConstructorsConstructorDescriptionNo argument XML persistence constructorCDMProfilerDataSource
(DataSourceDescriptor descriptor, String source, Hashtable properties) Create a new CDMProfilerDataSourceCDMProfilerDataSource
(DataSourceDescriptor descriptor, List files, Hashtable properties) Create a new FrontDataSource -
Method Summary
Modifier and TypeMethodDescriptionboolean
Apply properties componentsvoid
Called by DataSourceImpl to make the actual DataChoice(s) and add them to a list of Datachoices; the DataSourceImpl then checks to see if any derived datachoices are possible to derive from these, and shows them if so.boolean
Check to see if this CDMProfilerDataSource is equal to the object in question.protected Data
getDataInner
(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) Actually get the data identified by the given DataChoce.Get the FileNameOrUrl property.protected List
Get the location where we poll.void
getPropertiesComponents
(List comps) Add the gui components into the list for the properties dialogint
hashCode()
Return the hashcode for this objectvoid
Extends method in DataSourceImpl to call local initProfiler ()boolean
isMadis
(ucar.nc2.constants.FeatureType wantFeatureType, ucar.nc2.NetcdfFile ds) _more_boolean
isWPDN
(ucar.nc2.constants.FeatureType wantFeatureType, ucar.nc2.NetcdfFile ds) _more_static void
Test by running "java ucar.unidata.data.profiler.CDMProfilerDataSource" void
If we are polling some directory this method gets called when there is a new file.protected FieldImpl
recastProfilerMultiStationData
(FieldImpl input, int obInt) Change the data into a field that includes lat/lon infoprotected FieldImpl
recastProfilerSingleStationData
(FieldImpl input, int obInt) _more_void
setFileNameOrUrls
(List<String> value) Set the FileNameOrUrl property.Methods inherited from class ucar.unidata.data.FilesDataSource
doRemove, getDataFileExtension, getDataPaths, getFilePath, getFullDescription, getInputStreams, getPartialDescription, getSource, getSources, haveSources, initAfterCreation, initWithPollingInfo, isFileBased, newFilesFromPolling, processDataFilename, propertiesChanged, reloadData, reloadData, saveDataToLocalDisk, setNewFiles, setSource, setSources, sourcesChanged, updateState
Methods inherited from class ucar.unidata.data.DataSourceImpl
addActions, addDataChangeListener, addDataChoice, addPropertiesTabs, addReloadTab, applyFieldMask, beginWritingDataToLocalDisk, canAddCurrentName, canCacheDataToDisk, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canSaveDataToLocalDisk, canShowParameter, checkForInitAfterUnPersistence, clearCachedData, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeDateTimes, 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, initAfter, initDataChoice, initDataSelectionComponents, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeDerivedDataChoices, makeSaveLocalActions, 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, 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, notify, notifyAll, wait, wait, wait
Methods inherited from interface ucar.unidata.data.DataSource
getUniqueId
-
Constructor Details
-
CDMProfilerDataSource
No argument XML persistence constructor- Throws:
VisADException
- problem in VisADVisADException
- _more_
-
CDMProfilerDataSource
public CDMProfilerDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties) throws VisADException, IOException Create a new CDMProfilerDataSource- Parameters:
descriptor
- description of sourcesource
- source of the dataproperties
- extra properties- Throws:
IOException
- _more_VisADException
- problem accessing data
-
CDMProfilerDataSource
public CDMProfilerDataSource(DataSourceDescriptor descriptor, List files, Hashtable properties) throws VisADException, IOException Create a new FrontDataSource- Parameters:
descriptor
- Descriptor for this DataSourcefiles
- List of files or urlsproperties
- Extra data source properties- Throws:
IOException
- _more_VisADException
- _more_
-
-
Method Details
-
initAfterUnpersistence
public void initAfterUnpersistence()Extends method in DataSourceImpl to call local initProfiler ()- Specified by:
initAfterUnpersistence
in interfaceDataSource
- Overrides:
initAfterUnpersistence
in classFilesDataSource
-
newFileFromPolling
If we are polling some directory this method gets called when there is a new file. We set the file name, clear our state, reload the metadata and tell listeners of the change.- Overrides:
newFileFromPolling
in classDataSourceImpl
- Parameters:
f
- new File to use.
-
getLocationsForPolling
Get the location where we poll.- Overrides:
getLocationsForPolling
in classFilesDataSource
- Returns:
- File to poll on.
-
isMadis
public boolean isMadis(ucar.nc2.constants.FeatureType wantFeatureType, ucar.nc2.NetcdfFile ds) _more_- Parameters:
wantFeatureType
- _more_ds
- _more_- Returns:
- _more_
-
isWPDN
public boolean isWPDN(ucar.nc2.constants.FeatureType wantFeatureType, ucar.nc2.NetcdfFile ds) _more_- Parameters:
wantFeatureType
- _more_ds
- _more_- Returns:
- _more_
-
doMakeDataChoices
public void doMakeDataChoices()Called by DataSourceImpl to make the actual DataChoice(s) and add them to a list of Datachoices; the DataSourceImpl then checks to see if any derived datachoices are possible to derive from these, and shows them if so. Used data supplied in the constructor.- Overrides:
doMakeDataChoices
in classDataSourceImpl
-
getDataInner
protected Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException Actually get the data identified by the given DataChoce. The default is to call the getDataInner that does not take the requestProperties. This allows other, non unidata.data DataSource-s (that follow the old API) to work.- Overrides:
getDataInner
in classDataSourceImpl
- Parameters:
dataChoice
- The data choice that identifies the requested data.category
- The data category of the request.dataSelection
- Identifies any subsetting of the data.requestProperties
- Hashtable that holds any detailed request properties.- Returns:
- The visad.Data object
- Throws:
RemoteException
- Java RMI problemRemoteException
- _more_VisADException
- VisAD problem
-
recastProfilerSingleStationData
protected FieldImpl recastProfilerSingleStationData(FieldImpl input, int obInt) throws VisADException _more_- Parameters:
input
- _more_obInt
- _more_- Returns:
- _more_
- Throws:
VisADException
- _more_
-
recastProfilerMultiStationData
protected FieldImpl recastProfilerMultiStationData(FieldImpl input, int obInt) throws VisADException, RemoteException Change the data into a field that includes lat/lon info- Parameters:
input
- _more_obInt
- _more_- Returns:
- field with lat/lon info
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
equals
Check to see if this CDMProfilerDataSource is equal to the object in question.- Overrides:
equals
in classFilesDataSource
- Parameters:
o
- object in question- Returns:
- true if they are the same or equivalent objects
-
hashCode
public int hashCode()Return the hashcode for this object -
main
Test by running "java ucar.unidata.data.profiler.CDMProfilerDataSource" - Parameters:
args
- filename- Throws:
Exception
- problem running this
-
setFileNameOrUrls
Set the FileNameOrUrl property.- Parameters:
value
- The new value for FileNameOrUrl
-
getFileNameOrUrls
Get the FileNameOrUrl property.- Returns:
- The FileNameOrUrl
-
getPropertiesComponents
Add the gui components into the list for the properties dialog- Overrides:
getPropertiesComponents
in classDataSourceImpl
- Parameters:
comps
- List of components
-
applyProperties
public boolean applyProperties()Apply properties components- Overrides:
applyProperties
in classDataSourceImpl
- Returns:
- false if something failed and we need to keep showing the dialog
-