Package org.apache.tika.parser.sqlite3
Class SQLite3Parser
- java.lang.Object
-
- org.apache.tika.parser.AbstractParser
-
- org.apache.tika.parser.sqlite3.SQLite3Parser
-
- All Implemented Interfaces:
Serializable,org.apache.tika.config.Initializable,org.apache.tika.parser.Parser
public class SQLite3Parser extends org.apache.tika.parser.AbstractParser implements org.apache.tika.config.InitializableThis is the main class for parsing SQLite3 files. Whenparse(java.io.InputStream, org.xml.sax.ContentHandler, org.apache.tika.metadata.Metadata, org.apache.tika.parser.ParseContext)is called, this creates a newSQLite3DBParser. Given potential conflicts of native libraries in web servers, users will need to add org.xerial's sqlite-jdbc jar to the class path for this parser to work. For development and testing, this jar is specified in tika-parsers' pom.xml, but it is currently set to "provided." Note that this family of jdbc parsers is designed to treat each CLOB and each BLOB as an embedded document; i.e. it will recursively process documents that are stored in a sqlite db as "bytes". If using a TikaInputStream, make sure to close it to delete the temp file that has to be created.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SQLite3Parser()Checks to see if class is available for org.sqlite.JDBC.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckInitialization(org.apache.tika.config.InitializableProblemHandler problemHandler)Set<org.apache.tika.mime.MediaType>getSupportedTypes(org.apache.tika.parser.ParseContext context)voidinitialize(Map<String,org.apache.tika.config.Param> params)No-opvoidparse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context)
-
-
-
Method Detail
-
getSupportedTypes
public Set<org.apache.tika.mime.MediaType> getSupportedTypes(org.apache.tika.parser.ParseContext context)
- Specified by:
getSupportedTypesin interfaceorg.apache.tika.parser.Parser
-
parse
public void parse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context) throws IOException, SAXException, org.apache.tika.exception.TikaException
- Specified by:
parsein interfaceorg.apache.tika.parser.Parser- Throws:
IOExceptionSAXExceptionorg.apache.tika.exception.TikaException
-
initialize
public void initialize(Map<String,org.apache.tika.config.Param> params) throws org.apache.tika.exception.TikaConfigException
No-op- Specified by:
initializein interfaceorg.apache.tika.config.Initializable- Parameters:
params- params to use for initialization- Throws:
org.apache.tika.exception.TikaConfigException
-
checkInitialization
public void checkInitialization(org.apache.tika.config.InitializableProblemHandler problemHandler) throws org.apache.tika.exception.TikaConfigException- Specified by:
checkInitializationin interfaceorg.apache.tika.config.Initializable- Throws:
org.apache.tika.exception.TikaConfigException
-
-