|
||||||||||
| 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
ucar.unidata.data.grid.GridDataSource
ucar.unidata.data.grid.GeoGridDataSource
public class GeoGridDataSource
Handles gridded files
| Field Summary | |
|---|---|
static String |
PREF_VERTICALCS
Preference |
static String |
PROP_GRIDSIZE
grid size |
static String |
PROP_TIMESIZE
_more_ |
protected Object |
readLock
This is used to synchronize geogrid read access |
static boolean |
testMode
for test |
| Fields inherited from class ucar.unidata.data.grid.GridDataSource |
|---|
ATTR_EAST, ATTR_NORTH, ATTR_SOUTH, ATTR_WEST, ATTR_X, ATTR_Y, ATTR_Z |
| Fields inherited from class ucar.unidata.data.FilesDataSource |
|---|
adapters, oldSourceFromBundles, sources |
| 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 |
|---|
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 | |
|---|---|
GeoGridDataSource()
Default constructor |
|
GeoGridDataSource(DataSourceDescriptor descriptor,
File file,
Hashtable properties)
Create a GeoGridDataSource from a File. |
|
GeoGridDataSource(DataSourceDescriptor descriptor,
List files,
Hashtable properties)
Create a GeoGridDataSource from the filename. |
|
GeoGridDataSource(DataSourceDescriptor descriptor,
String filename,
Hashtable properties)
Create a GeoGridDataSource from the filename. |
|
| Method Summary | |
|---|---|
void |
addPropertiesTabs(JTabbedPane tabbedPane)
Add any extra tabs into the properties tab |
protected void |
applyFieldMask(Element root)
Load any subset info in field mask xml |
boolean |
canCacheDataToDisk()
Can this data source cache its |
protected boolean |
canDoFieldMask()
Can we mask the data? |
boolean |
canDoGeoSelection()
We can do geo selection in the properties gui |
boolean |
canSaveDataToLocalDisk()
Can this DataSource save data to local disk? |
protected void |
doMakeDataChoices()
This method is called at initialization time and creates a set of DirectDataChoice-s
and adds them into the base class managed list of DataChoice-s
with the method addDataChoice. |
protected ucar.nc2.dt.grid.GridDataset |
doMakeDataSet()
Create the dataset from the name of this DataSource. |
protected List |
doMakeDateTimes()
Return the list of DateTime-s associated with this DataSource. |
protected JComponent |
doMakeGeoSubsetPropertiesComponent()
Add in the spatial dimensions label |
void |
doRemove()
Called when Datasource is removed. |
List |
getAllDateTimes(DataChoice dataChoice)
Override the base class method to return the times for the data choice |
List |
getAllLevels(DataChoice dataChoice,
DataSelection dataSelection)
Get the list of all levels available from this DataSource |
protected Data |
getDataInner(DataChoice dataChoice,
DataCategory category,
DataSelection givenDataSelection,
Hashtable requestProperties)
Get the Data object specified by the particular selection criteria. |
List |
getDataPaths()
What should be changed by the user when in data relative mode |
ucar.nc2.dt.grid.GridDataset |
getDataset()
Return the GridDataset associated with this DataSource. |
protected JComponent |
getExtraGeoSelectionComponent()
Get the extra label that is shown in the geo-subset panel |
String |
getFullDescription()
Get the full description of the grid |
protected String |
getLocalDirectory(String label,
String prefix)
_more_ |
protected ucar.unidata.geoloc.ProjectionImpl |
getSampleDataProjection()
Return the sample projection |
protected String |
getSaveDataFileLabel()
_more_ |
void |
initAfterCreation()
Initialize after we have been created. |
void |
initAfterUnpersistence()
Initialize if being unpersisted. |
protected boolean |
isZAxisOk(ucar.nc2.dataset.CoordinateAxis1D zaxis)
Utility to check if we should ignore the given z axis |
static void |
main(String[] args)
Test this class by running "java ucar.unidata.data.grid.GeoGridDataSource |
protected void |
makeSaveLocalActions(List actions)
_more_ |
void |
reloadData()
Clear out the data set |
void |
resetTmpState()
This gets called after we have been saved in a zidv bundle to reset us back to any original state |
protected void |
resolvePath()
Resolve the url if we have to |
protected List |
saveDataToLocalDisk(String prefix,
Object loadId,
boolean changeLinks)
Save the data to local disk. |
void |
setFileNameOrUrl(String value)
Set the FileNameOrUrl property. |
void |
setTmpPaths(List paths)
Set what the user has changed |
protected void |
sourcesChanged()
The source has changed |
void |
updateState(Object newObject,
Hashtable newProperties)
This gets called when the user interactively does a Change data |
protected void |
writeFieldMaskFile(Document doc,
Element root)
Write out the field mask file |
| Methods inherited from class ucar.unidata.data.grid.GridDataSource |
|---|
getThreeDCategories, getThreeDTimeSeriesCategories, getTwoDCategories, getTwoDTimeSeriesCategories, initCategories |
| Methods inherited from class ucar.unidata.data.FilesDataSource |
|---|
equals, getDataFileExtension, getFilePath, getInputStreams, getLocationsForPolling, getPartialDescription, getSource, getSources, haveSources, initWithPollingInfo, isFileBased, newFilesFromPolling, processDataFilename, propertiesChanged, setNewFiles, setSource, setSources |
| Methods inherited from class ucar.unidata.collab.SharableImpl |
|---|
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, 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 |
|---|
public static final String PREF_VERTICALCS
public static final String PROP_GRIDSIZE
public static final String PROP_TIMESIZE
protected final Object readLock
public static boolean testMode
| Constructor Detail |
|---|
public GeoGridDataSource()
public GeoGridDataSource(DataSourceDescriptor descriptor,
File file,
Hashtable properties)
throws IOException
descriptor - Describes this data source, has a label etc.file - This is the file that points to the actual
data source.properties - General properties used in the base class
IOException - problem opening file
public GeoGridDataSource(DataSourceDescriptor descriptor,
String filename,
Hashtable properties)
throws IOException
descriptor - Describes this data source, has a label etc.filename - This is the filename (or url) that points
to the actual data source.properties - General properties used in the base class
IOException
public GeoGridDataSource(DataSourceDescriptor descriptor,
List files,
Hashtable properties)
throws IOException
descriptor - Describes this data source, has a label etc.files - List of files or urlsproperties - General properties used in the base class
IOException| Method Detail |
|---|
protected void applyFieldMask(Element root)
applyFieldMask in class DataSourceImplroot - xml rootprotected boolean canDoFieldMask()
canDoFieldMask in class DataSourceImpl
protected void writeFieldMaskFile(Document doc,
Element root)
writeFieldMaskFile in class DataSourceImpldoc - doc to write toroot - root nodepublic void initAfterUnpersistence()
initAfterUnpersistence in interface DataSourceinitAfterUnpersistence in class FilesDataSourceprotected JComponent doMakeGeoSubsetPropertiesComponent()
doMakeGeoSubsetPropertiesComponent in class DataSourceImplprotected JComponent getExtraGeoSelectionComponent()
getExtraGeoSelectionComponent in class DataSourceImplpublic void addPropertiesTabs(JTabbedPane tabbedPane)
addPropertiesTabs in class DataSourceImpltabbedPane - The properties tabpublic void initAfterCreation()
initAfterCreation in interface DataSourceinitAfterCreation in class FilesDataSourcepublic List getDataPaths()
getDataPaths in interface DataSourcegetDataPaths in class FilesDataSource
public void updateState(Object newObject,
Hashtable newProperties)
FilesDataSource
updateState in interface DataSourceupdateState in class FilesDataSourcenewObject - The new data object. May be a string or a listnewProperties - new propertiespublic void setTmpPaths(List paths)
setTmpPaths in interface DataSourcesetTmpPaths in class DataSourceImplpaths - new pathsprotected void resolvePath()
protected void sourcesChanged()
sourcesChanged in class FilesDataSourcepublic void reloadData()
reloadData in interface DataSourcereloadData in class FilesDataSourcepublic void doRemove()
doRemove in interface DataSourcedoRemove in class FilesDataSourcepublic boolean canSaveDataToLocalDisk()
canSaveDataToLocalDisk in interface DataSourcecanSaveDataToLocalDisk in class DataSourceImplprotected String getSaveDataFileLabel()
getSaveDataFileLabel in class DataSourceImplprotected void makeSaveLocalActions(List actions)
makeSaveLocalActions in class DataSourceImplactions - _more_
protected List saveDataToLocalDisk(String prefix,
Object loadId,
boolean changeLinks)
throws Exception
saveDataToLocalDisk in class FilesDataSourceprefix - the prefix for the local file nameloadId - the load id (for cancelling)changeLinks - true to change the links
Exception - problem saving data.
protected String getLocalDirectory(String label,
String prefix)
getLocalDirectory in class DataSourceImpllabel - _more_prefix - _more_
public String getFullDescription()
getFullDescription in interface DataSourcegetFullDescription in class FilesDataSourcepublic void resetTmpState()
DataSourceImpl
resetTmpState in interface DataSourceresetTmpState in class DataSourceImplprotected ucar.nc2.dt.grid.GridDataset doMakeDataSet()
public ucar.nc2.dt.grid.GridDataset getDataset()
protected ucar.unidata.geoloc.ProjectionImpl getSampleDataProjection()
getSampleDataProjection in class DataSourceImplprotected void doMakeDataChoices()
DirectDataChoice-s
and adds them into the base class managed list of DataChoice-s
with the method addDataChoice.
doMakeDataChoices in class DataSourceImpl
protected Data getDataInner(DataChoice dataChoice,
DataCategory category,
DataSelection givenDataSelection,
Hashtable requestProperties)
throws VisADException,
RemoteException
getDataInner in class DataSourceImpldataChoice - DataChoice to select.category - DataCategory (unused at present)givenDataSelection - DataSelection criteria for this request.requestProperties - extra request selection properties (not used
in this class)
VisADException - couldn't create Data object
RemoteException - couldn't create remote Data objectprotected List doMakeDateTimes()
doMakeDateTimes in class DataSourceImpl
public List getAllLevels(DataChoice dataChoice,
DataSelection dataSelection)
getAllLevels in interface DataSourcegetAllLevels in class DataSourceImpldataChoice - The data choice we are getting levels fordataSelection - _more_
public boolean canDoGeoSelection()
canDoGeoSelection in interface DataSourcecanDoGeoSelection in class DataSourceImplpublic boolean canCacheDataToDisk()
canCacheDataToDisk in class DataSourceImplprotected boolean isZAxisOk(ucar.nc2.dataset.CoordinateAxis1D zaxis)
zaxis - given z axis
public List getAllDateTimes(DataChoice dataChoice)
getAllDateTimes in interface DataSourcegetAllDateTimes in class DataSourceImpldataChoice - DataChoice in question
public static void main(String[] args)
throws Exception
args - filename
Exception - some error occurredpublic void setFileNameOrUrl(String value)
value - The new value for FileNameOrUrl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||