Package ucar.unidata.data.profiler
Class EOLProfilerDataSource
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.data.DataSourceImpl
ucar.unidata.data.profiler.EOLProfilerDataSource
- All Implemented Interfaces:
Sharable
,DataSource
,DataSourceFactory
,XmlPersistable
A data source for EOL profiler data
- Version:
- $Revision: 1.4 $
- Author:
- Unidata Development Team
-
Field Summary
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 constructorEOLProfilerDataSource
(DataSourceDescriptor descriptor, String source, Hashtable properties) Create a new EOLProfilerDataSource -
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 EOLProfilerDataSource 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 ()static void
Test by running "java ucar.unidata.data.profiler.EOLProfilerDataSource" void
If we are polling some directory this method gets called when there is a new file.void
setFileNameOrUrl
(String value) Set the FileNameOrUrl property.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, doRemove, 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, getDataPaths, getDataPrefix, getDataSelection, getDataSelectionComponents, getDataSource, getDateTimes, getDateTimeSelection, getDefaultSave, getDescription, getDescriptor, getErrorMessage, getEverChangedName, getExtraGeoSelectionComponent, getExtraTimesComponent, getFileFilterForPolling, getFullDescription, getid, getIdv, getInError, getLocalDirectory, getLocationForPolling, getMostRecentFiles, getName, getNameForDataSource, getNeedToShowErrorToUser, getNextId, getOutstandingGetDataCalls, getPartialDescription, 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, initAfterCreation, initDataChoice, initDataSelectionComponents, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeDerivedDataChoices, makeSaveLocalActions, newFilesFromPolling, notifyDataChange, propertiesChanged, putCache, putCache, reloadData, reloadData, reloadProperties, removeCache, removeDataChangeListener, removeDataChoice, removeProperty, replaceDataChoice, resetTmpState, saveDataToLocalDisk, saveDataToLocalDisk, saveDataToLocalDisk, selectTimesFromList, setAlias, setAskToUpdate, setCacheClearDelay, setCacheDataToDisk, setDataEditableStrings, setDataIsEditable, setDataIsRelative, setDataRelativeStrings, setDataSelection, setDateTimeSelection, setDefaultSave, setDescription, setDescriptor, setDirectory, setEverChangedName, setInError, setInError, setInError, setName, setNewFiles, setObjectProperties, setObjectProperty, setPassword, setPollingInfo, setPollLocation, setProperties, setProperty, setProperty, setRelativePaths, setTemplateName, setTmpPaths, setUserName, shouldCache, shouldCache, showPasswordDialog, showPropertiesDialog, showPropertiesDialog, showPropertiesDialog, showWaitDialog, tick, toString, toStringTruncated, updateDetailsText, updateState, 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
-
EOLProfilerDataSource
No argument XML persistence constructor- Throws:
VisADException
- problem in VisAD
-
EOLProfilerDataSource
public EOLProfilerDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties) throws VisADException Create a new EOLProfilerDataSource- Parameters:
descriptor
- description of sourcesource
- source of the dataproperties
- extra properties- Throws:
VisADException
- problem accessing data
-
-
Method Details
-
initAfterUnpersistence
public void initAfterUnpersistence()Extends method in DataSourceImpl to call local initProfiler ()- Specified by:
initAfterUnpersistence
in interfaceDataSource
- Overrides:
initAfterUnpersistence
in classDataSourceImpl
-
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 classDataSourceImpl
- Returns:
- File to poll on.
-
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 problemVisADException
- VisAD problem
-
equals
Check to see if this EOLProfilerDataSource is equal to the object in question.- Overrides:
equals
in classDataSourceImpl
- 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.EOLProfilerDataSource" - Parameters:
args
- filename- Throws:
Exception
- problem running this
-
setFileNameOrUrl
Set the FileNameOrUrl property.- Parameters:
value
- The new value for FileNameOrUrl
-
getFileNameOrUrl
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
-