Package ucar.unidata.data.point
Class NetcdfPointDataSource
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.data.DataSourceImpl
ucar.unidata.data.FilesDataSource
ucar.unidata.data.point.PointDataSource
ucar.unidata.data.point.NetcdfPointDataSource
- All Implemented Interfaces:
Sharable
,DataSource
,DataSourceFactory
,XmlPersistable
- Direct Known Subclasses:
NetcdfMetarDataSource
,NetcdfPointCloudDataSource
,WRFHDNetcdfDataSource
A data source for netCDF or CDM point data
- Version:
- $Revision: 1.32 $ $Date: 2007/07/31 19:29:16 $
- Author:
- Don Murray
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.unidata.data.point.PointDataSource
PointDataSource.PlotModelSelectionComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ucar.nc2.ft.FeatureDatasetPoint
a fixed datasetFields inherited from class ucar.unidata.data.point.PointDataSource
fieldsDescription, POINT_DATA, PROP_FIRSTGUESS, PROP_GRID_GAIN, PROP_GRID_NUMPASSES, PROP_GRID_PARAM, PROP_GRID_SEARCH_RADIUS, PROP_GRID_UNIT, PROP_GRID_X, PROP_GRID_Y, PROP_STATIONMODELNAME, PROP_STATIONMODELSCALE, STATION_DATA, STATION_PLOT
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
ConstructorsConstructorDescriptionDefault constructorNetcdfPointDataSource
(ucar.nc2.ft.FeatureDatasetPoint fixedDataset, DataSourceDescriptor descriptor, Hashtable properties) Create a new NetcdfPointDataSourceNetcdfPointDataSource
(DataSourceDescriptor descriptor, String[] sources, Hashtable properties) Create a new NetcdfPointDataSourceNetcdfPointDataSource
(DataSourceDescriptor descriptor, String source, Hashtable properties) Create a new NetcdfPointDataSourceNetcdfPointDataSource
(DataSourceDescriptor descriptor, List sources, Hashtable properties) Create a new NetcdfPointDataSource -
Method Summary
Modifier and TypeMethodDescriptionboolean
Can this datasource do the geoselection subsetting and decimationprotected boolean
Used for the geo subsetting property gui as to whether to show the stride or notboolean
Is this data source capable of saving its data to local diskprotected ucar.nc2.ft.FeatureDatasetPoint
doMakeDataset
(String file) Make the datasetvoid
doRemove()
Gets called by theDataManager
when this DataSource has been removed.boolean
Check to see if this NetcdfPointDataSource is equal to the object in question.protected ucar.nc2.ft.FeatureDatasetPoint
getDataset
(String file) Return the FeatureDatasetPoint associated with this DataSource.protected FieldImpl
getSample
(DataChoice dataChoice) Read a sample of the data.int
hashCode()
Get the hashcode for this objectvoid
Initialize after we have been created.static void
testprotected FieldImpl
makeObs
(DataChoice dataChoice, DataSelection subset, ucar.unidata.geoloc.LatLonRect bbox) Make PointObs from the choiceprotected FieldImpl
makeObs
(DataChoice dataChoice, DataSelection subset, ucar.unidata.geoloc.LatLonRect bbox, boolean sample) make the obsMethods inherited from class ucar.unidata.data.point.PointDataSource
addPropertiesTabs, applyProperties, canAddCurrentName, canCreateGrid, canDoAllLevels, doMakeDataChoices, getBinRoundTo, getBinWidth, getDataInner, getDataName, getDefaultLevels, getDescriptionDataChoice, getFullDescription, getGridGain, getGridSearchRadius, getGridUnit, getGridX, getGridY, getMakeGridFields, getNumGridPasses, getPointCategories, getPropertiesComponents, getSource, init, initDataSelectionComponents, initGridParameters, makeDerivedDataChoices, makeFieldDescription, reloadData, setBinRoundTo, setBinWidth, setGridGain, setGridSearchRadius, setGridUnit, setGridX, setGridY, setMakeGridFields, setNumGridPasses, setRoundToFromComboBox, setSource, setWidthFromComboBox, shouldCache
Methods inherited from class ucar.unidata.data.FilesDataSource
getDataFileExtension, getDataPaths, getFilePath, getInputStreams, getLocationsForPolling, getPartialDescription, getSource, getSources, haveSources, initAfterUnpersistence, initWithPollingInfo, isFileBased, newFilesFromPolling, processDataFilename, propertiesChanged, reloadData, saveDataToLocalDisk, setNewFiles, setSources, sourcesChanged, updateState
Methods inherited from class ucar.unidata.data.DataSourceImpl
addActions, addDataChangeListener, addDataChoice, addReloadTab, applyFieldMask, beginWritingDataToLocalDisk, canCacheDataToDisk, canChangeData, canDoFieldMask, canDoGeoSelectionMap, canPoll, 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, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, 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, 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, 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
-
Field Details
-
fixedDataset
protected ucar.nc2.ft.FeatureDatasetPoint fixedDataseta fixed dataset
-
-
Constructor Details
-
NetcdfPointDataSource
Default constructor- Throws:
VisADException
- problem creating the object
-
NetcdfPointDataSource
public NetcdfPointDataSource(ucar.nc2.ft.FeatureDatasetPoint fixedDataset, DataSourceDescriptor descriptor, Hashtable properties) throws VisADException Create a new NetcdfPointDataSource- Parameters:
fixedDataset
- the data sourcedescriptor
- data source descriptorproperties
- extra properties for initialization- Throws:
VisADException
- problem creating the data
-
NetcdfPointDataSource
public NetcdfPointDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties) throws VisADException Create a new NetcdfPointDataSource- Parameters:
descriptor
- data source descriptorsource
- source of data (filename/URL)properties
- extra properties for initialization- Throws:
VisADException
- problem creating the data
-
NetcdfPointDataSource
public NetcdfPointDataSource(DataSourceDescriptor descriptor, String[] sources, Hashtable properties) throws VisADException Create a new NetcdfPointDataSource- Parameters:
descriptor
- data source descriptorsources
- sources of data (filename/URL)properties
- extra properties for initialization- Throws:
VisADException
- problem creating the data
-
NetcdfPointDataSource
public NetcdfPointDataSource(DataSourceDescriptor descriptor, List sources, Hashtable properties) throws VisADException Create a new NetcdfPointDataSource- Parameters:
descriptor
- data source descriptorsources
- List source of data (filenames/URLs)properties
- extra properties for initialization- Throws:
VisADException
- problem creating the data
-
-
Method Details
-
canDoGeoSelection
public boolean canDoGeoSelection()Can this datasource do the geoselection subsetting and decimation- Specified by:
canDoGeoSelection
in interfaceDataSource
- Overrides:
canDoGeoSelection
in classDataSourceImpl
- Returns:
- can do geo subsetting
-
canDoGeoSelectionStride
protected boolean canDoGeoSelectionStride()Used for the geo subsetting property gui as to whether to show the stride or not- Overrides:
canDoGeoSelectionStride
in classDataSourceImpl
- Returns:
- default is true
-
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
-
equals
Check to see if this NetcdfPointDataSource 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()Get the hashcode for this object -
initAfterCreation
public void initAfterCreation()Initialize after we have been created.- Specified by:
initAfterCreation
in interfaceDataSource
- Overrides:
initAfterCreation
in classFilesDataSource
-
getDataset
Return the FeatureDatasetPoint associated with this DataSource.- Parameters:
file
- the file name- Returns:
- dataset
-
doMakeDataset
Make the dataset- Parameters:
file
- the file name- Returns:
- the dataset
-
getSample
Read a sample of the data. e.g., just the first ob- Overrides:
getSample
in classPointDataSource
- Parameters:
dataChoice
- The data choice- Returns:
- The first ob
- Throws:
Exception
- On badness
-
makeObs
protected FieldImpl makeObs(DataChoice dataChoice, DataSelection subset, ucar.unidata.geoloc.LatLonRect bbox) throws Exception Make PointObs from the choice- Specified by:
makeObs
in classPointDataSource
- Parameters:
dataChoice
- choice for data (source of data)subset
- subsetting parametersbbox
- bounding box. may be null- Returns:
- data of the form index -> (EarthLocation, Time, Data)
- Throws:
Exception
- problem creating data
-
makeObs
protected FieldImpl makeObs(DataChoice dataChoice, DataSelection subset, ucar.unidata.geoloc.LatLonRect bbox, boolean sample) throws Exception make the obs- Parameters:
dataChoice
- the datachoicesubset
- teh data selectionbbox
- the bboxsample
- just a taste?- Returns:
- the obs
- Throws:
Exception
- on badness
-
doRemove
public void doRemove()Gets called by theDataManager
when this DataSource has been removed.- Specified by:
doRemove
in interfaceDataSource
- Overrides:
doRemove
in classPointDataSource
-
main
test- Parameters:
args
- args
-