public abstract class ImageDataSource extends DataSourceImpl
Modifier and Type | Class and Description |
---|---|
static class |
ImageDataSource.ImageDataInfo
Class ImageDataInfo Holds an index and an AddeImageDescriptor
|
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
imageList
list of images
|
protected java.util.List |
imageTimes
list of image times
|
static java.lang.String |
PROP_BANDINFO
satellite type
|
static java.lang.String |
PROP_IMAGETYPE
Type of image, radar or satellite.
|
static java.lang.String |
TYPE_RADAR
radar type
|
static java.lang.String |
TYPE_SATELLITE
satellite type
|
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 |
---|
ImageDataSource()
The parameterless constructor for unpersisting.
|
ImageDataSource(DataSourceDescriptor descriptor,
ImageDataset ids,
java.util.Hashtable properties)
Create a new ImageDataSource with the given
ImageDataset . |
ImageDataSource(DataSourceDescriptor descriptor,
java.util.List images,
java.util.Hashtable properties)
Create a new ImageDataSource with a list of (String) images.
|
ImageDataSource(DataSourceDescriptor descriptor,
java.lang.String[] images,
java.util.Hashtable properties)
Create a new ImageDataSource with a list of (String) images.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canCacheDataToDisk()
Can this data source cache its
|
boolean |
canSaveDataToLocalDisk()
Is this data source capable of saving its data to local disk
|
void |
doMakeDataChoices()
Create the set of
DataChoice that represent
the data held by this data source. |
java.util.List |
doMakeDateTimes()
Override the base class method to return the list of times we created.
|
void |
doRemove()
Called when Datasource is removed.
|
boolean |
equals(java.lang.Object o)
Check to see if this ImageDataSource is equal to the object
in question.
|
java.util.List |
getAllDateTimes(DataChoice dataChoice)
Override the base class method for the non composite choices.
|
java.util.List |
getBandCategories()
Return the list of
DataCategory used for
single time step data with band information. |
java.util.List |
getBandTimeSeriesCategories()
Return the list of
DataCategory used for
multiple time step data with band information. |
boolean |
getCacheDataToDisk()
Get whether we should cache to disk
|
java.util.List |
getCompositeDataChoices(CompositeDataChoice compositeDataChoice,
java.util.List dataChoices)
This is used when we are unbundled and we may have different times than when we were saved.
|
protected visad.Data |
getDataInner(DataChoice dataChoice,
DataCategory category,
DataSelection dataSelection,
java.util.Hashtable requestProperties)
Create the actual data represented by the given
DataChoice . |
java.lang.String |
getDataName()
Get the name for the main data object
|
java.util.List |
getDataPaths()
Get the paths for saving data files
|
AddeImageDescriptor |
getDescriptor(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.
|
protected java.util.List |
getDescriptors(DataChoice dataChoice,
DataSelection subset)
Get a list of descriptors from the choice and subset
|
java.util.List |
getDescriptorsToUse()
Return the list of
AddeImageDescriptor s that define this
data source. |
java.lang.String |
getFullDescription()
Get an expanded description for the details display.
|
abstract java.lang.String |
getImageDataSourceName()
A hook for the derived classes to return their specific name (eg,
ADDE data source, McIDAS data source.
|
java.util.List |
getImageList()
Return the list of
AddeImageDescriptor s that define this
data source. |
protected java.util.List |
getLocationsForPolling()
Get the location where we poll.
|
java.util.List |
getSelectedDateTimes(DataChoice dataChoice)
Override the base class method for the non-composite choices.
|
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. |
int |
hashCode()
Override the hashCode method.
|
void |
initAfterUnpersistence()
Override the init method for when this data source is unpersisted.
|
protected boolean |
initDataFromPollingInfo()
Method for intializing the data.
|
protected boolean |
isFileBased()
Are we getting images from a file or from adde
|
protected visad.meteorology.SingleBandedImage |
makeImage(AddeImageDescriptor aid,
visad.MathType rangeType,
boolean fromSequence,
java.lang.String readLabel)
Create the single image defined by the given dataChoice.
|
protected visad.meteorology.SingleBandedImage |
makeImage(DataChoice dataChoice,
DataSelection subset)
Create the single image defined by the given dataChoice.
|
static ImageDataset |
makeImageDataset(java.lang.String[] addeURLs)
Make an ImageDataset from an array of ADDE URLs or AREA file names
|
static java.util.List |
makeImageDescriptors(java.lang.String[] addeURLs)
Make a list of image descriptors
|
protected visad.meteorology.ImageSequence |
makeImageSequence(DataChoice dataChoice,
DataSelection subset)
Create the image sequence defined by the given dataChoice.
|
void |
newFileFromPolling(java.io.File file)
If we are polling some directory this method gets called when
there is a new file.
|
protected void |
propertiesChanged()
The user changed the properties.
|
void |
reloadData()
Reload the data
|
void |
reloadData(java.lang.Object object,
java.util.Hashtable properties)
Reload data
|
protected java.util.List |
saveDataToLocalDisk(java.lang.String prefix,
java.lang.Object loadId,
boolean changeLinks)
Save files to local disk
|
void |
setImageList(java.util.List l)
Set the list of
AddeImageDescriptor s that define this data
source. |
void |
setNewFiles(java.util.List files)
Handle when this data source gets new files to use at runtime (e.g., from isl)
|
void |
updateState(java.lang.Object newObject,
java.util.Hashtable newProperties)
Update the state
|
addActions, addDataChangeListener, addDataChoice, addPropertiesTabs, addReloadTab, applyFieldMask, applyProperties, beginWritingDataToLocalDisk, canAddCurrentName, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearCachedData, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllLevels, getAllLevels, getAllTimesForTimeDriver, getCache, getCache, getCacheClearDelay, getData, getData, getDataCachePath, getDataChangeListeners, getDataChoices, getDataContext, getDataInner, getDataIsEditable, getDataPrefix, getDataSelection, getDataSelectionComponents, getDataSource, getDateTimes, getDateTimeSelection, getDefaultSave, getDescription, getDescriptor, getErrorMessage, getEverChangedName, getExtraGeoSelectionComponent, getExtraTimesComponent, getFileFilterForPolling, getid, getIdv, getInError, getLocalDirectory, getLocationForPolling, getMostRecentFiles, getName, getNameForDataSource, getNeedToShowErrorToUser, getNextId, getOutstandingGetDataCalls, getPartialDescription, getPassword, getPathsThatCanBeRelative, getPollingInfo, getProperties, getPropertiesComponents, getPropertiesHeader, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRelativePaths, getSampleDataProjection, getSaveDataFileLabel, getSelectedDateTimes, getTimesFromDataSelection, getTmpPaths, getTypeName, getUserName, handlePropertiesAction, hasPollingInfo, holdsDateTimes, holdsIndices, identifiedBy, identifiedByName, incrOutstandingGetDataCalls, initAfter, initAfterCreation, initDataChoice, initDataSelectionComponents, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeDerivedDataChoices, makeSaveLocalActions, newFilesFromPolling, notifyDataChange, putCache, putCache, reloadProperties, removeCache, removeDataChangeListener, removeDataChoice, removeProperty, replaceDataChoice, resetTmpState, saveDataToLocalDisk, saveDataToLocalDisk, selectTimesFromList, setAlias, setAskToUpdate, setCacheClearDelay, setCacheDataToDisk, setDataEditableStrings, setDataIsEditable, setDataIsRelative, setDataRelativeStrings, setDataSelection, setDateTimeSelection, setDefaultSave, setDescription, setDescriptor, setDirectory, setEverChangedName, setInError, setInError, setInError, setName, setObjectProperties, setObjectProperty, setPassword, setPollingInfo, setPollLocation, setProperties, setProperty, setProperty, setRelativePaths, setTemplateName, setTmpPaths, setUserName, shouldCache, shouldCache, showPasswordDialog, showPropertiesDialog, showPropertiesDialog, showPropertiesDialog, showWaitDialog, tick, toString, toStringTruncated, updateDetailsText, writeFieldMaskFile, writeFieldMaskFile
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUniqueId
public static final java.lang.String PROP_IMAGETYPE
public static final java.lang.String TYPE_RADAR
public static final java.lang.String TYPE_SATELLITE
public static final java.lang.String PROP_BANDINFO
protected java.util.List imageList
protected java.util.List imageTimes
public ImageDataSource()
public ImageDataSource(DataSourceDescriptor descriptor, java.lang.String[] images, java.util.Hashtable properties)
descriptor
- The descriptor for this data source.images
- Array of file anmes or urls.properties
- The properties for this data source.public ImageDataSource(DataSourceDescriptor descriptor, java.util.List images, java.util.Hashtable properties)
descriptor
- The descriptor for this data source.images
- Array of file anmes or urls.properties
- The properties for this data source.public ImageDataSource(DataSourceDescriptor descriptor, ImageDataset ids, java.util.Hashtable properties)
ImageDataset
.
The dataset may hold eight AREA file filepaths or ADDE URLs.descriptor
- The descriptor for this data source.ids
- The dataset.properties
- The properties for this data source.public void reloadData(java.lang.Object object, java.util.Hashtable properties)
reloadData
in interface DataSource
reloadData
in class DataSourceImpl
object
- the object to reloadproperties
- the propertiespublic void setNewFiles(java.util.List files)
setNewFiles
in interface DataSource
setNewFiles
in class DataSourceImpl
files
- List of filespublic void updateState(java.lang.Object newObject, java.util.Hashtable newProperties)
updateState
in interface DataSource
updateState
in class DataSourceImpl
newObject
- the new objectnewProperties
- the new propertiespublic java.util.List getDataPaths()
getDataPaths
in interface DataSource
getDataPaths
in class DataSourceImpl
public void initAfterUnpersistence()
initAfterUnpersistence
in interface DataSource
initAfterUnpersistence
in class DataSourceImpl
public boolean canCacheDataToDisk()
canCacheDataToDisk
in class DataSourceImpl
public boolean canSaveDataToLocalDisk()
canSaveDataToLocalDisk
in interface DataSource
canSaveDataToLocalDisk
in class DataSourceImpl
protected java.util.List saveDataToLocalDisk(java.lang.String prefix, java.lang.Object loadId, boolean changeLinks) throws java.lang.Exception
saveDataToLocalDisk
in class DataSourceImpl
prefix
- destination dir and file prefixloadId
- For JobManagerchangeLinks
- Change internal file referencesjava.lang.Exception
- On badnessprotected boolean initDataFromPollingInfo()
protected void propertiesChanged()
propertiesChanged
in class DataSourceImpl
public static ImageDataset makeImageDataset(java.lang.String[] addeURLs)
addeURLs
- array of ADDE URLspublic static java.util.List makeImageDescriptors(java.lang.String[] addeURLs)
addeURLs
- array of ADDE URLsprotected java.util.List getLocationsForPolling()
getLocationsForPolling
in class DataSourceImpl
protected boolean isFileBased()
public AddeImageDescriptor getDescriptor(java.lang.Object object)
object
- May be an AddeImageDescriptor (for new bundles) or a
String that is converted to an image descriptor.public java.util.List getCompositeDataChoices(CompositeDataChoice compositeDataChoice, java.util.List dataChoices)
getCompositeDataChoices
in interface DataSource
getCompositeDataChoices
in class DataSourceImpl
compositeDataChoice
- The compositedataChoices
- Its choicespublic abstract java.lang.String getImageDataSourceName()
public java.util.List getImageList()
AddeImageDescriptor
s that define this
data source.public java.util.List getDescriptorsToUse()
AddeImageDescriptor
s that define this
data source.public void setImageList(java.util.List l)
AddeImageDescriptor
s that define this data
source.l
- The list of image descriptors.public java.util.List doMakeDateTimes()
doMakeDateTimes
in class DataSourceImpl
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 java.util.List getBandCategories()
DataCategory
used for
single time step data with band information.public java.util.List getBandTimeSeriesCategories()
DataCategory
used for
multiple time step data with band information.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 DataSourceImpl
protected visad.Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, java.util.Hashtable requestProperties) throws visad.VisADException, java.rmi.RemoteException
DataChoice
.getDataInner
in class DataSourceImpl
dataChoice
- Either the
CompositeDataChoice
representing all time steps or a
DirectDataChoice
representing a single time step.category
- Not really used.dataSelection
- Defines any time subsets.requestProperties
- extra request propertiesjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic java.util.List getAllDateTimes(DataChoice dataChoice)
getAllDateTimes
in interface DataSource
getAllDateTimes
in class DataSourceImpl
dataChoice
- Either the
CompositeDataChoice
representing all time steps or a
DirectDataChoice
representing a single time step.public java.util.List getSelectedDateTimes(DataChoice dataChoice)
getSelectedDateTimes
in interface DataSource
getSelectedDateTimes
in class DataSourceImpl
dataChoice
- Either the
CompositeDataChoice
representing all time steps or a
DirectDataChoice
representing a single time step.protected final visad.meteorology.SingleBandedImage makeImage(DataChoice dataChoice, DataSelection subset) throws visad.VisADException, java.rmi.RemoteException
dataChoice
- The choice.subset
- any time subsets.java.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problemprotected visad.meteorology.SingleBandedImage makeImage(AddeImageDescriptor aid, visad.MathType rangeType, boolean fromSequence, java.lang.String readLabel) throws visad.VisADException, java.rmi.RemoteException
aid
- AddeImageDescriptorrangeType
- This is the sample rangeType. For the first image this is null and this method will immediately read the datafromSequence
- from a sequencereadLabel
- the labeljava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic void reloadData()
reloadData
in interface DataSource
reloadData
in class DataSourceImpl
public boolean getCacheDataToDisk()
getCacheDataToDisk
in class DataSourceImpl
protected visad.meteorology.ImageSequence makeImageSequence(DataChoice dataChoice, DataSelection subset) throws visad.VisADException, java.rmi.RemoteException
dataChoice
- The choice.subset
- any time subsets.java.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problemprotected java.util.List getDescriptors(DataChoice dataChoice, DataSelection subset)
dataChoice
- Data choicesubset
- subsetting infopublic boolean equals(java.lang.Object o)
equals
in class DataSourceImpl
o
- object in questionpublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getDataName()
public java.lang.String getFullDescription()
getFullDescription
in interface DataSource
getFullDescription
in class DataSourceImpl
public void newFileFromPolling(java.io.File file)
newFileFromPolling
in class DataSourceImpl
file
- new File to use.public void doRemove()
doRemove
in interface DataSource
doRemove
in class DataSourceImpl