From jbosstools-commits at lists.jboss.org Wed Mar 11 12:09:29 2009 Content-Type: multipart/mixed; boundary="===============0985656909888531194==" MIME-Version: 1.0 From: jbosstools-commits at lists.jboss.org To: jbosstools-commits at lists.jboss.org Subject: [jbosstools-commits] JBoss Tools SVN: r14172 - branches/jbosstools-3.0.x/smooks/docs/reference/en. Date: Wed, 11 Mar 2009 12:09:28 -0400 Message-ID: --===============0985656909888531194== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: smukhina Date: 2009-03-11 12:09:28 -0400 (Wed, 11 Mar 2009) New Revision: 14172 Modified: branches/jbosstools-3.0.x/smooks/docs/reference/en/master_output.xml Log: https://jira.jboss.org/jira/browse/JBDS-655 updated master_output files f= or all release smooks guide of 3.3.0 are added = Modified: branches/jbosstools-3.0.x/smooks/docs/reference/en/master_output.= xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/jbosstools-3.0.x/smooks/docs/reference/en/master_output.xml 20= 09-03-11 16:04:53 UTC (rev 14171) +++ branches/jbosstools-3.0.x/smooks/docs/reference/en/master_output.xml 20= 09-03-11 16:09:28 UTC (rev 14172) @@ -8,895 +8,898 @@ = = = -]> - - - - Smooks Dev Tools Reference Guide - - Xue(Dart) - Peng - - - November 2008 - - 2009 - JBoss, a division of = Red Hat - - - Version: 1.0.0.GA - - - - - - PDF version - - - - - - - = - - - - - JBoss Tools - Smooks - JBDS - - - Introduction -
- What is Smooks? - - Smooks is a Java Framework/= Engine for processing XML and non XML - data (CSV, EDI, Java, JSON etc). - - - - - Transformation: Perform a wi= de range of - Data Transforms. Supports many different Source and Result types - -XML/CSV/EDI/Java/JSON to XML/CSV/EDI/Java/JSON. - - - Java Binding: Bind into a Ja= va Object - Model from any data source (CSV, EDI, XML, Java, JSON etc). - - - - Huge Message Processing: Pro= cess huge - messages (GBs) - Split, Transform and Route message fragments to JMS= , File, - Database etc destinations. Route multiple message formats to multiple - destinations in a single pass over a message. - - - - Message Enrichment: Enrich a= message with - data from a Database, or other Datasources. - - - - Combine: Combine the above f= eatures in - different ways e.g. add Message Enrichment as part of a Splitting and - Routing process. - - - -
- Smooks - - - - - -
- For More informations about Smooks, please visit Smooks official= site. -
-
- What is Smooks dev tools? - - Smooks dev tools is a set of graphical tools for editing Smooks co= nfiguration file - base on Eclipse. -
- Smooks form editor - - - - - -
-
-
- How to install Smooks dev tools? - - The Smooks dev tools was included by the JBoss Tools since 3.0.0 - Beta1 version. You can download the JBoss T= ools from here. - Smooks dev tools (JBoss Tools) run with the latest Eclipse and - other required plug-ins (GEF, EMF, etc.). - You should download the latest IDE for Java EE developers from th= is site. It contai= ns many plug-ins ( - GEF, EMF, etc. ) required by Smooks dev tools. -
-
- - = - - - - - JBoss Tools - Smooks - JBDS - java - - - Quick Start - This "Quick Start" will show how to use the Smooks tools to create/edit the Smooks - configuration file for Java2Java data transformation. - This chapter should give you a brief understanding of the Smooks dev tools. -
- Download Smooks Java-to-Java Example - Visit here to download= the "java-to-java" example project. - - Tip: - - The example project is base on Maven, you suggest you to create = a new eclipse - Java project and copy the example code and .jar files from the example= project paste - them into the eclipse Java project. - -
-
- Smooks Configuration File Wizard - Select the Smooks Java-to-Java example project what you created an= d right-click, - select the menu New > Other, then find - Smooks > Smooks Configuratio= n File. - Click the - Next - button. -
- Selecting Smooks Configuration File Wizard - - - - - -
- The first wizard page is a file path creation page. Select the - src - folder to be the files container, and input the name - newConfig.smooks. Click - Next. -
- Choosing the configuration file container and the file name</tit= le> - <mediaobject> - <imageobject> - <imagedata fileref=3D"images/quick_start/quick_start2.png" scale=3D"9= 0"></imagedata> - </imageobject> - </mediaobject> - </figure> - <para>The second wizard page is a transform data type choose page.</para> - <para> As the quick start introduces how to create/edit the Java-to-Java= Smooks - configuration file, let's select the<emphasis> - <property moreinfo=3D"none">Java-to-Java</property> - </emphasis> type as the source/target transform data type. </para> - - <figure float=3D"0"> - <title>Selecting Data Type - - - - - -
- - On the next page you are prompted to choose the source data for tr= ansformation. - Let's select the Order class fro= m the example project as - the source JavaBean class. - -
- Selecting the Source Data - - - - - -
- - Then the wizard page asks you to choose the target data for transf= ormation. We select - the ListOrder class as the targe= t JavaBean class. -
- Selecting the Target Data - - - - - -
- - - - - Tip: - You can omit two these steps and just press - Finish. T= his will open the empty - Smooks Configuration file. It's possible to select source/target data afterwards - in the Smooks Graph editor. - -
-
- Smooks Editor - - When all the wizard steps are passed, a new Smooks Configuration f= ile is created and - the Smooks Editor will be opened= automatically: -
- Smooks Editor - - - - - -
- - This editor contains several parts: - The Smooks Editor Parts - - - - - - - - Editor feature - Functionality - - - - - - - - Problems area - - - If there are any errors when you are editing the file, the - Problems area will display them - - - - - - Source data tree - - - The tree will display the structure of transformed source - data - - - - - - Target data tree - - - The tree will display the structure of transformed target - data - - - - - - Mapping graphical area - - - Show the data mapping connection lines - - - - - - Source/Target data selection links - - - Click the link, and Data Selection wizard will be opened helping you to - choose the source/target data - - - - -
-
-
- -
- Choosing the Source/Target Data - - To choose the transform data you should make use of the data selec= tion links: - - - - - Source Select - for selecting source data - - - - - Target Select - for selecting target data - - - - After clicking the link the Data Type = Selection wizard will be - opened, and there are two data types on the list: Java and XML. - - Note - There will be more and more data types on the list as the develo= pment went on. - - - -
- Data Type Wizard - - - - - -
- - Select the - Java - data type and click N= ext, you will - see the JavaBean class selection page: - -
- JavaBean Data Selection - - - - - -
- - When you select all the necessary java classes, click - Finish - and the structure of the java class will be displayed on th= e source/target - data tree. -
- Displaying the Structure of the Transformed Data - - - - - -
-
- -
- Mapping - - As you see, the source/target data tree displays the structure of= the java class. - How to map it? - = - First, you should know what to transform: - - - - Bind the - "customerName" - property of the Order#header<= /property> to the - "customerName" - property of LineOrder. - - - Bind the - "customerNumber" - property of the Order#header<= /property> to the - "customerId" - property of LineOrder. - - - Bind the - "price" - property of the OrderItem to the - "unitPrice" - property of LineItem. - - - Bind the - "productId" - property of the OrderItem to the - "productCode" - property of LineItem. - - - Bind the - "quantity" - property of the OrderItem to the - "unitQuantity" - property of LineItem. - - - - Make sense? - OK, let's select the - "customerName" - item of the - "header" - item on the source data tree and start to drag it. When the= drag item - crosses the Mapping graphical area, you will see a connection line. Dro= p the item onto - the - "customerName" - of the LineOrder on = the target data - view. - Now a dialog is opened asking you to connect the root node: - -
- Dialog Asking You to Connect to the Root Nodes - - - - - -
- Please, click - Yes - to connect the root node. If you don't do that, this dialog= will be - opened again when you connect other nodes. - - Note: - Please, remember that: The root nodes of the source data and targ= et data *MUST* be - connected. - This rule is not only for Java-to-Java, but the same is also rele= vant for - XML-to-Java - - Now let's do the same operation with the - "customerNumber", th= at is what you - should see: -
- Correctly Mapping Editor - - - - - -
- Next, you are going to bind the properties of the OrderItem to - the properties of the LineItem.<= /para> - Select the - "price" - and drag it onto the - "unitPrice" - of the other side tree viewer. The Problems area will show = an - error: -
- Connection Error 1 - - - - - -
- How to deal with the error? - Please click the - Fix it link, a menu i= s popped-up with several - resolve methods on it. -
- Fixing the Connection Error - - - - - -
- Select the first resolve method: - 'Connect the "OrderItem" to the - "LineItem" '. As the result the - "OrderItem" is conne= cted with - the - "LineItem". - But the notify message area still shows some other errors: -
- Connection Error 2 - - - - - -
- OK, let's deal with the fire error. Click the - Fix it link and - select the first resolve method. The - "orderItems" is conn= ected with - the - "lineItems". - = - - Tip: - Why does the error occur? - You will find that, if you only connect the property node withou= t connecting the - parent node of the property, the "connection error" occurs. - The connection of the "price-to-unitPrice" is the - "Binding Connection", but it needs an "Instance Creation - Connection" - the connection of the - "OrderItem-to-LineItem". - - After that, connect - "quantity" to the - "unitQuantity" and <= emphasis> - "productId" to the - - "productCode": -
- Complete Mapping - - - - - -
- Now, you should save the file and the = Smooks tools will generate the correct - configuration file content. - OK, let run the test class: example.Ma= in. (Please, make sure that the Smooks engine - loads the correct configuration file). - Success! -
-
- - = - - - - - JBoss Tools - Smooks - JBDS - - - Smooks Graphical Editor Page - - Smooks Graphical Editor page is one tab of the Smooks Editor. -
- Graphical Editor - - - - - -
- - This Graphical editor allow= s you to perform drug/drop operations - with the nodes of transform data to map the source data to target data. = - When you save the changes in the Graphical editor the correct Smoo= ks Configuration file - content will be generated. -
- - Introducing the areas of graphical editor - Information on the topic could be found in the Quick Start/Smooks Editor section. -
-
- - Load Source/Target Data - Click the links under the data view, the Data Type Selection wizard page will be - shown. -
- Data Type Selection Wizard Page - - - - - - - -
- - There are sets of transform data type on the wizard page, select = one type and click - Next, the= data source selection wizard - page will be shown. - - - Note: - For different data type, the Data source selection wizard are dif= ferent too. - - -
- Java Data Source Selection Wizard Page - - - - - - - -
- -
- XML File Path Selection Wizard Page - - - - - - - -
- - When you finish the data selection (file path selection), click - Finish, t= he data view will display the - selected data structure. -
-
- - Using Graphical Editor for Mapping - To get information on the topic please, read the Quick Start/Mapping section. -
-
- - Error Messages - When you do any mapping operations, the Smooks tools validate the - file content with "Mapping Logic". If there are any errors of the confi= guration file - content, error messages are shown in the Problems - area. - Please, read the Quick Start= /Mapping section to - find how to fix the errors. -
-
- Properties View - - You can edit the properties of the connection lines with the Properties - view. - Navigate to Window > Show= View > Other > - Properties, to open the Properties - view. - When you select on the connection lines, the Properties view - will show a set of section GUI for editing the properties of the connec= tion line. - - - Tip: - This GUI on the Properties view is displayed when the Smooks - Graphical editor is active, if not, the Pr= operties view - displays empty GUI. - If the source data type of the selected connection line is - "XML", the Properties view show= s an XML - Properties section GUI. - But if the source data type of the selected connection line is - "Java", the XML Properties section GUI isn't - displayed. - It means that if the source/target data type of the selected conn= ection line is - different, the Properties view = shows different GUI. - -
- JavaBean Properties Section - - - - - - - -
-
- XML Properties Section - - - - - -
-
- Mapping Properties Section - - - - - -
-
-
- - = - - - - - JBoss Tools - Smooks - JBDS - - - Smooks Configuration Editor Page - Smooks Configuration Editor Page is one tab of the Smooks Editor. -
- Graphical Editor - - - - - -
- - You can add/edit/remove the Date - Decoder on the =D0=A1onfiguration page of the Smooks Editor. - The configuration also edit the Smooks parse - type and manage the Import - Files. - -
- - Smooks Parse Type - Open the - Other Configurations - section, we will see there is a set of radio buttons: - -
- Smooks Parse Types - - - - - -
- Select the radio button to change the Smooks parse type. -
-
- - Import File - Open the - Other Configurations - section, there is an - Import Files - list under the Smooks parse type buttons. - -
- Import File - - - - - -
- - There are three buttons on the right side of the - File Import - list. You can click those to add/edit/remove the import fil= es. - - - - Tip: - If the import file dosen't exist, the image of the import file w= ill change to - "Error Image". If you double-click the import file in the Import File = list, the file - will be open with a new default editor. - - -
-
- Date Decoder Detail Page - - Date Decoder is a resourceConfig element in the Smooks configurati= on file. It - describes how to transform the "Date" type. - Click the - New - button to open the New Resource= Type wizard - dialog. -
- Resource Type Selection Wizard - - - - - -
- - There are several resource type on the list. Select the - Date Decoder - and click the - Finish - button, a new - Date Decoder - item was added and shown on the resource type list. - There are several parameters in the - Date Decoder - resourceConfig element: - - - - - - locale-language - - - - - format - - - - locale-country - - - - - - You can modify the parameters of the - Date Decoder item wit= h the left detail page. - -
- Date Decoder Detail Page - - - - - -
- - When you defined a new - Date Decoder, they ca= n use the JavaBean Propertie= s GUI to set the - them to be the "Java type". - - -
- -
- - = - - - - - JBoss Tools - Smooks - JBDS - - - Smooks Source Editor Page -
- XML Source Editor - You can use this editor to edit the Smooks Configuration file dire= ctly. -
- Graphical Editor - - - - - -
-
-
- Error Messages GUI - If the Smooks tools can't u= nderstand the configuration - file or the configuration file is illegal (XML structure isn't right fo= r Smooks - Configuration file, etc.), the error will be underlined. -
- Graphical Editor - - - - - -
- - -
-
- -
+]> + + + + Smooks Dev Tools Reference Guide + + Xue(Dart) + Peng + + + November 2008 + + 2008 + JBoss, a division of Red Hat Inc. + + + Version: 1.0.0.CR1 + + + + + + PDF version + + + + + + + = + + + + + JBoss Tools + Smooks + JBDS + + + Introduction +
+ What is Smooks? + + Smooks is a Java Framework/Engine for processing XML and= non XML + data (CSV, EDI, Java, JSON etc). + + + + + Transformation: Perform a wide range of + Data Transforms. Supports many different Source and Result types + -XML/CSV/EDI/Java/JSON to XML/CSV/EDI/Java/JSON. + + + Java Binding: Bind into a Java Object + Model from any data source (CSV, EDI, XML, Java, JSON etc). + + + + Huge Message Processing: Process huge + messages (GBs) - Split, Transform and Route message fragments to JMS= , File, + Database etc destinations. Route multiple message formats to multiple + destinations in a single pass over a message. + + + + Message Enrichment: Enrich a message with + data from a Database, or other Datasources. + + + + Combine: Combine the above features in + different ways e.g. add Message Enrichment as part of a Splitting and + Routing process. + + + +
+ Smooks + + + + + +
+ For More informations abo= ut Smooks, please visit Smooks official site. +
+
+ What is Smooks dev tools? + + Smooks dev tools is a se= t of graphical tools for editing Smooks configuration file + base on Eclipse. +
+ Smooks form editor + + + + + +
+
+
+ How to install Smooks dev tools? + + The Smooks dev tools was = included by the JBoss Tools since 3.0.0 + Beta1 version. You can download the J= Boss Tools from here. + Smooks dev tools (JBoss Tools) run with the latest Eclipse and + other required plug-ins (GEF, EMF, etc.). + You should download the= latest IDE for Java EE developers from this site.= It contains many plug-ins ( + GEF, EMF, etc. ) required by Smooks dev tools. +
+
+ + = + + + + + JBoss Tools + Smooks + JBDS + java + + + Quick Start + This "Quick Start" will sh= ow how to use the Smooks tools to create/edit th= e Smooks + configuration file for Java2Java data transformation. + This chapter should give y= ou a brief understanding of the Smooks de= v tools= . +
+ <diffmk:wrapper diffmk:change=3D"changed">Download Smooks Java-to= -Java Example</diffmk:wrapper> + Visit = here to download the "java-to-java" example project. + + Tip: + + The example project is= base on Maven, you suggest you to create a new eclipse + Java project and copy the example code and .jar files from the example= project paste + them into the eclipse Java project. + +
+
+ <diffmk:wrapper diffmk:change=3D"changed">Smooks Configuration Fi= le Wizard</diffmk:wrapper> + Select the Smooks Java-to-= Java example project what you created and right-click, + select the menu New > Other, then find + S= mooks > Smooks Configuration File. + Click the + Next + button. +
+ <diffmk:wrapper diffmk:change=3D"changed">Selecting Smooks Confi= guration File Wizard</diffmk:wrapper> + + + + + +
+ The first wizard page is a= file path creation page. Select the + src + folder to be the fi= les container, and input the name + n= ewConfig.smooks. Click + N= ext. +
+ <diffmk:wrapper diffmk:change=3D"changed">Choosing the configura= tion file container and the file name</diffmk:wrapper> + + + + + +
+ The second wizard page is a transform data type choose page. + A= s the quick start introduces how to create/edit the Java-to-Java Smooks + configuration file, let's select the + Java-to-Java + type as the source/= target transform data type. + +
+ <diffmk:wrapper diffmk:change=3D"changed">Selecting Data Type</d= iffmk:wrapper> + + + + + +
+ + On the next page you are p= rompted to choose the source data for transformation. + Let's select the Order class from the exampl= e project as + the source JavaBean class. + +
+ <diffmk:wrapper diffmk:change=3D"added">= Selecting the Source Data</diffmk:wrapper> + + + + + +
+ + Th= en the wizard page asks you to choose the target data for transformation. W= e select + the ListOrder class as the target JavaBean c= lass. +
+ <diffmk:wrapper diffmk:change=3D"changed">Selecting the Target D= ata</diffmk:wrapper> + + + + + +
+ + + + + <diffmk:wrapper diffmk:change=3D"added">= Tip:</diffmk:wrapper> + Y= ou can omit two these steps and just press + F= inish.<= /diffmk:wrapper> This wi= ll open the empty + Smooks Configuration file. It's possible to select source/target data afterwards + in the Smooks Graph editor. + +
+
+ <diffmk:wrapper diffmk:change=3D"changed">Smooks Editor</diffmk:w= rapper> + + When all the wizard steps = are passed, a new Smooks Configuration file is created and + the Smooks Editor will be opened automatical= ly: +
+ <diffmk:wrapper diffmk:change=3D"changed">Smooks Editor</diffmk:= wrapper> + + + + + +
+ + This editor contains seve= ral parts: + <diffmk:wrapper diffmk:change=3D"added"= >The Smooks Editor Parts</diffmk:wrapper> + + + + + + + + Editor feature + Functionality + + + + + + + + Problems area + + + If there are any errors when you are editing the file, the + Problems area will display them + + + + + + Source data tree + + + The tree will display the structure of transformed source + data + + + + + + Target data tree + + + The tree will display the structure of transformed target + data + + + + + + Mapping graphical area + + + Show the data mapping connection lines + + + + + + Source/Target data selection links + + + Click the link, an= d Data Selection wizard<= diffmk:wrapper diffmk:change=3D"changed"> will be opened helping you to + choose the source/target data + + + + +
+
+
+ +
+ <diffmk:wrapper diffmk:change=3D"changed">Choosing the Source/Tar= get Data</diffmk:wrapper> + + To= choose the transform data you should make use of the data selection links:= + + + + + Source Select + for selecting sou= rce data + + + + + Target Select + for selecting tar= get data + + + + After clicking the link th= e Data Type Selection wizard will be + opened, and there are two data types on the list: Java and XML. + + Note + There will be more and= more data types on the list as the development went on. + + + +
+ <diffmk:wrapper diffmk:change=3D"changed">Data Type Wizard</diff= mk:wrapper> + + + + + +
+ + Select the + Java + data type and click= Next, you will + see the JavaBean class selection page: + +
+ <diffmk:wrapper diffmk:change=3D"changed">JavaBean Data Selectio= n</diffmk:wrapper> + + + + + +
+ + When you select all the ne= cessary java classes, click + Finish + and the structure o= f the java class will be displayed on the source/target + data tree. +
+ <diffmk:wrapper diffmk:change=3D"changed">Displaying the Structu= re of the Transformed Data</diffmk:wrapper> + + + + + +
+
+ +
+ Mapping + + As you see, the source/= target data tree displays the structure of the java class. + How to map it? + = + First, you should know wha= t to transform: + + + + Bind the + "customerName" + property of the <= /diffmk:wrapper>Order#header to the + "customerName" + property of LineOrder. + + + Bind the + "customerNumber" + property of the <= /diffmk:wrapper>Order#header to the + "customerId" + property of LineOrder. + + + Bind the + "price" + property of the <= /diffmk:wrapper>OrderItem to the + "unitPrice" + property of LineItem. + + + Bind the + "productId" + property of the <= /diffmk:wrapper>OrderItem to the + "productCode" + property of LineItem. + + + Bind the + "quantity" + property of the <= /diffmk:wrapper>OrderItem to the + "unitQuantity" + property of LineItem. + + + + Make sense? + OK, let's select the + "customerName" + item of the + "header" + item on the source = data tree and start to drag it. When the drag item + crosses the Mapping graphical area, you will see a connection line. Dro= p the item onto + the + "customerName" + of the LineOrder on the target data + view. + Now a dialog is opened = asking you to connect the root node: + +
+ Dialog Asking You to Connect to the Root Nodes + + + + + +
+ Please, click + Yes + to connect the root= node. If you don't do that, this dialog will be + opened again when you connect other nodes. + + <diffmk:wrapper diffmk:change=3D"changed">Note:</diffmk:wrapper>= + Please, remember that: = The root nodes of the source data and target data *MUST* be + connected. + This rule is not only f= or Java-to-Java, but the same is also relevant for + XML-to-Java + + Now let's do the same ope= ration with the + "customerNumber", that is what you + should see: +
+ Correctly Mapping Editor + + + + + +
+ Next, you are going to bin= d the properties of the OrderItem to + the properties of the LineItem. + Select the + "price" + and drag it onto th= e + "unitPrice" + of the other side t= ree viewer. The Problems area will show an + error: +
+ Connection Error 1 + + + + + +
+ How to deal with the err= or? + Please click the + Fix it link, a menu is popped-up with several + resolve methods on it. +
+ <diffmk:wrapper diffmk:change=3D"added">= Fixing the Connection Error</diffmk:wrapper> + + + + + +
+ Select the first resolve = method: + 'Connect the "OrderItem" to the + "LineItem" '. As the result the + "OrderItem" is connected with + the + "LineItem". + But the notify message a= rea still shows some other errors: +
+ Connection Error 2 + + + + + +
+ OK, let's deal with the fi= re error. Click the + Fix it link and + select the first resolve method. The + "orderItems" is connected with + the + "lineItems". + = + + <diffmk:wrapper diffmk:change=3D"changed">Tip:</diffmk:wrapper><= /title> + <para><diffmk:wrapper diffmk:change=3D"changed"> Why does the error occ= ur?</diffmk:wrapper></para> + <para><diffmk:wrapper diffmk:change=3D"changed"> You will find that, if= you only connect the property node without connecting the + parent node of the property, the "connection error" occurs.</diffmk:wr= apper></para> + <para><diffmk:wrapper diffmk:change=3D"changed">The connection of the "= price-to-unitPrice" is the + "Binding Connection", but it needs an "Instance Creation + Connection" - the connection of the + "OrderItem-to-LineItem".</diffmk:wrapper></para> + </tip> + <para><diffmk:wrapper diffmk:change=3D"added"> After that, connect </dif= fmk:wrapper><emphasis diffmk:change=3D"added"> + <property diffmk:change=3D"added" moreinfo=3D"none"><diffmk:wrapper dif= fmk:change=3D"added">"quantity"</diffmk:wrapper></property></emphasis><diff= mk:wrapper diffmk:change=3D"added"> to the </diffmk:wrapper><emphasis diffm= k:change=3D"added"> + <property diffmk:change=3D"added" moreinfo=3D"none"><diffmk:wrapper di= ffmk:change=3D"added">"unitQuantity"</diffmk:wrapper></property></emphasis>= <diffmk:wrapper diffmk:change=3D"added"> and </diffmk:wrapper><emphasis dif= fmk:change=3D"added"> + <property diffmk:change=3D"added" moreinfo=3D"none"><diffmk:wrapper d= iffmk:change=3D"added">"productId"</diffmk:wrapper></property></emphasis><d= iffmk:wrapper diffmk:change=3D"added"> to the + </diffmk:wrapper><emphasis diffmk:change=3D"added"> + <property diffmk:change=3D"added" moreinfo=3D"none"><diffmk:wrapper di= ffmk:change=3D"added">"productCode"</diffmk:wrapper></property><diffmk:wrap= per diffmk:change=3D"added">:</diffmk:wrapper></emphasis></para> + <figure float=3D"0"> + <title><diffmk:wrapper diffmk:change=3D"changed">Complete Mapping</diff= mk:wrapper> + + + + + + + Now, you should save the f= ile and the Smooks tools= will generate the corre= ct + configuration file content. + OK, let run the test class= : example.Main. (Please, make sure that the Smoo= ks engine + loads the correct configuration file). + Success! +
+
+ + = + + + + + JBoss Tools + Smooks + JBDS + + + Smooks Graphical Editor Page + + Smooks Graphical Editor pag= e is one tab of the Smooks Editor. +
+ Graphical Editor + + + + + +
+ + This Graphical editor allows you to perform drug/drop operations + with the nodes of transform data to map the source data to target data. = + When you save the change= s in the Graphical editor the correct Smooks Configuration file + content will be generated. +
+ + <diffmk:wrapper diffmk:change=3D"changed">Introducing the areas o= f graphical editor</diffmk:wrapper> + Information on the topic= could be found in the Quick Start/Smooks Editor section. +
+
+ + <diffmk:wrapper diffmk:change=3D"changed">Load Source/Target Data= </diffmk:wrapper> + Click the links under the= data view, the Data Type Selection wizar= d page = will be + shown. +
+ <diffmk:wrapper diffmk:change=3D"changed">Data Type Selection Wi= zard Page</diffmk:wrapper> + + + + + + + +
+ + There are sets of transfo= rm data type on the wizard page, select one type and click + Next, the data source= selection wizard + page will be shown. + + + <diffmk:wrapper diffmk:change=3D"changed">Note:</diffmk:wrapper>= + For different data type= , the Data source selection wizard are different too. + + +
+ <diffmk:wrapper diffmk:change=3D"changed">Java Data Source Selec= tion Wizard Page</diffmk:wrapper> + + + + + + + +
+ +
+ <diffmk:wrapper diffmk:change=3D"changed">XML File Path Selectio= n Wizard Page</diffmk:wrapper> + + + + + + + +
+ + When you finish the data = selection (file path selection), click + Finish, the data view= will display the + selected data structure. +
+
+ + <diffmk:wrapper diffmk:change=3D"changed">Using Graphical Editor = for Mapping</diffmk:wrapper> + To get information on th= e topic please, read the Quick Start/Mapping section. +
+
+ + <diffmk:wrapper diffmk:change=3D"changed">Error Messages</diffmk:= wrapper> + When you do any mapping op= erations, the Smooks tools validate the + file content with "Mapping Logic". If there are any errors of the confi= guration file + content, error messages are shown in the Proble= ms + area= . + Please, read the Quick Start/Mapping section to + find how to fix the errors. +
+
+ <diffmk:wrapper diffmk:change=3D"changed">Properties View</diffmk= :wrapper> + + You can edit the properti= es of the connection lines with the Prope= rties + view. + Navigate to Window > Show View= > Other > + Properties, to open the Properties + view. + When you select on the co= nnection lines, the Properties view + will show a set of section GUI for editing the properties of the connec= tion line. + + + <diffmk:wrapper diffmk:change=3D"changed">Tip:</diffmk:wrapper><= /title> + <para><diffmk:wrapper diffmk:change=3D"added">This GUI on the </diffmk:= wrapper><property diffmk:change=3D"added" moreinfo=3D"none"><diffmk:wrapper= diffmk:change=3D"added">Properties view</diffmk:wrapper></property><diffmk= :wrapper diffmk:change=3D"added"> is displayed when the Smooks + Graphical editor is active, if not, the </diffmk:wrapper><property dif= fmk:change=3D"added" moreinfo=3D"none"><diffmk:wrapper diffmk:change=3D"add= ed">Properties view</diffmk:wrapper></property><diffmk:wrapper diffmk:chang= e=3D"added"> + displays empty GUI.</diffmk:wrapper></para> + <para><diffmk:wrapper diffmk:change=3D"added">If the source data type o= f the selected connection line is + "XML", the </diffmk:wrapper><property diffmk:change=3D"added" moreinfo= =3D"none"><diffmk:wrapper diffmk:change=3D"added">Properties view</diffmk:w= rapper></property><diffmk:wrapper diffmk:change=3D"added"> shows an XML + Properties section GUI.</diffmk:wrapper></para> + <para><diffmk:wrapper diffmk:change=3D"changed">But if the source data = type of the selected connection line is + "Java", the XML Properties section GUI isn't + displayed.</diffmk:wrapper></para> + <para><diffmk:wrapper diffmk:change=3D"added">It means that if the sour= ce/target data type of the selected connection line is + different, the </diffmk:wrapper><property diffmk:change=3D"added" more= info=3D"none"><diffmk:wrapper diffmk:change=3D"added">Properties view</diff= mk:wrapper></property><diffmk:wrapper diffmk:change=3D"added"> shows differ= ent GUI.</diffmk:wrapper></para> + </tip> + <figure float=3D"0"> + <title>JavaBean Properties Section + + + + + + + + +
+ <diffmk:wrapper diffmk:change=3D"changed">XML Properties Section= </diffmk:wrapper> + + + + + +
+
+ <diffmk:wrapper diffmk:change=3D"changed">Mapping Properties Sec= tion</diffmk:wrapper> + + + + + +
+
+ + + = +
+ + + + + JBoss Tools + Smooks + JBDS + + + Smooks Configuration Editor Page + Smooks Configuration Edito= r Page is one tab of the Smooks Editor. +
+ Graphical Editor + + + + + +
+ + You can add/edit/remove = the Date + Decoder= on the =D0=A1onfiguration page of the Sm= ooks Editor. + The configuration also e= dit the Smooks parse + type = and manage the Import + Files= . + +
+ + <diffmk:wrapper diffmk:change=3D"changed">Smooks Parse Type</diff= mk:wrapper> + Open the = + Other Configurations + section, we will se= e there is a set of radio buttons: + +
+ <diffmk:wrapper diffmk:change=3D"changed">Smooks Parse Types</di= ffmk:wrapper> + + + + + +
+ Select the radio button= to change the Smooks parse type. +
+
+ + <diffmk:wrapper diffmk:change=3D"changed">Import File</diffmk:wra= pper> + Open the + Other Configurations + section, there is a= n + Import Files + list under the Smoo= ks parse type buttons. + +
+ Import File + + + + + +
+ + There are three buttons on= the right side of the + File Import + list. You can click= those to add/edit/remove the import files. + + + + <diffmk:wrapper diffmk:change=3D"changed">Tip:</diffmk:wrapper><= /title> + <para><diffmk:wrapper diffmk:change=3D"changed"> If the import file dos= en't exist, the image of the import file will change to + "Error Image". If you double-click the import file in the Import File = list, the file + will be open with a new default editor. </diffmk:wrapper></para> + + </tip> + </section> + <section id=3D"configurationpage_datedecoder"> + <title>Date Decoder Detail Page + + Date Decoder is a resour= ceConfig element in the Smooks configuration file. It + describes how to transform the "Date" type. + Click the + New + button to open the = New Resource Type wizard= + dialog. +
+ Resource Type Selection Wizard + + + + + +
+ + There are several resource= type on the list. Select the + Date Decoder + and click the + Finish + button, a new + Date Decoder + item was added and = shown on the resource type list. + There are several paramet= ers in the + Date Decoder + resourceConfig elem= ent: + + + + + + locale-language + + + + + format + + + + locale-country + + + + + + You can modify the parame= ters of the + Date Decoder item with the left detail page. + +
+ Date Decoder Detail Page + + + + + +
+ + When you defined a new + Date Decoder, they can use the JavaBean Properties GUI to set the + them to be the "Java type". + + +
+ + + + = +
+ + + + + JBoss Tools + Smooks + JBDS + + + Smooks Source Editor Page +
+ XML Source Editor + You can use this editor = to edit the Smooks Configuration file directly. +
+ Graphical Editor + + + + + +
+
+
+ Error Messages GUI + If the Smooks tools can't understand the configuration + file or the configuration file is illegal (XML structure isn't right fo= r Smooks + Configuration file, etc.), the error will be underlined. +
+ Graphical Editor + + + + + +
+ + +
+ + +
+
--===============0985656909888531194==--