Le 28/11/2011 21:33, Erhan Bagdemir a écrit :
Apache JCA Java CSV API :-) It is a very cool approach to use annotations for mapping CSV fields with beans.It can be even configured using a class annotation like this: @CSVEntity(seperator= COMMA, quotas=true|false,... ) public class Person { @CSVField(header="NAME", width=15) } But how will the Collections be handled ?
Collections are probably out of the scope of [csv]. The best we could do is splitting a field on a secondary delimiter, something like this:
foo;bar;element1:element2 with a bean declaration like: public class Bean { @CSVField String foo; @CSVField String bar; @CSVField(split=":") String[] elements; } Emmanuel Bourg
smime.p7s
Description: Signature cryptographique S/MIME