GitHub user thammegowda opened a pull request:

    https://github.com/apache/tika/pull/123

    TIKA-1986 : support for typed parameters from XML configuration

     This is a sub-task of TIKA-1508 (please merge #91 first).
    
    This extends configuration file with a place for specifying parameters and 
their types.
    
    + Added a class called `Param`
    + Relying on JAXB annotations to convert between XML and Java objects
    + Test case updated to check for types


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/thammegowda/tika TIKA-1986

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tika/pull/123.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #123
    
----
commit b2cf23178ede925b0ef23f88ebf1aff95c8c157c
Author: Thamme Gowda <[email protected]>
Date:   2016-03-09T02:23:19Z

    Add uniformity to parser parameter configuration.
    
    1. Added Configurable interface.
     This can be used for all services like Parser, Detector which can take
      configurable parameters.
    
    2. Added ConfigurableParser interface which extends Parser interface.
       I didn't add new method to existing Parser because
        that will break the compatibility.
    
    3. AbstractParser extends ConfigurableParser and has
      default implementation for configure() contract.
      I think it is safe to do so and it doesnt break anything.
      In addition all parsers which extend AbstractParser will can easily
      access config from TikaConfig if they want to
    
    3. Added a TODO to TikaConfig,
     after this should allow multiple instances of same parser with
     different runtime configurations.
    
    4. TikaConfig is modified to detect if instance can be configured,
      if so, then checks if params are available in XML file, parses the
      params and invokes configure(ctx) method with these params
    
    5. Added DummyConfigurableParser that simply copies parameters to
     metadata for the sake of testing
    
    6. Added a sample XML config file for testing.
    Added ConfigurableParserTest that performs an end to end test of all
    the above.

commit ae51417d8881dd90b921f02c2677a7d5bfd69a30
Author: Thamme Gowda <[email protected]>
Date:   2016-03-09T03:23:47Z

    remove unwanted TODO:

commit 64db9614cfaa3e873a9dc9efc6d201d887f6a4c5
Author: Thamme Gowda <[email protected]>
Date:   2016-03-12T14:43:44Z

    Added a TikaConfigException, params getter

commit 0d69ca7540b4350e043c5b9ed34d14a46bd70cf7
Author: Thamme Gowda <[email protected]>
Date:   2016-03-12T14:51:14Z

    Test Case updated with newer exception and getter

commit e780d56652d48dd0f50b4e62a58153e95f055022
Author: Thamme Gowda <[email protected]>
Date:   2016-05-23T18:30:13Z

    merged upstream changes and resolved conflicts

commit b64612dcdb021fbb8b3fbf31d70a02f1bb7736cb
Author: Thamme Gowda <[email protected]>
Date:   2016-05-23T18:52:55Z

    Update javadoc with @since

commit 01869923533b330ec7728995e3ee5feceee1b90e
Author: Thamme Gowda <[email protected]>
Date:   2016-05-26T00:18:25Z

    Added support for type for runtime parameters

commit 9e08a6bc0a2b2ffad12e4b6f90725b2201d0a69b
Author: Thamme Gowda <[email protected]>
Date:   2016-05-26T00:50:49Z

    Updated test case with type checking

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to