Package org.apache.sis.storage.landsat
Class LandsatStoreProvider
java.lang.Object
org.apache.sis.storage.DataStoreProvider
org.apache.sis.storage.landsat.LandsatStoreProvider
The provider of
LandsatStore
instances. Given a StorageConnector
input,
this class tries to instantiate a LandsatStore
.
Thread safety
The sameLandsatStoreProvider
instance can be safely used by many threads without synchronization on
the part of the caller. However, the LandsatStore
instances created by this factory are not thread-safe.- Since:
- 1.1
- Version:
- 1.2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
The object to use for verifying if the first keyword is the expected one.Nested classes/interfaces inherited from class org.apache.sis.storage.DataStoreProvider
DataStoreProvider.Prober<S>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final String
The format name.private static final org.opengis.parameter.ParameterDescriptorGroup
The parameter descriptor to be returned bygetOpenParameters()
.Fields inherited from class org.apache.sis.storage.DataStoreProvider
CREATE, LOCATION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Path
getMetadataFile
(Path directory) Returns the metadata file inside the given directory if the file exists, ornull
otherwise.org.opengis.parameter.ParameterDescriptorGroup
Returns a description of all parameters accepted by this provider for opening a Landsat file.Returns a generic name for this data store, used mostly in warnings or error messages.open
(StorageConnector connector) Returns aLandsatStore
implementation associated with this provider.probeContent
(StorageConnector connector) ReturnsProbeResult.SUPPORTED
if the given storage appears to be supported byLandsatStore
.Methods inherited from class org.apache.sis.storage.DataStoreProvider
getFormat, getLogger, getSupportedVersions, open, probeContent
-
Field Details
-
NAME
The format name.- See Also:
-
OPEN_DESCRIPTOR
private static final org.opengis.parameter.ParameterDescriptorGroup OPEN_DESCRIPTORThe parameter descriptor to be returned bygetOpenParameters()
.
-
-
Constructor Details
-
LandsatStoreProvider
public LandsatStoreProvider()Creates a new provider.
-
-
Method Details
-
getShortName
Returns a generic name for this data store, used mostly in warnings or error messages.- Specified by:
getShortName
in 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 Landsat file.- Specified by:
getOpenParameters
in classDataStoreProvider
- Returns:
- description of available parameters for opening a Landsat file.
- Since:
- 0.8
- See Also:
-
getMetadataFile
Returns the metadata file inside the given directory if the file exists, ornull
otherwise.- Parameters:
directory
- directory to test, ornull
if unknown.- Returns:
- metadata file, or
null
if it does not exist.
-
probeContent
ReturnsProbeResult.SUPPORTED
if the given storage appears to be supported byLandsatStore
. ReturningSUPPORTED
from 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 header.- Specified by:
probeContent
in classDataStoreProvider
- Parameters:
connector
- information about the storage (URL, stream, JDBC connection, etc).- Returns:
ProbeResult.SUPPORTED
if the given storage seems to be readable as a Landsat file.- Throws:
DataStoreException
- if an I/O error occurred.
-
open
Returns aLandsatStore
implementation associated with this provider.- Specified by:
open
in classDataStoreProvider
- Parameters:
connector
- information about the storage (URL, stream, 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:
-