Package org.apache.tika.parser.jdbc
Class JDBCTableReader
java.lang.Object
org.apache.tika.parser.jdbc.JDBCTableReader
- Direct Known Subclasses:
SQLite3TableReader
General base class to iterate through rows of a JDBC table
-
Constructor Summary
ConstructorsConstructorDescriptionJDBCTableReader(Connection connection, String tableName, EmbeddedDocumentUtil embeddedDocumentUtil) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAllCharacters(String s, ContentHandler handler) protected Blobprotected voidhandleBlob(String tableName, String columnName, int rowNum, ResultSet resultSet, int columnIndex, ContentHandler handler, ParseContext context) protected voidhandleClob(String tableName, String columnName, int rowNum, ResultSet resultSet, int columnIndex, ContentHandler handler, ParseContext context) protected voidhandleDate(ResultSet resultSet, int columnIndex, ContentHandler handler) protected voidhandleInteger(ResultSet rs, int columnIndex, ContentHandler handler) protected voidhandleTimeStamp(ResultSet resultSet, int columnIndex, ContentHandler handler) booleannextRow(ContentHandler handler, ParseContext context)
-
Constructor Details
-
JDBCTableReader
public JDBCTableReader(Connection connection, String tableName, EmbeddedDocumentUtil embeddedDocumentUtil)
-
-
Method Details
-
nextRow
public boolean nextRow(ContentHandler handler, ParseContext context) throws IOException, SAXException - Throws:
IOExceptionSAXException
-
getHeaders
- Throws:
IOException
-
handleInteger
protected void handleInteger(ResultSet rs, int columnIndex, ContentHandler handler) throws SQLException, SAXException - Throws:
SQLExceptionSAXException
-
handleClob
protected void handleClob(String tableName, String columnName, int rowNum, ResultSet resultSet, int columnIndex, ContentHandler handler, ParseContext context) throws SQLException, IOException, SAXException - Throws:
SQLExceptionIOExceptionSAXException
-
handleBlob
protected void handleBlob(String tableName, String columnName, int rowNum, ResultSet resultSet, int columnIndex, ContentHandler handler, ParseContext context) throws SQLException, IOException, SAXException - Throws:
SQLExceptionIOExceptionSAXException
-
getBlob
- Parameters:
resultSet- result set to grab value fromcolumnIndex- index in result setmetadata- metadata to populate or use for each implementation- Returns:
- the blob or
nullif the value was null - Throws:
SQLException
-
handleDate
protected void handleDate(ResultSet resultSet, int columnIndex, ContentHandler handler) throws SAXException, SQLException - Throws:
SAXExceptionSQLException
-
handleTimeStamp
protected void handleTimeStamp(ResultSet resultSet, int columnIndex, ContentHandler handler) throws SAXException, SQLException - Throws:
SAXExceptionSQLException
-
addAllCharacters
- Throws:
SAXException
-
getTableName
-