FAQ
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

Search Discussions

  • Claus Ibsen at Nov 24, 2010 at 8:54 am
    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 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/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedNov 24, '10 at 8:46a
activeNov 24, '10 at 8:54a
posts2
users2
websitecamel.apache.org

2 users in discussion

Claus Ibsen: 1 post Wouter Heijke: 1 post

People

Translate

site design / logo © 2022 Grokbase