camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Component to read FixedLength file ?
Date Tue, 15 Jul 2008 12:03:14 GMT
Yeah - I did ponder if it should be a dataformat or a component; or
maybe even both. The bit I wasn't sure about was flatpack really just
provides an iterator over rows of the file; I wasn't sure if this
properly matched the dataformat model of marshalling or unmarshalling
a payload (which currently assumes that unmarshalling generates a
single result).

Maybe we need to enhance the dataformat concept to work with this use case too?

So maybe if we want to process each row of a file we do something like...

from("file://whatnot").
  unmarshall().flatpack().fixed("locationOftheXMLConfigurationfile.pzmap.xml").
  split().body().
  to("whatever");

where the split().body() would do the iteration over each DataSet?


2008/7/15 Claus Ibsen <ci@silverbullet.dk>:
> Hi
>
> Yes I thought also at first it was a dataformat ;) But how James created it it works
as if it is a dataformat. You just have to do it in to..from from..to steps.
>
>
> from("file://c:/test").to("flatpack:foo: locationOftheXMLConfigurationfile.pzmap.xml");
>
> from("flatpack:foo").to("whatever you want");
>
> As a component it gets more attention, as people can find it on the component list. The
dataformats are kinda hidden in the wiki documentation.
> Maybe they need a "dataformat" top menu as well ;)
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
> -----Original Message-----
> From: cmoulliard [mailto:cmoulliard@gmail.com]
> Sent: 15. juli 2008 09:32
> To: camel-user@activemq.apache.org
> Subject: Re: Component to read FixedLength file ?
>
>
> Many thanks.
>
> I will test the integration of this component within Camel.
>
> Remark : I'm a little confused about how Flatpack has been integrated. The
> project has been integrated like a component but from my point of view, it
> should be integrated (for consistency reason) like a Dataformat. Because
> like the other framework/technology implemented in Camel (JAXB, Artix,
> XStream, ....), they transform the content from a format (XML, CSV, ...)
> into another format (Collection of Java objects)
>
> E.g.
>
> DataFormat flatpack = new
> DataFormat("locationOftheXMLConfigurationfile.pzmap.xml.xml")
>
> from("file:///c:/test")
> .unmarshall(flatpack)
> .to("whatever you want")
>
> Regards,
>
> Charles
>
>
>
> James.Strachan wrote:
>>
>> BTW trunk has an early spike of a flatpack component. Needs more work,
>> but there's a basic fixed-width reader example there for the curious
>>
>> 2008/7/14 James Strachan <james.strachan@gmail.com>:
>>> I've raised a JIRA to track this...
>>> https://issues.apache.org/activemq/browse/CAMEL-717
>>>
>>> 2008/7/14 James Strachan <james.strachan@gmail.com>:
>>>> 2008/7/14 cmoulliard <cmoulliard@gmail.com>:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Is there a component expected to read fixedlength files in Camel like
>>>>> flatpack (http://flatpack.sourceforge.net/) allow to do it ?
>>>>
>>>> It should be pretty easy to write a flatpack component.
>>>>
>>>> there's a commercial tool called Artix Data Services which comes with
>>>> a nice design UI that does this with Camel...
>>>> http://activemq.apache.org/camel/artix-data-services.html
>>>>
>>>> but it'd be nice to have an OSS option :)
>>>>
>>>> --
>>>> James
>>>> -------
>>>> http://macstrac.blogspot.com/
>>>>
>>>> Open Source Integration
>>>> http://open.iona.com
>>>>
>>>
>>>
>>>
>>> --
>>> James
>>> -------
>>> http://macstrac.blogspot.com/
>>>
>>> Open Source Integration
>>> http://open.iona.com
>>>
>>
>>
>>
>> --
>> James
>> -------
>> http://macstrac.blogspot.com/
>>
>> Open Source Integration
>> http://open.iona.com
>>
>>
>
>
> -----
> Enterprise Architect
>
> Xpectis
> 12, route d'Esch
> L-1470 Luxembourg
>
> Phone +352 25 10 70 470
> Mobile +352 621 45 36 22
>
> e-mail : cmoulliard@xpectis.com
> web site : www.xpectis.com
> --
> View this message in context: http://www.nabble.com/Component-to-read-FixedLength-file---tp18444614s22882p18459545.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Mime
View raw message