Hi,

On Mon, Oct 17, 2011 at 3:56 PM, Nick Burch <nick.bu...@alfresco.com> wrote:
> My idea for wanting to get via the TikaConfig is based on the two arguments
> that DefaultDetector takes. One is the mime registry, which TikaConfig
> provides, the other is the classloader which TikaConfig may have been passed

OK, I see the point.

If we do add such a TikaConfig.getDetector() method, then the
equivalent code in the Tika(TikaConfig) constructor should be replaced
to call that method to avoid duplication.

> In my specific case, my class is accepting a TikaConfig object, which may or
> may not be the default one (depending on the caller), and is then creating a
> DefaultDetector and using that. It struck me that mirroring the parser case
> might make sense

Have you considered passing a Tika instance instead of TikaConfig? The
getParser() and getDetector() methods give easy access to the
underlying functionality, and the Tika constructors allow complete
customization of these component instances, including by specifying a
custom TikaConfig.

BR,

Jukka Zitting

Reply via email to