edu.wisc.ssec.mcidasv.data.hydra
Class MultiDimensionDataSource

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.data.DataSourceImpl
          extended by edu.wisc.ssec.mcidasv.data.HydraDataSource
              extended by edu.wisc.ssec.mcidasv.data.hydra.MultiDimensionDataSource
All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

public class MultiDimensionDataSource
extends HydraDataSource

A data source for Multi Dimension Data


Field Summary
private  HashMap<String,MultiDimensionAdapter> adapterMap
           
protected  MultiDimensionAdapter[] adapters
           
private  List categories
           
protected  List[] categoriesArray
           
private static String DATA_DESCRIPTION
           
private  HashMap defaultSubset
           
protected  HashMap[] defaultSubsets
           
protected  String filename
          Sources file
private  boolean hasImagePreview
           
private  boolean hasTrackPreview
           
private  MultiSpectralData multiSpectData
           
protected  Hashtable[] propsArray
           
protected  MultiDimensionReader reader
           
protected  SpectrumAdapter spectrumAdapter
           
 TrackAdapter track_adapter
           
 
Fields inherited from class edu.wisc.ssec.mcidasv.data.HydraDataSource
oldSourceFromBundles, request, 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_TITLE
 
Constructor Summary
MultiDimensionDataSource()
          Zero-argument constructor for construction via unpersistence.
MultiDimensionDataSource(DataSourceDescriptor descriptor, List newSources, Hashtable properties)
          Construct a new HYDRA hdf data source.
MultiDimensionDataSource(DataSourceDescriptor descriptor, String fileName, Hashtable properties)
          Construct a new HYDRA hdf data source.
 
Method Summary
protected  Data applyProperties(Data data, Hashtable requestProperties, HashMap subset)
           
private  DataChoice doMakeDataChoice(int idx, String var)
           
 void doMakeDataChoices()
          Make and insert the DataChoice-s for this DataSource.
 boolean equals(Object o)
          Check to see if this HDFHydraDataSource is equal to the object in question.
 Data getData(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties)
           
protected  Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties)
          Get the data for the given DataChoice and selection criteria.
 String getDatasetName()
           
 MultiSpectralData getMultiSpectralData()
           
 HashMap getSubsetFromLonLatRect(MultiDimensionSubset select, GeoSelection geoSelection)
           
 void initAfterUnpersistence()
           
protected  void initDataSelectionComponents(List<DataSelectionComponent> components, DataChoice dataChoice)
           
 void setDatasetName(String name)
           
 void setup()
           
 
Methods inherited from class edu.wisc.ssec.mcidasv.data.HydraDataSource
canSaveDataToLocalDisk, clearCachedData, doMakeDateTimes, getAdapters, isFileBased
 
Methods inherited from class ucar.unidata.data.DataSourceImpl
addActions, addDataChangeListener, addDataChoice, addPropertiesTabs, addReloadTab, applyFieldMask, applyProperties, beginWritingDataToLocalDisk, canAddCurrentName, canCacheDataToDisk, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, doRemove, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getAllLevels, getAllTimesForTimeDriver, getCache, getCache, getCacheClearDelay, getCacheDataToDisk, getCompositeDataChoices, 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, getLocationsForPolling, getMostRecentFiles, getName, getNameForDataSource, getNeedToShowErrorToUser, getNextId, getOutstandingGetDataCalls, getPartialDescription, 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, initAfterCreation, initDataChoice, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeDerivedDataChoices, makeSaveLocalActions, newFileFromPolling, 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, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ucar.unidata.data.DataSource
getUniqueId
 

Field Detail

filename

protected String filename
Sources file


reader

protected MultiDimensionReader reader

adapters

protected MultiDimensionAdapter[] adapters

defaultSubsets

protected HashMap[] defaultSubsets

adapterMap

private HashMap<String,MultiDimensionAdapter> adapterMap

propsArray

protected Hashtable[] propsArray

categoriesArray

protected List[] categoriesArray

spectrumAdapter

protected SpectrumAdapter spectrumAdapter

DATA_DESCRIPTION

private static final String DATA_DESCRIPTION
See Also:
Constant Field Values

defaultSubset

private HashMap defaultSubset

track_adapter

public TrackAdapter track_adapter

multiSpectData

private MultiSpectralData multiSpectData

categories

private List categories

hasImagePreview

private boolean hasImagePreview

hasTrackPreview

private boolean hasTrackPreview
Constructor Detail

MultiDimensionDataSource

public MultiDimensionDataSource()
Zero-argument constructor for construction via unpersistence.


MultiDimensionDataSource

public MultiDimensionDataSource(DataSourceDescriptor descriptor,
                                String fileName,
                                Hashtable properties)
                         throws VisADException
Construct a new HYDRA hdf data source.

Parameters:
descriptor - descriptor for this DataSource
fileName - name of the hdf file to read
properties - hashtable of properties
Throws:
VisADException - problem creating data

MultiDimensionDataSource

public MultiDimensionDataSource(DataSourceDescriptor descriptor,
                                List newSources,
                                Hashtable properties)
                         throws VisADException
Construct a new HYDRA hdf data source.

Parameters:
descriptor - descriptor for this DataSource
sources - List of filenames
properties - hashtable of properties
Throws:
VisADException - problem creating data
Method Detail

setup

public void setup()
           throws Exception
Throws:
Exception

initAfterUnpersistence

public void initAfterUnpersistence()
Specified by:
initAfterUnpersistence in interface DataSource
Overrides:
initAfterUnpersistence in class DataSourceImpl

doMakeDataChoices

public void doMakeDataChoices()
Make and insert the DataChoice-s for this DataSource.

Overrides:
doMakeDataChoices in class DataSourceImpl

doMakeDataChoice

private DataChoice doMakeDataChoice(int idx,
                                    String var)
                             throws Exception
Throws:
Exception

equals

public boolean equals(Object o)
Check to see if this HDFHydraDataSource is equal to the object in question.

Overrides:
equals in class DataSourceImpl
Parameters:
o - object in question
Returns:
true if they are the same or equivalent objects

getMultiSpectralData

public MultiSpectralData getMultiSpectralData()

getDatasetName

public String getDatasetName()

setDatasetName

public void setDatasetName(String name)

getSubsetFromLonLatRect

public HashMap getSubsetFromLonLatRect(MultiDimensionSubset select,
                                       GeoSelection geoSelection)

getData

public Data getData(DataChoice dataChoice,
                    DataCategory category,
                    DataSelection dataSelection,
                    Hashtable requestProperties)
             throws VisADException,
                    RemoteException
Specified by:
getData in interface DataSource
Overrides:
getData in class DataSourceImpl
Throws:
VisADException
RemoteException

getDataInner

protected Data getDataInner(DataChoice dataChoice,
                            DataCategory category,
                            DataSelection dataSelection,
                            Hashtable requestProperties)
                     throws VisADException,
                            RemoteException
Description copied from class: HydraDataSource
Get the data for the given DataChoice and selection criteria.

Overrides:
getDataInner in class HydraDataSource
Parameters:
dataChoice - DataChoice for selection
category - DataCategory for the DataChoice (not used)
dataSelection - subsetting criteria
requestProperties - extra request properties
Returns:
the Data object for the request
Throws:
VisADException - couldn't create the data
RemoteException - couldn't create a remote data object

applyProperties

protected Data applyProperties(Data data,
                               Hashtable requestProperties,
                               HashMap subset)
                        throws VisADException,
                               RemoteException
Throws:
VisADException
RemoteException

initDataSelectionComponents

protected void initDataSelectionComponents(List<DataSelectionComponent> components,
                                           DataChoice dataChoice)
Overrides:
initDataSelectionComponents in class DataSourceImpl