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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoverageAccess
access(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 Map<String,Parameter<?>>
defineConnectParameterInfo()
protected Map<String,Parameter<?>>
defineCreateParameterInfo()
protected Map<String,Parameter<?>>
defineDeleteParameterInfo()
protected CoverageAccess
delete(Map<String,Serializable> params, Hints hints, ProgressListener listener)
protected Map<String,Parameter<?>>
getConnectParameterInfo()
protected Map<String,Parameter<?>>
getCreateParameterInfo()
protected Map<String,Parameter<?>>
getDeleteParameterInfo()
InternationalString
getDescription()
Describe the nature of thisDriver
implementation.EnumSet<Driver.DriverCapabilities>
getDriverCapabilities()
Map<RenderingHints.Key,?>
getImplementationHints()
Implementation hints provided during construction.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).
-
-
-
Constructor Detail
-
DefaultDriver
protected DefaultDriver(String name, String description, String title, EnumSet<Driver.DriverCapabilities> driverCapabilities, Hints implementationHints)
-
-
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
-
getConnectParameterInfo
protected Map<String,Parameter<?>> getConnectParameterInfo()
-
getDeleteParameterInfo
protected Map<String,Parameter<?>> getDeleteParameterInfo()
-
getCreateParameterInfo
protected Map<String,Parameter<?>> getCreateParameterInfo()
-
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
-
defineConnectParameterInfo
protected Map<String,Parameter<?>> defineConnectParameterInfo()
-
defineCreateParameterInfo
protected Map<String,Parameter<?>> defineCreateParameterInfo()
-
defineDeleteParameterInfo
protected Map<String,Parameter<?>> defineDeleteParameterInfo()
-
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.
-
-