Class GDALStore
- All Implemented Interfaces:
AutoCloseable, Aggregate, Resource, Localized
-
Nested Class Summary
Nested classes/interfaces inherited from interface Resource
Resource.FileSet -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGDALStore(GDALStoreProvider provider, StorageConnector connector) Creates a new data store for reading the file specified by the given connector. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this data store and releases any underlying resources.Collection<? extends Resource> Returns the children resources of this aggregate.Returns the GDAL driver used for opening the file.Returns an array of files believed to be part of this resource.final Optional<GenericName> Returns an identifier for the root resource of this data store, or an empty value if none.Returns information about the data store as a whole.Returns the parameters used for opening this GDAL data store.final GDALStoreProviderReturns the factory that created thisDataStoreinstance.Methods inherited from class DataStore
addListener, findResource, getDisplayName, getLocale, getNativeMetadata, removeListener, setLocale, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Resource
addListener, removeListener
-
Constructor Details
-
GDALStore
Creates a new data store for reading the file specified by the given connector. Theproviderargument is mandatory for this data store, because it provides the links to the GDAL library.- Parameters:
provider- the factory that created thisGDALStoreinstance.connector- information about the storage. Should be convertible to a URL.- Throws:
DataStoreException- if an error occurred while creating the data store for the given storage.
-
-
Method Details
-
getProvider
Returns the factory that created thisDataStoreinstance. The provider determines which GDAL library is used.- Overrides:
getProviderin classDataStore- Returns:
- the factory that created this
DataStoreinstance. - See Also:
-
getDriver
Returns the GDAL driver used for opening the file.- Returns:
- the GDAL driver used for opening the file.
- Throws:
DataStoreException- if this data store is closed.
-
getOpenParameters
Returns the parameters used for opening this GDAL data store. The parameters are described byGDALStoreProvider.getOpenParameters()and contains at least a parameter named "location" with aURIvalue. The return value may be empty if the storage input cannot be described by a URI.- Specified by:
getOpenParametersin classDataStore- Returns:
- parameters used for opening this data store.
- See Also:
-
getFileSet
Returns an array of files believed to be part of this resource.- Specified by:
getFileSetin interfaceResource- Returns:
- files used by this resource, or an empty value if unknown.
- Throws:
DataStoreException- if the list of files cannot be obtained.- "TODO:"
- This method is often used for copying a resources from one location to another.
GDAL provides a
GDALCopyDatasetFilesfunction for this purpose. That function is not yet used by Apache SIS.
-
getIdentifier
Returns an identifier for the root resource of this data store, or an empty value if none.- Specified by:
getIdentifierin interfaceResource- Overrides:
getIdentifierin classDataStore- Returns:
- an identifier for the root resource of this data store.
- Throws:
DataStoreException- if an error occurred while fetching the identifier.- See Also:
-
getMetadata
Returns information about the data store as a whole.- Specified by:
getMetadatain interfaceResource- Specified by:
getMetadatain classDataStore- Returns:
- information about resources in the data store.
- Throws:
DataStoreException- if an error occurred while reading the metadata.- See Also:
-
components
Returns the children resources of this aggregate.- Specified by:
componentsin interfaceAggregate- Returns:
- the resources that are contained in this aggregate.
- Throws:
DataStoreException- if an error occurred in a GDAL function.
-
close
Closes this data store and releases any underlying resources. Ais sent to listeners before the data store is closed. Any attempt to use this store after closing will result ininvalid reference
CloseEventDataStoreClosedException.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classDataStore- Throws:
DataStoreException- if an error occurred while closing this data store.- See Also:
-