Package org.geotools.coverage.io.impl
Class DefaultDriver
- Object
-
- DefaultDriver
-
- All Implemented Interfaces:
Driver
,Factory
,OptionalFactory
- Direct Known Subclasses:
DefaultFileDriver
public class DefaultDriver extends Object implements Driver
Base Implementation for theDriver
interface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface Driver
Driver.DriverCapabilities
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultDriver(String name, String description, String title, EnumSet<Driver.DriverCapabilities> driverCapabilities, Hints implementationHints)
-
Method Summary
-
-
-
Method Detail
-
getName
public String 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
public InternationalString getTitle()
Description copied from interface:Driver
Human readable title for thisDriver
.
-
getImplementationHints
public Map<RenderingHints.Key,?> 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
public InternationalString 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
public boolean canAccess(Driver.DriverCapabilities operation, Map<String,Serializable> params)
-
access
public CoverageAccess access(Driver.DriverCapabilities operation, Map<String,Serializable> params, Hints hints, ProgressListener listener) throws IOException
Description copied from interface:Driver
Simone: Returnnull
in case the delete succeds. TODO think about a neater approach- Specified by:
access
in interfaceDriver
- Throws:
IOException
-
getParameterInfo
public Map<String,Parameter<?>> getParameterInfo(Driver.DriverCapabilities operation)
- Specified by:
getParameterInfo
in interfaceDriver
-
canConnect
protected boolean canConnect(Map<String,Serializable> params)
-
canCreate
protected boolean canCreate(Map<String,Serializable> params)
-
canDelete
protected boolean canDelete(Map<String,Serializable> params)
-
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
-
delete
protected CoverageAccess delete(Map<String,Serializable> params, Hints hints, ProgressListener listener) throws IOException
- Throws:
IOException
-
getDriverCapabilities
public EnumSet<Driver.DriverCapabilities> 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.
-
-