question about custom encoder

7 messages Options
Embed this post
Permalink
raffaelespazzoli

question about custom encoder

Reply Threaded More More options
Print post
Permalink
Hi,
I must read from a data from a file. The data is structured in lines,
each line of data is a fixed position record. Lines can be of different
types, so record in lines aren't homogeneous.
There is a logical relation between lines for example:

root abc
child1 def
childOfchild1 ghi
child2 lmn
root a1b1c1
...

root1 has its own data and child1 and child2 each child has its own data
and child 1 has another child.

Id' like to read the file in a xml structure where all related lines
belong to the same record (of course the record will be a tree).

I didn't find a good tutorial or at least a key to understand the logic
of the encoder.

can you help with my problem?

thanks
Raffaele


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Paul Peters-3

RE: question about custom encoder

Reply Threaded More More options
Print post
Permalink
Hi Raffaele,

It should be possible to use "input match" here.
As it's the structure of the data itself that defines individual records and line-items there must be some tag preceding the level.
(in other, more elaborate, cases you'd need to use a "link identifier" to filter out associated lines to reconstruct a record).

So, with the custom encoder you should be able to create a repeating node 'record' and below it two items, a non-repeating element 'root' with "input match" set to the field which indicates this is a line containing 'root' information, and a repeating+optional node 'line items' containing a non-repeating element 'child' with "input match" and a repeating+optional element 'childchild' with "input match".

That should work to properly read the data. I think the output format, the XML, will be a set of records glued into one big string, but that's a minor issue.

That'll be € 0,02 .. senza iva.

Hope this helps
Paul
 

-----Original Message-----
From: Raffaele Spazzoli

Hi,
I must read from a data from a file. The data is structured in lines,
each line of data is a fixed position record. Lines can be of different
types, so record in lines aren't homogeneous.
There is a logical relation between lines for example:

root abc
child1 def
childOfchild1 ghi
child2 lmn
root a1b1c1
...

root1 has its own data and child1 and child2 each child has its own data
and child 1 has another child.

Id' like to read the file in a xml structure where all related lines
belong to the same record (of course the record will be a tree).

I didn't find a good tutorial or at least a key to understand the logic
of the encoder.

can you help with my problem?

thanks
Raffaele


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

raffaelespazzoli

RE: question about custom encoder

Reply Threaded More More options
Print post
Permalink
I Paul
I also think that the customer encoder is enough powerful to read the
data of my use case. The point is how? I there a tutorial or someone in
this mailing list that can give me a hint? Custom encoder ha about 30/40
options not documented.
In my use case record types are identified by the first 3 bytes.  

By the way the result that I want to obtain is a xml hierarchical
structure defined by an xsd.

thanks
Raffaele

On Fri, 2009-07-03 at 09:25 +0200, Paul Peters wrote:

> Hi Raffaele,
>
> It should be possible to use "input match" here.
> As it's the structure of the data itself that defines individual records and line-items there must be some tag preceding the level.
> (in other, more elaborate, cases you'd need to use a "link identifier" to filter out associated lines to reconstruct a record).
>
> So, with the custom encoder you should be able to create a repeating node 'record' and below it two items, a non-repeating element 'root' with "input match" set to the field which indicates this is a line containing 'root' information, and a repeating+optional node 'line items' containing a non-repeating element 'child' with "input match" and a repeating+optional element 'childchild' with "input match".
>
> That should work to properly read the data. I think the output format, the XML, will be a set of records glued into one big string, but that's a minor issue.
>
> That'll be € 0,02 .. senza iva.
>
> Hope this helps
> Paul
>  
>
> -----Original Message-----
> From: Raffaele Spazzoli
>
> Hi,
> I must read from a data from a file. The data is structured in lines,
> each line of data is a fixed position record. Lines can be of different
> types, so record in lines aren't homogeneous.
> There is a logical relation between lines for example:
>
> root abc
> child1 def
> childOfchild1 ghi
> child2 lmn
> root a1b1c1
> ...
>
> root1 has its own data and child1 and child2 each child has its own data
> and child 1 has another child.
>
> Id' like to read the file in a xml structure where all related lines
> belong to the same record (of course the record will be a tree).
>
> I didn't find a good tutorial or at least a key to understand the logic
> of the encoder.
>
> can you help with my problem?
>
> thanks
> Raffaele
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Paul Peters-3

RE: question about custom encoder

Reply Threaded More More options
Print post
Permalink
Hi Raffaele,

Well, it's not powerful enough to read several Gigabytes... : )
Even if it's documented it is very complex to use... Best document thus far is to download the eGate User Guide for JavaCAPS 513 from Sun's documenation site. The same information should still be available for JavaCAPS 6 and downloadable from the docs.sun.com or http://developers.sun.com/docs/javacaps/index.jsp but the way the information is categorized and classified gives me instant migrane and i have thusfar not been able to find it..

The other information is hidden in tutorials, and little screencams, but not easily accessible.  
Pity, as it's very powerful actually..

Take care
Paul

-----Original Message-----
From: Raffaele Spazzoli

I Paul
I also think that the customer encoder is enough powerful to read the
data of my use case. The point is how? I there a tutorial or someone in
this mailing list that can give me a hint? Custom encoder ha about 30/40
options not documented.
In my use case record types are identified by the first 3 bytes.  

By the way the result that I want to obtain is a xml hierarchical
structure defined by an xsd.

thanks
Raffaele



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Michael.Czapski

Re: question about custom encoder

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Perhaps Java CAPS 5.1.3 documentation can help here. Have a look at http://dlc.sun.com/pdf/820-0952/820-0952.pdf, Chapter 9 Object Type Definitions III, Section 9.8 Specifying Delimiters. I don't know how close the custom OTD delimiter processing code is to the custom encoder delimiter processing code. They look close enough :-)

Regards

Michael

Paul Peters wrote:
Hi Raffaele,

Well, it's not powerful enough to read several Gigabytes... : )
Even if it's documented it is very complex to use... Best document thus far is to download the eGate User Guide for JavaCAPS 513 from Sun's documenation site. The same information should still be available for JavaCAPS 6 and downloadable from the docs.sun.com or http://developers.sun.com/docs/javacaps/index.jsp but the way the information is categorized and classified gives me instant migrane and i have thusfar not been able to find it..

The other information is hidden in tutorials, and little screencams, but not easily accessible.  
Pity, as it's very powerful actually..

Take care
Paul

-----Original Message-----
From: Raffaele Spazzoli 

I Paul
I also think that the customer encoder is enough powerful to read the
data of my use case. The point is how? I there a tutorial or someone in
this mailing list that can give me a hint? Custom encoder ha about 30/40
options not documented.
In my use case record types are identified by the first 3 bytes.  

By the way the result that I want to obtain is a xml hierarchical
structure defined by an xsd.

thanks
Raffaele



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


  

--

--

Podcast 1   Podcast 2

 

Michael Czapski, BSc Computing, MSc eBus.Tech.
Principal Field Technologist, Software
SOA/BI/Java CAPS

Sun Microsystems
33 Berry Street, North Sydney
NSW 2060 Australia
Phone +61 2 9466 9427
Email [hidden email]

Blog: http://blogs.sun.com/javacapsfieldtech/

LinkedIn: MichaelCzapski

Skype: michaelczapski

Screencasts and Document Archives: http://mediacast.sun.com/users/Michael.Czapski-Sun

JavaOne 2008 SYS-CON.TV Interview with Michael Czapski and Brendan Marry: http://tv.sys-con.com/node/674561

 


raffaelespazzoli

Re: question about custom encoder

Reply Threaded More More options
Print post
Permalink
thanks Paul and Michael,
I'll have a look to your links.

bye
Raffaele

On Sat, 2009-07-04 at 10:27 +1000, Michael Czapski, Principal Field
Technologist, ANZ APS, SOA/BI/Java CAPS wrote:

> Perhaps Java CAPS 5.1.3 documentation can help here. Have a look at
> http://dlc.sun.com/pdf/820-0952/820-0952.pdf, Chapter 9 Object Type
> Definitions III, Section 9.8 Specifying Delimiters. I don't know how
> close the custom OTD delimiter processing code is to the custom
> encoder delimiter processing code. They look close enough :-)
>
> Regards
>
> Michael
>
> Paul Peters wrote:
> > Hi Raffaele,
> >
> > Well, it's not powerful enough to read several Gigabytes... : )
> > Even if it's documented it is very complex to use... Best document thus far is to download the eGate User Guide for JavaCAPS 513 from Sun's documenation site. The same information should still be available for JavaCAPS 6 and downloadable from the docs.sun.com or http://developers.sun.com/docs/javacaps/index.jsp but the way the information is categorized and classified gives me instant migrane and i have thusfar not been able to find it..
> >
> > The other information is hidden in tutorials, and little screencams, but not easily accessible.  
> > Pity, as it's very powerful actually..
> >
> > Take care
> > Paul
> >
> > -----Original Message-----
> > From: Raffaele Spazzoli
> >
> > I Paul
> > I also think that the customer encoder is enough powerful to read the
> > data of my use case. The point is how? I there a tutorial or someone in
> > this mailing list that can give me a hint? Custom encoder ha about 30/40
> > options not documented.
> > In my use case record types are identified by the first 3 bytes.  
> >
> > By the way the result that I want to obtain is a xml hierarchical
> > structure defined by an xsd.
> >
> > thanks
> > Raffaele
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
> >  
>
> --
> --
>
>
>
> Podcast 1   Podcast 2
>
>
>  
>
>
> Michael Czapski, BSc
> Computing, MSc
> eBus.Tech.
> Principal Field
> Technologist, Software
> SOA/BI/Java CAPS
>
> Sun Microsystems
> 33 Berry Street, North
> Sydney
> NSW 2060 Australia
> Phone +61 2 9466 9427
> Email
> [hidden email]
>
> Blog:
> http://blogs.sun.com/javacapsfieldtech/ 
>
> LinkedIn:
> MichaelCzapski
>
> Skype: michaelczapski
>
> Screencastsand Document
> Archives:
> http://mediacast.sun.com/users/Michael.Czapski-Sun 
>
> JavaOne 2008 SYS-CON.TV
> Interview with Michael
> Czapski and Brendan
> Marry: http://tv.sys-con.com/node/674561 
>
>
>
>  
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Lixin Tang

RE: question about custom encoder

Reply Threaded More More options
Print post
Permalink
Raffaele,

Please refer to the following link:

http://wiki.open-esb.java.net/Wiki.jsp?page=DesigningCustomEncoders

Let us know if it doesn't cover any of those options.

Thanks

Lixin
 

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]
On Behalf Of Raffaele Spazzoli
Sent: Monday, July 06, 2009 3:18 AM
To: [hidden email]
Subject: Re: question about custom encoder

thanks Paul and Michael,
I'll have a look to your links.

bye
Raffaele

On Sat, 2009-07-04 at 10:27 +1000, Michael Czapski, Principal Field
Technologist, ANZ APS, SOA/BI/Java CAPS wrote:

> Perhaps Java CAPS 5.1.3 documentation can help here. Have a look at
> http://dlc.sun.com/pdf/820-0952/820-0952.pdf, Chapter 9 Object Type
> Definitions III, Section 9.8 Specifying Delimiters. I don't know how
> close the custom OTD delimiter processing code is to the custom
> encoder delimiter processing code. They look close enough :-)
>
> Regards
>
> Michael
>
> Paul Peters wrote:
> > Hi Raffaele,
> >
> > Well, it's not powerful enough to read several Gigabytes... : ) Even
> > if it's documented it is very complex to use... Best document thus far
is to download the eGate User Guide for JavaCAPS 513 from Sun's documenation
site. The same information should still be available for JavaCAPS 6 and
downloadable from the docs.sun.com or
http://developers.sun.com/docs/javacaps/index.jsp but the way the
information is categorized and classified gives me instant migrane and i
have thusfar not been able to find it..
> >
> > The other information is hidden in tutorials, and little screencams, but
not easily accessible.  

> > Pity, as it's very powerful actually..
> >
> > Take care
> > Paul
> >
> > -----Original Message-----
> > From: Raffaele Spazzoli
> >
> > I Paul
> > I also think that the customer encoder is enough powerful to read
> > the data of my use case. The point is how? I there a tutorial or
> > someone in this mailing list that can give me a hint? Custom encoder
> > ha about 30/40 options not documented.
> > In my use case record types are identified by the first 3 bytes.  
> >
> > By the way the result that I want to obtain is a xml hierarchical
> > structure defined by an xsd.
> >
> > thanks
> > Raffaele
> >
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
> >  
>
> --
> --
>
>
>
> Podcast 1   Podcast 2
>
>
>  
>
>
> Michael Czapski, BSc
> Computing, MSc
> eBus.Tech.
> Principal Field
> Technologist, Software
> SOA/BI/Java CAPS
>
> Sun Microsystems
> 33 Berry Street, North
> Sydney
> NSW 2060 Australia
> Phone +61 2 9466 9427
> Email
> [hidden email]
>
> Blog:
> http://blogs.sun.com/javacapsfieldtech/
>
> LinkedIn:
> MichaelCzapski
>
> Skype: michaelczapski
>
> Screencastsand Document
> Archives:
> http://mediacast.sun.com/users/Michael.Czapski-Sun
>
> JavaOne 2008 SYS-CON.TV
> Interview with Michael
> Czapski and Brendan
> Marry: http://tv.sys-con.com/node/674561
>
>
>
>  
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]