Package org.apache.sis.storage.netcdf
Class NetcdfStoreProvider
- Object
-
- DataStoreProvider
-
- NetcdfStoreProvider
-
public class NetcdfStoreProvider extends DataStoreProvider
The provider ofNetcdfStoreinstances. Given aStorageConnectorinput, this class tries to instantiate aNetcdfStoreusing the embedded netCDF decoder. If the embedded decoder can not decode the given input and the UCAR library is reachable on the classpath, then this class tries to instantiate aNetcdfStorebacked by the UCAR library.Thread safetyThe sameNetcdfStoreProviderinstance can be safely used by many threads without synchronization on the part of the caller. However theNetcdfStoreinstances created by this factory are not thread-safe.- Since:
- 0.3
- See Also:
NetcdfStore
Defined in the
sis-netcdfmodule
-
-
Field Summary
-
Fields inherited from class DataStoreProvider
CREATE, LOCATION
-
-
Constructor Summary
Constructors Constructor Description NetcdfStoreProvider()Creates a new provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParameterDescriptorGroupgetOpenParameters()Returns a description of all parameters accepted by this provider for opening a netCDF file.StringgetShortName()Returns a generic name for this data store, used mostly in warnings or error messages.DataStoreopen(StorageConnector connector)Returns aNetcdfStoreimplementation associated with this provider.ProbeResultprobeContent(StorageConnector connector)ReturnsProbeResult.SUPPORTEDif the given storage appears to be supported byNetcdfStore.-
Methods inherited from class DataStoreProvider
getFormat, getLogger, getSupportedVersions, open
-
-
-
-
Method Detail
-
getShortName
public String getShortName()
Returns a generic name for this data store, used mostly in warnings or error messages.- Specified by:
getShortNamein classDataStoreProvider- Returns:
- a short name or abbreviation for the data format.
-
getOpenParameters
public ParameterDescriptorGroup getOpenParameters()
Returns a description of all parameters accepted by this provider for opening a netCDF file.- Specified by:
getOpenParametersin classDataStoreProvider- Returns:
- description of available parameters for opening a netCDF file.
- Since:
- 0.8
-
probeContent
public ProbeResult probeContent(StorageConnector connector) throws DataStoreException
ReturnsProbeResult.SUPPORTEDif the given storage appears to be supported byNetcdfStore. ReturningSUPPORTEDfrom this method does not guarantee that reading or writing will succeed, only that there appears to be a reasonable chance of success based on a brief inspection of the storage object or contents.- Specified by:
probeContentin classDataStoreProvider- Parameters:
connector- information about the storage (URL, stream,NetcdfFileinstance, etc).- Returns:
SUPPORTEDif the given storage seems to be usable byNetcdfStoreinstances.- Throws:
DataStoreException- if an I/O error occurred.
-
open
public DataStore open(StorageConnector connector) throws DataStoreException
Returns aNetcdfStoreimplementation associated with this provider.- Specified by:
openin classDataStoreProvider- Parameters:
connector- information about the storage (URL, stream,NetcdfFileinstance, etc).- Returns:
- a data store implementation associated with this provider for the given storage.
- Throws:
DataStoreException- if an error occurred while creating the data store instance.
-
-