public class DBFDriverFunction extends Object implements org.h2gis.api.DriverFunction
| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Constructor and Description |
|---|
DBFDriverFunction() |
| Modifier and Type | Method and Description |
|---|---|
static DbaseFileHeader |
dBaseHeaderFromMetaData(ResultSetMetaData metaData,
List<Integer> retainedColumns)
Create a DBF header from the columns specified in parameter.
|
void |
exportTable(Connection connection,
String tableReference,
File fileName,
org.h2gis.api.ProgressVisitor progress) |
void |
exportTable(Connection connection,
String tableReference,
File fileName,
org.h2gis.api.ProgressVisitor progress,
String encoding) |
String[] |
getExportFormats() |
String |
getFormatDescription(String format) |
org.h2gis.api.DriverFunction.IMPORT_DRIVER_TYPE |
getImportDriverType() |
String[] |
getImportFormats() |
static String |
getQuestionMark(int count)
Generate the concatenation of ?
|
static String |
getSQLColumnTypes(DbaseFileHeader header,
boolean isH2Database)
Return SQL Columns declaration
|
void |
importFile(Connection connection,
String tableReference,
File fileName,
org.h2gis.api.ProgressVisitor progress) |
void |
importFile(Connection connection,
String tableReference,
File fileName,
org.h2gis.api.ProgressVisitor progress,
boolean deleteTables) |
void |
importFile(Connection connection,
String tableReference,
File fileName,
org.h2gis.api.ProgressVisitor progress,
String forceFileEncoding) |
boolean |
isSpatialFormat(String extension) |
public static String DESCRIPTION
public void exportTable(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
exportTable in interface org.h2gis.api.DriverFunctionSQLExceptionIOExceptionpublic void exportTable(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress, String encoding) throws SQLException, IOException
exportTable in interface org.h2gis.api.DriverFunctionSQLExceptionIOExceptionpublic String getFormatDescription(String format)
getFormatDescription in interface org.h2gis.api.DriverFunctionpublic org.h2gis.api.DriverFunction.IMPORT_DRIVER_TYPE getImportDriverType()
getImportDriverType in interface org.h2gis.api.DriverFunctionpublic String[] getImportFormats()
getImportFormats in interface org.h2gis.api.DriverFunctionpublic String[] getExportFormats()
getExportFormats in interface org.h2gis.api.DriverFunctionpublic boolean isSpatialFormat(String extension)
isSpatialFormat in interface org.h2gis.api.DriverFunctionpublic void importFile(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
importFile in interface org.h2gis.api.DriverFunctionSQLExceptionIOExceptionpublic void importFile(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress, String forceFileEncoding) throws SQLException, IOException
importFile in interface org.h2gis.api.DriverFunctionconnection - Active connection, do not close this connection.tableReference - [[catalog.]schema.]table referencefileName - File path to readprogress - monitorforceFileEncoding - File encoding to use, null will use the provided file encoding in file header.SQLException - Table write errorIOException - File read errorpublic void importFile(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress, boolean deleteTables) throws SQLException, IOException
importFile in interface org.h2gis.api.DriverFunctionSQLExceptionIOExceptionpublic static String getQuestionMark(int count)
count - Number of ? character to generationpublic static String getSQLColumnTypes(DbaseFileHeader header, boolean isH2Database) throws IOException
header - DBAse file headerisH2Database - true if H2 databaseIOExceptionpublic static DbaseFileHeader dBaseHeaderFromMetaData(ResultSetMetaData metaData, List<Integer> retainedColumns) throws SQLException
metaData - SQL ResultSetMetadataretainedColumns - list of column indexesSQLException - If one or more type are not supported by DBFCopyright © 2019 CNRS. All rights reserved.