Class AbstractSpatialDatabasesDSExtension
- java.lang.Object
-
- com.vividsolutions.jump.workbench.plugin.Extension
-
- com.vividsolutions.jump.datastore.spatialdatabases.AbstractSpatialDatabasesDSExtension
-
- All Implemented Interfaces:
Configuration
- Direct Known Subclasses:
H2DataStoreExtension
,MariadbDataStoreExtension
,MysqlDataStoreExtension
,OracleDataStoreExtension
,PostgisDSExtension
,SpatialiteDataStoreExtension
public abstract class AbstractSpatialDatabasesDSExtension extends Extension
basic implementation for db datastore extensions
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>
classNameToJarName
protected DataStoreDriver
driver
protected Class[]
dsDriverClasses
protected String
errorMessage
static String
VERSION
-
Constructor Summary
Constructors Constructor Description AbstractSpatialDatabasesDSExtension(Class[] dsDriverClasses, Map<String,String> classesToJar)
instantiate a new extension capable of registering a database datastore driverAbstractSpatialDatabasesDSExtension(Class dsDriverClass, Map<String,String> classesToJar)
convenience method forAbstractSpatialDatabasesDSExtension(Class[], Map)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
configure(PlugInContext context)
installs the database datastore driver defined as first parameter inAbstractSpatialDatabasesDSExtension(Class, Map)
ifisAvailable()
returns an empty StringString
getMessage()
by default show error messages or loaded JDBC driver versionsabstract String
getName()
implement to assign a readable name to the datastore driver extensionString
getVersion()
the default version is 'svn revision (build date)'protected String
isAvailable()
override to check dependencies on your own
-
-
-
Constructor Detail
-
AbstractSpatialDatabasesDSExtension
public AbstractSpatialDatabasesDSExtension(Class[] dsDriverClasses, Map<String,String> classesToJar)
instantiate a new extension capable of registering a database datastore driver- Parameters:
dsDriverClasses
- - the class implementingDataStoreDriver
classesToJar
- - a map with class name entries mapping to jar file names eg. "oracle.jdbc.driver.OracleDriver"->"ojdb6.jar"
-
AbstractSpatialDatabasesDSExtension
public AbstractSpatialDatabasesDSExtension(Class dsDriverClass, Map<String,String> classesToJar)
convenience method forAbstractSpatialDatabasesDSExtension(Class[], Map)
- Parameters:
dsDriverClass
- the Dadabase Driver ClassclassesToJar
- a map containing driver class names as keys and the jar containing the class as values
-
-
Method Detail
-
getName
public abstract String getName()
implement to assign a readable name to the datastore driver extension
-
getVersion
public String getVersion()
the default version is 'svn revision (build date)'- Overrides:
getVersion
in classExtension
-
isAvailable
protected String isAvailable()
override to check dependencies on your own- Returns:
- "" on success, "errormessage" on failure
-
getMessage
public String getMessage()
by default show error messages or loaded JDBC driver versions- Overrides:
getMessage
in classExtension
-
configure
public void configure(PlugInContext context) throws Exception
installs the database datastore driver defined as first parameter inAbstractSpatialDatabasesDSExtension(Class, Map)
ifisAvailable()
returns an empty String- Throws:
Exception
-
-