org.h2gis.drivers.shp
Class SHPDriverFunction

java.lang.Object
  extended by org.h2gis.drivers.shp.SHPDriverFunction
All Implemented Interfaces:
DriverFunction

public class SHPDriverFunction
extends Object
implements DriverFunction

Read/Write Shape files

Author:
Nicolas Fortin

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.h2gis.h2spatialapi.DriverFunction
DriverFunction.IMPORT_DRIVER_TYPE
 
Field Summary
static String DESCRIPTION
           
 
Constructor Summary
SHPDriverFunction()
           
 
Method Summary
 void exportTable(Connection connection, String tableReference, File fileName, ProgressVisitor progress)
           
 void exportTable(Connection connection, String tableReference, File fileName, ProgressVisitor progress, String encoding)
           
 String[] getExportFormats()
           
 String getFormatDescription(String format)
           
 DriverFunction.IMPORT_DRIVER_TYPE getImportDriverType()
           
 String[] getImportFormats()
           
 void importFile(Connection connection, String tableReference, File fileName, ProgressVisitor progress)
           
 void importFile(Connection connection, String tableReference, File fileName, ProgressVisitor progress, String forceEncoding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTION

public static String DESCRIPTION
Constructor Detail

SHPDriverFunction

public SHPDriverFunction()
Method Detail

exportTable

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

exportTable

public void exportTable(Connection connection,
                        String tableReference,
                        File fileName,
                        ProgressVisitor progress,
                        String encoding)
                 throws SQLException,
                        IOException
Parameters:
connection - Active connection, do not close this connection.
tableReference - [[catalog.]schema.]table reference
fileName - File path to write, if exists it may be replaced
encoding - File encoding, null will use default encoding
Throws:
SQLException
IOException

getFormatDescription

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

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

importFile

public void importFile(Connection connection,
                       String tableReference,
                       File fileName,
                       ProgressVisitor progress,
                       String forceEncoding)
                throws SQLException,
                       IOException
Parameters:
connection - Active connection, do not close this connection.
tableReference - [[catalog.]schema.]table reference
fileName - File path to read
forceEncoding - If defined use this encoding instead of the one defined in dbf header.
Throws:
SQLException - Table write error
IOException - File read error


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