Class TikaParser

java.lang.Object
com.norconex.importer.handler.parser.impl.TikaParser
All Implemented Interfaces:
Configurable<TikaParserConfig>, ConfigurableDocHandler<TikaParserConfig>, DocHandler

public class TikaParser extends Object implements ConfigurableDocHandler<TikaParserConfig>
Raw Tika parser that needs to be configured by passing a tika configuration file.
  • Constructor Details

    • TikaParser

      public TikaParser()
  • Method Details

    • init

      public void init() throws IOException
      Description copied from interface: DocHandler
      Initialize any required resources. Invoked once per Importer instance, by the Importer.
      Specified by:
      init in interface DocHandler
      Throws:
      IOException - An I/O exception of some sort has occurred
    • close

      public void close()
      Description copied from interface: DocHandler
      Closes any required resources. Invoked once per Importer instance, by the Importer.
      Specified by:
      close in interface DocHandler
    • handle

      public boolean handle(DocHandlerContext ctx) throws IOException
      Description copied from interface: DocHandler
      Perform any operations on a document.
      Specified by:
      handle in interface DocHandler
      Parameters:
      ctx - the document handling context
      Returns:
      false to stop processing and reject a document or true to proceed to the next configured handler.
      Throws:
      IOException - An I/O exception of some sort has occurred
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getConfiguration

      public TikaParserConfig getConfiguration()
      Specified by:
      getConfiguration in interface Configurable<TikaParserConfig>