tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris A. Mattmann (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TIKA-1680) Add configuration layer to configure, Parsers default configurable properties.
Date Tue, 04 Aug 2015 22:23:05 GMT

    [ https://issues.apache.org/jira/browse/TIKA-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14654463#comment-14654463

Chris A. Mattmann commented on TIKA-1680:

yeah I agree Nick for 1.x series we're golden. But if we're going to think 2.x (which the
point of this thread was) I'd like to do something better than having to provide an e.g.,
alternative Tika config, etc. But like I said before, code does the talking and so far I've
just done talk. we'll see if I can do some code next ;)

> Add configuration layer to configure, Parsers default configurable properties.
> ------------------------------------------------------------------------------
>                 Key: TIKA-1680
>                 URL: https://issues.apache.org/jira/browse/TIKA-1680
>             Project: Tika
>          Issue Type: Improvement
>          Components: config
>            Reporter: Mario Costa
>            Priority: Minor
> 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
> */
>     <P extends Parser> ParseContext getDefaultConfig(Class<P> class, ParseContext
> }
> 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,
> mc

This message was sent by Atlassian JIRA

View raw message