Class DefaultParser
java.lang.Object
com.norconex.importer.handler.parser.impl.DefaultParser
- All Implemented Interfaces:
Configurable<DefaultParserConfig>,ConfigurableDocHandler<DefaultParserConfig>,DocHandler
Parser class when no other handlers are specified.
The importer uses Apache Tika parser in its own way with default
settings common for most senarios.
If you want to use and configure Tika yourself, use
TikaParser.-
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTYFields inherited from interface com.norconex.importer.handler.DocHandler
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected org.apache.tika.parser.ParsercreateRecursiveParser(DocHandlerContext docCtx, Writer output, List<Doc> embeddedDocs) booleanbooleanhandle(DocHandlerContext ctx) Perform any operations on a document.inthashCode()voidinit()Initialize any required resources.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.norconex.importer.handler.DocHandler
close
-
Constructor Details
-
DefaultParser
public DefaultParser()
-
-
Method Details
-
init
Description copied from interface:DocHandlerInitialize any required resources. Invoked once per Importer instance, by the Importer.- Specified by:
initin interfaceDocHandler- Throws:
IOException- An I/O exception of some sort has occurred
-
handle
Description copied from interface:DocHandlerPerform any operations on a document.- Specified by:
handlein interfaceDocHandler- Parameters:
ctx- the document handling context- Returns:
falseto stop processing and reject a document ortrueto proceed to the next configured handler.- Throws:
IOException- An I/O exception of some sort has occurred
-
createRecursiveParser
protected org.apache.tika.parser.Parser createRecursiveParser(DocHandlerContext docCtx, Writer output, List<Doc> embeddedDocs) -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getConfiguration
- Specified by:
getConfigurationin interfaceConfigurable<DefaultParserConfig>
-