ucar.unidata.data.grid
Class Vis5DDataSource

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.data.DataSourceImpl
          extended by ucar.unidata.data.FilesDataSource
              extended by ucar.unidata.data.grid.GridDataSource
                  extended by ucar.unidata.data.grid.Vis5DDataSource
All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

public class Vis5DDataSource
extends GridDataSource

A data source for Vis5D data files. Handles grid and topography files.

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

Field Summary
 
Fields inherited from class ucar.unidata.data.grid.GridDataSource
ATTR_EAST, ATTR_NORTH, ATTR_SOUTH, ATTR_WEST, ATTR_X, ATTR_Y, ATTR_Z
 
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
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_TITLE
 
Constructor Summary
Vis5DDataSource()
          Dummy constructor so this object can get unpersisted.
Vis5DDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties)
          Create a Vis5DDataSource from the specification given.
 
Method Summary
 boolean canDoGeoSelection()
          We can do geo selection in the properties gui
protected  boolean canDoGeoSelectionMap()
          Used for the geo subsetting property gui as to whether to show the map selection or not
protected  void doMakeDataChoices()
          Create the DataChoices for this data source
protected  List doMakeDateTimes()
          Create the list of times associated with this datasource
protected  Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties)
          Get the data described by the selection parameters
 FieldImpl getField(DataChoice dc, DataSelection dataSelection)
          Get the grid described by the selection parameters
static void main(String[] args)
          Test by running "java ucar.unidata.data.grid.Vis5DDataSource "
 void setSource(String value)
          Set the Source property.
protected  void sourcesChanged()
          The source has changed
 
Methods inherited from class ucar.unidata.data.grid.GridDataSource
getThreeDCategories, getThreeDTimeSeriesCategories, getTwoDCategories, getTwoDTimeSeriesCategories, initCategories
 
Methods inherited from class ucar.unidata.data.FilesDataSource
doRemove, equals, getDataFileExtension, getDataPaths, getFilePath, getFullDescription, getInputStreams, getLocationsForPolling, getPartialDescription, getSource, getSources, haveSources, initAfterCreation, initAfterUnpersistence, initWithPollingInfo, isFileBased, newFilesFromPolling, processDataFilename, propertiesChanged, reloadData, saveDataToLocalDisk, setNewFiles, setSources, updateState
 
Methods inherited from class ucar.unidata.data.DataSourceImpl
addActions, addDataChangeListener, addDataChoice, addPropertiesTabs, applyFieldMask, applyProperties, beginWritingDataToLocalDisk, canCacheDataToDisk, canChangeData, canDoFieldMask, canDoGeoSelectionStride, canPoll, canSaveDataToLocalDisk, canShowParameter, checkForInitAfterUnPersistence, clearCachedData, clearFileCache, clearTimes, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getAllLevels, getCache, getCacheClearDelay, getCacheDataToDisk, getCompositeDataChoices, getData, getData, getDataCachePath, getDataChangeListeners, getDataChoices, getDataContext, getDataInner, getDataIsEditable, getDataPrefix, getDataSelection, getDataSelectionComponents, getDataSource, getDateTimes, getDateTimeSelection, getDescription, getDescriptor, getErrorMessage, getExtraGeoSelectionComponent, getFileFilterForPolling, getid, getInError, getLocalDirectory, getLocationForPolling, getMostRecentFiles, getName, getNameForDataSource, getNeedToShowErrorToUser, getNextId, getOutstandingGetDataCalls, getPassword, getPathsThatCanBeRelative, getPollingInfo, getProperties, getPropertiesComponents, 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, newFileFromPolling, notifyDataChange, putCache, removeCache, removeDataChangeListener, removeDataChoice, removeProperty, replaceDataChoice, resetTmpState, saveDataToLocalDisk, saveDataToLocalDisk, setAlias, setAskToUpdate, setCacheClearDelay, setCacheDataToDisk, setDataEditableStrings, setDataIsEditable, setDataIsRelative, setDataRelativeStrings, setDataSelection, setDateTimeSelection, setDescription, setDescriptor, setDirectory, 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, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setShareGroup, setSharing, setUniqueId, showSharableDialog
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ucar.unidata.data.DataSource
getUniqueId
 

Constructor Detail

Vis5DDataSource

public Vis5DDataSource()
Dummy constructor so this object can get unpersisted.


Vis5DDataSource

public Vis5DDataSource(DataSourceDescriptor descriptor,
                       String source,
                       Hashtable properties)
                throws VisADException
Create a Vis5DDataSource from the specification given.

Parameters:
descriptor - descriptor for the DataSource
source - source of data (filename)
properties - extra properties for initialization
Throws:
VisADException - couldn't create the data
Method Detail

sourcesChanged

protected void sourcesChanged()
The source has changed

Overrides:
sourcesChanged in class FilesDataSource

doMakeDataChoices

protected void doMakeDataChoices()
Create the DataChoices for this data source

Overrides:
doMakeDataChoices in class DataSourceImpl

getDataInner

protected Data getDataInner(DataChoice dataChoice,
                            DataCategory category,
                            DataSelection dataSelection,
                            Hashtable requestProperties)
                     throws VisADException,
                            RemoteException
Get the data described by the selection parameters

Overrides:
getDataInner in class DataSourceImpl
Parameters:
dataChoice - choice describing data
category - the data category
dataSelection - subsetting specs
requestProperties - extra request properties
Returns:
the data (a grid)
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

doMakeDateTimes

protected List doMakeDateTimes()
Create the list of times associated with this datasource

Overrides:
doMakeDateTimes in class DataSourceImpl
Returns:
list of times

getField

public FieldImpl getField(DataChoice dc,
                          DataSelection dataSelection)
                   throws VisADException,
                          RemoteException
Get the grid described by the selection parameters

Parameters:
dc - choice describing the data
dataSelection - subsetting properties
Returns:
grid (FieldImpl) of data
Throws:
RemoteException - On badness
VisADException - On badness

canDoGeoSelection

public boolean canDoGeoSelection()
We can do geo selection in the properties gui

Specified by:
canDoGeoSelection in interface DataSource
Overrides:
canDoGeoSelection in class DataSourceImpl
Returns:
can do geo selection

canDoGeoSelectionMap

protected boolean canDoGeoSelectionMap()
Used for the geo subsetting property gui as to whether to show the map selection or not

Overrides:
canDoGeoSelectionMap in class DataSourceImpl
Returns:
default is true

setSource

public void setSource(String value)
Set the Source property.

Overrides:
setSource in class FilesDataSource
Parameters:
value - The new value for Source

main

public static void main(String[] args)
                 throws Exception
Test by running "java ucar.unidata.data.grid.Vis5DDataSource "

Parameters:
args - filename
Throws:
Exception - problem running this