public abstract class FilesDataSource extends DataSourceImpl
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
adapters
List of sources files
|
protected java.lang.String |
oldSourceFromBundles
for unpersistence
|
protected java.util.List |
sources
List of sources files
|
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 |
---|
FilesDataSource()
Default Constructor
|
FilesDataSource(DataSourceDescriptor descriptor) |
FilesDataSource(DataSourceDescriptor descriptor,
java.util.List newSources,
java.lang.String description,
java.util.Hashtable properties)
Ctor
|
FilesDataSource(DataSourceDescriptor descriptor,
java.util.List newSources,
java.lang.String name,
java.lang.String description,
java.util.Hashtable properties)
Create a TrackDataSource from the specification given.
|
FilesDataSource(DataSourceDescriptor descriptor,
java.lang.String name,
java.lang.String description,
java.util.Hashtable properties)
Ctor
|
Modifier and Type | Method and Description |
---|---|
void |
doRemove()
Called when Datasource is removed.
|
boolean |
equals(java.lang.Object that)
Are we equals
|
protected java.lang.String |
getDataFileExtension(java.lang.String file)
Get the file extension
|
java.util.List |
getDataPaths()
Get the file paths (or urls or whatever) that are to be changed
when we are unpersisted and are in data relative mode
|
protected java.lang.String |
getFilePath()
Get the first file path in the sources list
|
java.lang.String |
getFullDescription()
get the detailed description
|
protected java.util.List |
getInputStreams(java.util.List processedSources)
Get a list of input streams, one for each given file
|
protected java.util.List |
getLocationsForPolling()
Get the location where we poll.
|
java.lang.String |
getPartialDescription()
Return the human readable description of this DataSource
|
protected java.lang.String |
getSource()
Get the string value of the first entry in the sources list
|
java.util.List |
getSources()
Get the source property (filename or URL).
|
boolean |
haveSources()
Do I have any sources
|
void |
initAfterCreation()
Initialize after we have been directly created
|
void |
initAfterUnpersistence()
Initialize after XML decoding.
|
protected void |
initWithPollingInfo()
Initialze sources from polling info
|
protected boolean |
isFileBased()
Are we getting data from a file or from server
|
void |
newFilesFromPolling(java.util.List files)
If we are polling some directory this method gets called when
there is a new file.
|
protected java.lang.String |
processDataFilename(java.lang.String filename,
int index)
Process the file name to get a file that we can use to write to local disk
|
protected void |
propertiesChanged()
The user changed the properties.
|
void |
reloadData()
Clear out and reinitialize the track
|
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 the data source files to local disk
|
void |
setNewFiles(java.util.List files)
Used to change the files we use when loaded in from a bundle
|
void |
setSource(java.lang.String value)
Set the list of sources to be a list containing the given value
|
void |
setSources(java.util.List value)
Set the sources property (filename or URL).
|
protected void |
sourcesChanged()
Something changed
|
void |
updateState(java.lang.Object newObject,
java.util.Hashtable newProperties)
This gets called when the user interactively does a Change data
|
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, doMakeDataChoices, doMakeDateTimes, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getAllLevels, getAllTimesForTimeDriver, getCache, getCache, getCacheClearDelay, getCacheDataToDisk, getCompositeDataChoices, getData, getData, getDataCachePath, getDataChangeListeners, getDataChoices, getDataContext, getDataInner, 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, 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, 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, hashCode, notify, notifyAll, wait, wait, wait
getUniqueId
protected java.util.List sources
protected java.util.List adapters
protected java.lang.String oldSourceFromBundles
public FilesDataSource()
public FilesDataSource(DataSourceDescriptor descriptor)
public FilesDataSource(DataSourceDescriptor descriptor, java.lang.String name, java.lang.String description, java.util.Hashtable properties)
descriptor
- The descriptorname
- The namedescription
- The long nameproperties
- propertiespublic FilesDataSource(DataSourceDescriptor descriptor, java.util.List newSources, java.lang.String description, java.util.Hashtable properties)
descriptor
- The descriptornewSources
- List of files or urlsdescription
- The long nameproperties
- propertiespublic FilesDataSource(DataSourceDescriptor descriptor, java.util.List newSources, java.lang.String name, java.lang.String description, java.util.Hashtable properties)
descriptor
- data source descriptornewSources
- List of sources of data (filename/URL)name
- my namedescription
- description of the dataproperties
- extra properties for initializationpublic java.util.List getDataPaths()
getDataPaths
in interface DataSource
getDataPaths
in class DataSourceImpl
protected boolean isFileBased()
protected java.lang.String getDataFileExtension(java.lang.String file)
file
- The fileprotected java.lang.String processDataFilename(java.lang.String filename, int index)
filename
- Filenameindex
- Which file it it. This can be used by derived classes to add more info to the file nameprotected java.util.List saveDataToLocalDisk(java.lang.String prefix, java.lang.Object loadId, boolean changeLinks) throws java.lang.Exception
saveDataToLocalDisk
in class DataSourceImpl
prefix
- The directory prefix and unique file prefixloadId
- For stopping the load through the JobManagerchangeLinks
- Should this data source also change its internal data referencesjava.lang.Exception
- On badnessprotected java.util.List getInputStreams(java.util.List processedSources) throws java.lang.Exception
processedSources
- The sourcesjava.lang.Exception
- On badnesspublic void initAfterCreation()
initAfterCreation
in interface DataSource
initAfterCreation
in class DataSourceImpl
public java.lang.String getPartialDescription()
getPartialDescription
in interface DataSource
getPartialDescription
in class DataSourceImpl
public java.lang.String getFullDescription()
getFullDescription
in interface DataSource
getFullDescription
in class DataSourceImpl
public boolean haveSources()
public void initAfterUnpersistence()
initAfterUnpersistence
in interface DataSource
initAfterUnpersistence
in class DataSourceImpl
public void updateState(java.lang.Object newObject, java.util.Hashtable newProperties)
updateState
in interface DataSource
updateState
in class DataSourceImpl
newObject
- The new data object. May be a string or a listnewProperties
- new propertiesprotected void initWithPollingInfo()
protected void propertiesChanged()
propertiesChanged
in class DataSourceImpl
public void setNewFiles(java.util.List files)
setNewFiles
in interface DataSource
setNewFiles
in class DataSourceImpl
files
- Files to useprotected void sourcesChanged()
public void reloadData(java.lang.Object object, java.util.Hashtable properties)
DataSourceImpl
reloadData
in interface DataSource
reloadData
in class DataSourceImpl
object
- the objectproperties
- the propertiesprotected java.util.List getLocationsForPolling()
getLocationsForPolling
in class DataSourceImpl
public void newFilesFromPolling(java.util.List files)
newFilesFromPolling
in class DataSourceImpl
files
- New filespublic void doRemove()
doRemove
in interface DataSource
doRemove
in class DataSourceImpl
public void reloadData()
reloadData
in interface DataSource
reloadData
in class DataSourceImpl
protected java.lang.String getFilePath()
public void setSources(java.util.List value)
value
- data sourcespublic java.util.List getSources()
protected java.lang.String getSource()
public void setSource(java.lang.String value)
value
- valuepublic boolean equals(java.lang.Object that)
equals
in class DataSourceImpl
that
- that