Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-1680

Add configuration layer to configure, Parsers default configurable properties.

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • config
    • None


      In several conditions, we want to change the default tika configuration, for some specific parsers, to change the behaviour of libraries/components wrapped in the parsers.

      Currently, the ParseContext class allows, for means of passing this default configuration.

      Add means, to load from a configuration database/files default configuration to override, currently hard coded, defaults.

      E.g. #TIKA-640, there are no means to change the defaults, by means of configuration files, with out having to change, tika source.

      • Sugestion
      • Add a ParserConfigurationFactory, to delegate configuration loading, to a database/property based file etc.
      • Allow for configuration factory instance to be configured via file, like tika-config.xml for Parsers.

      interface ParserConfigurationFactory {

      • Create or fille the given ParseContext with the default configuration for the parser class...
        <P extends Parser> ParseContext getDefaultConfig(Class<P> class, ParseContext ctx);

      Replace when creating a ParseContext, by

      ParseContext ctx = ParserConfigurationFactorySingleton.getSingleton().getDefaultConfig(...) ...

      Filling the configuration, given a set of properties, could be done via a class <ParserName>ConfigBuilder that know how to build and set the configuration properties in specific objects (such as MimeConfig), related to 3rd party external libraries ...

      Best regards,


        Issue Links


          This comment will be Viewable by All Users Viewable by All Users


            Unassigned Unassigned
            mjscosta Mario Costa




                Issue deployment