public class NetcdfStore extends DataStore implements Aggregate
NetcdfStoreProvider.open(StorageConnector).NetcdfStoreProviderDefined in the sis-netcdf module
| Constructor and Description |
|---|
NetcdfStore(NetcdfStoreProvider provider,
StorageConnector connector)
Creates a new netCDF store from the given file, URL, stream or
NetcdfFile object. |
NetcdfStore(StorageConnector connector)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Resource |
add(Resource resource)
Unsupported operation in current version.
|
void |
close()
Closes this netCDF store and releases any underlying resources.
|
Collection<Resource> |
components()
Returns the resources (features or coverages) in this netCDF file.
|
Version |
getConventionVersion()
Returns the version number of the Climate and Forecast (CF) conventions used in the netCDF file.
|
Metadata |
getMetadata()
Returns information about the dataset as a whole.
|
ParameterValueGroup |
getOpenParameters()
Returns the parameters used to open this netCDF data store.
|
void |
remove(Resource resource)
Unsupported operation in current version.
|
String |
toString()
Returns a string representation of this netCDF store for debugging purpose.
|
addWarningListener, findResource, getDisplayName, getLocale, getProvider, removeWarningListener, setLocale@Deprecated public NetcdfStore(StorageConnector connector) throws DataStoreException
NetcdfStore(NetcdfStoreProvider, StorageConnector).NetcdfFile object.
This constructor invokes StorageConnector.closeAllExcept(Object), keeping open only the
needed resource.connector - information about the storage (URL, stream, NetcdfFile instance, etc).DataStoreException - if an error occurred while opening the netCDF file.public NetcdfStore(NetcdfStoreProvider provider, StorageConnector connector) throws DataStoreException
NetcdfFile object.
This constructor invokes StorageConnector.closeAllExcept(Object), keeping open only the
needed resource.provider - the factory that created this DataStore instance, or null if unspecified.connector - information about the storage (URL, stream, NetcdfFile instance, etc).DataStoreException - if an error occurred while opening the netCDF file.public Metadata getMetadata() throws DataStoreException
getMetadata in interface ResourcegetMetadata in class DataStoreDataStoreException - if an error occurred while reading the data.Resource.getMetadata()public ParameterValueGroup getOpenParameters()
NetcdfStoreProvider.getOpenParameters() and contains at
least a parameter named "location" with a URI value.
This method may return null if the storage input can not be described by a URI
(for example a netCDF file reading directly from a ReadableByteChannel).getOpenParameters in class DataStorenull if not available.DataStoreProvider.getOpenParameters()public Version getConventionVersion() throws DataStoreException
null if no information about CF convention has been found.DataStoreException - if an error occurred while reading the data.public Collection<Resource> components() throws DataStoreException
components in interface AggregateDataStoreException - if an error occurred while fetching the components.public Resource add(Resource resource) throws ReadOnlyStorageException
add in interface Aggregateresource - the resource to copy in this Aggregate.resource itself if it has been added verbatim.ReadOnlyStorageException - if this instance does not support write operations.public void remove(Resource resource) throws ReadOnlyStorageException
remove in interface Aggregateresource - child resource to remove, should not be null.ReadOnlyStorageException - if this instance does not support write operations.public void close()
throws DataStoreException
close in interface AutoCloseableclose in class DataStoreDataStoreException - if an error occurred while closing the netCDF file.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.