camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r850309 - in /websites/production/camel/content: bindy.html book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache
Date Tue, 12 Feb 2013 07:24:08 GMT
Author: buildbot
Date: Tue Feb 12 07:24:08 2013
New Revision: 850309

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/bindy.html
    websites/production/camel/content/book-dataformat-appendix.html
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/cache/main.pageCache

Modified: websites/production/camel/content/bindy.html
==============================================================================
--- websites/production/camel/content/bindy.html (original)
+++ websites/production/camel/content/bindy.html Tue Feb 12 07:24:08 2013
@@ -77,14 +77,14 @@
         <td valign="top" width="100%">
 <div class="wiki-content maincontent"><h2><a shape="rect" name="Bindy-Bindy"></a>Bindy</h2>
 
-<p>The idea that the developers has followed to design this component was to allow the parsing/binding of non structured data (or to be more precise non-XML data)<br clear="none">
-to Java Bean using annotations. Using Bindy, you can bind data like :</p>
-<ul class="alternate" type="square"><li>CSV record,</li><li>Fixedlength record,</li><li>FIX messages,</li><li>or any other non-structured data</li></ul>
+<p>The goal of this component is to allow the parsing/binding of non-structured data (or to be more precise non-XML data)<br clear="none">
+to/from Java Beans that have binding mappings defined with annotations. Using Bindy, you can bind data from sources such as :</p>
+<ul class="alternate" type="square"><li>CSV records,</li><li>Fixed-length records,</li><li>FIX messages,</li><li>or almost any other non-structured data</li></ul>
 
 
-<p>to one or many Plain Old Java Object (POJO) and to convert the data according to the type of the java property. POJO  can be linked together and relation one to many is available in some cases. Moreover, for data type like Date, Double, Float, Integer, Short, Long and BigDecimal, you can provide the pattern to apply during the formatting of the property.</p>
+<p>to one or many Plain Old Java Object (POJO). Bindy converts the data according to the type of the java property. POJOs can be linked together with one-to-many relationships available in some cases. Moreover, for data type like Date, Double, Float, Integer, Short, Long and BigDecimal, you can provide the pattern to apply during the formatting of the property.</p>
 
-<p>For the BigDecimal number, you can also define the precision and the decimal or grouping separators</p>
+<p>For the BigDecimal numbers, you can also define the precision and the decimal or grouping separators.</p>
 
 <div class="table-wrap">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Type </th><th colspan="1" rowspan="1" class="confluenceTh"> Format Type </th><th colspan="1" rowspan="1" class="confluenceTh"> Pattern example </th><th colspan="1" rowspan="1" class="confluenceTh"> Link </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> Date </td><td colspan="1" rowspan="1" class="confluenceTd"> DateFormat </td><td colspan="1" rowspan="1" class="confluenceTd"> "dd-MM-yyyy" </td><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html" rel="nofollow">http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> Decimal* </td><td colspan="1" rowspan="1" class="confluenceTd"> Decimalformat </td><td colspan="1" rowspan="1" class="confluenceTd"> "##.###.###" </td><td colspan="
 1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html" rel="nofollow">http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html</a> </td></tr></tbody></table>
@@ -92,7 +92,7 @@ to Java Bean using annotations. Using Bi
 
 <p>Decimal* = Double, Integer, Float, Short, Long</p>
 <div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Format supported</b><br clear="none">This first release only support comma separated values fields and key value pair fields (e.g. : FIX messages).</td></tr></table></div>
-<p>To work with camel-bindy, you must first define your model in a package (e.g. com.acme.model) and for each model class (e.g. Order, Client, Instrument, ...) associate the required annotations (described hereafter) with Class or property name.</p>
+<p>To work with camel-bindy, you must first define your model in a package (e.g. com.acme.model) and for each model class (e.g. Order, Client, Instrument, ...) add the required annotations (described hereafter) to the Class or field.</p>
 
 <h2><a shape="rect" name="Bindy-Annotations"></a>Annotations</h2>
 
@@ -330,7 +330,7 @@ Remark : In this case, the first and las
 
 
 <div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pos </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - digit number starting from 1 to ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - will be used to format Decimal, Date, ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the length of the field for fixed length format </td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"> precision </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the precision to be used when the Decimal number will be formatted/parsed </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - is used by the Java Formater (SimpleDateFormat by example) to format/validate data </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> position </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - must be used when the position of the field in the CSV generated must be different compare to pos </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> required </td><td colspan="1" rowspan="1" class="conflu
 enceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> trim </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> defaultValue </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - defines the field's default value when the respective CSV field is empty/not available </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> impliedDecimalSeparator </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> optional - default value = "false" - Indicates if there is a decimal point implied at a specified location </td></tr></tbo
 dy></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pos </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - digit number starting from 1 to ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - will be used to format Decimal, Date, ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the length of the field for fixed length format </td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"> precision </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the precision to be used when the Decimal number will be formatted/parsed </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - is used by the Java Formater (SimpleDateFormat by example) to format/validate data </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> position </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - must be used when the position of the field in the CSV generated must be different compare to pos </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> required </td><td colspan="1" rowspan="1" class="conflu
 enceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> trim </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> defaultValue </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - defines the field's default value when the respective CSV field is empty/not available </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> impliedDecimalSeparator </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> optional - default value = "false" - Indicates if there is a decimal point implied at a specified location </td></tr><tr><
 td colspan="1" rowspan="1" class="confluenceTd"> lengthPos </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b>: optional - can be used to identify&#160;a data field in a fixed-length record that defines the fixed length for this field </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> delimiter </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> optional - can be used to demarcate the end of a variable-length field within a fixed-length record </td></tr></tbody></table>
 </div>
 
 
@@ -563,9 +563,8 @@ Remark : In this case, the first and las
 
 <h3><a shape="rect" name="Bindy-4.FixedLengthRecord"></a>4. FixedLengthRecord</h3>
 
-<p>The FixedLengthRecord annotation is used to identified the root class of the model. It represents a record = a line of a file/message containing data fixed length formatted<br clear="none">
-and can be linked to several children model classes. This format is a bit particular beause data of a field can be aligned to the right or to the left.<br clear="none">
-When the size of the data does not fill completely the length of the field, then we add 'padd' characters.</p>
+<p>The FixedLengthRecord annotation is used to identified the root class of the model. It represents a record = a line of a file/message containing data fixed length formatted and can be linked to several children model classes. This format is a bit particular beause data of a field can be aligned to the right or to the left.<br clear="none">
+When the size of the data does not fill completely the length of the field, we can then add 'padd' characters.</p>
 
 <div class="table-wrap">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Annotation name </th><th colspan="1" rowspan="1" class="confluenceTh"> Record type </th><th colspan="1" rowspan="1" class="confluenceTh"> Level </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <b>FixedLengthRecord</b> </td><td colspan="1" rowspan="1" class="confluenceTd"> fixed </td><td colspan="1" rowspan="1" class="confluenceTd"> Class </td></tr></tbody></table>
@@ -573,10 +572,12 @@ When the size of the data does not fill 
 
 
 <div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> crlf </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = WINDOWS - allow to define the carriage return character to use </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> paddingChar </td><td colspan="1" rowspan="1" class="confluenceTd"> char </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - default value = '  ' </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory = size of the fixed length record </td></tr><tr><td colspan="1" row
 span="1" class="confluenceTd"> hasHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - NOT YET IMPLEMENTED </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> hasFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - NOT YET IMPLEMENTED </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> This annotation is associated to the root class of the model and must be declared one time. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> crlf </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = WINDOWS - allow to define the carriage return character to use </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> paddingChar </td><td colspan="1" rowspan="1" class="confluenceTd"> char </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - default value = '  ' </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory = size of the fixed length record </td></tr><tr><td colspan="1" row
 span="1" class="confluenceTd"> hasHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Indicates that the record(s) of this type may be preceded by a single header record at the beginning of the file / stream </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> hasFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional -  Indicates that the record(s) of this type may be followed by a single footer record at the end of the file / stream </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> skipHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Configures the data format to skip marshalling / unmarshalling of the header record.  Configure this parameter on
  the primary record (e.g., not the header or footer). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> skipFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Configures the data format to skip marshalling / unmarshalling of the footer record Configure this parameter on the primary record (e.g., not the header or footer).. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> isHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Identifies this FixedLengthRecord as a header record </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> isFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Identifies this FixedLengthRecords as a footer r
 ecord </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> This annotation is associated to the root class of the model and must be declared one time. </td></tr></tbody></table>
 </div>
 
 
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">The hasHeader/hasFooter parameters are mutually exclusive with isHeader/isFooter.  A record may not be both a header/footer and a primary fixed-length record.</td></tr></table></div>
+
 <p><b>case 1 : Simple fixed length record</b></p>
 
 <p>This simple example shows how to design the model to parse/format a fixed message</p>
@@ -718,6 +719,181 @@ When the size of the data does not fill 
 </pre>
 </div></div>
 
+<p><b>case 4: Fixed length record with delimiter</b></p>
+
+<p>Fixed-length records sometimes have delimited content within the record. The firstName and lastName fields are delimited with the '^' character in the following example:</p>
+
+<p>10A9Pauline^M^ISINXD12345678BUYShare000002500.45USD01-08-2009</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Fixed-delimited</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+    @FixedLengthRecord()
+    <span class="code-keyword">public</span> <span class="code-keyword">static</span> class Order {
+
+        @DataField(pos = 1, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">int</span> orderNr;
+
+        @DataField(pos = 2, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> clientNr;
+
+        @DataField(pos = 3, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> firstName;
+
+        @DataField(pos = 4, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> lastName;
+
+        @DataField(pos = 5, length = 4)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentCode;
+
+        @DataField(pos = 6, length = 10)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentNumber;
+
+        @DataField(pos = 7, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> orderType;
+
+        @DataField(pos = 8, length = 5)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentType;
+
+        @DataField(pos = 9, precision = 2, length = 12, paddingChar = '0')
+        <span class="code-keyword">private</span> BigDecimal amount;
+
+        @DataField(pos = 10, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> currency;
+
+        @DataField(pos = 11, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+        <span class="code-keyword">private</span> Date orderDate;
+</pre>
+</div></div>
+
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">As of <b>Camel 2.11</b> the 'pos' value(s) in a fixed-length record may optionally be defined using ordinal, sequential values instead of precise column numbers.</td></tr></table></div>
+
+<p><b>case 5 : Fixed length record with record-defined field length</b></p>
+
+<p>Occasionally a fixed-length record may contain a field that define the expected length of another field within the same record.  In the following example the length of the instrumentNumber field value is defined by the value of instrumentNumberLen field in the record.</p>
+
+<p>10A9Pauline^M^ISIN10XD12345678BUYShare000002500.45USD01-08-2009</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Fixed-delimited</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+    @FixedLengthRecord()
+    <span class="code-keyword">public</span> <span class="code-keyword">static</span> class Order {
+
+        @DataField(pos = 1, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">int</span> orderNr;
+
+        @DataField(pos = 2, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> clientNr;
+
+        @DataField(pos = 3, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> firstName;
+
+        @DataField(pos = 4, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> lastName;
+
+        @DataField(pos = 5, length = 4)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentCode;
+
+        @DataField(pos = 6, length = 2, align = <span class="code-quote">"R"</span>, paddingChar = '0')
+        <span class="code-keyword">private</span> <span class="code-object">int</span> instrumentNumberLen;
+        
+        @DataField(pos = 7, lengthPos=6)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentNumber;
+
+        @DataField(pos = 8, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> orderType;
+
+        @DataField(pos = 9, length = 5)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentType;
+
+        @DataField(pos = 10, precision = 2, length = 12, paddingChar = '0')
+        <span class="code-keyword">private</span> BigDecimal amount;
+
+        @DataField(pos = 11, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> currency;
+
+        @DataField(pos = 12, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+        <span class="code-keyword">private</span> Date orderDate;
+</pre>
+</div></div>
+
+
+<p><b>case 6 : Fixed length record with header and footer</b></p>
+
+<p>Bindy will discover fixed-length header and footer records that are configured as part of the model &#8211; provided that the annotated classes exist either in the same package as the primary @FixedLengthRecord class, or within one of the configured scan packages. The following text illustrates two fixed-length records that are bracketed by a header record and footer record.</p>
+
+<p>101-08-2009<br clear="none">
+10A9  PaulineM    ISINXD12345678BUYShare000002500.45USD01-08-2009<br clear="none">
+10A9     RichN    ISINXD12345678BUYShare000002700.45USD01-08-2009<br clear="none">
+9000000002</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Fixed-header-and-footer-main-class</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+@FixedLengthRecord(hasHeader = <span class="code-keyword">true</span>, hasFooter = <span class="code-keyword">true</span>)
+<span class="code-keyword">public</span> class Order {
+
+    @DataField(pos = 1, length = 2)
+    <span class="code-keyword">private</span> <span class="code-object">int</span> orderNr;
+
+    @DataField(pos = 2, length = 2)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> clientNr;
+
+    @DataField(pos = 3, length = 9)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> firstName;
+
+    @DataField(pos = 4, length = 5, align = <span class="code-quote">"L"</span>)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> lastName;
+
+    @DataField(pos = 5, length = 4)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentCode;
+
+    @DataField(pos = 6, length = 10)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentNumber;
+
+    @DataField(pos = 7, length = 3)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> orderType;
+
+    @DataField(pos = 8, length = 5)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentType;
+
+    @DataField(pos = 9, precision = 2, length = 12, paddingChar = '0')
+    <span class="code-keyword">private</span> BigDecimal amount;
+
+    @DataField(pos = 10, length = 3)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> currency;
+
+    @DataField(pos = 11, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+    <span class="code-keyword">private</span> Date orderDate;
+...
+}
+
+
+@FixedLengthRecord(isHeader = <span class="code-keyword">true</span>)
+<span class="code-keyword">public</span>  class OrderHeader {
+    @DataField(pos = 1, length = 1)
+    <span class="code-keyword">private</span> <span class="code-object">int</span> recordType = 1;
+    
+    @DataField(pos = 2, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+    <span class="code-keyword">private</span> Date recordDate;
+    
+...
+}
+
+
+@FixedLengthRecord(isFooter = <span class="code-keyword">true</span>)
+<span class="code-keyword">public</span> class OrderFooter {
+    
+    @DataField(pos = 1, length = 1)
+    <span class="code-keyword">private</span> <span class="code-object">int</span> recordType = 9;
+    
+    @DataField(pos = 2, length = 9, align = <span class="code-quote">"R"</span>, paddingChar = '0')
+    <span class="code-keyword">private</span> <span class="code-object">int</span> numberOfRecordsInTheFile;
+
+...
+}
+
+</pre>
+</div></div>
+
 <h3><a shape="rect" name="Bindy-5.Message"></a>5. Message</h3>
 
 <p>The Message annotation is used to identified the class of your model who will contain key value pairs fields. This kind of format is used mainly in Financial Exchange Protocol Messages (FIX). Nevertheless, this annotation can be used for any other format where data are identified by keys. The key pair values are separated each other by a separator which can be a special character like a tab delimitor (unicode representation : \u0009) or a start of heading (unicode representation : \u0001)</p>
@@ -1089,6 +1265,7 @@ from(<span class="code-quote">"file:<spa
 </div></div>
 
 <h4><a shape="rect" name="Bindy-Marshaling"></a>Marshaling</h4>
+
 <p>To generate CSV records from a collection of model objects, you create the following route :</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">

Modified: websites/production/camel/content/book-dataformat-appendix.html
==============================================================================
--- websites/production/camel/content/book-dataformat-appendix.html (original)
+++ websites/production/camel/content/book-dataformat-appendix.html Tue Feb 12 07:24:08 2013
@@ -1182,14 +1182,14 @@ from(<span class="code-quote">"file:<spa
 </div></div>
 <h2><a shape="rect" name="BookDataFormatAppendix-Bindy"></a>Bindy</h2>
 
-<p>The idea that the developers has followed to design this component was to allow the parsing/binding of non structured data (or to be more precise non-XML data)<br clear="none">
-to Java Bean using annotations. Using Bindy, you can bind data like :</p>
-<ul class="alternate" type="square"><li>CSV record,</li><li>Fixedlength record,</li><li>FIX messages,</li><li>or any other non-structured data</li></ul>
+<p>The goal of this component is to allow the parsing/binding of non-structured data (or to be more precise non-XML data)<br clear="none">
+to/from Java Beans that have binding mappings defined with annotations. Using Bindy, you can bind data from sources such as :</p>
+<ul class="alternate" type="square"><li>CSV records,</li><li>Fixed-length records,</li><li>FIX messages,</li><li>or almost any other non-structured data</li></ul>
 
 
-<p>to one or many Plain Old Java Object (POJO) and to convert the data according to the type of the java property. POJO  can be linked together and relation one to many is available in some cases. Moreover, for data type like Date, Double, Float, Integer, Short, Long and BigDecimal, you can provide the pattern to apply during the formatting of the property.</p>
+<p>to one or many Plain Old Java Object (POJO). Bindy converts the data according to the type of the java property. POJOs can be linked together with one-to-many relationships available in some cases. Moreover, for data type like Date, Double, Float, Integer, Short, Long and BigDecimal, you can provide the pattern to apply during the formatting of the property.</p>
 
-<p>For the BigDecimal number, you can also define the precision and the decimal or grouping separators</p>
+<p>For the BigDecimal numbers, you can also define the precision and the decimal or grouping separators.</p>
 
 <div class="table-wrap">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Type </th><th colspan="1" rowspan="1" class="confluenceTh"> Format Type </th><th colspan="1" rowspan="1" class="confluenceTh"> Pattern example </th><th colspan="1" rowspan="1" class="confluenceTh"> Link </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> Date </td><td colspan="1" rowspan="1" class="confluenceTd"> DateFormat </td><td colspan="1" rowspan="1" class="confluenceTd"> "dd-MM-yyyy" </td><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html" rel="nofollow">http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> Decimal* </td><td colspan="1" rowspan="1" class="confluenceTd"> Decimalformat </td><td colspan="1" rowspan="1" class="confluenceTd"> "##.###.###" </td><td colspan="
 1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html" rel="nofollow">http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html</a> </td></tr></tbody></table>
@@ -1197,7 +1197,7 @@ to Java Bean using annotations. Using Bi
 
 <p>Decimal* = Double, Integer, Float, Short, Long</p>
 <div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Format supported</b><br clear="none">This first release only support comma separated values fields and key value pair fields (e.g. : FIX messages).</td></tr></table></div>
-<p>To work with camel-bindy, you must first define your model in a package (e.g. com.acme.model) and for each model class (e.g. Order, Client, Instrument, ...) associate the required annotations (described hereafter) with Class or property name.</p>
+<p>To work with camel-bindy, you must first define your model in a package (e.g. com.acme.model) and for each model class (e.g. Order, Client, Instrument, ...) add the required annotations (described hereafter) to the Class or field.</p>
 
 <h2><a shape="rect" name="BookDataFormatAppendix-Annotations"></a>Annotations</h2>
 
@@ -1435,7 +1435,7 @@ Remark : In this case, the first and las
 
 
 <div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pos </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - digit number starting from 1 to ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - will be used to format Decimal, Date, ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the length of the field for fixed length format </td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"> precision </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the precision to be used when the Decimal number will be formatted/parsed </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - is used by the Java Formater (SimpleDateFormat by example) to format/validate data </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> position </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - must be used when the position of the field in the CSV generated must be different compare to pos </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> required </td><td colspan="1" rowspan="1" class="conflu
 enceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> trim </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> defaultValue </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - defines the field's default value when the respective CSV field is empty/not available </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> impliedDecimalSeparator </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> optional - default value = "false" - Indicates if there is a decimal point implied at a specified location </td></tr></tbo
 dy></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pos </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - digit number starting from 1 to ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - will be used to format Decimal, Date, ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the length of the field for fixed length format </td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"> precision </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the precision to be used when the Decimal number will be formatted/parsed </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - is used by the Java Formater (SimpleDateFormat by example) to format/validate data </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> position </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - must be used when the position of the field in the CSV generated must be different compare to pos </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> required </td><td colspan="1" rowspan="1" class="conflu
 enceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> trim </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> defaultValue </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - defines the field's default value when the respective CSV field is empty/not available </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> impliedDecimalSeparator </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> optional - default value = "false" - Indicates if there is a decimal point implied at a specified location </td></tr><tr><
 td colspan="1" rowspan="1" class="confluenceTd"> lengthPos </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b>: optional - can be used to identify&#160;a data field in a fixed-length record that defines the fixed length for this field </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> delimiter </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> optional - can be used to demarcate the end of a variable-length field within a fixed-length record </td></tr></tbody></table>
 </div>
 
 
@@ -1668,9 +1668,8 @@ Remark : In this case, the first and las
 
 <h3><a shape="rect" name="BookDataFormatAppendix-4.FixedLengthRecord"></a>4. FixedLengthRecord</h3>
 
-<p>The FixedLengthRecord annotation is used to identified the root class of the model. It represents a record = a line of a file/message containing data fixed length formatted<br clear="none">
-and can be linked to several children model classes. This format is a bit particular beause data of a field can be aligned to the right or to the left.<br clear="none">
-When the size of the data does not fill completely the length of the field, then we add 'padd' characters.</p>
+<p>The FixedLengthRecord annotation is used to identified the root class of the model. It represents a record = a line of a file/message containing data fixed length formatted and can be linked to several children model classes. This format is a bit particular beause data of a field can be aligned to the right or to the left.<br clear="none">
+When the size of the data does not fill completely the length of the field, we can then add 'padd' characters.</p>
 
 <div class="table-wrap">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Annotation name </th><th colspan="1" rowspan="1" class="confluenceTh"> Record type </th><th colspan="1" rowspan="1" class="confluenceTh"> Level </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <b>FixedLengthRecord</b> </td><td colspan="1" rowspan="1" class="confluenceTd"> fixed </td><td colspan="1" rowspan="1" class="confluenceTd"> Class </td></tr></tbody></table>
@@ -1678,10 +1677,12 @@ When the size of the data does not fill 
 
 
 <div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> crlf </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = WINDOWS - allow to define the carriage return character to use </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> paddingChar </td><td colspan="1" rowspan="1" class="confluenceTd"> char </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - default value = '  ' </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory = size of the fixed length record </td></tr><tr><td colspan="1" row
 span="1" class="confluenceTd"> hasHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - NOT YET IMPLEMENTED </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> hasFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - NOT YET IMPLEMENTED </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> This annotation is associated to the root class of the model and must be declared one time. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> crlf </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = WINDOWS - allow to define the carriage return character to use </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> paddingChar </td><td colspan="1" rowspan="1" class="confluenceTd"> char </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - default value = '  ' </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory = size of the fixed length record </td></tr><tr><td colspan="1" row
 span="1" class="confluenceTd"> hasHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Indicates that the record(s) of this type may be preceded by a single header record at the beginning of the file / stream </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> hasFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional -  Indicates that the record(s) of this type may be followed by a single footer record at the end of the file / stream </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> skipHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Configures the data format to skip marshalling / unmarshalling of the header record.  Configure this parameter on
  the primary record (e.g., not the header or footer). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> skipFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Configures the data format to skip marshalling / unmarshalling of the footer record Configure this parameter on the primary record (e.g., not the header or footer).. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> isHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Identifies this FixedLengthRecord as a header record </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> isFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Identifies this FixedLengthRecords as a footer r
 ecord </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> This annotation is associated to the root class of the model and must be declared one time. </td></tr></tbody></table>
 </div>
 
 
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">The hasHeader/hasFooter parameters are mutually exclusive with isHeader/isFooter.  A record may not be both a header/footer and a primary fixed-length record.</td></tr></table></div>
+
 <p><b>case 1 : Simple fixed length record</b></p>
 
 <p>This simple example shows how to design the model to parse/format a fixed message</p>
@@ -1823,6 +1824,181 @@ When the size of the data does not fill 
 </pre>
 </div></div>
 
+<p><b>case 4: Fixed length record with delimiter</b></p>
+
+<p>Fixed-length records sometimes have delimited content within the record. The firstName and lastName fields are delimited with the '^' character in the following example:</p>
+
+<p>10A9Pauline^M^ISINXD12345678BUYShare000002500.45USD01-08-2009</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Fixed-delimited</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+    @FixedLengthRecord()
+    <span class="code-keyword">public</span> <span class="code-keyword">static</span> class Order {
+
+        @DataField(pos = 1, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">int</span> orderNr;
+
+        @DataField(pos = 2, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> clientNr;
+
+        @DataField(pos = 3, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> firstName;
+
+        @DataField(pos = 4, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> lastName;
+
+        @DataField(pos = 5, length = 4)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentCode;
+
+        @DataField(pos = 6, length = 10)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentNumber;
+
+        @DataField(pos = 7, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> orderType;
+
+        @DataField(pos = 8, length = 5)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentType;
+
+        @DataField(pos = 9, precision = 2, length = 12, paddingChar = '0')
+        <span class="code-keyword">private</span> BigDecimal amount;
+
+        @DataField(pos = 10, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> currency;
+
+        @DataField(pos = 11, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+        <span class="code-keyword">private</span> Date orderDate;
+</pre>
+</div></div>
+
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">As of <b>Camel 2.11</b> the 'pos' value(s) in a fixed-length record may optionally be defined using ordinal, sequential values instead of precise column numbers.</td></tr></table></div>
+
+<p><b>case 5 : Fixed length record with record-defined field length</b></p>
+
+<p>Occasionally a fixed-length record may contain a field that define the expected length of another field within the same record.  In the following example the length of the instrumentNumber field value is defined by the value of instrumentNumberLen field in the record.</p>
+
+<p>10A9Pauline^M^ISIN10XD12345678BUYShare000002500.45USD01-08-2009</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Fixed-delimited</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+    @FixedLengthRecord()
+    <span class="code-keyword">public</span> <span class="code-keyword">static</span> class Order {
+
+        @DataField(pos = 1, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">int</span> orderNr;
+
+        @DataField(pos = 2, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> clientNr;
+
+        @DataField(pos = 3, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> firstName;
+
+        @DataField(pos = 4, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> lastName;
+
+        @DataField(pos = 5, length = 4)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentCode;
+
+        @DataField(pos = 6, length = 2, align = <span class="code-quote">"R"</span>, paddingChar = '0')
+        <span class="code-keyword">private</span> <span class="code-object">int</span> instrumentNumberLen;
+        
+        @DataField(pos = 7, lengthPos=6)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentNumber;
+
+        @DataField(pos = 8, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> orderType;
+
+        @DataField(pos = 9, length = 5)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentType;
+
+        @DataField(pos = 10, precision = 2, length = 12, paddingChar = '0')
+        <span class="code-keyword">private</span> BigDecimal amount;
+
+        @DataField(pos = 11, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> currency;
+
+        @DataField(pos = 12, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+        <span class="code-keyword">private</span> Date orderDate;
+</pre>
+</div></div>
+
+
+<p><b>case 6 : Fixed length record with header and footer</b></p>
+
+<p>Bindy will discover fixed-length header and footer records that are configured as part of the model &#8211; provided that the annotated classes exist either in the same package as the primary @FixedLengthRecord class, or within one of the configured scan packages. The following text illustrates two fixed-length records that are bracketed by a header record and footer record.</p>
+
+<p>101-08-2009<br clear="none">
+10A9  PaulineM    ISINXD12345678BUYShare000002500.45USD01-08-2009<br clear="none">
+10A9     RichN    ISINXD12345678BUYShare000002700.45USD01-08-2009<br clear="none">
+9000000002</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Fixed-header-and-footer-main-class</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+@FixedLengthRecord(hasHeader = <span class="code-keyword">true</span>, hasFooter = <span class="code-keyword">true</span>)
+<span class="code-keyword">public</span> class Order {
+
+    @DataField(pos = 1, length = 2)
+    <span class="code-keyword">private</span> <span class="code-object">int</span> orderNr;
+
+    @DataField(pos = 2, length = 2)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> clientNr;
+
+    @DataField(pos = 3, length = 9)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> firstName;
+
+    @DataField(pos = 4, length = 5, align = <span class="code-quote">"L"</span>)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> lastName;
+
+    @DataField(pos = 5, length = 4)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentCode;
+
+    @DataField(pos = 6, length = 10)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentNumber;
+
+    @DataField(pos = 7, length = 3)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> orderType;
+
+    @DataField(pos = 8, length = 5)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentType;
+
+    @DataField(pos = 9, precision = 2, length = 12, paddingChar = '0')
+    <span class="code-keyword">private</span> BigDecimal amount;
+
+    @DataField(pos = 10, length = 3)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> currency;
+
+    @DataField(pos = 11, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+    <span class="code-keyword">private</span> Date orderDate;
+...
+}
+
+
+@FixedLengthRecord(isHeader = <span class="code-keyword">true</span>)
+<span class="code-keyword">public</span>  class OrderHeader {
+    @DataField(pos = 1, length = 1)
+    <span class="code-keyword">private</span> <span class="code-object">int</span> recordType = 1;
+    
+    @DataField(pos = 2, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+    <span class="code-keyword">private</span> Date recordDate;
+    
+...
+}
+
+
+@FixedLengthRecord(isFooter = <span class="code-keyword">true</span>)
+<span class="code-keyword">public</span> class OrderFooter {
+    
+    @DataField(pos = 1, length = 1)
+    <span class="code-keyword">private</span> <span class="code-object">int</span> recordType = 9;
+    
+    @DataField(pos = 2, length = 9, align = <span class="code-quote">"R"</span>, paddingChar = '0')
+    <span class="code-keyword">private</span> <span class="code-object">int</span> numberOfRecordsInTheFile;
+
+...
+}
+
+</pre>
+</div></div>
+
 <h3><a shape="rect" name="BookDataFormatAppendix-5.Message"></a>5. Message</h3>
 
 <p>The Message annotation is used to identified the class of your model who will contain key value pairs fields. This kind of format is used mainly in Financial Exchange Protocol Messages (FIX). Nevertheless, this annotation can be used for any other format where data are identified by keys. The key pair values are separated each other by a separator which can be a special character like a tab delimitor (unicode representation : \u0009) or a start of heading (unicode representation : \u0001)</p>
@@ -2194,6 +2370,7 @@ from(<span class="code-quote">"file:<spa
 </div></div>
 
 <h4><a shape="rect" name="BookDataFormatAppendix-Marshaling"></a>Marshaling</h4>
+
 <p>To generate CSV records from a collection of model objects, you create the following route :</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Tue Feb 12 07:24:08 2013
@@ -12204,14 +12204,14 @@ from(<span class="code-quote">"file:<spa
 </div></div>
 <h2><a shape="rect" name="BookInOnePage-Bindy"></a>Bindy</h2>
 
-<p>The idea that the developers has followed to design this component was to allow the parsing/binding of non structured data (or to be more precise non-XML data)<br clear="none">
-to Java Bean using annotations. Using Bindy, you can bind data like :</p>
-<ul class="alternate" type="square"><li>CSV record,</li><li>Fixedlength record,</li><li>FIX messages,</li><li>or any other non-structured data</li></ul>
+<p>The goal of this component is to allow the parsing/binding of non-structured data (or to be more precise non-XML data)<br clear="none">
+to/from Java Beans that have binding mappings defined with annotations. Using Bindy, you can bind data from sources such as :</p>
+<ul class="alternate" type="square"><li>CSV records,</li><li>Fixed-length records,</li><li>FIX messages,</li><li>or almost any other non-structured data</li></ul>
 
 
-<p>to one or many Plain Old Java Object (POJO) and to convert the data according to the type of the java property. POJO  can be linked together and relation one to many is available in some cases. Moreover, for data type like Date, Double, Float, Integer, Short, Long and BigDecimal, you can provide the pattern to apply during the formatting of the property.</p>
+<p>to one or many Plain Old Java Object (POJO). Bindy converts the data according to the type of the java property. POJOs can be linked together with one-to-many relationships available in some cases. Moreover, for data type like Date, Double, Float, Integer, Short, Long and BigDecimal, you can provide the pattern to apply during the formatting of the property.</p>
 
-<p>For the BigDecimal number, you can also define the precision and the decimal or grouping separators</p>
+<p>For the BigDecimal numbers, you can also define the precision and the decimal or grouping separators.</p>
 
 <div class="table-wrap">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Type </th><th colspan="1" rowspan="1" class="confluenceTh"> Format Type </th><th colspan="1" rowspan="1" class="confluenceTh"> Pattern example </th><th colspan="1" rowspan="1" class="confluenceTh"> Link </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> Date </td><td colspan="1" rowspan="1" class="confluenceTd"> DateFormat </td><td colspan="1" rowspan="1" class="confluenceTd"> "dd-MM-yyyy" </td><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html" rel="nofollow">http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> Decimal* </td><td colspan="1" rowspan="1" class="confluenceTd"> Decimalformat </td><td colspan="1" rowspan="1" class="confluenceTd"> "##.###.###" </td><td colspan="
 1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html" rel="nofollow">http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html</a> </td></tr></tbody></table>
@@ -12219,7 +12219,7 @@ to Java Bean using annotations. Using Bi
 
 <p>Decimal* = Double, Integer, Float, Short, Long</p>
 <div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Format supported</b><br clear="none">This first release only support comma separated values fields and key value pair fields (e.g. : FIX messages).</td></tr></table></div>
-<p>To work with camel-bindy, you must first define your model in a package (e.g. com.acme.model) and for each model class (e.g. Order, Client, Instrument, ...) associate the required annotations (described hereafter) with Class or property name.</p>
+<p>To work with camel-bindy, you must first define your model in a package (e.g. com.acme.model) and for each model class (e.g. Order, Client, Instrument, ...) add the required annotations (described hereafter) to the Class or field.</p>
 
 <h2><a shape="rect" name="BookInOnePage-Annotations"></a>Annotations</h2>
 
@@ -12457,7 +12457,7 @@ Remark : In this case, the first and las
 
 
 <div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pos </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - digit number starting from 1 to ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - will be used to format Decimal, Date, ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the length of the field for fixed length format </td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"> precision </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the precision to be used when the Decimal number will be formatted/parsed </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - is used by the Java Formater (SimpleDateFormat by example) to format/validate data </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> position </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - must be used when the position of the field in the CSV generated must be different compare to pos </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> required </td><td colspan="1" rowspan="1" class="conflu
 enceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> trim </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> defaultValue </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - defines the field's default value when the respective CSV field is empty/not available </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> impliedDecimalSeparator </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> optional - default value = "false" - Indicates if there is a decimal point implied at a specified location </td></tr></tbo
 dy></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pos </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - digit number starting from 1 to ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - will be used to format Decimal, Date, ... </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the length of the field for fixed length format </td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"> precision </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - represents the precision to be used when the Decimal number will be formatted/parsed </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> pattern </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - is used by the Java Formater (SimpleDateFormat by example) to format/validate data </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> position </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - must be used when the position of the field in the CSV generated must be different compare to pos </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> required </td><td colspan="1" rowspan="1" class="conflu
 enceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> trim </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "false" </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> defaultValue </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = "" - defines the field's default value when the respective CSV field is empty/not available </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> impliedDecimalSeparator </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> optional - default value = "false" - Indicates if there is a decimal point implied at a specified location </td></tr><tr><
 td colspan="1" rowspan="1" class="confluenceTd"> lengthPos </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b>: optional - can be used to identify&#160;a data field in a fixed-length record that defines the fixed length for this field </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> delimiter </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> optional - can be used to demarcate the end of a variable-length field within a fixed-length record </td></tr></tbody></table>
 </div>
 
 
@@ -12690,9 +12690,8 @@ Remark : In this case, the first and las
 
 <h3><a shape="rect" name="BookInOnePage-4.FixedLengthRecord"></a>4. FixedLengthRecord</h3>
 
-<p>The FixedLengthRecord annotation is used to identified the root class of the model. It represents a record = a line of a file/message containing data fixed length formatted<br clear="none">
-and can be linked to several children model classes. This format is a bit particular beause data of a field can be aligned to the right or to the left.<br clear="none">
-When the size of the data does not fill completely the length of the field, then we add 'padd' characters.</p>
+<p>The FixedLengthRecord annotation is used to identified the root class of the model. It represents a record = a line of a file/message containing data fixed length formatted and can be linked to several children model classes. This format is a bit particular beause data of a field can be aligned to the right or to the left.<br clear="none">
+When the size of the data does not fill completely the length of the field, we can then add 'padd' characters.</p>
 
 <div class="table-wrap">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Annotation name </th><th colspan="1" rowspan="1" class="confluenceTh"> Record type </th><th colspan="1" rowspan="1" class="confluenceTh"> Level </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <b>FixedLengthRecord</b> </td><td colspan="1" rowspan="1" class="confluenceTd"> fixed </td><td colspan="1" rowspan="1" class="confluenceTd"> Class </td></tr></tbody></table>
@@ -12700,10 +12699,12 @@ When the size of the data does not fill 
 
 
 <div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> crlf </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = WINDOWS - allow to define the carriage return character to use </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> paddingChar </td><td colspan="1" rowspan="1" class="confluenceTd"> char </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - default value = '  ' </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory = size of the fixed length record </td></tr><tr><td colspan="1" row
 span="1" class="confluenceTd"> hasHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - NOT YET IMPLEMENTED </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> hasFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - NOT YET IMPLEMENTED </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> This annotation is associated to the root class of the model and must be declared one time. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Parameter name </th><th colspan="1" rowspan="1" class="confluenceTh"> type </th><th colspan="1" rowspan="1" class="confluenceTh"> Info </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> crlf </td><td colspan="1" rowspan="1" class="confluenceTd"> string </td><td colspan="1" rowspan="1" class="confluenceTd"> optional - default value = WINDOWS - allow to define the carriage return character to use </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> paddingChar </td><td colspan="1" rowspan="1" class="confluenceTd"> char </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory - default value = '  ' </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> length </td><td colspan="1" rowspan="1" class="confluenceTd"> int </td><td colspan="1" rowspan="1" class="confluenceTd"> mandatory = size of the fixed length record </td></tr><tr><td colspan="1" row
 span="1" class="confluenceTd"> hasHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Indicates that the record(s) of this type may be preceded by a single header record at the beginning of the file / stream </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> hasFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional -  Indicates that the record(s) of this type may be followed by a single footer record at the end of the file / stream </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> skipHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Configures the data format to skip marshalling / unmarshalling of the header record.  Configure this parameter on
  the primary record (e.g., not the header or footer). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> skipFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Configures the data format to skip marshalling / unmarshalling of the footer record Configure this parameter on the primary record (e.g., not the header or footer).. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> isHeader </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Identifies this FixedLengthRecord as a header record </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> isFooter </td><td colspan="1" rowspan="1" class="confluenceTd"> boolean </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11</b> - optional - Identifies this FixedLengthRecords as a footer r
 ecord </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> This annotation is associated to the root class of the model and must be declared one time. </td></tr></tbody></table>
 </div>
 
 
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">The hasHeader/hasFooter parameters are mutually exclusive with isHeader/isFooter.  A record may not be both a header/footer and a primary fixed-length record.</td></tr></table></div>
+
 <p><b>case 1 : Simple fixed length record</b></p>
 
 <p>This simple example shows how to design the model to parse/format a fixed message</p>
@@ -12845,6 +12846,181 @@ When the size of the data does not fill 
 </pre>
 </div></div>
 
+<p><b>case 4: Fixed length record with delimiter</b></p>
+
+<p>Fixed-length records sometimes have delimited content within the record. The firstName and lastName fields are delimited with the '^' character in the following example:</p>
+
+<p>10A9Pauline^M^ISINXD12345678BUYShare000002500.45USD01-08-2009</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Fixed-delimited</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+    @FixedLengthRecord()
+    <span class="code-keyword">public</span> <span class="code-keyword">static</span> class Order {
+
+        @DataField(pos = 1, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">int</span> orderNr;
+
+        @DataField(pos = 2, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> clientNr;
+
+        @DataField(pos = 3, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> firstName;
+
+        @DataField(pos = 4, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> lastName;
+
+        @DataField(pos = 5, length = 4)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentCode;
+
+        @DataField(pos = 6, length = 10)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentNumber;
+
+        @DataField(pos = 7, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> orderType;
+
+        @DataField(pos = 8, length = 5)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentType;
+
+        @DataField(pos = 9, precision = 2, length = 12, paddingChar = '0')
+        <span class="code-keyword">private</span> BigDecimal amount;
+
+        @DataField(pos = 10, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> currency;
+
+        @DataField(pos = 11, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+        <span class="code-keyword">private</span> Date orderDate;
+</pre>
+</div></div>
+
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">As of <b>Camel 2.11</b> the 'pos' value(s) in a fixed-length record may optionally be defined using ordinal, sequential values instead of precise column numbers.</td></tr></table></div>
+
+<p><b>case 5 : Fixed length record with record-defined field length</b></p>
+
+<p>Occasionally a fixed-length record may contain a field that define the expected length of another field within the same record.  In the following example the length of the instrumentNumber field value is defined by the value of instrumentNumberLen field in the record.</p>
+
+<p>10A9Pauline^M^ISIN10XD12345678BUYShare000002500.45USD01-08-2009</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Fixed-delimited</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+    @FixedLengthRecord()
+    <span class="code-keyword">public</span> <span class="code-keyword">static</span> class Order {
+
+        @DataField(pos = 1, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">int</span> orderNr;
+
+        @DataField(pos = 2, length = 2)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> clientNr;
+
+        @DataField(pos = 3, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> firstName;
+
+        @DataField(pos = 4, delimiter = <span class="code-quote">"^"</span>)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> lastName;
+
+        @DataField(pos = 5, length = 4)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentCode;
+
+        @DataField(pos = 6, length = 2, align = <span class="code-quote">"R"</span>, paddingChar = '0')
+        <span class="code-keyword">private</span> <span class="code-object">int</span> instrumentNumberLen;
+        
+        @DataField(pos = 7, lengthPos=6)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentNumber;
+
+        @DataField(pos = 8, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> orderType;
+
+        @DataField(pos = 9, length = 5)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentType;
+
+        @DataField(pos = 10, precision = 2, length = 12, paddingChar = '0')
+        <span class="code-keyword">private</span> BigDecimal amount;
+
+        @DataField(pos = 11, length = 3)
+        <span class="code-keyword">private</span> <span class="code-object">String</span> currency;
+
+        @DataField(pos = 12, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+        <span class="code-keyword">private</span> Date orderDate;
+</pre>
+</div></div>
+
+
+<p><b>case 6 : Fixed length record with header and footer</b></p>
+
+<p>Bindy will discover fixed-length header and footer records that are configured as part of the model &#8211; provided that the annotated classes exist either in the same package as the primary @FixedLengthRecord class, or within one of the configured scan packages. The following text illustrates two fixed-length records that are bracketed by a header record and footer record.</p>
+
+<p>101-08-2009<br clear="none">
+10A9  PaulineM    ISINXD12345678BUYShare000002500.45USD01-08-2009<br clear="none">
+10A9     RichN    ISINXD12345678BUYShare000002700.45USD01-08-2009<br clear="none">
+9000000002</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Fixed-header-and-footer-main-class</b></div><div class="codeContent panelContent">
+<pre class="code-java">
+@FixedLengthRecord(hasHeader = <span class="code-keyword">true</span>, hasFooter = <span class="code-keyword">true</span>)
+<span class="code-keyword">public</span> class Order {
+
+    @DataField(pos = 1, length = 2)
+    <span class="code-keyword">private</span> <span class="code-object">int</span> orderNr;
+
+    @DataField(pos = 2, length = 2)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> clientNr;
+
+    @DataField(pos = 3, length = 9)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> firstName;
+
+    @DataField(pos = 4, length = 5, align = <span class="code-quote">"L"</span>)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> lastName;
+
+    @DataField(pos = 5, length = 4)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentCode;
+
+    @DataField(pos = 6, length = 10)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentNumber;
+
+    @DataField(pos = 7, length = 3)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> orderType;
+
+    @DataField(pos = 8, length = 5)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> instrumentType;
+
+    @DataField(pos = 9, precision = 2, length = 12, paddingChar = '0')
+    <span class="code-keyword">private</span> BigDecimal amount;
+
+    @DataField(pos = 10, length = 3)
+    <span class="code-keyword">private</span> <span class="code-object">String</span> currency;
+
+    @DataField(pos = 11, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+    <span class="code-keyword">private</span> Date orderDate;
+...
+}
+
+
+@FixedLengthRecord(isHeader = <span class="code-keyword">true</span>)
+<span class="code-keyword">public</span>  class OrderHeader {
+    @DataField(pos = 1, length = 1)
+    <span class="code-keyword">private</span> <span class="code-object">int</span> recordType = 1;
+    
+    @DataField(pos = 2, length = 10, pattern = <span class="code-quote">"dd-MM-yyyy"</span>)
+    <span class="code-keyword">private</span> Date recordDate;
+    
+...
+}
+
+
+@FixedLengthRecord(isFooter = <span class="code-keyword">true</span>)
+<span class="code-keyword">public</span> class OrderFooter {
+    
+    @DataField(pos = 1, length = 1)
+    <span class="code-keyword">private</span> <span class="code-object">int</span> recordType = 9;
+    
+    @DataField(pos = 2, length = 9, align = <span class="code-quote">"R"</span>, paddingChar = '0')
+    <span class="code-keyword">private</span> <span class="code-object">int</span> numberOfRecordsInTheFile;
+
+...
+}
+
+</pre>
+</div></div>
+
 <h3><a shape="rect" name="BookInOnePage-5.Message"></a>5. Message</h3>
 
 <p>The Message annotation is used to identified the class of your model who will contain key value pairs fields. This kind of format is used mainly in Financial Exchange Protocol Messages (FIX). Nevertheless, this annotation can be used for any other format where data are identified by keys. The key pair values are separated each other by a separator which can be a special character like a tab delimitor (unicode representation : \u0009) or a start of heading (unicode representation : \u0001)</p>
@@ -13216,6 +13392,7 @@ from(<span class="code-quote">"file:<spa
 </div></div>
 
 <h4><a shape="rect" name="BookInOnePage-Marshaling"></a>Marshaling</h4>
+
 <p>To generate CSV records from a collection of model objects, you create the following route :</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.



Mime
View raw message