camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r929863 - in /websites/production/camel/content: cache/main.pageCache univocity-parsers-formats.html
Date Thu, 20 Nov 2014 13:19:58 GMT
Author: buildbot
Date: Thu Nov 20 13:19:58 2014
New Revision: 929863

Log:
Production update by buildbot for camel

Added:
    websites/production/camel/content/univocity-parsers-formats.html
Modified:
    websites/production/camel/content/cache/main.pageCache

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

Added: websites/production/camel/content/univocity-parsers-formats.html
==============================================================================
--- websites/production/camel/content/univocity-parsers-formats.html (added)
+++ websites/production/camel/content/univocity-parsers-formats.html Thu Nov 20 13:19:58 2014
@@ -0,0 +1,228 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+<head>
+    <link href="//camel.apache.org/styles/site.css" rel="stylesheet" type="text/css">
+    <link href="//camel.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css">
+    <script src="//camel.apache.org/styles/prototype.js" type="text/javascript"></script>
+    <script src="//camel.apache.org/styles/rico.js" type="text/javascript"></script>
   
+    <script src="//camel.apache.org/styles/site.js" type="text/javascript"></script>
+
+    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+
+    <style type="text/css">
+      .maincontent { overflow:hidden; }
+    </style>
+    <!--[if IE]>
+    <style type="text/css">
+      .maincontent { width:100%; }
+    </style>
+    <![endif]-->
+
+
+  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet'
type='text/css' />
+  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet'
type='text/css' />
+  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
+  
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+
+    <title>
+    Apache Camel: uniVocity-parsers formats
+    </title>
+</head>
+<body>
+<div class="white_box">
+<div class="header">
+  <div class="header_l">
+    <div class="header_r">
+    </div>
+  </div>
+</div>
+<div class="content">
+  <div class="content_l">
+    <div class="content_r">
+      <div>
+          <!-- Banner -->
+<div id="banner-content"><div id="asf_logo">
+	<div id="activemq_logo" style="height:108px; background:transparent url(banner.data/apache-camel-7.png)
no-repeat scroll left top;">
+            <a shape="rect" style="float:left; width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px;
margin-top:20px; margin-left:18px;" href="http://camel.apache.org/">Camel</a>
+            <a shape="rect" style="float:right; width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px;
margin-top:45px; margin-right:10px;" href="http://www.apache.org">Apache</a>
+	</div>
+</div></div>
+          <!-- Banner -->
+        <div class="top_red_bar">
+          <div id="site-breadcrumbs">
+                <!-- Breadcrumbs -->
+<a href="index.html">Apache Camel</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a
href="architecture.html">Architecture</a>&nbsp;&gt;&nbsp;<a href="data-format.html">Data
Format</a>&nbsp;&gt;&nbsp;<a href="univocity-parsers-formats.html">uniVocity-parsers
formats</a>
+          </div>
+          <!-- Quicklinks -->
+<div id="site-quicklinks"><p><a shape="rect" href="download.html">Download</a>
| <a shape="rect" href="javadoc.html">JavaDoc</a> | <a shape="rect" href="source.html">Source</a>
| <a shape="rect" href="discussion-forums.html">Forums</a> | <a shape="rect"
href="support.html">Support</a></p></div>
+          <!-- Quicklinks -->
+        </div>
+
+	<table border="0">
+	<tbody>
+        <tr>
+        <td valign="top" width="100%">
+<div class="wiki-content maincontent"><h2 id="uniVocity-parsersformats-uniVocity-parsers">uniVocity-parsers</h2><p>This&#160;<a
shape="rect" href="data-format.html">Data Format</a>, available since camel 2.15.0,
uses&#160;<a shape="rect" class="external-link" href="http://www.univocity.com/pages/about-parsers"
rel="nofollow">uniVocity-parsers</a> for reading and writing 3 kinds of tabular data
text files:</p><ul><li>CSV (Comma Separated Values), where the values are
separated by a symbol (usually a comma)</li><li>fixed-width, where the values
have known sizes</li><li>TSV (Tabular Separated Values), where the fields are
separated by a tabulation</li></ul><p>Thus there are 3 data formats based
on uniVocity-parsers.</p><h3 id="uniVocity-parsersformats-Options">Options</h3><p>Most
configuration options of the uniVocity-parsers are available in the data formats. If you want
more information about a particular option, please refer to their <a shape="rect" class="external-link"
href="http:
 //www.univocity.com/pages/parsers-documentation" rel="nofollow">documentation page</a>.</p><p>The
3 data formats share common options and have dedicated ones, this section presents them all.</p><h4
id="uniVocity-parsersformats-Commonoptions,sharedbyallthedataformats">Common options, shared
by all the data formats</h4><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">Description</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>nullValue</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>String</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The string representation of a <code>null</code>
value.</p><p>This option is <code>null</code> by default. When <code>null</code>,
it uses the default uniVocity-parser value.</p></td></tr><tr><td
colspan="1" row
 span="1" class="confluenceTd"><code>skipEmptyLines</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Boolean</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not the empty lines must
be ignored.</p><p><span>This option is </span><code>null</code><span>
by default. When </span><code>null</code><span>, it uses the default
uniVocity-parser value.</span></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><code>ignoreTrailingWhitespaces</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Boolean</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not the trailing white
spaces must ignored.</p><p><span>This option is </span><code>null</code><span>
by default. When </span><code>null</code><span>, it uses the default
uniVocity-parser value.</span></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><code>ignoreLeadingWhitespaces</code></td><td
colspan="1" rowspan="1" class="confluenceTd
 "><code>Boolean</code></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether
or not the leading white spaces must be ignored.</p><p><span>This option
is </span><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>headersDisabled</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>boolean</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not the headers are disabled.
When defined, this option explicitly sets the headers as <code>null</code> which
indicates that there is no header.</p><p>This option is <code>false</code>
by default.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>headers</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>String[]</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The headers to use.</p><p><span>This
option is </sp
 an><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>headersExtractionEnabled</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Boolean</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not the header must be
read in the first line of the test document</p><p><span>This option is </span><code>null</code><span>
by default. When </span><code>null</code><span>, it uses the default
uniVocity-parser value.</span></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><code>numberOfRecordsToRead</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Integer</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The maximum number of record to read.</p><p><span>This
option is </span><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniV
 ocity-parser value.</span></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><code>emptyValue</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><code>String</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>The String representation of an empty value</p><p><span>This
option is </span><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>lineSeparator</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>String</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The line separator of the files</p><p><span>This
option is </span><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>normalizedLineSeparator</code></td><td
colspan="1" rowspan="1" cl
 ass="confluenceTd"><code>Character</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The normalized line separator of the files</p><p><span>This
option is </span><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>comment</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Character</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The comment symbol.</p><p><span>This
option is </span><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>lazyLoad</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>boolean</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Whether the unmarshalling should
produce an iterator that reads the lines on the fl
 y or if all the lines must be read at one.</p><p>This option is <code>false</code>
by default.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>asMap</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>boolean</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Whether the unmarshalling should
produce maps for the lines values instead of lists. It requires to have header (either defined
or collected).</p><p>This options is <code>false</code> by default.</p></td></tr></tbody></table></div><h4
id="uniVocity-parsersformats-CSVformatoptions">CSV format options</h4><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">Description</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>quoteAllFields</code></td><td
colspan="1" rowspan="1" class="
 confluenceTd"><code>Boolean</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Whether or not all values must be quoted when writing them.</p><p><span>This
option is </span><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>quote</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Character</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The quote symbol.</p><p><span>This
option is </span><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>quoteEscape</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Character</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The quote escape symbol.</p><p><span>This
option is </span><code>null</c
 ode><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>delimiter</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Character</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The delimiter of values</p><p><span>This
option is </span><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr></tbody></table></div><h4
id="uniVocity-parsersformats-Fixed-widthformatoptions">Fixed-width format options</h4><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">Description</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>fieldLengths</code></td><td
colspan="
 1" rowspan="1" class="confluenceTd"><code>int[]</code></td><td colspan="1"
rowspan="1" class="confluenceTd">This options is required and defines the length of each
values.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>skipTrailingCharsUntilNewline</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Boolean</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not the trailing characters
until new line must be ignored.</p><p><span>This option is </span><code>null</code><span>
by default. When </span><code>null</code><span>, it uses the default
uniVocity-parser value.</span></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><code>recordEndsOnNewLine</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Boolean</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not the record ends on
new line.</p><p><span>This option is </span><code>null</code><span>
by default. When </span><code>
 null</code><span>, it uses the default uniVocity-parser value.</span></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>padding</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Character</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The padding character.</p><p><span>This
option is </span><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr></tbody></table></div><h4
id="uniVocity-parsersformats-TSVformatoptions">TSV format options</h4><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">Description</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>escapeChar</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>Character</code></td
 ><td colspan="1" rowspan="1" class="confluenceTd"><p>The escape character.</p><p><span>This
option is </span><code>null</code><span> by default. When </span><code>null</code><span>,
it uses the default uniVocity-parser value.</span></p></td></tr></tbody></table></div><h3
id="uniVocity-parsersformats-Marshallingusages">Marshalling usages</h3><p>The
marshalling accepts either:</p><ul><li>A list of maps (L<code>ist&lt;Map&lt;String,
?&gt;&gt;</code>), one for each line</li><li>A single map (<code><span>Map&lt;String,
?&gt;</span></code>), for a single line</li></ul><p><span
style="line-height: 1.4285715;">Any other body will throws an exception.</span></p><h4
id="uniVocity-parsersformats-Usageexample:marshallingaMapintoCSVformat">Usage example:
marshalling a Map into CSV format</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td
colspan="1" rowspan="1" class="confluenceTd">Considering the following body</td><td
colspan="1" rowspan="1" class="confluenceTd"><div cla
 ss="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[Map&lt;String,
Object&gt; body = new HashMap&lt;&gt;();
+body.put(&quot;A&quot;, &quot;one&quot;);
+body.put(&quot;B&quot;, &quot;two&quot;);
+body.put(&quot;C&quot;, &quot;three&quot;);]]></script>
+</div></div></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">and
this Java route definition</td><td colspan="1" rowspan="1" class="confluenceTd"><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;direct:input&quot;)
+    .marshal(new UniVocityCsvDataFormat())
+    .to(&quot;mock:result&quot;);]]></script>
+</div></div></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">or
this XML route definition</td><td colspan="1" rowspan="1" class="confluenceTd"><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
+    &lt;from uri=&quot;direct:input&quot;/&gt;
+    &lt;marshal&gt;
+        &lt;univocity-csv/&gt;
+    &lt;/marshal&gt;
+    &lt;to uri=&quot;mock:result&quot;/&gt;
+&lt;/route&gt;]]></script>
+</div></div></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">then
it will produce</td><td colspan="1" rowspan="1" class="confluenceTd"><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[one,two,three]]></script>
+</div></div></td></tr></tbody></table></div><h4
id="uniVocity-parsersformats-Usageexample:marshallingaMapintofixed-widthformat">Usage example:
marshalling a Map into fixed-width format</h4><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>Considering
the following body</span></td><td colspan="1" rowspan="1" class="confluenceTd"><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[Map&lt;String,
Object&gt; body = new HashMap&lt;&gt;();
+body.put(&quot;A&quot;, &quot;one&quot;);
+body.put(&quot;B&quot;, &quot;two&quot;);
+body.put(&quot;C&quot;, &quot;three&quot;);]]></script>
+</div></div></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>and
this Java route definition</span></td><td colspan="1" rowspan="1" class="confluenceTd"><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;direct:input&quot;)
+    .marshal(new UniVocityFixedWidthDataFormat()
+        .setFieldLengths(new int[] {5, 5, 5})
+        .padding(&#39;_&#39;)
+    )
+    .to(&quot;mock:result&quot;);]]></script>
+</div></div></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td
colspan="1" rowspan="1" class="confluenceTd"><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
+    &lt;from uri=&quot;direct:input&quot;/&gt;
+    &lt;marshal&gt;
+        &lt;univocity-fixed padding=&quot;_&quot;&gt;
+            &lt;univocity-header length=&quot;5&quot;/&gt;
+            &lt;univocity-header length=&quot;5&quot;/&gt;
+            &lt;univocity-header length=&quot;5&quot;/&gt;
+        &lt;/univocity-fixed&gt;
+    &lt;/marshal&gt;
+    &lt;to uri=&quot;mock:result&quot;/&gt;
+&lt;/route&gt;]]></script>
+</div></div></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>then
it will produce</span></td><td colspan="1" rowspan="1" class="confluenceTd"><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[one__two__three]]></script>
+</div></div></td></tr></tbody></table></div><h4
id="uniVocity-parsersformats-Usageexample:marshallingaMapintoTSVformat"><span style="line-height:
1.5;">Usage example: marshalling a Map into TSV format</span></h4><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>Considering
the following body</span></td><td colspan="1" rowspan="1" class="confluenceTd"><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[Map&lt;String,
Object&gt; body = new HashMap&lt;&gt;();
+body.put(&quot;A&quot;, &quot;one&quot;);
+body.put(&quot;B&quot;, &quot;two&quot;);
+body.put(&quot;C&quot;, &quot;three&quot;);]]></script>
+</div></div></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>and
this Java route definition</span></td><td colspan="1" rowspan="1" class="confluenceTd"><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;direct:input&quot;)
+    .marshal(new UniVocityTsvDataFormat())
+    .to(&quot;mock:result&quot;);]]></script>
+</div></div></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>or
this XML route definition</span></td><td colspan="1" rowspan="1" class="confluenceTd"><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
+    &lt;from uri=&quot;direct:input&quot;/&gt;
+    &lt;marshal&gt;
+        &lt;univocity-tsv/&gt;
+    &lt;/marshal&gt;
+    &lt;to uri=&quot;mock:result&quot;/&gt;
+&lt;/route&gt;]]></script>
+</div></div></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>then
it will produce</span></td><td colspan="1" rowspan="1" class="confluenceTd"><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[one
two three]]></script>
+</div></div><p>(with tabs separating the values)</p></td></tr></tbody></table></div><h3
id="uniVocity-parsersformats-Unmarshallingusages">Unmarshalling usages</h3><p>&#160;</p><p>&#160;</p><p>&#160;</p><h3
id="uniVocity-parsersformats-Dependencies">Dependencies</h3><p>To use CSV in
your Camel routes you need to add a dependency on&#160;<strong>camel-csv</strong>,
which implements this data format.</p><p><span style="line-height: 1.4285715;">If
you use Maven you can just add the following to your pom.xml, substituting the version number
for the latest and greatest release (see&#160;</span><a shape="rect" href="https://cwiki.apache.org/confluence/display/CAMEL/Download"
style="line-height: 1.4285715;">the download page for the latest versions</a><span
style="line-height: 1.4285715;">).</span></p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+    &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+    &lt;artifactId&gt;camel-univocity-parsers&lt;/artifactId&gt;
+    &lt;version&gt;x.x.x&lt;/version&gt;
+&lt;/dependency&gt;]]></script>
+</div></div></div>
+        </td>
+        <td valign="top">
+          <div class="navigation">
+            <div class="navigation_top">
+                <!-- NavigationBar -->
+<div class="navigation_bottom" id="navigation_bottom"><h3 id="Navigation-Overview"><a
shape="rect" href="overview.html">Overview</a></h3><ul class="alternate"><li><a
shape="rect" href="index.html">Home</a></li><li><a shape="rect" href="download.html">Download</a></li><li><a
shape="rect" href="getting-started.html">Getting Started</a></li><li><a
shape="rect" href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul class="alternate"><li><a
shape="rect" href="user-guide.html">User Guide</a></li><li><a shape="rect"
href="manual.html">Manual</a></li><li><a shape="rect" href="books.html">Books</a></li><li><a
shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect" href="cookbook.html">Cookbook</a></li><li><a
shape="rect" href="architecture.html">Architecture</a></li><li><a
shape="rect" href="enterprise-integration-patterns.html">Enterprise
  Integration Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a
shape="rect" href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect" href="languages.html">Languages</a></li><li><a
shape="rect" href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form enctype="application/x-www-form-urlencoded"
method="get" id="cse-search-box" action="http://www.google.com/cse">
+  <div>
+    <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
+    <input type="hidden" name="ie" value="UTF-8">
+    <input type="text" name="q" size="21">
+    <input type="submit" name="sa" value="Search">
+  </div>
+</form>
+<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script><h3
id="Navigation-Community"><a shape="rect" href="community.html">Community</a></h3><ul
class="alternate"><li><a shape="rect" href="support.html">Support</a></li><li><a
shape="rect" href="contributing.html">Contributing</a></li><li><a
shape="rect" href="discussion-forums.html">Discussion Forums</a></li><li><a
shape="rect" href="mailing-lists.html">Mailing Lists</a></li><li><a
shape="rect" href="user-stories.html">User Stories</a></li><li><a
shape="rect" href="news.html">News</a></li><li><a shape="rect" href="articles.html">Articles</a></li><li><a
shape="rect" href="site.html">Site</a></li><li><a shape="rect" href="team.html">Team</a></li><li><a
shape="rect" class="external-link" href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"
 ><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a
shape="rect" href="source.html">Source</a></li><li><a shape="rect"
href="building.html">Building</a></li><li><a shape="rect" href="javadoc.html">JavaDoc</a></li><li><a
shape="rect" href="irc-room.html">IRC Room</a></li></ul><h3 id="Navigation-ApacheSoftwareFoundation">Apache
Software Foundation</h3><ul class="alternate"><li><a shape="rect" class="external-link"
href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
shape="rect" class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
shape="rect" class="external-link" href="http://www.apache.org/security/">Security</a></li></ul></div>
+                <!-- NavigationBar -->
+            </div>
+          </div>
+        </td>
+        </tr>
+	</tbody>
+        </table>
+
+
+        <div class="bottom_red_bar"></div>
+      </div>
+    </div>
+  </div>
+</div>
+<div class="black_box">
+<div class="footer">
+  <div class="footer_l">
+    <div class="footer_r">
+      <div>
+        <a href="$base/privacy-policy.html">Privacy Policy</a> -
+        (<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=48792059">edit
page</a>)
+   	 (<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=48792059&amp;showComments=true&amp;showCommentArea=true#addcomment">add
comment</a>)
+      </div>
+    </div>
+  </div>
+</div>
+</div>
+</div>
+<div class="design_attribution">
+&copy; 2004-2014 The Apache Software Foundation.
+<br>          
+Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are
trademarks of The Apache Software Foundation.  All other marks mentioned may be trademarks
or registered trademarks of their respective owners.
+<br>
+<a href="http://hiramchirino.com">Graphic Design By Hiram</a>
+</div>
+
+<!-- Camel committers that would like access to the Analytics, send a note to private@camel.apache.org
-->
+<script type="text/javascript">
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-25976253-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
+
+</body>
+</html>
+
+



Mime
View raw message