|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.collab.SharableImpl
ucar.unidata.data.DataSourceImpl
ucar.unidata.data.FilesDataSource
public abstract class FilesDataSource
A data source for balloon and aircraft tracks
| Field Summary | |
|---|---|
protected List |
adapters
List of sources files |
protected String |
oldSourceFromBundles
for unpersistence |
protected List |
sources
List of sources files |
| 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 | |
|---|---|
FilesDataSource()
Default Constructor |
|
FilesDataSource(DataSourceDescriptor descriptor)
|
|
FilesDataSource(DataSourceDescriptor descriptor,
List newSources,
String description,
Hashtable properties)
Ctor |
|
FilesDataSource(DataSourceDescriptor descriptor,
List newSources,
String name,
String description,
Hashtable properties)
Create a TrackDataSource from the specification given. |
|
FilesDataSource(DataSourceDescriptor descriptor,
String name,
String description,
Hashtable properties)
Ctor |
|
| Method Summary | |
|---|---|
void |
doRemove()
Called when Datasource is removed. |
boolean |
equals(Object that)
Are we equals |
protected String |
getDataFileExtension(String file)
Get the file extension |
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 String |
getFilePath()
Get the first file path in the sources list |
String |
getFullDescription()
get the detailed description |
protected List |
getInputStreams(List processedSources)
Get a list of input streams, one for each given file |
protected List |
getLocationsForPolling()
Get the location where we poll. |
String |
getPartialDescription()
Return the human readable description of this DataSource |
protected String |
getSource()
Get the string value of the first entry in the sources list |
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(List files)
If we are polling some directory this method gets called when there is a new file. |
protected String |
processDataFilename(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(Object object,
Hashtable properties)
Reload data |
protected List |
saveDataToLocalDisk(String prefix,
Object loadId,
boolean changeLinks)
Save the data source files to local disk |
void |
setNewFiles(List files)
Used to change the files we use when loaded in from a bundle |
void |
setSource(String value)
Set the list of sources to be a list containing the given value |
void |
setSources(List value)
Set the sources property (filename or URL). |
protected void |
sourcesChanged()
Something changed |
void |
updateState(Object newObject,
Hashtable newProperties)
This gets called when the user interactively does a Change data |
| 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 |
|---|
protected List sources
protected List adapters
protected String oldSourceFromBundles
| Constructor Detail |
|---|
public FilesDataSource()
public FilesDataSource(DataSourceDescriptor descriptor)
public FilesDataSource(DataSourceDescriptor descriptor,
String name,
String description,
Hashtable properties)
descriptor - The descriptorname - The namedescription - The long nameproperties - properties
public FilesDataSource(DataSourceDescriptor descriptor,
List newSources,
String description,
Hashtable properties)
descriptor - The descriptornewSources - List of files or urlsdescription - The long nameproperties - properties
public FilesDataSource(DataSourceDescriptor descriptor,
List newSources,
String name,
String description,
Hashtable properties)
descriptor - data source descriptornewSources - List of sources of data (filename/URL)name - my namedescription - description of the dataproperties - extra properties for initialization| Method Detail |
|---|
public List getDataPaths()
getDataPaths in interface DataSourcegetDataPaths in class DataSourceImplprotected boolean isFileBased()
protected String getDataFileExtension(String file)
file - The file
protected String processDataFilename(String filename,
int index)
filename - Filenameindex - Which file it it. This can be used by derived classes to add more info to the file name
protected List saveDataToLocalDisk(String prefix,
Object loadId,
boolean changeLinks)
throws Exception
saveDataToLocalDisk in class DataSourceImplprefix - The directory prefix and unique file prefixloadId - For stopping the load through the JobManagerchangeLinks - Should this data source also change its internal data references
Exception - On badness
protected List getInputStreams(List processedSources)
throws Exception
processedSources - The sources
Exception - On badnesspublic void initAfterCreation()
initAfterCreation in interface DataSourceinitAfterCreation in class DataSourceImplpublic String getPartialDescription()
getPartialDescription in interface DataSourcegetPartialDescription in class DataSourceImplpublic String getFullDescription()
getFullDescription in interface DataSourcegetFullDescription in class DataSourceImplpublic boolean haveSources()
public void initAfterUnpersistence()
initAfterUnpersistence in interface DataSourceinitAfterUnpersistence in class DataSourceImpl
public void updateState(Object newObject,
Hashtable newProperties)
updateState in interface DataSourceupdateState in class DataSourceImplnewObject - The new data object. May be a string or a listnewProperties - new propertiesprotected void initWithPollingInfo()
protected void propertiesChanged()
propertiesChanged in class DataSourceImplpublic void setNewFiles(List files)
setNewFiles in interface DataSourcesetNewFiles in class DataSourceImplfiles - Files to useprotected void sourcesChanged()
public void reloadData(Object object,
Hashtable properties)
DataSourceImpl
reloadData in interface DataSourcereloadData in class DataSourceImplobject - the objectproperties - the propertiesprotected List getLocationsForPolling()
getLocationsForPolling in class DataSourceImplpublic void newFilesFromPolling(List files)
newFilesFromPolling in class DataSourceImplfiles - New filespublic void doRemove()
doRemove in interface DataSourcedoRemove in class DataSourceImplpublic void reloadData()
reloadData in interface DataSourcereloadData in class DataSourceImplprotected String getFilePath()
public void setSources(List value)
value - data sourcespublic List getSources()
protected String getSource()
public void setSource(String value)
value - valuepublic boolean equals(Object that)
equals in class DataSourceImplthat - that
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||