Question : Do I have to reuse the code of the CSVDataFormat class in the unmarshall method in order to extract from the file each CSV record like this ?
InputStreamReader in = new InputStreamReader(inputStream); try { CSVParser parser = new CSVParser(in, getStrategy()); List<List<String>> list = new ArrayList<List<String>>(); while (true) { String[] strings = parser.getLine(); Remark : the issue is that through my annotation I define the field 'separator' and parser will split the content according to what is define in the strategy OR my code must be independent of org.apache.commons.csv classes ? James.Strachan wrote: > > 2009/1/12 cmoulliard <cmoulli...@gmail.com>: >> >> After a few days of reflection (and a good week-end), I'm coming back >> also >> with some ideas and a name >> >> I think that the name of the project / package will be simply : "bindy" >> Why, >> the idea behind this framework is to bind data to Java Bean using >> annotations. > > Lovely! :) > >> The framework in this first release allows a user to bind a CSV >> record to more than one POJOs and to convert the data according to the >> type >> of the java property. The objects created can be link together in an one >> to >> one relation. In the next step, it will be possible to bind also fixed >> length content (including header and footer). From the java objects, it >> is >> possible to generate the data content (ex : csv, fixedlength, ...). >> >> Concerning the package I propose to use : >> >> org.apache.camel.bindy.annotation (where annotations have been defined >> and >> can be used for csv, fixed length, ... >> org.apache.camel.bindy.csv (for CSV) >> org.apache.camel.bindy.fixed (for fixed length) >> org.apache.camel.bindy.format >> org.apache.camel.bindy.format.impl (to transform string to java type or >> java >> types to String) >> >> I'm not so long from your proposal ;-) >> >> Charles >> >> >> >> >> James.Strachan wrote: >>> >>> 2009/1/8 cmoulliard <cmoulli...@gmail.com>: >>>> >>>> Question >>>> >>>> - Are we going to create a new module (under components folder) for >>>> this >>>> framework ? >>> >>> Yeah I think so >>> >>>> - If this is the case, which name (project and package name) are we >>>> going >>>> to >>>> use regarding to the fact that this framework can parse/format CSV, >>>> fixedLength format where the binding is defined through annotations ? >>>> Suggestion : JAnXB - Java Api for non XML binding ? >>> >>> Naming is probably the trickiest bit of software development :). I >>> confess to really not being sure - after a few days; here's the best I >>> could come up with (though note I'm not too hot at naming things :) >>> >>> name: CsvBinding >>> module: camel-csv-binding >>> package: org.apache.camel.binding.csv >>> >>> -- >>> James >>> ------- >>> http://macstrac.blogspot.com/ >>> >>> Open Source Integration >>> http://fusesource.com/ >>> >>> >> >> >> ----- >> Charles Moulliard >> SOA Architect >> >> My Blog : http://cmoulliard.blogspot.com/ >> http://cmoulliard.blogspot.com/ >> -- >> View this message in context: >> http://www.nabble.com/Advise-on-%40Annotation---Reflection-%21%21-tp21141422s22882p21416163.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > > > -- > James > ------- > http://macstrac.blogspot.com/ > > Open Source Integration > http://fusesource.com/ > > ----- Charles Moulliard SOA Architect My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ -- View this message in context: http://www.nabble.com/Advise-on-%40Annotation---Reflection-%21%21-tp21141422s22882p21417852.html Sent from the Camel - Users mailing list archive at Nabble.com.