On Mon, 17 Oct 2011, Jukka Zitting wrote:
On Mon, Oct 17, 2011 at 2:32 PM, Nick Burch <nick.bu...@alfresco.com> wrote:
Would it make sense to add a getDetector() method to TikaConfig to mirror
the parser one? It's only a few lines of code without it, but it seems to me
that it'd make things simpler and cleaner if it was there. Thoughts?

TikaConfig doesn't currently have anything to do with Detectors, so my
instinct would be to avoid such an extra method unless we actually
want to add some sort of a custom detector configuration mechanism.

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

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

Nick

Reply via email to