tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Palsulich (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (TIKA-1558) Create a Parser Blacklist
Date Tue, 31 Mar 2015 21:41:53 GMT

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

Tyler Palsulich edited comment on TIKA-1558 at 3/31/15 9:41 PM:
----------------------------------------------------------------

-Above strategy added in r1661284. You can now blacklist Parsers by adding names to {{META-INF/services/org.apache.tika.parser.Parser.blacklist}}
with the same format as the normal services file. If a class is blacklisted, all of its subclasses
are automatically blacklisted.-

Edit: Service loading blacklisting disabled in r1670487. Use a custom TikaConfig like [this
one|https://svn.apache.org/repos/asf/tika/trunk/tika-parsers/src/test/resources/org/apache/tika/config/TIKA-1558-blacklistsub.xml]
to disable a Parser. Any subclasses of that Parser will also be excluded.


was (Author: tpalsulich):
Above strategy added in r1661284. You can now blacklist Parsers by adding names to {{META-INF/services/org.apache.tika.parser.Parser.blacklist}}
with the same format as the normal services file. If a class is blacklisted, all of its subclasses
are automatically blacklisted.

> Create a Parser Blacklist
> -------------------------
>
>                 Key: TIKA-1558
>                 URL: https://issues.apache.org/jira/browse/TIKA-1558
>             Project: Tika
>          Issue Type: New Feature
>            Reporter: Tyler Palsulich
>            Assignee: Tyler Palsulich
>             Fix For: 1.8
>
>
> As talked about in TIKA-1555 and TIKA-1557, it would be nice to be able to disable Parsers
without pulling their dependencies out. In some cases (e.g. disable all ExternalParsers),
there may not be an easy way to exclude the dependencies via Maven.
> -So, an initial design would be to include another file like {{META-INF/services/org.apache.tika.parser.Parser.blacklist}}.
We create a new method {{ServiceLoader#loadServiceProviderBlacklist}}. Then, in {{ServiceLoader#loadServiceProviders}},
we remove all elements of the list that are assignable to an element in {{ServiceLoader#loadServiceProviderBlacklist}}.-



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message