You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by thammegowda <gi...@git.apache.org> on 2016/03/09 04:39:47 UTC

[GitHub] tika pull request: TIKA-1508 : Add uniformity to parser parameter ...

GitHub user thammegowda opened a pull request:

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

    TIKA-1508 : Add uniformity to parser parameter configuration - contributed by Thamme Gowda

    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 doesn't break anything.
      In addition, all parsers which extend `AbstractParser` 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.


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

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

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

    https://github.com/apache/tika/pull/91.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 #91
    
----
commit b2cf23178ede925b0ef23f88ebf1aff95c8c157c
Author: Thamme Gowda <tg...@gmail.com>
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 <tg...@gmail.com>
Date:   2016-03-09T03:23:47Z

    remove unwanted TODO:

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tika pull request #91: TIKA-1508 : Add uniformity to parser parameter config...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---