<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/csv-beans/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/csv-beans/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 25 Jun 2021 06:06:11 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/csv-beans/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>Home modified by Dmitry Sviridov</title><link>https://sourceforge.net/p/csv-beans/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -124,7 +124,7 @@
     }

      CsvContext&amp;lt;testbeanwithconstructor&amp;gt; context = CsvContext.builder()
-                .targetClass(Bean)
+                .targetClass(Bean.class)
                 .columnNames("ID", "KEY")
                 .columnDelimeter("|")
                 .columnSetter("KEY", Bean::setKey, String.class)
&amp;lt;/testbeanwithconstructor&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dmitry Sviridov</dc:creator><pubDate>Fri, 25 Jun 2021 06:06:11 -0000</pubDate><guid>https://sourceforge.net582155a3eeccc08ab80461dfea81b98f1a39d6a1</guid></item><item><title>Home modified by Dmitry Sviridov</title><link>https://sourceforge.net/p/csv-beans/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -127,7 +127,7 @@
                 .targetClass(Bean)
                 .columnNames("ID", "KEY")
                 .columnDelimeter("|")
-                .columnSetter("KEY", TestBeanWithConstructor::setKey, String.class)
+                .columnSetter("KEY", Bean::setKey, String.class)
                 .columnField("ID", "id")
                 .columnConstructorArgumentId("ID", 0, int.class)
                 .build();
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dmitry Sviridov</dc:creator><pubDate>Fri, 25 Jun 2021 05:51:44 -0000</pubDate><guid>https://sourceforge.netb2583d0829fca0edc689dc9a2bf70e7be27d3453</guid></item><item><title>Home modified by Dmitry Sviridov</title><link>https://sourceforge.net/p/csv-beans/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -101,10 +101,35 @@

 FName2,LName2

-###Parce CSV data
+###Parse CSV data
 ~~~
 CsvContext&amp;lt;exampletestannotatedmethod&amp;gt; context = CsvContext.newInstance(ExampleTestAnnotatedMethod.class);
 Unmarshaller&amp;lt;exampletestannotatedmethod&amp;gt; unmarshaller = context.createUnmarshaller();
 FileInputStream inputStream = new FileInputStream("example.csv");
 Iterable&amp;lt;exampletestannotatedmethod&amp;gt; iterable = unmarshaller.unmarshal(inputStream);
 ~~~
+
+###Context Builder
+    
+~~~
+    public class Bean {
+        private final int id;
+        private String key;
+        public Bean(int id) {
+            this.id = id;
+        }
+        public void setKey(String key) {
+            this.key = key;
+        }
+    }
+    
+     CsvContext&amp;lt;testbeanwithconstructor&amp;gt; context = CsvContext.builder()
+                .targetClass(Bean)
+                .columnNames("ID", "KEY")
+                .columnDelimeter("|")
+                .columnSetter("KEY", TestBeanWithConstructor::setKey, String.class)
+                .columnField("ID", "id")
+                .columnConstructorArgumentId("ID", 0, int.class)
+                .build();
+        Unmarshaller&amp;lt;bean&amp;gt; unmarshaller = context.createUnmarshaller();
+~~~
&amp;lt;/bean&amp;gt;&amp;lt;/testbeanwithconstructor&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dmitry Sviridov</dc:creator><pubDate>Fri, 25 Jun 2021 05:51:05 -0000</pubDate><guid>https://sourceforge.net654787f2639880ef29b513d7ac030f50acfcd28e</guid></item><item><title>Home modified by Dmitry Sviridov</title><link>https://sourceforge.net/p/csv-beans/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -1,17 +1,16 @@
-Processing CSV files Wiki
-==
+##Processing CSV files Wiki
+

 &amp;lt;&amp;lt;toc&amp;gt;&amp;gt;

-Simple example (for version 0.3.0):
-==
+###Simple example (for version 0.3.0):

-Object to csv file:
--------
+
+###Object to csv file:
+

 create and anotate bean class
-{{{
-#!java" 
+~~~
 @CSV
 @CsvAccessorType(CsvAccessType.NONE)
 public static class ExampleTestAnnotatedMethod {
@@ -36,10 +35,9 @@
         val2 = name;
     }
 }
-}}}
+~~~
 create objects 
-{{{
-#!java
+~~~
 ArrayList&amp;lt;exampletestannotatedmethod&amp;gt; arrayList = new ArrayList&amp;lt;exampletestannotatedmethod&amp;gt;();
 ExampleTestAnnotatedMethod bean1 = new ExampleTestAnnotatedMethod();
 bean1.setFirstName("FName1");
@@ -49,15 +47,14 @@
 bean2.setFirstName("FName2");
 bean2.setLastName("LName2");
 arrayList.add(bean2);
-}}}
+~~~
 and marshal data to CSV file
-{{{
-#!java
+~~~
 CsvContext&amp;lt;exampletestannotatedmethod&amp;gt; context = CsvContext.newInstance(ExampleTestAnnotatedMethod.class);
 Marshaller&amp;lt;exampletestannotatedmethod&amp;gt; marshaller = context.createMarshaller();
 FileOutputStream outputStream = new FileOutputStream("example.csv");
 marshaller.marshal(arrayList, outputStream); 
-}}}
+~~~
 Result in file example.csv must like this:


@@ -67,12 +64,10 @@

 FName2,LName2

-CSV file to Objects
------------------------
+###CSV file to Objects

 create and anotate bean class
-{{{
-#!java
+~~~
 @CSV
 @CsvAccessorType(CsvAccessType.NONE)
 public static class ExampleTestAnnotatedMethod {
@@ -97,7 +92,7 @@
         val2 = name;
     }
 }
-}}}
+~~~
 Create CSV file example.csv

 firstName,lastName
@@ -106,11 +101,10 @@

 FName2,LName2

-Parce CSV data
-{{{
-#!java
+###Parce CSV data
+~~~
 CsvContext&amp;lt;exampletestannotatedmethod&amp;gt; context = CsvContext.newInstance(ExampleTestAnnotatedMethod.class);
 Unmarshaller&amp;lt;exampletestannotatedmethod&amp;gt; unmarshaller = context.createUnmarshaller();
 FileInputStream inputStream = new FileInputStream("example.csv");
 Iterable&amp;lt;exampletestannotatedmethod&amp;gt; iterable = unmarshaller.unmarshal(inputStream);
-}}}
+~~~
&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/toc&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dmitry Sviridov</dc:creator><pubDate>Sun, 01 Dec 2019 09:20:50 -0000</pubDate><guid>https://sourceforge.net6bbb2cf1aa1f569a6af7c93c77e061e8e34da3c1</guid></item><item><title>Home modified by Dmitry Sviridov</title><link>https://sourceforge.net/p/csv-beans/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,10 +1,13 @@
-= Processing CSV files Wiki =
+Processing CSV files Wiki
+==

 &amp;lt;&amp;lt;toc&amp;gt;&amp;gt;

-== Simple example (for version 0.3.0): ==
+Simple example (for version 0.3.0):
+==

-=== Object to csv file: ===
+Object to csv file:
+-------

 create and anotate bean class
 {{{
@@ -64,7 +67,8 @@

 FName2,LName2

-=== CSV file to Objects ===
+CSV file to Objects
+-----------------------

 create and anotate bean class
 {{{
&amp;lt;/toc&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dmitry Sviridov</dc:creator><pubDate>Sun, 01 Dec 2019 09:17:47 -0000</pubDate><guid>https://sourceforge.net1a89346da106ab3bdd465c6d4f0c75ba6c5c291a</guid></item><item><title>Home modified by Dmitry Sviridov</title><link>https://sourceforge.net/p/csv-beans/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,8 +1,112 @@
-Welcome to your wiki!
+= Processing CSV files Wiki =

-This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
+&amp;lt;&amp;lt;toc&amp;gt;&amp;gt;

-The wiki uses [Markdown](/p/csv-beans/wiki/markdown_syntax/) syntax.
+== Simple example (for version 0.3.0): ==

-[[members limit=20]]
-[[download_button]]
+=== Object to csv file: ===
+
+create and anotate bean class
+{{{
+#!java" 
+@CSV
+@CsvAccessorType(CsvAccessType.NONE)
+public static class ExampleTestAnnotatedMethod {
+    private String val1;
+    private String val2;
+
+    @CsvColumn
+    public String getFirstName() {
+       return val1;
+    }
+
+    public void setFirstName(String name) {
+        val1 = name;
+    }
+
+    public String getLastName() {
+        return val2;
+    }
+
+    @CsvColumn
+    public void setLastName(String name) {
+        val2 = name;
+    }
+}
+}}}
+create objects 
+{{{
+#!java
+ArrayList&amp;lt;exampletestannotatedmethod&amp;gt; arrayList = new ArrayList&amp;lt;exampletestannotatedmethod&amp;gt;();
+ExampleTestAnnotatedMethod bean1 = new ExampleTestAnnotatedMethod();
+bean1.setFirstName("FName1");
+bean1.setLastName("LName1");
+arrayList.add(bean1);
+ExampleTestAnnotatedMethod bean2 = new ExampleTestAnnotatedMethod();
+bean2.setFirstName("FName2");
+bean2.setLastName("LName2");
+arrayList.add(bean2);
+}}}
+and marshal data to CSV file
+{{{
+#!java
+CsvContext&amp;lt;exampletestannotatedmethod&amp;gt; context = CsvContext.newInstance(ExampleTestAnnotatedMethod.class);
+Marshaller&amp;lt;exampletestannotatedmethod&amp;gt; marshaller = context.createMarshaller();
+FileOutputStream outputStream = new FileOutputStream("example.csv");
+marshaller.marshal(arrayList, outputStream); 
+}}}
+Result in file example.csv must like this:
+
+
+firstName,lastName
+
+FName1,LName1
+
+FName2,LName2
+
+=== CSV file to Objects ===
+
+create and anotate bean class
+{{{
+#!java
+@CSV
+@CsvAccessorType(CsvAccessType.NONE)
+public static class ExampleTestAnnotatedMethod {
+    private String val1;
+    private String val2;
+
+    @CsvColumn
+    public String getFirstName() {
+       return val1;
+    }
+
+    public void setFirstName(String name) {
+        val1 = name;
+    }
+
+    public String getLastName() {
+        return val2;
+    }
+
+    @CsvColumn
+    public void setLastName(String name) {
+        val2 = name;
+    }
+}
+}}}
+Create CSV file example.csv
+
+firstName,lastName
+
+FName1,LName1
+
+FName2,LName2
+
+Parce CSV data
+{{{
+#!java
+CsvContext&amp;lt;exampletestannotatedmethod&amp;gt; context = CsvContext.newInstance(ExampleTestAnnotatedMethod.class);
+Unmarshaller&amp;lt;exampletestannotatedmethod&amp;gt; unmarshaller = context.createUnmarshaller();
+FileInputStream inputStream = new FileInputStream("example.csv");
+Iterable&amp;lt;exampletestannotatedmethod&amp;gt; iterable = unmarshaller.unmarshal(inputStream);
+}}}
&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/exampletestannotatedmethod&amp;gt;&amp;lt;/toc&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dmitry Sviridov</dc:creator><pubDate>Sun, 01 Dec 2019 09:15:33 -0000</pubDate><guid>https://sourceforge.net962d7287a4eb1a70b37f45b68095ee2a38350fbc</guid></item><item><title>Home modified by Dmitry Sviridov</title><link>https://sourceforge.net/p/csv-beans/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Welcome to your wiki!&lt;/p&gt;
&lt;p&gt;This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: &lt;span&gt;[SamplePage]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The wiki uses &lt;a class="" href="/p/csv-beans/wiki/markdown_syntax/"&gt;Markdown&lt;/a&gt; syntax.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h6&gt;Project Members:&lt;/h6&gt;
	&lt;ul class="md-users-list"&gt;
		&lt;li&gt;&lt;a href="/u/aristar/"&gt;Dmitry Sviridov&lt;/a&gt; (admin)&lt;/li&gt;
		
	&lt;/ul&gt;&lt;br/&gt;
&lt;p&gt;&lt;span class="download-button-5de382ac9d8bdd446f65d4be" style="margin-bottom: 1em; display: block;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dmitry Sviridov</dc:creator><pubDate>Sun, 01 Dec 2019 09:06:52 -0000</pubDate><guid>https://sourceforge.netf199becea32983adf95f7d0ebf0ae6569d50b485</guid></item></channel></rss>