Package org.apache.tika.parser.jdbc
Class JDBCTableReader
java.lang.Object
org.apache.tika.parser.jdbc.JDBCTableReader
General base class to iterate through rows of a JDBC table
-
Constructor Summary
ConstructorDescriptionJDBCTableReader
(Connection connection, String tableName, EmbeddedDocumentUtil embeddedDocumentUtil) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAllCharacters
(String s, ContentHandler handler) protected Blob
protected void
handleBlob
(String tableName, String columnName, int rowNum, ResultSet resultSet, int columnIndex, ContentHandler handler, ParseContext context) protected void
handleClob
(String tableName, String columnName, int rowNum, ResultSet resultSet, int columnIndex, ContentHandler handler, ParseContext context) protected void
handleDate
(ResultSet resultSet, int columnIndex, ContentHandler handler) protected void
handleInteger
(ResultSet rs, int columnIndex, ContentHandler handler) protected void
handleTimeStamp
(ResultSet resultSet, int columnIndex, ContentHandler handler) boolean
nextRow
(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:
IOException
SAXException
-
getHeaders
- Throws:
IOException
-
handleInteger
protected void handleInteger(ResultSet rs, int columnIndex, ContentHandler handler) throws SQLException, SAXException - Throws:
SQLException
SAXException
-
handleClob
protected void handleClob(String tableName, String columnName, int rowNum, ResultSet resultSet, int columnIndex, ContentHandler handler, ParseContext context) throws SQLException, IOException, SAXException - Throws:
SQLException
IOException
SAXException
-
handleBlob
protected void handleBlob(String tableName, String columnName, int rowNum, ResultSet resultSet, int columnIndex, ContentHandler handler, ParseContext context) throws SQLException, IOException, SAXException - Throws:
SQLException
IOException
SAXException
-
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
null
if the value was null - Throws:
SQLException
-
handleDate
protected void handleDate(ResultSet resultSet, int columnIndex, ContentHandler handler) throws SAXException, SQLException - Throws:
SAXException
SQLException
-
handleTimeStamp
protected void handleTimeStamp(ResultSet resultSet, int columnIndex, ContentHandler handler) throws SAXException, SQLException - Throws:
SAXException
SQLException
-
addAllCharacters
- Throws:
SAXException
-
getTableName
-