public class McIdasXDataSource extends ucar.unidata.data.DataSourceImpl
Modifier and Type | Class and Description |
---|---|
class |
McIdasXDataSource.FrameDataInfo
Class FrameDataInfo Holds an index and a McIdasFrame
|
Modifier and Type | Field and Description |
---|---|
(package private) ucar.unidata.idv.control.DisplayControlImpl |
dci |
private java.util.List |
frameList
list of McIDAS-X frames
|
private java.util.List |
frameNumbers
list of frames to load
|
private boolean |
hasImagePreview |
private int |
lastPreview |
private static org.slf4j.Logger |
logger |
private McIdasXInfo |
mcidasxInfo
McIDAS-X connection info
|
private java.awt.Image |
theImage |
private java.util.List |
twoDCategories
list of 2D categories
|
private java.util.List |
twoDTimeSeriesCategories
list of 2D time series categories
|
private double[][] |
values
image data arrays
|
changeDataPathsCbx, dataCacheKey, dataChoices, geoSelectionPanel, haveBeenUnPersisted, okToContinue, PARAM_SHOW_HIDE, PARAM_SHOW_NO, PARAM_SHOW_YES
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 and Description |
---|
McIdasXDataSource()
Default bean constructor; does nothing
|
McIdasXDataSource(ucar.unidata.data.DataSourceDescriptor descriptor,
java.lang.String name,
java.util.Hashtable properties)
Create a McIdasXDataSource
|
Modifier and Type | Method and Description |
---|---|
void |
doMakeDataChoices()
Create the set of
DataChoice that represent the data held by
this data source. |
private void |
doMakeDataChoices(ucar.unidata.data.CompositeDataChoice composite)
Make the data choices and add them to the given composite
|
protected visad.Data |
getDataInner(ucar.unidata.data.DataChoice dataChoice,
ucar.unidata.data.DataCategory category,
ucar.unidata.data.DataSelection dataSelection,
java.util.Hashtable requestProperties)
Actually get the data identified by the given DataChoce.
|
java.lang.String |
getDataName()
Get the name for the main data object
|
private ucar.unidata.idv.control.DisplayControlImpl |
getDisplayControlImpl() |
McIdasFrame |
getFrame(int frameNumber)
Get a frame from the frameList based on frame number
|
private McIdasFrame |
getFrame(java.lang.Object object)
A utility method that helps us deal with legacy bundles that used to
have String file names as the id of a data choice.
|
java.util.List |
getFrameNumbers()
Get frame numbers
|
visad.meteorology.SingleBandedImage |
getMcIdasFrame(int frameNumber,
FrameComponentInfo frameComponentInfo,
FrameDirtyInfo frameDirtyInfo) |
private visad.meteorology.SingleBandedImage |
getMcIdasSequence(int frameNumber,
FrameComponentInfo frameComponentInfo,
FrameDirtyInfo frameDirtyInfo)
make a time series from selected McIdas-X frames
|
McIdasXInfo |
getMcIdasXInfo()
Get McIdasXInfo object
|
java.util.List |
getTwoDCategories()
Return the list of
DataCategory used for single time step data. |
java.util.List |
getTwoDTimeSeriesCategories()
Return the list of
DataCategory used for multiple time step
data. |
void |
initAfterCreation()
Gets called after creation.
|
void |
initAfterUnpersistence()
This is called after this datasource has been fully created
and initialized after being unpersisted by the XmlEncoder.
|
private void |
initConnection()
Initialize the connection to McIdas-X.
|
protected void |
initDataSelectionComponents(java.util.List<ucar.unidata.data.DataSelectionComponent> components,
ucar.unidata.data.DataChoice dataChoice)
Add any data selection components
|
private void |
makeCategories()
Initialize the
DataCategory objects that this data source uses. |
java.util.List |
makeFrames(java.util.List inFrameNumbers)
Make a list of McIDAS-X frames
|
private void |
makePreviewImage(ucar.unidata.data.DataChoice dataChoice) |
void |
setFrame(int frameNumber,
McIdasFrame inFrame)
Set a frame in the framelist based on frame number
|
protected boolean |
shouldCache(visad.Data data)
See if this DataSource should cache or not
|
private java.util.List |
sortChoices(java.util.List choices)
Sort the list of data choices on their frame numbers
|
addActions, addDataChangeListener, addDataChoice, addPropertiesTabs, addReloadTab, applyFieldMask, applyProperties, beginWritingDataToLocalDisk, canAddCurrentName, canCacheDataToDisk, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canSaveDataToLocalDisk, canShowParameter, checkForInitAfterUnPersistence, clearCachedData, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeDateTimes, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, doRemove, endWritingDataToLocalDisk, equals, 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, 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, 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, showPasswordDialog, showPropertiesDialog, showPropertiesDialog, showPropertiesDialog, showWaitDialog, tick, toString, toStringTruncated, updateDetailsText, updateState, writeFieldMaskFile, writeFieldMaskFile
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
private static final org.slf4j.Logger logger
private java.util.List frameNumbers
private java.util.List frameList
private McIdasXInfo mcidasxInfo
private java.util.List twoDCategories
private java.util.List twoDTimeSeriesCategories
private double[][] values
private boolean hasImagePreview
private java.awt.Image theImage
private int lastPreview
ucar.unidata.idv.control.DisplayControlImpl dci
public McIdasXDataSource()
public McIdasXDataSource(ucar.unidata.data.DataSourceDescriptor descriptor, java.lang.String name, java.util.Hashtable properties)
descriptor
- the datasource descriptorname
- my nameproperties
- my propertiespublic java.util.List makeFrames(java.util.List inFrameNumbers)
inFrameNumbers
- List of frame numbers. Cannot be null
.public McIdasFrame getFrame(int frameNumber)
public void setFrame(int frameNumber, McIdasFrame inFrame)
public void initAfterUnpersistence()
initAfterUnpersistence
in interface ucar.unidata.data.DataSource
initAfterUnpersistence
in class ucar.unidata.data.DataSourceImpl
public void initAfterCreation()
initAfterCreation
in interface ucar.unidata.data.DataSource
initAfterCreation
in class ucar.unidata.data.DataSourceImpl
private void initConnection()
protected boolean shouldCache(visad.Data data)
ucar.unidata.data.DataSourceImpl
shouldCache
in class ucar.unidata.data.DataSourceImpl
data
- Data to cacheprotected void initDataSelectionComponents(java.util.List<ucar.unidata.data.DataSelectionComponent> components, ucar.unidata.data.DataChoice dataChoice)
ucar.unidata.data.DataSourceImpl
initDataSelectionComponents
in class ucar.unidata.data.DataSourceImpl
components
- list of componentsdataChoice
- the data choiceprivate void makePreviewImage(ucar.unidata.data.DataChoice dataChoice)
protected visad.Data getDataInner(ucar.unidata.data.DataChoice dataChoice, ucar.unidata.data.DataCategory category, ucar.unidata.data.DataSelection dataSelection, java.util.Hashtable requestProperties) throws visad.VisADException, java.rmi.RemoteException
ucar.unidata.data.DataSourceImpl
getDataInner
in class ucar.unidata.data.DataSourceImpl
dataChoice
- The data choice that identifies the requested
data.category
- The data category of the request.dataSelection
- Identifies any subsetting of the data.requestProperties
- Hashtable that holds any detailed request
properties.java.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problemprivate visad.meteorology.SingleBandedImage getMcIdasSequence(int frameNumber, FrameComponentInfo frameComponentInfo, FrameDirtyInfo frameDirtyInfo) throws visad.VisADException, java.rmi.RemoteException
visad.VisADException
java.rmi.RemoteException
private ucar.unidata.idv.control.DisplayControlImpl getDisplayControlImpl()
public java.util.List getFrameNumbers()
public java.lang.String getDataName()
public McIdasXInfo getMcIdasXInfo()
private void makeCategories()
DataCategory
objects that this data source uses.public java.util.List getTwoDCategories()
DataCategory
used for single time step data.public java.util.List getTwoDTimeSeriesCategories()
DataCategory
used for multiple time step
data.public void doMakeDataChoices()
DataChoice
that represent the data held by
this data source.
We create one top-level CompositeDataChoice
that represents
all of the image time steps. We create a set of children
DirectDataChoice
, one for each time step.
doMakeDataChoices
in class ucar.unidata.data.DataSourceImpl
private void doMakeDataChoices(ucar.unidata.data.CompositeDataChoice composite)
composite
- The parent data choice to add toprivate java.util.List sortChoices(java.util.List choices)
choices
- The data choicesprivate McIdasFrame getFrame(java.lang.Object object)
object
- May be an AddeImageDescriptor (for new bundles) or a
String that is converted to an image descriptor.public visad.meteorology.SingleBandedImage getMcIdasFrame(int frameNumber, FrameComponentInfo frameComponentInfo, FrameDirtyInfo frameDirtyInfo) throws visad.VisADException, java.rmi.RemoteException
visad.VisADException
java.rmi.RemoteException