Class StoreProvider
java.lang.Object
org.apache.sis.storage.DataStoreProvider
org.apache.sis.internal.storage.folder.StoreProvider
The provider of
Store instances. This provider is intentionally registered with lowest priority
because it will open any directory, which may conflict with other providers opening only directory with
some specific content.- Since:
- 0.8
- Version:
- 1.1
- Author:
- Johann Sorel (Geomatys), Martin Desruisseaux (Geomatys)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.storage.DataStoreProvider
DataStoreProvider.Prober<S> -
Field Summary
Fields inherited from class org.apache.sis.storage.DataStoreProvider
CREATE, LOCATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.opengis.parameter.ParameterDescriptorGroupReturns a description of all parameters accepted by this provider for opening a data store.Returns a short name or abbreviation for the data format.open(StorageConnector connector) Returns a data store implementation associated with this provider.open(org.opengis.parameter.ParameterValueGroup parameters) Returns a data store implementation associated with this provider for the given parameters.probeContent(StorageConnector connector) ReturnsProbeResult.SUPPORTEDif the given storage appears to be a folder.Methods inherited from class org.apache.sis.storage.DataStoreProvider
getFormat, getLogger, getSupportedVersions, probeContent
-
Constructor Details
-
StoreProvider
public StoreProvider()Creates a new provider.
-
-
Method Details
-
getShortName
Returns a short name or abbreviation for the data format.- Specified by:
getShortNamein classDataStoreProvider- Returns:
- a short name or abbreviation for the data format.
- See Also:
-
getOpenParameters
public org.opengis.parameter.ParameterDescriptorGroup getOpenParameters()Returns a description of all parameters accepted by this provider for opening a data store.- Specified by:
getOpenParametersin classDataStoreProvider- Returns:
- description of the parameters for opening a
DataStore. - See Also:
-
probeContent
ReturnsProbeResult.SUPPORTEDif the given storage appears to be a folder. 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 characteristics.- Specified by:
probeContentin classDataStoreProvider- Parameters:
connector- information about the storage (URL, stream, JDBC connection, etc).- Returns:
ProbeResult.SUPPORTEDif the given storage seems to be readable as a folder.- Throws:
DataStoreException- if an I/O error occurred.
-
open
Returns a data store implementation associated with this provider. The data store created by this method will try to auto-detect the format of every files in the directory. For exploring only the file of a known format, useopen(ParameterValueGroup)instead.- Specified by:
openin classDataStoreProvider- Parameters:
connector- information about the storage (URL, path, 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.- See Also:
-
open
public DataStore open(org.opengis.parameter.ParameterValueGroup parameters) throws DataStoreException Returns a data store implementation associated with this provider for the given parameters.- Overrides:
openin classDataStoreProvider- Parameters:
parameters- opening parameters as defined byDataStoreProvider.getOpenParameters().- Returns:
- a folder data store implementation for the given parameters.
- Throws:
DataStoreException- if an error occurred while creating the data store instance.- See Also:
-