tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yves Zoundi <yveszou...@gmail.com>
Subject OSGI bundle for Tika
Date Mon, 19 May 2008 12:05:30 GMT
Hi everybody,

It would be nice to create sub-projects from Apache Tika main maven
project. The mime detection part is pretty useful and its code could be
in a separate project. That would allow people to use it without the
rest of the Tika's code.

I was looking at a mime detection solution. I looked at JMimeInfo,
jmimemagic and mime-util. After few tests, I choose to use Apache Tika's

I removed few classes from the source code and created a jar with the
mime detection code. I needed to use Tika in an OSGI environment and it
was a bit painful to use Tika out of the box(without embedding it in an
OSGI bundle which would export Tika packages later).

I had to create a manifest and as Tika's code is not huge, I was able to
export the packages quickly. I need to import javax.xml.parsers, sax and
dom packages as Tika use them to load the mimetypes configuration file.

The thing I didn't see in the mime detection code was a serializer to
save the mimetypes. 

In a typical application, people usually :
- Want a mime type configuration file somewhere that they can load
- Want to be able to add/remove mimetypes
- Add file extensions patterns to existing mime types
- Store back the mime types to its location.

So my questions are : 
- If I load the mimetypes from a file, and add some mimetype entries at
runtime, how can I save back the file without doing it manually with
dom, jdom or dom4j?
- Would it be possible to create an OSGI bundle for the mime detection

Keep up the good work

Yves Zoundi 
Blog : http://yveszoundi.blogspot.com
XPontus XML Editor : http://xpontus.sf.net
VFSJFileChooser : http://vfsjfilechooser.sf.net

Your attitude, not your aptitude, will determine your altitude
Zig Ziglar

You have to learn the rules of the game. And then you have to play
better than anyone else.
Albert Einstein

Act as if it was impossible to fail.
Dorothea Brande

View raw message