• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Specific detail of code generation

#1 2008-01-11 15:55:15

jama
Guest

Specific detail of code generation

Tags: [code, generation, java]

Hello,
I'm using JasperETL for the traslation of some document but I don't understand how the code is generated. In particular I want generate the Java code of the trasformation whitout the use of the graphical interface of JasperETL. I've understand that Talend allow to create java code from XML description of job but I haven't no idea on the way to invocate this traslation.
The instruction that I need are the method to create the java code from the XML document in which I defined the properties of the jobs and the ways to create a new job and save it to the repository.

Best regards.

#2 2008-01-14 05:54:25

nrousseau
Talend team
Registered: 2006-09-19
Posts: 119
Website

Re: Specific detail of code generation

Hi,

One thing you should know first, is that if you want to load the process / generate the code etc... you will need almost all the code from TOS/JasperETL.
The job is saved in a xml format yes, but via Emf (tool from eclipse)

If you still want to access the code, you need to get the code from the SVN, the class who loads the job is Process, and one tool to generate the code is ProcessorUtilities. (can't tell you too much about the repository, but i guess you can have a look to the wizard code)

Nicolas

Offline

#3 2008-01-14 14:46:10

jama
Guest

Re: Specific detail of code generation

Thanks for the informations.
Are you sure that the class to load the job is Process and not Processor? Where is it located?

#4 2008-01-15 03:55:40

nrousseau
Talend team
Registered: 2006-09-19
Posts: 119
Website

Re: Specific detail of code generation

for the Process: org.talend.designer.core.ui.editor.process.Process
and ProcessorUtilities: org.talend.designer.runprocess.ProcessorUtilities

Offline

#5 2008-01-15 12:52:19

jama
Guest

Re: Specific detail of code generation

Thanks for all!It's very useful!
I don't find a documentation of the code, it's possible?

#6 2008-01-15 16:26:30

jama
Guest

Re: Specific detail of code generation

I've seen the class Process and I have some question. Process is the class to manage a job. It's created when I decide to open an existing job? It's represented the class to manipulate and load the job, it's true?
In this case when I want to open an existing job I can to create a new instance of Process and ask to this class to load the job, generate the code and return it, it's true?
Thanks for your attention.

#7 2008-01-16 02:34:51

shong
Talend team
Registered: 2007-08-29
Posts: 10297
Website

Re: Specific detail of code generation

Hi

I don't find a documentation of the code, it's possible?

The Javadoc are available in TOS. Go to Help menu > Help Contents > Developer Guide > API Reference .

Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#8 2008-01-16 12:45:35

jama
Guest

Re: Specific detail of code generation

shong wrote:

Hi

I don't find a documentation of the code, it's possible?

The Javadoc are available in TOS. Go to Help menu > Help Contents > Developer Guide > API Reference .

Best regards

         shong

Thank you very much for your explanation but I haven't understand where is the help menu.

Can you give me the path?

#9 2008-01-16 16:56:54

mhirt
Talend team
Registered: 2006-09-19
Posts: 1634

Re: Specific detail of code generation

Here it is...


Uploaded Images

Last edited by mhirt (2008-01-16 16:57:47)

Offline

#10 2008-01-17 11:37:15

jama
Guest

Re: Specific detail of code generation

Thanks for all.
Now I try to write a class java to load the job.
If you have a suggestion, please tell me.

#11 2008-01-17 14:43:30

jama
Guest

Re: Specific detail of code generation

Why in the folder plugin of Jasper I have the jar org.talend.designer.runprocess but opening it I don't find the class processUtilities? Where is it located?
The same thing happens with Process.

#12 2008-01-18 02:58:15

shong
Talend team
Registered: 2007-08-29
Posts: 10297
Website

Re: Specific detail of code generation

Hi

Why in the folder plugin of Jasper I have the jar org.talend.designer.runprocess but opening it I don't find the class processUtilities? Where is it located?

You can find them in the source code.
Talend core:
Process.java : org.talend.designer.core.ui.editor.process/
ProcessorUtilities: org.talend.designer.runprocess/

Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#13 2008-01-20 21:39:19

jama
Guest

Re: Specific detail of code generation

I've understood that the class processUtilities manages the generation of code with the instruction
generateCode(IProcess process, IContext context, boolean statistics, boolean trace, boolean properties)
where IProcess is an interface implemented by the class Process that manages the information contained into the XML file of the process with the extention .properties.
With the instruction getMasterJob I can take the information by the file with the extension .item
It's right?

The question is: how can I do to load the file .property? There is a method called loadXmlFile but I haven't understood how can I use this or what is the meaning of the argument ProcessType.

Please help me.
Best regards

#14 2008-01-22 12:43:25

jama
Guest

Re: Specific detail of code generation

I've read some classes but I dont'understand where is the invocation of the file that contain the property of the job. I need only an help to know what is the method (and its invocation) that allow me to read the attribute of the specific file .property in the workspace and consequently to use them in TalendFilePackage, Process and other.

Thanks.

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Specific detail of code generation

Board footer

Powered by FluxBB