You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Wouter Heijke <wh...@gmail.com> on 2010/11/24 09:46:43 UTC

Apache Tika support for Camel

Hi,

I'm relatively new to Camel and while learning how to use it created a
DataFormat extension using Apache Tika.
With this you can unmarshal file formats supported by Apache Tika into Camel
messages and filter on the document's contenttype etc.
The unmarshalled text will be in the body of the message and any properties
will be set in the header of the message.

Example:

from("something").unmarshal(tika).choice().when(
                header("tikacontenttype").isEqualTo("application/zip")).to(
                "somewhere")

.when(header("tikacontenttype").startsWith("text/plain")).to(
                        "someshereelse").otherwise().to("nowhere");

The code although not finished can already be useful for some is here:

https://github.com/wheijke/camel-tika

Another project is Twitter4j support that I hope to finish soon.

Enjoy,

Wouter

Re: Apache Tika support for Camel

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Welcome to the community.

We love contributions and if you consider donating your work to
Apache, then we can have the data format included in the kit out of
the box.
http://camel.apache.org/contributing.html



I have added your project to the Camel users stories
https://cwiki.apache.org/confluence/display/CAMEL/User+Stories

On Wed, Nov 24, 2010 at 9:46 AM, Wouter Heijke <wh...@gmail.com> wrote:
> Hi,
>
> I'm relatively new to Camel and while learning how to use it created a
> DataFormat extension using Apache Tika.
> With this you can unmarshal file formats supported by Apache Tika into Camel
> messages and filter on the document's contenttype etc.
> The unmarshalled text will be in the body of the message and any properties
> will be set in the header of the message.
>
> Example:
>
> from("something").unmarshal(tika).choice().when(
>                header("tikacontenttype").isEqualTo("application/zip")).to(
>                "somewhere")
>
> .when(header("tikacontenttype").startsWith("text/plain")).to(
>                        "someshereelse").otherwise().to("nowhere");
>
> The code although not finished can already be useful for some is here:
>
> https://github.com/wheijke/camel-tika
>
> Another project is Twitter4j support that I hope to finish soon.
>
> Enjoy,
>
> Wouter
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/