Package ucar.unidata.data
Interface DataSource
- All Known Implementing Classes:
AddeImageDataSource
,AddePointDataSource
,AddeProfilerDataSource
,AddeTextDataSource
,AddeTextProductDataSource
,AMRCTextPointDataSource
,CacheDataSource
,CDMProfileDataSource
,CDMProfilerDataSource
,CDMRadarDataSource
,CDOGTextPointDataSource
,DataSourceImpl
,DbPointDataSource
,DbTrajectoryDataSource
,DemDataSource
,DescriptorDataSource
,DiamondPointDataSource
,DodsGeoGridDataSource
,DoradeDataSource
,DrawingDataSource
,EOLProfilerDataSource
,FilesDataSource
,FrontDataSource
,GeodasDataSource
,GeoGridDataSource
,GeotiffDataSource
,GNOMETextPointDataSource
,GridCoverageDataSource
,GridDataSource
,ImageDataSource
,ImageGridDataSource
,ImageXmlDataSource
,JsonDataSource
,KmlDataSource
,Level2RadarDataSource
,ListDataSource
,McIDASImageDataSource
,MovieDataSource
,NetcdfMetarDataSource
,NetcdfPointCloudDataSource
,NetcdfPointDataSource
,NetcdfRadarDataSource
,NwxTextProductDataSource
,PlaceFileDataSource
,PointCloudDataSource
,PointDataSource
,RadarDataSource
,RaobDataSource
,SerializedDataSource
,ShapeFileDataSource
,SondeDataSource
,TextDataSource
,TextPointDataSource
,TextProductDataSource
,TrackDataSource
,TrajectoryFeatureTypeDataSource
,Vis5DDataSource
,VisadDataSource
,WaterMLDataSource
,WmsDataSource
,WRFHDNetcdfDataSource
public interface DataSource
Interface for a source of Data
- Version:
- $Revision: 1.94 $
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
???static final String
???static final String
Identifier for most recent propertiesstatic final String[]
Ordinal names for imagesstatic final String
property idstatic final String
The base directory propertystatic final String
Property id for if this data source is cacheablestatic final String
The DataChoice name propertystatic final String
The property for display propertiesstatic final String
The document links propertystatic final String
The file pattern propertystatic final String
The geolocation propertystatic final String
icon property namestatic final String
The name propertystatic final String
The polling interval propertystatic final String
The resolver URL propertystatic final String
properties from the catalogsstatic final String
property identifierstatic final String
Used in request properties for the time labelsstatic final String
The time propertystatic final String
The title property -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataChangeListener
(DataChangeListener listener) Add the data change listener.boolean
canAddCurrentName
(DataChoice dataChoice) can we add the data choice to the global list of parameter namesboolean
Whether this DataSource to do "All levels"boolean
Can this datasource do the geoselection subsetting and decimationboolean
Can this data source saves its files to local diskvoid
This is called when the CacheManager detects the need ot clear memory.void
createAutoDisplay
(String displayType, DataContext dataContext) Automatically create the given display on initialization.void
doRemove()
Remove this DataSourcevoid
Gets called by the DataSelection tree gui when a CompositeDataChoice is first opened.findDataChoice
(Object dataChoiceId) A utility method to find a given DataChoice based on the idA utility method to find all data choices that match the patternGet anyAction
-s associated with this DataSource.getAlias()
Return the alias for this DataSource.Get the list of all times available from this DataSourcegetAllDateTimes
(DataChoice dataChoice) Get the list of all times available from the DataChoicegetAllLevels
(DataChoice dataChoice) Get the list of all levels available from this DataSourcegetAllLevels
(DataChoice dataChoice, DataSelection dataSelection) Get all levels for the data choice and selectiongetCompositeDataChoices
(CompositeDataChoice compositeDataChoice, List dataChoices) Utility to update the children data choicesgetData
(DataChoice dataChoice, DataCategory category, Hashtable requestProperties) Return the visad.Data object represented by the given dataChoice argumentgetData
(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) Return the visad.Data object represented by the given dataChoice argumentReturn the List ofDataChoice
objectsboolean
Has this data source been marked to change it file on a bundle loadGet the list of file or url paths this data source hasGet the DataSelection for this DataSourcegetDataSelectionComponents
(DataChoice dataChoice) Returns a list of DataSelectionComponents that are shown in the field selectorGet the list of datetimes that this data source should use.Human readable description of this DataSourceGet the current error message.All the detailsboolean
See if this DataSource is in error.getName()
Human readable name of this DataSourceboolean
Do we need to show the error to the user or was it already handledA little more detailed description of this DataSourcegetProperty
(String name) Get the propertyGet the list of all times selected from this DataSourcegetSelectedDateTimes
(DataChoice dataChoice) Get the list of all times selected from the DataChoicefor changing pathsGet the type name of this DataSourceReturn the unique id of this datasource.boolean
identifiedBy
(Object definingObject) Is this datasource identified by the given defining object.boolean
identifiedByName
(String name) Is this datasource identified by the given label.void
Intialization method that gets called after the DataSource has been created.void
Method to be implemented to have work done after the DataSource has been unpersisted from XMLvoid
Method to call notifying implementers of changes to datavoid
Reload the data and notify any listenersvoid
reloadData
(Object object, Hashtable properties) Reload data.void
removeDataChangeListener
(DataChangeListener listener) Remove the data change listener.void
This gets called after we have been saved in a zidv bundle to reset us back to any original statesaveDataToLocalDisk
(boolean changeLinks, String uniqueFilePath) Save the files to local diskvoid
Set the aliasvoid
setDataIsEditable
(boolean value) Set the DataIsEditable property.void
setDateTimeSelection
(List selectedTimes) Set the list of datetimes that this data source should use.void
setDefaultSave
(boolean selected) Sets the default save.void
setInError
(boolean b) _more_void
setNewFiles
(List files) Used to change what files this data source usesvoid
setObjectProperties
(Hashtable properties) set the propertiesvoid
setTmpPaths
(List strings) for changing pathsboolean
Show the properties dialogvoid
updateState
(Object newObject, Hashtable newProperties) Update the state
-
Field Details
-
PROP_SERVICE_HTTP
properties from the catalogs- See Also:
-
PROP_SUBPROPERTIES
property identifier- See Also:
-
PROP_CACHEABLE
Property id for if this data source is cacheable- See Also:
-
PROP_ICON
icon property name- See Also:
-
PROP_AUTOCREATEDISPLAY
property id- See Also:
-
PROP_DOCUMENTLINKS
The document links property- See Also:
-
PROP_FILEPATTERN
The file pattern property- See Also:
-
PROP_RESOLVERURL
The resolver URL property- See Also:
-
PROP_POLLINFO
The polling interval property- See Also:
-
PROP_BASEDIRECTORY
The base directory property- See Also:
-
PROP_TITLE
The title property- See Also:
-
PROP_NAME
The name property- See Also:
-
PROP_DATACHOICENAME
The DataChoice name property- See Also:
-
PROP_GEOLOCATION
The geolocation property- See Also:
-
PROP_TIMESTRIDE
The time property- See Also:
-
PROP_DISPLAYPROPERTIES
The property for display properties- See Also:
-
PROP_TIMELABELS
Used in request properties for the time labels- See Also:
-
ordinalNames
Ordinal names for images -
MOST_RECENT
Identifier for most recent properties- See Also:
-
DATAPATH_DATE_FORMAT
???- See Also:
-
DATAPATH_DATE_PATTERN
???- See Also:
-
-
Method Details
-
getDataChoices
List getDataChoices()Return the List ofDataChoice
objects- Returns:
- List of DataChoices
-
getData
Data getData(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException Return the visad.Data object represented by the given dataChoice argument- Parameters:
dataChoice
- choice for the datacategory
- The data categorydataSelection
- sub selection (i.e. times) criteriarequestProperties
- extra request properties- Returns:
- the Data object for the request
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getData
Data getData(DataChoice dataChoice, DataCategory category, Hashtable requestProperties) throws VisADException, RemoteException Return the visad.Data object represented by the given dataChoice argument- Parameters:
dataChoice
- choice for the datacategory
- The data categoryrequestProperties
- extra request properties- Returns:
- the Data object for the request
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getProperty
Get the property- Parameters:
name
- prop name- Returns:
- prop value
-
getName
String getName()Human readable name of this DataSource- Returns:
- a human readable name
-
setNewFiles
Used to change what files this data source uses- Parameters:
files
- List of files
-
getDescription
String getDescription()Human readable description of this DataSource- Returns:
- a human readable description
-
getPartialDescription
String getPartialDescription()A little more detailed description of this DataSource- Returns:
- a human readable description
-
getFullDescription
String getFullDescription()All the details- Returns:
- full descriptive name
-
findDataChoice
A utility method to find a given DataChoice based on the id- Parameters:
dataChoiceId
- the ID of the DataChoice- Returns:
- the DataChoice or null
-
findDataChoices
A utility method to find all data choices that match the pattern- Parameters:
id
- The id- Returns:
- List of data choices
-
getTypeName
String getTypeName()Get the type name of this DataSource- Returns:
- type name
-
getAllLevels
Get the list of all levels available from this DataSource- Parameters:
dataChoice
- The data choice to get levels for- Returns:
- List of all available levels
-
getAllLevels
Get all levels for the data choice and selection- Parameters:
dataChoice
- data choicedataSelection
- selection- Returns:
- List of levels
-
getAllDateTimes
List getAllDateTimes()Get the list of all times available from this DataSource- Returns:
- List of all available times
-
getSelectedDateTimes
List getSelectedDateTimes()Get the list of all times selected from this DataSource- Returns:
- List of selected times
-
getAllDateTimes
Get the list of all times available from the DataChoice- Parameters:
dataChoice
- DataChoice in question- Returns:
- List of times
-
getSelectedDateTimes
Get the list of all times selected from the DataChoice- Parameters:
dataChoice
- DataChoice in question- Returns:
- List of times
-
setDateTimeSelection
Set the list of datetimes that this data source should use.- Parameters:
selectedTimes
- List of times to use
-
getDateTimeSelection
List getDateTimeSelection()Get the list of datetimes that this data source should use.- Returns:
- List of times the data source should use.
-
getDataSelection
DataSelection getDataSelection()Get the DataSelection for this DataSource- Returns:
- the DataSelection (time sub-selection)
-
addDataChangeListener
Add the data change listener.- Parameters:
listener
- listener to add
-
expandIfNeeded
Gets called by the DataSelection tree gui when a CompositeDataChoice is first opened. This allows us to incrementally expand these nested data choices.- Parameters:
cdc
- the data choice
-
removeDataChangeListener
Remove the data change listener.- Parameters:
listener
- listener to remove
-
notifyDataChange
void notifyDataChange()Method to call notifying implementers of changes to data -
doRemove
void doRemove()Remove this DataSource -
getInError
boolean getInError()See if this DataSource is in error.- Returns:
- true if in error
-
setInError
void setInError(boolean b) _more_- Parameters:
b
- _more_
-
getNeedToShowErrorToUser
boolean getNeedToShowErrorToUser()Do we need to show the error to the user or was it already handled- Returns:
- need to show the error to the user
-
getErrorMessage
String getErrorMessage()Get the current error message.- Returns:
- error message
-
initAfterUnpersistence
void initAfterUnpersistence()Method to be implemented to have work done after the DataSource has been unpersisted from XML -
initAfterCreation
void initAfterCreation()Intialization method that gets called after the DataSource has been created. -
identifiedBy
Is this datasource identified by the given defining object.- Parameters:
definingObject
- object in question- Returns:
- true if it is
-
identifiedByName
Is this datasource identified by the given label. The name may be of the form "class:classpattern" or just a pattern to match the name by- Parameters:
name
- the name.- Returns:
- true if it is
-
getAlias
String getAlias()Return the alias for this DataSource.- Returns:
- alias (i.e., alternate name) for this DataSource
-
setAlias
Set the alias- Parameters:
alias
- alias to use
-
getUniqueId
String getUniqueId()Return the unique id of this datasource.- Returns:
- unique id
-
getActions
List getActions()Get anyAction
-s associated with this DataSource. The actions can be used to create menus, buttons, etc.- Returns:
- a list of Actions associated with this DataSource
-
showPropertiesDialog
boolean showPropertiesDialog()Show the properties dialog- Returns:
- Was ok pressed
-
reloadData
void reloadData()Reload the data and notify any listeners -
getCompositeDataChoices
Utility to update the children data choices- Parameters:
compositeDataChoice
- composite data choicedataChoices
- Its children- Returns:
- The actual children to use
-
canDoGeoSelection
boolean canDoGeoSelection()Can this datasource do the geoselection subsetting and decimation- Returns:
- can do geo subsetting
-
getDataSelectionComponents
Returns a list of DataSelectionComponents that are shown in the field selector- Parameters:
dataChoice
- The data choice in the field selector- Returns:
- The list of components
-
setObjectProperties
set the properties- Parameters:
properties
- properties
-
canDoAllLevels
boolean canDoAllLevels()Whether this DataSource to do "All levels"- Returns:
- boolean
-
setDataIsEditable
void setDataIsEditable(boolean value) Set the DataIsEditable property.- Parameters:
value
- The new value for DataIsEditable
-
getDataIsEditable
boolean getDataIsEditable()Has this data source been marked to change it file on a bundle load- Returns:
- is editable
-
getTmpPaths
List getTmpPaths()for changing paths- Returns:
- paths to change
-
updateState
Update the state- Parameters:
newObject
- new objectnewProperties
- the properties
-
setTmpPaths
for changing paths- Parameters:
strings
- Changed paths
-
resetTmpState
void resetTmpState()This gets called after we have been saved in a zidv bundle to reset us back to any original state -
getDataPaths
List getDataPaths()Get the list of file or url paths this data source has- Returns:
- List of files or urls
-
canSaveDataToLocalDisk
boolean canSaveDataToLocalDisk()Can this data source saves its files to local disk- Returns:
- can save to local disk
-
saveDataToLocalDisk
Save the files to local disk- Parameters:
changeLinks
- And change the internal file referencesuniqueFilePath
- Prefix to save files to- Returns:
- List of files saved
- Throws:
IOException
- On badness
-
clearCachedData
void clearCachedData()This is called when the CacheManager detects the need ot clear memory. -
createAutoDisplay
Automatically create the given display on initialization. This used to be in the IDV but we moved it here to allow different data sources to do different things.- Parameters:
displayType
- The display control type iddataContext
- Really, the IDV
-
canAddCurrentName
can we add the data choice to the global list of parameter names- Parameters:
dataChoice
- the data choice- Returns:
- can add
-
reloadData
Reload data.- Parameters:
object
- the objectproperties
- the properties
-
setDefaultSave
void setDefaultSave(boolean selected) Sets the default save. The idea here is the user should just be allowed to select a default option when saving a zidv bundle rather than being asked additional questions.- Parameters:
selected
- the new default save
-