Package org.apache.tika.parser.sqlite3
Class SQLite3DBParser
- java.lang.Object
- 
- org.apache.tika.parser.jdbc.AbstractDBParser
- 
- org.apache.tika.parser.sqlite3.SQLite3DBParser
 
 
- 
- All Implemented Interfaces:
- Serializable,- Parser
 
 public class SQLite3DBParser extends AbstractDBParser This is the implementation of the db parser for SQLite. This parser is internal only; it should not be registered in the services file or configured in the TikaConfig xml file.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static Map<Property,String>METADATA_KEYSprotected static StringSQLITE_CLASS_NAME
 - 
Constructor SummaryConstructors Constructor Description SQLite3DBParser()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Override this for any special handling of closing the connection.protected voidextractMetadata(Connection connection, Metadata metadata)This is called before parsing the tables to extract metadata from the db, if any.protected ConnectiongetConnection(InputStream stream, Metadata metadata, ParseContext context)Override this for special configuration of the connection, such as limiting the number of rows to be held in memory.protected StringgetConnectionString(InputStream is, Metadata metadata, ParseContext context)Implement for db specific connection information, e.g.protected StringgetJDBCClassName()JDBC class name, e.g.Set<MediaType>getSupportedTypes(ParseContext context)Returns the set of media types supported by this parser when used with the given parse context.protected List<String>getTableNames(Connection connection, Metadata metadata, ParseContext context)Returns the names of the tables to processprotected JDBCTableReadergetTableReader(Connection connection, String tableName, EmbeddedDocumentUtil embeddedDocumentUtil)Given a connection and a table name, return the JDBCTableReader for this db.JDBCTableReadergetTableReader(Connection connection, String tableName, ParseContext context)Given a connection and a table name, return the JDBCTableReader for this db.- 
Methods inherited from class org.apache.tika.parser.jdbc.AbstractDBParserparse
 
- 
 
- 
- 
- 
Field Detail- 
SQLITE_CLASS_NAMEprotected static final String SQLITE_CLASS_NAME - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getSupportedTypespublic Set<MediaType> getSupportedTypes(ParseContext context) Description copied from interface:ParserReturns the set of media types supported by this parser when used with the given parse context.- Specified by:
- getSupportedTypesin interface- Parser
- Overrides:
- getSupportedTypesin class- AbstractDBParser
- Parameters:
- context- context
- Returns:
- null (always)
 
 - 
getConnectionprotected Connection getConnection(InputStream stream, Metadata metadata, ParseContext context) throws IOException Description copied from class:AbstractDBParserOverride this for special configuration of the connection, such as limiting the number of rows to be held in memory.- Overrides:
- getConnectionin class- AbstractDBParser
- Parameters:
- stream- stream to use
- metadata- metadata that could be used in parameterizing the connection
- context- parsecontext that could be used in parameterizing the connection
- Returns:
- connection
- Throws:
- IOException
 
 - 
getConnectionStringprotected String getConnectionString(InputStream is, Metadata metadata, ParseContext context) throws IOException Description copied from class:AbstractDBParserImplement for db specific connection information, e.g. "jdbc:sqlite:/docs/mydb.db" Include any optimization settings, user name, password, etc.- Specified by:
- getConnectionStringin class- AbstractDBParser
- Parameters:
- is- stream for processing
- metadata- metadata might be useful in determining connection info
- context- context to use to help create connectionString
- Returns:
- connection string to be used by AbstractDBParser.getConnection(java.io.InputStream, org.apache.tika.metadata.Metadata, org.apache.tika.parser.ParseContext).
- Throws:
- IOException
 
 - 
closepublic void close() throws SQLException, IOExceptionDescription copied from class:AbstractDBParserOverride this for any special handling of closing the connection.- Overrides:
- closein class- AbstractDBParser
- Throws:
- SQLException
- IOException
 
 - 
getJDBCClassNameprotected String getJDBCClassName() Description copied from class:AbstractDBParserJDBC class name, e.g. org.sqlite.JDBC- Specified by:
- getJDBCClassNamein class- AbstractDBParser
- Returns:
- jdbc class name
 
 - 
getTableNamesprotected List<String> getTableNames(Connection connection, Metadata metadata, ParseContext context) throws SQLException Description copied from class:AbstractDBParserReturns the names of the tables to process- Specified by:
- getTableNamesin class- AbstractDBParser
- Parameters:
- connection- Connection to use to make the sql call(s) to get the names of the tables
- metadata- Metadata to use (potentially) in decision about which tables to extract
- context- ParseContext to use (potentially) in decision about which tables to extract
- Returns:
- Throws:
- SQLException
 
 - 
getTableReaderpublic JDBCTableReader getTableReader(Connection connection, String tableName, ParseContext context) Description copied from class:AbstractDBParserGiven a connection and a table name, return the JDBCTableReader for this db.- Specified by:
- getTableReaderin class- AbstractDBParser
- Returns:
- a reader
 
 - 
getTableReaderprotected JDBCTableReader getTableReader(Connection connection, String tableName, EmbeddedDocumentUtil embeddedDocumentUtil) Description copied from class:AbstractDBParserGiven a connection and a table name, return the JDBCTableReader for this db.- Specified by:
- getTableReaderin class- AbstractDBParser
- embeddedDocumentUtil- embedded doc util
- Returns:
 
 - 
extractMetadataprotected void extractMetadata(Connection connection, Metadata metadata) Description copied from class:AbstractDBParserThis is called before parsing the tables to extract metadata from the db, if any. Override this for db specific metadata. This implementation is a no-op- Overrides:
- extractMetadatain class- AbstractDBParser
 
 
- 
 
-