org.h2gis.drivers
Class DriverManager

java.lang.Object
  extended by org.h2gis.h2spatialapi.AbstractFunction
      extended by org.h2gis.drivers.DriverManager
All Implemented Interfaces:
DriverFunction, Function, ScalarFunction

public class DriverManager
extends AbstractFunction
implements ScalarFunction, DriverFunction

Manage additional table engines in H2. Use the appropriate driver to open a specified file path.

Author:
Nicolas Fortin

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.h2gis.h2spatialapi.DriverFunction
DriverFunction.IMPORT_DRIVER_TYPE
 
Field Summary
 
Fields inherited from interface org.h2gis.h2spatialapi.ScalarFunction
PROP_DETERMINISTIC, PROP_NOBUFFER
 
Fields inherited from interface org.h2gis.h2spatialapi.Function
PROP_NAME, PROP_REMARKS
 
Constructor Summary
DriverManager()
           
 
Method Summary
 void exportTable(Connection connection, String tableReference, File fileName, ProgressVisitor progress)
           
 String[] getExportFormats()
           
 String getFormatDescription(String format)
           
 DriverFunction.IMPORT_DRIVER_TYPE getImportDriverType()
           
 String[] getImportFormats()
           
 String getJavaStaticMethod()
           
 void importFile(Connection connection, String tableReference, File fileName, ProgressVisitor progress)
           
static void openFile(Connection connection, String fileName, String tableName)
          Create a new table
 
Methods inherited from class org.h2gis.h2spatialapi.AbstractFunction
addProperty, getProperty, removeProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.h2gis.h2spatialapi.Function
getProperty
 

Constructor Detail

DriverManager

public DriverManager()
Method Detail

getJavaStaticMethod

public String getJavaStaticMethod()
Specified by:
getJavaStaticMethod in interface ScalarFunction

getFormatDescription

public String getFormatDescription(String format)
Specified by:
getFormatDescription in interface DriverFunction

openFile

public static void openFile(Connection connection,
                            String fileName,
                            String tableName)
                     throws SQLException
Create a new table

Parameters:
connection - Active connection, do not close this connection.
fileName - File path to write, if exists it may be replaced
tableName - [[catalog.]schema.]table reference
Throws:
SQLException

exportTable

public void exportTable(Connection connection,
                        String tableReference,
                        File fileName,
                        ProgressVisitor progress)
                 throws SQLException,
                        IOException
Specified by:
exportTable in interface DriverFunction
Throws:
SQLException
IOException

getImportDriverType

public DriverFunction.IMPORT_DRIVER_TYPE getImportDriverType()
Specified by:
getImportDriverType in interface DriverFunction

getImportFormats

public String[] getImportFormats()
Specified by:
getImportFormats in interface DriverFunction

getExportFormats

public String[] getExportFormats()
Specified by:
getExportFormats in interface DriverFunction

importFile

public void importFile(Connection connection,
                       String tableReference,
                       File fileName,
                       ProgressVisitor progress)
                throws SQLException,
                       IOException
Specified by:
importFile in interface DriverFunction
Throws:
SQLException
IOException


Copyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.