Interface Driver
-
- All Superinterfaces:
Factory
,OptionalFactory
- All Known Subinterfaces:
FileDriver
- All Known Implementing Classes:
DefaultDriver
,DefaultFileDriver
,NetCDFDriver
public interface Driver extends OptionalFactory, Factory
A driver adding the ability to work with a new coverage format or service.Classes implementing this interface basically act as factory for creating connections to coverage sources like files, WCS services, WMS services, databases, etc...
This class also offers basic create / delete functionality (which can be useful for file based coverage formats).
Purpose of this class is to provide basic information about a certain coverage service/format as well as about the parameters needed in order to connect to a source which such a service/format is able to work against.
Notice that as part as the roll of a "factory" interface this class makes available an
isAvailable()
method which should check if all the needed dependencies which can be jars as well as native libs or configuration files.- Since:
- 2.5
- Author:
- Simone Giannecchini, GeoSolutions., Jody Garnett
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Driver.DriverCapabilities
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CoverageAccess
access(Driver.DriverCapabilities opreation, Map<String,Serializable> params, Hints hints, ProgressListener listener)
Simone: Returnnull
in case the delete succeds.boolean
canAccess(Driver.DriverCapabilities operation, Map<String,Serializable> params)
InternationalString
getDescription()
Describe the nature of thisDriver
implementation.EnumSet<Driver.DriverCapabilities>
getDriverCapabilities()
String
getName()
Unique name (non human readable) that can be used to refer to this implementation.Map<String,Parameter<?>>
getParameterInfo(Driver.DriverCapabilities operation)
InternationalString
getTitle()
Human readable title for thisDriver
.boolean
isAvailable()
Test to see if thisDriver
is available, if it has all the appropriate dependencies (jars or libraries).-
Methods inherited from interface Factory
getImplementationHints
-
-
-
-
Method Detail
-
getName
String getName()
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).
- Returns:
- name of this
Driver
-
getTitle
InternationalString getTitle()
Human readable title for thisDriver
.- Returns:
- human readable title for presentation in user interfaces
-
getDescription
InternationalString getDescription()
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.- Returns:
- A human readable description that is suitable for inclusion in a list of available
Driver
s.
-
isAvailable
boolean isAvailable()
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 interfaceOptionalFactory
- Returns:
- true if and only if this factory has all the appropriate dependencies on the classpath to create DataStores.
-
canAccess
boolean canAccess(Driver.DriverCapabilities operation, Map<String,Serializable> params)
-
getParameterInfo
Map<String,Parameter<?>> getParameterInfo(Driver.DriverCapabilities operation)
-
getDriverCapabilities
EnumSet<Driver.DriverCapabilities> getDriverCapabilities()
-
access
CoverageAccess access(Driver.DriverCapabilities opreation, Map<String,Serializable> params, Hints hints, ProgressListener listener) throws IOException
Simone: Returnnull
in case the delete succeds. TODO think about a neater approach- Throws:
IOException
-
-