Author: smukhina
Date: 2010-01-25 11:45:45 -0500 (Mon, 25 Jan 2010)
New Revision: 19913
Added:
trunk/smooks/docs/reference/en/modules/process_page.xml
Modified:
trunk/smooks/docs/reference/en/modules/introduction.xml
Log:
https://jira.jboss.org/jira/brows/JBDS-821 Smooks editor is redesigned - new functinality
is described
Modified: trunk/smooks/docs/reference/en/modules/introduction.xml
===================================================================
--- trunk/smooks/docs/reference/en/modules/introduction.xml 2010-01-25 16:45:08 UTC (rev
19912)
+++ trunk/smooks/docs/reference/en/modules/introduction.xml 2010-01-25 16:45:45 UTC (rev
19913)
@@ -37,7 +37,7 @@
<entry><para>Smooks Configuration File
Wizard</para></entry>
<entry><para>Smooks tools allows to create/edit the Smooks
configuration file for Java2Java data transformation.</para></entry>
<entry>
- <link linkend="config_file_wizzard">Smooks Configuration File
Wizard</link>
+ <!--<link linkend="config_file_wizzard">-->Smooks
Configuration File Wizard<!--</link>-->
</entry>
</row>
@@ -45,7 +45,7 @@
<entry><para>Smooks Editor</para></entry>
<entry><para>Smooks Editor helps configure the created Smooks
configuration file.</para></entry>
<entry>
- <link linkend="quickstart_formeditor">Smooks Editor</link>
+ <!--<link linkend="quickstart_formeditor">-->Smooks
Editor<!--</link>-->
</entry>
</row>
@@ -105,7 +105,7 @@
</imageobject>
</mediaobject>
</figure>
- <para> For More informations about <property>Smooks</property>,
please visit <ulink
+ <para> For more informations about <property>Smooks</property>,
please visit <ulink
url="http://www.smooks.org">Smooks official
site</ulink>.</para>
</section>
<section>
@@ -121,6 +121,11 @@
</imageobject>
</mediaobject>
</figure>
+ <para>The easiest way to use the Smooks Configuration Editor is to create a
project
+ (Java project, an ESB project, etc.), right-click on it and select <property>New
-> Other</property>
+ to open the New wizard. Drill into <property>Smooks -> Smooks Configuration
File</property>
+ and continue through the wizard. We recommend using a minimum Smooks level of 1.1 or
1.2, but if you're using it in a deployed service, it depends on what version your
runtime supports.
+ Once the file is created, it will open in the Smooks Configuration
Editor.</para>
</section>
<section>
<title>How to install Smooks dev tools?</title>
@@ -133,7 +138,24 @@
<para> You should download the latest IDE for Java EE developers from <ulink
url="http://www.eclipse.org/downloads/"> Eclipse site</ulink>. It
contains many plug-ins (
GEF, EMF, etc. ) required by Smooks dev tools. </para>
-
+ <para>The Smooks Configuration depends on having all of the appropriate Smooks
runtime jars in the path of the Eclipse Plug-in or Java Project in the Eclipse workspace.
+
+ The easiest solution is to do the following:
+ <itemizedlist>
+ <listitem><para>1) Download the Smooks distribution from here:
http://www.smooks.org/mediawiki/index.php?title=Downloads .
+ Grab the latest "ALL" distribution (as of today, it is the Smooks v.1.2.2
"ALL" distribution) and it will include binaries, examples,
etc.</para></listitem>
+ <listitem><para>2) Extract files from the archive somewhere on your
machine.</para></listitem>
+ <listitem><para>3) In your Eclipse workspace, copy the Smooks jars into a
directory of your Eclipse plug-in or Java project named
"lib".</para></listitem>
+ <listitem><para>4) For your Eclipse Plug-in or Java Project, right-click
on the project and select Properties.</para></listitem>
+ <listitem><para>5) Select the "Java Build Path" item in the
Properties list, select the Libraries tab, and click "Add JARs"
+ </para></listitem>
+ <listitem><para>6) In the Jar Selection dialog, select all the jars in
the "lib" directory mentioned in step 3 and click
<property>OK</property>.
+ </para></listitem>
+ <listitem><para>7) Click <property>OK</property> to close the
Properties dialog. Now you should see a "Referenced Libraries" node that
appeared in your project hierarchy in Eclipse.
+ </para></listitem>
+ </itemizedlist>
+
+ </para>
<para>Now let's progress to more advanced topics.</para>
</section>
Added: trunk/smooks/docs/reference/en/modules/process_page.xml
===================================================================
--- trunk/smooks/docs/reference/en/modules/process_page.xml (rev
0)
+++ trunk/smooks/docs/reference/en/modules/process_page.xml 2010-01-25 16:45:45 UTC (rev
19913)
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="process_page">
+ <?dbhtml filename="process_page.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Smooks</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Process Page</title>
+ <para>This chapter describes Process tab of the Smooks Configuration File
editor, gives short recommendations how this tab can be used during the project
configuring.</para>
+
+ <section>
+ <title>Input Task Configuring</title>
+ <para>
+ <property>Input task configuring</property> is an obligatory step
for your smooks project creation.
+ You can do this on the Process page of the editor: look for the "Input
Task" in the Process Map at the top of the page.
+ </para>
+ <figure>
+ <title>Input Task Configuring</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/process_page/process1.png"
scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Select it and you will see all the properties to set for the Input
reader of your Smooks configuration.
+ "Input type" corresponds to the type of data that you will be
working with.
+ For example, to work with incoming CSV (Comma-separated Values) data, you
would specify "CSV" in the drop-down list.
+ Each reader type has slightly different configuration details that must be set
in the "Input configuration" area.
+ For instance, the CSV reader requires you to specify details such as the
encoding, quote character, separator character, and the list of incoming fields.
+ The EDI reader requires the encoding and the path to the Mapping Model
describing the incoming data.
+ In the "Input data" section, you specify some sample data that
conforms to your reader configuration.
+ </para>
+
+ <para>
+ Once you've specified your reader configuration and sample data, you can
see the input model rendered in a tree form in the "Input model" section.
+ On the picture below you can see the correct configuration of some XML input
task.
+ </para>
+ <figure>
+ <title>Input Task Configuring</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/process_page/process2.png"
scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+
+
+ <section>
+ <title>"Java Mapping" or "Apply
Template"?</title>
+
+ <para>Though there are many options in Smooks as far as what you can do
with input
+ data such as transformation, routing, and persistence, the first release
+ of the Smooks Configuration Editor focuses on just a couple of areas:
+ mapping to java and applying templates to create different output formats.
+ If you have a set of Java classes you want to use the incoming data for,
+ you can use the "Java Mapping" task to specify those classes and
use drag and
+ drop to map between the input model generated by the reader and elements in
the output model.
+ Or if you simply want to transform your output to one or more formats, you
can use the "Apply Template"
+ task to map it to a CSV file, XML or XSD file (and other formats in the
future).
+ </para>
+ </section>
+ <section id="mapping">
+ <title>Java Mapping</title>
+
+ <para>
+ If you decide to do Java Mapping, you need to make sure that your Input
reader has been set up and you have some sample data specified.
+ Then you should select the "Input Task" in the Process tab and
click the plus (+) sign to the right of the icon.
+ Select "Java Mapping" from the popup menu and it will appear to the
right, connected to the "Input Task". Then select the "Java Mapping"
task.
+ </para>
+ <figure>
+ <title>Java Mapping configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/process_page/process3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Another method of adding "Java Mapping" element to the
canvas in the Processing Tasks section is to right click Input Task element and select in
the popup menu </para>
+ <figure>
+ <title>Java Mapping configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/process_page/process4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Right-click on the canvas in an empty space and select "Add ->Java
Class".
+ </para>
+ <figure>
+ <title>Java Mapping configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/process_page/process5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ The "Java Bean Creation" wizard appears.
+ Specify a unique identifier for the new class, the class path, whether
it's an array or not, and if it is a collection, also specify the collection class.
+ If the Java class is specified, you'll see a list of the properties in
the box below.
+ Click Finish when you're done.
+ Now with the input and output models on the canvas, you can click and drag
from the various input elements to corresponding output elements. Make sure to connect
collection elements to corresponding collection elements.
+ Finally your mapping should look nearly like the one on the picture below.
+ </para>
+ <figure>
+ <title>Final Mapping schema</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/process_page/process6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>"Apply Template" task</title>
+
+ <para>The "Apply Template" task works very similarly to the
<link linkend="mapping">"Java Mapping" task</link>, where
you map between an input model and an output model.
+ Select the "Input Task" or "Java Mapping" task you want
to use as the input model in the Process Map pane and click the plus (+) sign to the right
of the icon.
+ </para>
+ <figure>
+ <title>"Apply Template" task opening</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/process_page/process7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Select "Apply Template" from the popup menu and it will appear to
the right, connected to the task you created it from. Then select the "Apply
Template" task.
+ Once you've defined your template model, you can click and drag from the
various input elements to corresponding output elements in the template. Make sure to
connect collection elements to corresponding collection elements
+ </para>
+ </section>
+</chapter>
+