添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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_TIMESTRIDE , PROP_TITLE GridCoverageDataSource ( DataSourceDescriptor descriptor, ucar.nc2.ft2.coverage.adapter.DtCoverageDataset gds, java.lang.String name, java.lang.String filename)
Construct a GeoGridDataSource
GridCoverageDataSource ( DataSourceDescriptor descriptor, java.io.File file, java.util.Hashtable properties)
Create a GridCoverageDataSource from a File.
GridCoverageDataSource ( DataSourceDescriptor descriptor, java.util.List files, java.util.Hashtable properties)
Create a GeoGridDataSource from the filename.
GridCoverageDataSource ( DataSourceDescriptor descriptor, java.lang.String filename, java.util.Hashtable properties)
Create a GeoGridDataSource from the filename.
GridCoverageDataSource (ucar.nc2.ft2.coverage.adapter.DtCoverageDataset gds)
Create a GeoGridDataSource from the GridDataset
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.ft2.coverage.adapter.DtCoverageDataset doMakeDataSet ()
Create the dataset from the name of this DataSource.
protected java.util.List doMakeDateTimes ()
Return the list of DateTime-s associated with this DataSource.
protected javax.swing.JComponent doMakeGeoSubsetPropertiesComponent ()
Add in the spatial dimensions label
doRemove ()
Called when Datasource is removed.
ucar.nc2.ft2.coverage.adapter.DtCoverage findGridForDataChoice (ucar.nc2.ft2.coverage.adapter.DtCoverageDataset ds, DataChoice dc)
Find the grid in the dataset from the DataChoice
java.util.List getAllDateTimes ( DataChoice dataChoice)
Override the base class method to return the times for the data choice
java.util.List getAllLevels ( DataChoice dataChoice, DataSelection dataSelection)
Get the list of all levels available from this DataSource
visad.Data getData (java.lang.String parameter)
Get the data for a particular parameter
protected visad.Data getDataInner ( DataChoice dataChoice, DataCategory category, DataSelection givenDataSelection, java.util.Hashtable requestProperties)
Get the Data object specified by the particular selection criteria.
java.util.List getDataPaths ()
What should be changed by the user when in data relative mode
ucar.nc2.ft2.coverage.adapter.DtCoverageDataset getDataset ()
Return the GridDataset associated with this DataSource.
protected javax.swing.JComponent getExtraGeoSelectionComponent ()
Get the extra label that is shown in the geo-subset panel
protected javax.swing.JComponent getExtraTimesComponent ()
Add the reverse times checkbox
java.lang.String getFullDescription ()
Get the full description of the grid
protected java.lang.String getLocalDirectory (java.lang.String label, java.lang.String prefix)
Get the local directory
java.util.List<ucar.ma2.Range> getRangesFromLatLonRect (ucar.nc2.ft2.coverage.adapter.DtCoverageCS dtCoverageCS, ucar.unidata.geoloc.LatLonRect rect) java.util.List<ucar.ma2.Range> getRangesFromLonRange (ucar.nc2.ft2.coverage.adapter.DtCoverageCS dtCoverageCS, double lonMin, double lonMax) boolean getReverseTimes ()
Get the ReverseTimes property.
protected ucar.unidata.geoloc.ProjectionImpl getSampleDataProjection ()
Return the sample projection
protected java.lang.String getSaveDataFileLabel ()
Get the label for the save data file option
getTimeIndexWithBounds (visad.DateTime dateTime, java.util.List<visad.DateTime> allTimes, ucar.nc2.ft2.coverage.CoverageCoordAxis1D cca)
Find the time index in the dataset with smallest bound values
java.util.List<ucar.nc2.util.NamedObject> getTimes (java.util.List<ucar.nc2.time.CalendarDate> cdates) indexOf (java.lang.Object o, java.util.List levels)
Find the index of the given object in the list of levels.
initAfterCreation ()
Initialize after we have been created.
initAfterUnpersistence ()
Initialize if being unpersisted.
boolean isLocalFile ()
Are we a local file
static boolean isNumeric (java.lang.String str)
check if a input is only numeric number
protected boolean isZAxisOk (ucar.nc2.dataset.CoordinateAxis1D zaxis)
Utility to check if we should ignore the given z axis
java.util.List<java.lang.String> listParameters ()
Get the list of parameters
static void main (java.lang.String[] args)
Test this class by running "java ucar.unidata.data.grid.GeoGridDataSource "
ucar.nc2.util.Optional<ucar.ma2.RangeIterator> makeRange (ucar.nc2.ft2.coverage.adapter.DtCoverageCS dtCoverageCS, double minValue, double maxValue) protected void makeSaveLocalActions (java.util.List actions)
Make savel local actions
reloadData ()
Clear out the data set
resetTmpState ()
Reset the tmp state
protected void resolvePath ()
Resolve the url if we have to
protected java.util.List saveDataToLocalDisk (java.lang.String prefix, java.lang.Object loadId, boolean changeLinks)
Save the data to local disk.
setDefaultSelectionBounds (java.awt.geom.Rectangle2D.Float rect)
Set the default selection bounds
setFileNameOrUrl (java.lang.String value)
Set the FileNameOrUrl property.
setNewFiles (java.util.List files)
Overwrite setNewFiles so we clear out the resolverurl
setReverseTimes (boolean value)
Set the ReverseTimes property.
setTmpPaths (java.util.List paths)
Set what the user has changed
protected void sourcesChanged ()
The source has changed
updateState (java.lang.Object newObject, java.util.Hashtable newProperties)
Update the state
protected void writeFieldMaskFile (org.w3c.dom.Document doc, org.w3c.dom.Element root)
Write out the field mask file

Methods inherited from class ucar.unidata.data. DataSourceImpl

addActions , addDataChangeListener , addDataChoice , addReloadTab , canAddCurrentName , canChangeData , canDoAllLevels , canDoGeoSelectionMap , canDoGeoSelectionStride , canPoll , canShowParameter , checkForInitAfterUnPersistence , clearCachedData , clearFileCache , clearTimes , convertSourceFile , convertToFilesIfDirectory , createAutoDisplay , createCacheKey , createElement , decrOutstandingGetDataCalls , doDirectory , doMakeGeoSelectionPanel , doMakeGeoSelectionPanel , doMakeGeoSelectionPanel , endWritingDataToLocalDisk , expandIfNeeded , findDataChoice , findDataChoices , flushCache , getAbsoluteDateTimes , getActions , getAlias , getAllDateTimes , getAllLevels , getAllTimesForTimeDriver , getCache , getCache , getCacheClearDelay , getCacheDataToDisk , getCompositeDataChoices , getData , getData , getDataCachePath , getDataChangeListeners , getDataChoices , getDataContext , getDataInner , getDataIsEditable , getDataPrefix , getDataSelection , getDataSelectionComponents , getDataSource , getDateTimes , getDateTimeSelection , getDefaultSave , getDescription , getDescriptor , getErrorMessage , getEverChangedName , getFileFilterForPolling , getid , getIdv , getInError , getLocationForPolling , getMostRecentFiles , getName , getNameForDataSource , getNeedToShowErrorToUser , getNextId , getOutstandingGetDataCalls , getPassword , getPathsThatCanBeRelative , getPollingInfo , getProperties , getPropertiesComponents , getPropertiesHeader , getProperty , getProperty , getProperty , getProperty , getProperty , getProperty , getProperty , getRelativePaths , getSelectedDateTimes , getSelectedDateTimes , getTimesFromDataSelection , getTmpPaths , getTypeName , getUserName , handlePropertiesAction , hasPollingInfo , holdsDateTimes , holdsIndices , identifiedBy , identifiedByName , incrOutstandingGetDataCalls , initAfter , initDataChoice , initDataSelectionComponents , initFromXml , isPolling , loadFieldMask , loadFieldMask , loadLatestFile , logException , logException , makeDerivedDataChoices , newFileFromPolling , notifyDataChange , putCache , putCache , reloadProperties , removeCache , removeDataChangeListener , removeDataChoice , removeProperty , replaceDataChoice , 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 , setUserName , shouldCache , shouldCache , showPasswordDialog , showPropertiesDialog , showPropertiesDialog , showPropertiesDialog , showWaitDialog , tick , toString , toStringTruncated , updateDetailsText , writeFieldMaskFile

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

PREF_LARGE_REMOTE_DATA_WARN

public static final java.lang.String PREF_LARGE_REMOTE_DATA_WARN
Preference - warn users for large remote data requests
See Also:
Constant Field Values

GridCoverageDataSource

public GridCoverageDataSource(DataSourceDescriptor descriptor,
                              ucar.nc2.ft2.coverage.adapter.DtCoverageDataset gds,
                              java.lang.String name,
                              java.lang.String filename)
Construct a GeoGridDataSource
Parameters:
descriptor - the data source descriptor
gds - The GridDataset
name - A name
filename - the filename

GridCoverageDataSource

public GridCoverageDataSource(ucar.nc2.ft2.coverage.adapter.DtCoverageDataset gds)
Create a GeoGridDataSource from the GridDataset
Parameters:
gds - the GridDataset

GridCoverageDataSource

public GridCoverageDataSource(DataSourceDescriptor descriptor,
                              java.io.File file,
                              java.util.Hashtable properties)
                       throws java.io.IOException
Create a GridCoverageDataSource from a File.
Parameters:
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
Throws:
java.io.IOException - problem opening file

GridCoverageDataSource

public GridCoverageDataSource(DataSourceDescriptor descriptor,
                              java.lang.String filename,
                              java.util.Hashtable properties)
                       throws java.io.IOException
Create a GeoGridDataSource from the filename.
Parameters:
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
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

GridCoverageDataSource

public GridCoverageDataSource(DataSourceDescriptor descriptor,
                              java.util.List files,
                              java.util.Hashtable properties)
                       throws java.io.IOException
Create a GeoGridDataSource from the filename.
Parameters:
descriptor - Describes this data source, has a label etc.
files - List of files or urls
properties - General properties used in the base class
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

isNumeric

public static boolean isNumeric(java.lang.String str)
check if a input is only numeric number
Parameters:
str - is this numeric
Returns:
true if numeric
public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Test this class by running "java ucar.unidata.data.grid.GeoGridDataSource "
Parameters:
args - filename
Throws:
java.lang.Exception - some error occurred

setDefaultSelectionBounds

public void setDefaultSelectionBounds(java.awt.geom.Rectangle2D.Float rect)
Set the default selection bounds
Parameters:
rect - rectangle

applyFieldMask

protected void applyFieldMask(org.w3c.dom.Element root)
Load any subset info in field mask xml
Overrides:
applyFieldMask in class DataSourceImpl
Parameters:
root - xml root

writeFieldMaskFile

protected void writeFieldMaskFile(org.w3c.dom.Document doc,
                                  org.w3c.dom.Element root)
Write out the field mask file
Overrides:
writeFieldMaskFile in class DataSourceImpl
Parameters:
doc - doc to write to
root - root node

initAfterUnpersistence

public void initAfterUnpersistence()
Initialize if being unpersisted.
Specified by:
initAfterUnpersistence in interface DataSource
Overrides:
initAfterUnpersistence in class FilesDataSource

doMakeGeoSubsetPropertiesComponent

protected javax.swing.JComponent doMakeGeoSubsetPropertiesComponent()
Add in the spatial dimensions label
Overrides:
doMakeGeoSubsetPropertiesComponent in class DataSourceImpl
Returns:
The subset properties component

getExtraGeoSelectionComponent

protected javax.swing.JComponent getExtraGeoSelectionComponent()
Get the extra label that is shown in the geo-subset panel
Overrides:
getExtraGeoSelectionComponent in class DataSourceImpl
Returns:
Extra label for geosubset panel

addPropertiesTabs

public void addPropertiesTabs(javax.swing.JTabbedPane tabbedPane)
Add any extra tabs into the properties tab
Overrides:
addPropertiesTabs in class DataSourceImpl
Parameters:
tabbedPane - The properties tab

getDataPaths

public java.util.List getDataPaths()
What should be changed by the user when in data relative mode
Specified by:
getDataPaths in interface DataSource
Overrides:
getDataPaths in class FilesDataSource
Returns:
paths to changed

updateState

public void updateState(java.lang.Object newObject,
                        java.util.Hashtable newProperties)
Update the state
Specified by:
updateState in interface DataSource
Overrides:
updateState in class FilesDataSource
Parameters:
newObject - new object
newProperties - properties

canSaveDataToLocalDisk

public boolean canSaveDataToLocalDisk()
Can this DataSource save data to local disk?
Specified by:
canSaveDataToLocalDisk in interface DataSource
Overrides:
canSaveDataToLocalDisk in class DataSourceImpl
Returns:
true if this DataSource can save data to local disk?

getSaveDataFileLabel

protected java.lang.String getSaveDataFileLabel()
Get the label for the save data file option
Overrides:
getSaveDataFileLabel in class DataSourceImpl
Returns:
label

makeSaveLocalActions

protected void makeSaveLocalActions(java.util.List actions)
Make savel local actions
Overrides:
makeSaveLocalActions in class DataSourceImpl
Parameters:
actions - list of actions

beginWritingDataToLocalDisk

protected java.lang.Object beginWritingDataToLocalDisk(java.lang.String msg)
Overwrite this method so we don't show the loading dialog
Overrides:
beginWritingDataToLocalDisk in class DataSourceImpl
Parameters:
msg - The msg to show in the dialog
Returns:
The jobmanager loadid

saveDataToLocalDisk

protected java.util.List saveDataToLocalDisk(java.lang.String prefix,
                                             java.lang.Object loadId,
                                             boolean changeLinks)
                                      throws java.lang.Exception
Save the data to local disk.
Overrides:
saveDataToLocalDisk in class FilesDataSource
Parameters:
prefix - the prefix for the local file name
loadId - the load id (for cancelling)
changeLinks - true to change the links
Returns:
The list of files
Throws:
java.lang.Exception - problem saving data.

setNewFiles

public void setNewFiles(java.util.List files)
Overwrite setNewFiles so we clear out the resolverurl
Specified by:
setNewFiles in interface DataSource
Overrides:
setNewFiles in class FilesDataSource
Parameters:
files - The list of new files to use

getLocalDirectory

protected java.lang.String getLocalDirectory(java.lang.String label,
                                             java.lang.String prefix)
Get the local directory
Overrides:
getLocalDirectory in class DataSourceImpl
Parameters:
label - a label
prefix - the prefix
Returns:
the path

getFullDescription

public java.lang.String getFullDescription()
Get the full description of the grid
Specified by:
getFullDescription in interface DataSource
Overrides:
getFullDescription in class FilesDataSource
Returns:
the description

doMakeDataSet

protected ucar.nc2.ft2.coverage.adapter.DtCoverageDataset doMakeDataSet()
Create the dataset from the name of this DataSource.
Returns:
new GridDataset

getDataset

public ucar.nc2.ft2.coverage.adapter.DtCoverageDataset getDataset()
Return the GridDataset associated with this DataSource.
Returns:
dataset

getSampleDataProjection

protected ucar.unidata.geoloc.ProjectionImpl getSampleDataProjection()
Return the sample projection
Overrides:
getSampleDataProjection in class DataSourceImpl
Returns:
the sample projection

doMakeDataChoices

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.
Overrides:
doMakeDataChoices in class DataSourceImpl

getDataInner

protected visad.Data getDataInner(DataChoice dataChoice,
                                  DataCategory category,
                                  DataSelection givenDataSelection,
                                  java.util.Hashtable requestProperties)
                           throws visad.VisADException,
                                  java.rmi.RemoteException
Get the Data object specified by the particular selection criteria.
Overrides:
getDataInner in class DataSourceImpl
Parameters:
dataChoice - DataChoice to select.
category - DataCategory (unused at present)
givenDataSelection - DataSelection criteria for this request.
requestProperties - extra request selection properties (not used in this class)
Returns:
Data object corresponding to the data choice
Throws:
visad.VisADException - couldn't create Data object
java.rmi.RemoteException - couldn't create remote Data object

listParameters

public java.util.List<java.lang.String> listParameters()
Get the list of parameters
Returns:
the list
public visad.Data getData(java.lang.String parameter)
                   throws visad.VisADException,
                          java.rmi.RemoteException
Get the data for a particular parameter
Parameters:
parameter - the parameter name
Returns:
the Data or null
Throws:
java.rmi.RemoteException - Java RMI Error
visad.VisADException - VisAD Error

doMakeDateTimes

protected java.util.List doMakeDateTimes()
Return the list of DateTime-s associated with this DataSource.
Overrides:
doMakeDateTimes in class DataSourceImpl
Returns:
List of DateTime-s.

getAllLevels

public java.util.List getAllLevels(DataChoice dataChoice,
                                   DataSelection dataSelection)
Get the list of all levels available from this DataSource
Specified by:
getAllLevels in interface DataSource
Overrides:
getAllLevels in class DataSourceImpl
Parameters:
dataChoice - The data choice we are getting levels for
dataSelection - the data selection
Returns:
List of all available levels

canDoGeoSelection

public boolean canDoGeoSelection()
We can do geo selection in the properties gui
Specified by:
canDoGeoSelection in interface DataSource
Overrides:
canDoGeoSelection in class DataSourceImpl
Returns:
can do geo selection

makeRange

public ucar.nc2.util.Optional<ucar.ma2.RangeIterator> makeRange(ucar.nc2.ft2.coverage.adapter.DtCoverageCS dtCoverageCS,
                                                                double minValue,
                                                                double maxValue)
java.util.List levels) throws visad.VisADException
Find the index of the given object in the list of levels. If its a Real then check values
Parameters:
o - Object
levels - levels
Returns:
index
Throws:
visad.VisADException - On badness

getTimeIndexWithBounds

public int getTimeIndexWithBounds(visad.DateTime dateTime,
                                  java.util.List<visad.DateTime> allTimes,
                                  ucar.nc2.ft2.coverage.CoverageCoordAxis1D cca)
Find the time index in the dataset with smallest bound values
Parameters:
dateTime - the time
allTimes - the DateTime list
cca - the data CoordinateAxis1DTime
Returns:
the GeoGrid or null dataset doesn't exist or if variable not found

findGridForDataChoice

public ucar.nc2.ft2.coverage.adapter.DtCoverage findGridForDataChoice(ucar.nc2.ft2.coverage.adapter.DtCoverageDataset ds,
                                                                      DataChoice dc)
Find the grid in the dataset from the DataChoice
Parameters:
ds - the grid dataset
dc - the data choice
Returns:
the GeoGrid or null dataset doesn't exist or if variable not found

isZAxisOk

protected boolean isZAxisOk(ucar.nc2.dataset.CoordinateAxis1D zaxis)
Utility to check if we should ignore the given z axis
Parameters:
zaxis - given z axis
Returns:
Is ok

getAllDateTimes

public java.util.List getAllDateTimes(DataChoice dataChoice)
Override the base class method to return the times for the data choice
Specified by:
getAllDateTimes in interface DataSource
Overrides:
getAllDateTimes in class DataSourceImpl
Parameters:
dataChoice - DataChoice in question
Returns:
List of all times for that choice

setFileNameOrUrl

public void setFileNameOrUrl(java.lang.String value)
Set the FileNameOrUrl property.
Parameters:
value - The new value for FileNameOrUrl

getExtraTimesComponent

protected javax.swing.JComponent getExtraTimesComponent()
Add the reverse times checkbox
Overrides:
getExtraTimesComponent in class DataSourceImpl
Returns:
extra comp

getRangesFromLatLonRect

public java.util.List<ucar.ma2.Range> getRangesFromLatLonRect(ucar.nc2.ft2.coverage.adapter.DtCoverageCS dtCoverageCS,
                                                              ucar.unidata.geoloc.LatLonRect rect)
                                                       throws ucar.ma2.InvalidRangeException
Throws:
ucar.ma2.InvalidRangeException

getRangesFromLonRange

public java.util.List<ucar.ma2.Range> getRangesFromLonRange(ucar.nc2.ft2.coverage.adapter.DtCoverageCS dtCoverageCS,
                                                            double lonMin,
                                                            double lonMax)
                                                     throws ucar.ma2.InvalidRangeException
Throws:
ucar.ma2.InvalidRangeException

getTimes

public java.util.List<ucar.nc2.util.NamedObject> getTimes(java.util.List<ucar.nc2.time.CalendarDate> cdates)
Returns:
nameObject list