Package org.apache.tika.eval.io
Class DBWriter
- java.lang.Object
-
- org.apache.tika.eval.io.DBWriter
-
- All Implemented Interfaces:
IDBWriter
public class DBWriter extends Object implements IDBWriter
This is still in its early stages. The idea is to get something working with h2 and then add to that as necessary. Beware, this deletes the db file with each initialization. Each thread must construct its own DBWriter because each DBWriter creates its own PreparedStatements at initialization.
-
-
Constructor Summary
Constructors Constructor Description DBWriter(Connection connection, List<TableInfo> tableInfos, JDBCUtil dbUtil, MimeBuffer mimeBuffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
getMimeId(String mimeString)
void
writeRow(TableInfo table, Map<Cols,String> data)
-
-
-
Constructor Detail
-
DBWriter
public DBWriter(Connection connection, List<TableInfo> tableInfos, JDBCUtil dbUtil, MimeBuffer mimeBuffer) throws IOException, SQLException
- Throws:
IOException
SQLException
-
-
Method Detail
-
writeRow
public void writeRow(TableInfo table, Map<Cols,String> data) throws IOException
- Specified by:
writeRow
in interfaceIDBWriter
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceIDBWriter
- Throws:
IOException
-
-