ucar.unidata.data
Interface DataSource

All Known Implementing Classes:
AddeImageDataSource, AddePointDataSource, AddeProfilerDataSource, AddeTextDataSource, AddeTextProductDataSource, CacheDataSource, CDMProfileDataSource, CDMProfilerDataSource, CDMRadarDataSource, CDOGTextPointDataSource, DataSourceImpl, DbPointDataSource, DbTrajectoryDataSource, DemDataSource, DescriptorDataSource, DiamondPointDataSource, DodsGeoGridDataSource, DoradeDataSource, DrawingDataSource, EOLProfilerDataSource, FilesDataSource, FrontDataSource, GeodasDataSource, GeoGridDataSource, GeotiffDataSource, GNOMETextPointDataSource, GridDataSource, ImageDataSource, ImageGridDataSource, ImageXmlDataSource, KmlDataSource, Level2RadarDataSource, ListDataSource, McIDASImageDataSource, MovieDataSource, NetcdfMetarDataSource, NetcdfPointDataSource, NetcdfRadarDataSource, NwxTextProductDataSource, PlaceFileDataSource, PointCloudDataSource, PointDataSource, RadarDataSource, RaobDataSource, SerializedDataSource, ShapeFileDataSource, SondeDataSource, TextDataSource, TextPointDataSource, TextProductDataSource, TrackDataSource, TrajectoryFeatureTypeDataSource, Vis5DDataSource, VisadDataSource, WaterMLDataSource, WmsDataSource

public interface DataSource

Interface for a source of Data

Version:
$Revision: 1.94 $
Author:
IDV Development Team

Field Summary
static String DATAPATH_DATE_FORMAT
          ???
static String DATAPATH_DATE_PATTERN
          ???
static String MOST_RECENT
          Identifier for most recent properties
static String[] ordinalNames
          Ordinal names for images
static String PROP_AUTOCREATEDISPLAY
          property id
static String PROP_BASEDIRECTORY
          The base directory property
static String PROP_CACHEABLE
          Property id for if this data source is cacheable
static String PROP_DATACHOICENAME
          The DataChoice name property
static String PROP_DISPLAYPROPERTIES
          The property for display properties
static String PROP_DOCUMENTLINKS
          The document links property
static String PROP_FILEPATTERN
          The file pattern property
static String PROP_GEOLOCATION
          The geolocation property
static String PROP_ICON
          icon property name
static String PROP_NAME
          The name property
static String PROP_POLLINFO
          The polling interval property
static String PROP_RESOLVERURL
          The resolver URL property
static String PROP_SERVICE_HTTP
          properties from the catalogs
static String PROP_SUBPROPERTIES
          property identifier
static String PROP_TIMELABELS
          Used in request properties for the time labels
static String PROP_TITLE
          The title property
 
Method Summary
 void addDataChangeListener(DataChangeListener listener)
          Add the data change listener.
 boolean canAddCurrentName(DataChoice dataChoice)
          can we add the data choice to the global list of parameter names
 boolean canDoGeoSelection()
          Can this datasource do the geoselection subsetting and decimation
 boolean canSaveDataToLocalDisk()
          Can this data source saves its files to local disk
 void clearCachedData()
          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 DataSource
 void expandIfNeeded(CompositeDataChoice cdc)
          Gets called by the DataSelection tree gui when a CompositeDataChoice is first opened.
 DataChoice findDataChoice(Object dataChoiceId)
          A utility method to find a given DataChoice based on the id
 List findDataChoices(Object id)
          A utility method to find all data choices that match the pattern
 List getActions()
          Get any Action-s associated with this DataSource.
 String getAlias()
          Return the alias for this DataSource.
 List getAllDateTimes()
          Get the list of all times available from this DataSource
 List getAllDateTimes(DataChoice dataChoice)
          Get the list of all times available from the DataChoice
 List getAllLevels(DataChoice dataChoice)
          Get the list of all levels available from this DataSource
 List getAllLevels(DataChoice dataChoice, DataSelection dataSelection)
          Get all levels for the data choice and selection
 List getCompositeDataChoices(CompositeDataChoice compositeDataChoice, List dataChoices)
          Utility to update the children data choices
 Data getData(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties)
          Return the visad.Data object represented by the given dataChoice argument
 Data getData(DataChoice dataChoice, DataCategory category, Hashtable requestProperties)
          Return the visad.Data object represented by the given dataChoice argument
 List getDataChoices()
          Return the List of DataChoice objects
 boolean getDataIsEditable()
          Has this data source been marked to change it file on a bundle load
 List getDataPaths()
          Get the list of file or url paths this data source has
 DataSelection getDataSelection()
          Get the DataSelection for this DataSource
 List<DataSelectionComponent> getDataSelectionComponents(DataChoice dataChoice)
          Returns a list of DataSelectionComponents that are shown in the field selector
 List getDateTimeSelection()
          Get the list of datetimes that this data source should use.
 String getDescription()
          Human readable description of this DataSource
 String getErrorMessage()
          Get the current error message.
 String getFullDescription()
          All the details
 boolean getInError()
          See if this DataSource is in error.
 String getName()
          Human readable name of this DataSource
 boolean getNeedToShowErrorToUser()
          Do we need to show the error to the user or was it already handled
 String getPartialDescription()
          A little more detailed description of this DataSource
 Object getProperty(String name)
          Get the property
 List getSelectedDateTimes()
          Get the list of all times selected from this DataSource
 List getSelectedDateTimes(DataChoice dataChoice)
          Get the list of all times selected from the DataChoice
 List getTmpPaths()
          for changing paths
 String getTypeName()
          Get the type name of this DataSource
 String getUniqueId()
          Return 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 initAfterCreation()
          Intialization method that gets called after the DataSource has been created.
 void initAfterUnpersistence()
          Method to be implemented to have work done after the DataSource has been unpersisted from XML
 void notifyDataChange()
          Method to call notifying implementers of changes to data
 void reloadData()
          Reload the data and notify any listeners
 void reloadData(Object object, Hashtable properties)
           
 void removeDataChangeListener(DataChangeListener listener)
          Remove the data change listener.
 void resetTmpState()
          This gets called after we have been saved in a zidv bundle to reset us back to any original state
 List saveDataToLocalDisk(boolean changeLinks, String uniqueFilePath)
          Save the files to local disk
 void setAlias(String alias)
          Set the alias
 void setDataIsEditable(boolean value)
          Set the DataIsEditable property.
 void setDateTimeSelection(List selectedTimes)
          Set the list of datetimes that this data source should use.
 void setInError(boolean b)
           
 void setNewFiles(List files)
          Used to change what files this data source uses
 void setObjectProperties(Hashtable properties)
          set the properties
 void setTmpPaths(List strings)
          for changing paths
 boolean showPropertiesDialog()
          Show the properties dialog
 void updateState(Object newObject, Hashtable newProperties)
          Update the state
 

Field Detail

PROP_SERVICE_HTTP

static final String PROP_SERVICE_HTTP
properties from the catalogs

See Also:
Constant Field Values

PROP_SUBPROPERTIES

static final String PROP_SUBPROPERTIES
property identifier

See Also:
Constant Field Values

PROP_CACHEABLE

static final String PROP_CACHEABLE
Property id for if this data source is cacheable

See Also:
Constant Field Values

PROP_ICON

static final String PROP_ICON
icon property name

See Also:
Constant Field Values

PROP_AUTOCREATEDISPLAY

static final String PROP_AUTOCREATEDISPLAY
property id

See Also:
Constant Field Values

PROP_DOCUMENTLINKS

static final String PROP_DOCUMENTLINKS
The document links property

See Also:
Constant Field Values

PROP_FILEPATTERN

static final String PROP_FILEPATTERN
The file pattern property

See Also:
Constant Field Values

PROP_RESOLVERURL

static final String PROP_RESOLVERURL
The resolver URL property

See Also:
Constant Field Values

PROP_POLLINFO

static final String PROP_POLLINFO
The polling interval property

See Also:
Constant Field Values

PROP_BASEDIRECTORY

static final String PROP_BASEDIRECTORY
The base directory property

See Also:
Constant Field Values

PROP_TITLE

static final String PROP_TITLE
The title property

See Also:
Constant Field Values

PROP_NAME

static final String PROP_NAME
The name property

See Also:
Constant Field Values

PROP_DATACHOICENAME

static final String PROP_DATACHOICENAME
The DataChoice name property

See Also:
Constant Field Values

PROP_GEOLOCATION

static final String PROP_GEOLOCATION
The geolocation property

See Also:
Constant Field Values

PROP_DISPLAYPROPERTIES

static final String PROP_DISPLAYPROPERTIES
The property for display properties

See Also:
Constant Field Values

PROP_TIMELABELS

static final String PROP_TIMELABELS
Used in request properties for the time labels

See Also:
Constant Field Values

ordinalNames

static final String[] ordinalNames
Ordinal names for images


MOST_RECENT

static final String MOST_RECENT
Identifier for most recent properties

See Also:
Constant Field Values

DATAPATH_DATE_FORMAT

static final String DATAPATH_DATE_FORMAT
???

See Also:
Constant Field Values

DATAPATH_DATE_PATTERN

static final String DATAPATH_DATE_PATTERN
???

See Also:
Constant Field Values
Method Detail

getDataChoices

List getDataChoices()
Return the List of DataChoice 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 data
category - The data category
dataSelection - sub selection (i.e. times) criteria
requestProperties - extra request properties
Returns:
the Data object for the request
Throws:
RemoteException - Java RMI problem
VisADException - 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 data
category - The data category
requestProperties - extra request properties
Returns:
the Data object for the request
Throws:
RemoteException - Java RMI problem
VisADException - VisAD problem

getProperty

Object getProperty(String name)
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

void setNewFiles(List files)
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

DataChoice findDataChoice(Object dataChoiceId)
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

List findDataChoices(Object id)
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

List getAllLevels(DataChoice dataChoice)
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

List getAllLevels(DataChoice dataChoice,
                  DataSelection dataSelection)
Get all levels for the data choice and selection

Parameters:
dataChoice - data choice
dataSelection - 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

List getAllDateTimes(DataChoice dataChoice)
Get the list of all times available from the DataChoice

Parameters:
dataChoice - DataChoice in question
Returns:
List of times

getSelectedDateTimes

List getSelectedDateTimes(DataChoice dataChoice)
Get the list of all times selected from the DataChoice

Parameters:
dataChoice - DataChoice in question
Returns:
List of times

setDateTimeSelection

void setDateTimeSelection(List selectedTimes)
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

void addDataChangeListener(DataChangeListener listener)
Add the data change listener.

Parameters:
listener - listener to add

expandIfNeeded

void expandIfNeeded(CompositeDataChoice cdc)
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

void removeDataChangeListener(DataChangeListener listener)
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)

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

boolean identifiedBy(Object definingObject)
Is this datasource identified by the given defining object.

Parameters:
definingObject - object in question
Returns:
true if it is

identifiedByName

boolean identifiedByName(String name)
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

void setAlias(String alias)
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 any Action-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

List getCompositeDataChoices(CompositeDataChoice compositeDataChoice,
                             List dataChoices)
Utility to update the children data choices

Parameters:
compositeDataChoice - composite data choice
dataChoices - 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

List<DataSelectionComponent> getDataSelectionComponents(DataChoice dataChoice)
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

void setObjectProperties(Hashtable properties)
set the properties

Parameters:
properties - properties

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

void updateState(Object newObject,
                 Hashtable newProperties)
Update the state

Parameters:
newObject - new object
newProperties - the properties

setTmpPaths

void setTmpPaths(List strings)
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

List saveDataToLocalDisk(boolean changeLinks,
                         String uniqueFilePath)
                         throws IOException
Save the files to local disk

Parameters:
changeLinks - And change the internal file references
uniqueFilePath - 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

void createAutoDisplay(String displayType,
                       DataContext dataContext)
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 id
dataContext - Really, the IDV

canAddCurrentName

boolean canAddCurrentName(DataChoice dataChoice)
can we add the data choice to the global list of parameter names

Parameters:
dataChoice - the data choice
Returns:
can add

reloadData

void reloadData(Object object,
                Hashtable properties)