public class CacheDataSource extends DataSourceImpl
Modifier and Type | Class and Description |
---|---|
static class |
CacheDataSource.DataChoiceHolder
Class DataChoiceHolder holds a data chocie and a unique id and a name
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_DATA
data property
|
static java.lang.String |
PROP_DATACHOICE
datachoice property
|
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 |
---|
CacheDataSource()
Default bean constructor; does nothing
|
CacheDataSource(DataSourceDescriptor descriptor,
java.lang.String name,
java.util.Hashtable properties)
Create a CacheDataSource
|
Modifier and Type | Method and Description |
---|---|
protected void |
addActions(java.util.List actions)
add menu actions
|
void |
addDataChoice(DataChoice dataChoice,
java.lang.String name,
visad.Data data)
Add a data choice into the list with the given name.
|
void |
addDataChoice(DataChoice dataChoice,
java.lang.String name,
visad.Data data,
DataSelection dataSelection)
add the data choice
|
void |
clearCachedData()
clear the cache
|
java.lang.Object |
getCache(java.lang.Object key)
Get an Object from the cache.
|
java.util.List |
getDataChoices()
Get the DataChoices.
|
protected visad.Data |
getDataInner(DataChoice dataChoice,
DataCategory category,
DataSelection dataSelection,
java.util.Hashtable requestProperties)
Actually get the data identified by the given DataChoce.
|
java.util.List |
getHolders()
Get the Holders property.
|
void |
putCache(java.lang.Object key,
java.lang.Object value)
Put the cache
|
void |
removeCache(java.lang.Object key)
Remove an Object from the cache.
|
void |
setHolders(java.util.List value)
Set the Holders property.
|
void |
writeIser()
write out the iser file
|
addDataChangeListener, addDataChoice, addPropertiesTabs, addReloadTab, applyFieldMask, applyProperties, beginWritingDataToLocalDisk, canAddCurrentName, canCacheDataToDisk, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canSaveDataToLocalDisk, canShowParameter, checkForInitAfterUnPersistence, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeDataChoices, doMakeDateTimes, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, doRemove, endWritingDataToLocalDisk, equals, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getAllLevels, getAllTimesForTimeDriver, getCache, getCacheClearDelay, getCacheDataToDisk, getCompositeDataChoices, getData, getData, getDataCachePath, getDataChangeListeners, 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, initAfterUnpersistence, initDataChoice, initDataSelectionComponents, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeDerivedDataChoices, makeSaveLocalActions, newFileFromPolling, newFilesFromPolling, notifyDataChange, propertiesChanged, putCache, reloadData, reloadData, reloadProperties, 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
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getUniqueId
public static final java.lang.String PROP_DATACHOICE
public static final java.lang.String PROP_DATA
public CacheDataSource()
public CacheDataSource(DataSourceDescriptor descriptor, java.lang.String name, java.util.Hashtable properties)
descriptor
- the datasource descriptorname
- my nameproperties
- my propertiesprotected void addActions(java.util.List actions)
addActions
in class DataSourceImpl
actions
- list of actionspublic void writeIser()
public void addDataChoice(DataChoice dataChoice, java.lang.String name, visad.Data data)
dataChoice
- The datachoicename
- The namedata
- The data to cachepublic void addDataChoice(DataChoice dataChoice, java.lang.String name, visad.Data data, DataSelection dataSelection)
dataChoice
- data choicename
- namedata
- the datadataSelection
- data selectionpublic void clearCachedData()
clearCachedData
in interface DataSource
clearCachedData
in class DataSourceImpl
public void putCache(java.lang.Object key, java.lang.Object value)
putCache
in class DataSourceImpl
key
- keyvalue
- valuepublic java.lang.Object getCache(java.lang.Object key)
getCache
in class DataSourceImpl
key
- key for the objectnull
public void removeCache(java.lang.Object key)
removeCache
in class DataSourceImpl
key
- key for the objectprotected visad.Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, java.util.Hashtable requestProperties) throws visad.VisADException, java.rmi.RemoteException
DataSourceImpl
getDataInner
in class 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 problempublic java.util.List getDataChoices()
getDataChoices
in interface DataSource
getDataChoices
in class DataSourceImpl
public void setHolders(java.util.List value)
value
- The new value for Holderspublic java.util.List getHolders()