Hi,

See http://uppertank.net/blog/archives/40 for a case where you'd like
to have your mime type information stored and managed in an external
repository. The way to do that with our current API would be to
implement an alternative reader that reads all mime type information
from the external repository and instantiates a MimeTypes registry
with all that information.

The downside of this approach is that the type information is static
and needs to be kept fully in memory. I'm not too concerned about the
memory overhead (the registry can't be *that* big), but it would be
nice to be able to update the mime type information without having to
do full reloads of the registry.

So, how about adding MimeTypeRegistry interface and making the current
MimeTypes class be the default implementation of that interface? Then
external repositories could implement the MimeTypeRegistry interface
using on-demand loading of type information. Such a split would also
make for a cleaner interface/implementation separation within Tika
itself.

BR,

Jukka Zitting

Reply via email to