Package org.geotools.coverage.io.impl
Class DefaultDriver
Object
DefaultDriver
- All Implemented Interfaces:
Driver
,Factory
,OptionalFactory
- Direct Known Subclasses:
DefaultFileDriver
Base Implementation for the
Driver
interface.-
Nested Class Summary
Nested classes/interfaces inherited from interface Driver
Driver.DriverCapabilities
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DefaultDriver
(String name, String description, String title, EnumSet<Driver.DriverCapabilities> driverCapabilities, Hints implementationHints) -
Method Summary
Modifier and TypeMethodDescriptionaccess
(Driver.DriverCapabilities operation, Map<String, Serializable> params, Hints hints, ProgressListener listener) Simone: Returnnull
in case the delete succeds.boolean
canAccess
(Driver.DriverCapabilities operation, Map<String, Serializable> params) protected boolean
canConnect
(Map<String, Serializable> params) protected boolean
canCreate
(Map<String, Serializable> params) protected boolean
canDelete
(Map<String, Serializable> params) protected CoverageAccess
connect
(Map<String, Serializable> params, Hints hints, ProgressListener listener) protected CoverageAccess
create
(Map<String, Serializable> params, Hints hints, ProgressListener listener) protected CoverageAccess
delete
(Map<String, Serializable> params, Hints hints, ProgressListener listener) Describe the nature of thisDriver
implementation.Implementation hints provided during construction.getName()
Unique name (non human readable) that can be used to refer to this implementation.getParameterInfo
(Driver.DriverCapabilities operation) getTitle()
Human readable title for thisDriver
.boolean
Test to see if thisDriver
is available, if it has all the appropriate dependencies (jars or libraries).
-
Constructor Details
-
DefaultDriver
-
-
Method Details
-
getName
Description copied from interface:Driver
Unique name (non human readable) that can be used to refer to this implementation.While the Title and Description will change depending on the users local this name will be consistent. Please note that a given file may be readable by several Drivers (the description of each implementation should be provided to the user so they can make an intellegent choice in the matter).
-
getTitle
Description copied from interface:Driver
Human readable title for thisDriver
. -
getImplementationHints
Implementation hints provided during construction.Often these hints are configuration and factory settings used to intergrate the driver with application services.
- Specified by:
getImplementationHints
in interfaceFactory
- Returns:
- The map of hints, or an {@linkplain java.util.Collections.emptyMap() empty map} if none.
-
getDescription
Description copied from interface:Driver
Describe the nature of thisDriver
implementation.A description of this
Driver
type; the description should indicate the format or service being made available in human readable terms.- Specified by:
getDescription
in interfaceDriver
- Returns:
- A human readable description that is suitable for inclusion in a list of available
Driver
s.
-
canAccess
-
access
public CoverageAccess access(Driver.DriverCapabilities operation, Map<String, Serializable> params, Hints hints, ProgressListener listener) throws IOExceptionDescription copied from interface:Driver
Simone: Returnnull
in case the delete succeds. TODO think about a neater approach- Specified by:
access
in interfaceDriver
- Throws:
IOException
-
getConnectParameterInfo
-
getDeleteParameterInfo
-
getCreateParameterInfo
-
getParameterInfo
- Specified by:
getParameterInfo
in interfaceDriver
-
canConnect
-
canCreate
-
canDelete
-
connect
protected CoverageAccess connect(Map<String, Serializable> params, Hints hints, ProgressListener listener) throws IOException- Throws:
IOException
-
create
protected CoverageAccess create(Map<String, Serializable> params, Hints hints, ProgressListener listener) throws IOException- Throws:
IOException
-
defineConnectParameterInfo
-
defineCreateParameterInfo
-
defineDeleteParameterInfo
-
delete
protected CoverageAccess delete(Map<String, Serializable> params, Hints hints, ProgressListener listener) throws IOException- Throws:
IOException
-
getDriverCapabilities
- Specified by:
getDriverCapabilities
in interfaceDriver
-
isAvailable
public boolean isAvailable()Description copied from interface:Driver
Test to see if thisDriver
is available, if it has all the appropriate dependencies (jars or libraries).One may ask how this is different than
#canConnect(Map)
, and basically available can be used by finder mechanisms to list availableDriver
s.- Specified by:
isAvailable
in interfaceDriver
- Specified by:
isAvailable
in interfaceOptionalFactory
- Returns:
- true if and only if this factory has all the appropriate dependencies on the classpath to create DataStores.
-