commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <brit...@apache.org>
Subject Re: [CSV] Some tweaks for working with headers
Date Tue, 03 May 2016 18:36:06 GMT
Gary Gregory <garydgregory@gmail.com> schrieb am Di., 3. Mai 2016 um
20:16 Uhr:

> @Benedikt: Would you be able to RM these and what is trunk out in to
> release?
>

I was already thinking about this, we have a lot of nice new things in
trunk. I'll be on vacation next week. If I can't manage to push an RC out
this week, I'll do it after my vacation.

Benedikt


>
> Gary
>
> On Tue, May 3, 2016 at 9:33 AM, Benedikt Ritter <britter@apache.org>
> wrote:
>
> > I have created CSV-179 [1] and CSV-180 [2] for this.
> >
> > [1] https://issues.apache.org/jira/browse/CSV-179
> > [2] https://issues.apache.org/jira/browse/CSV-180
> >
> >
> > Gary Gregory <garydgregory@gmail.com> schrieb am So., 1. Mai 2016 um
> > 22:26 Uhr:
> >
> > > This all sounds good to me.
> > >
> > > Gary
> > > On May 1, 2016 12:05 PM, "Benedikt Ritter" <britter@apache.org> wrote:
> > >
> > > > Hi,
> > > >
> > > > I often seeing myself doing the following when my csv file has a
> header
> > > > row:
> > > >
> > > > CSVFormat.RFC4180
> > > >    .withHeader() // use first row as header
> > > >    .withSkipHeaderRecord();
> > > >
> > > > How about combining the two into a method called
> > > withFirstRecordAsHeader()
> > > > or something like that?
> > > >
> > > > Further more I find it unsymmetrical that I can retrieve a column
> value
> > > > from CSVRecord using an enum, but I cannot pass an enum to CSVFormat
> to
> > > > define a header. So I'd like to add a new overload of withHeader:
> > > >
> > > > withHeader(Class<? extends Enum> headers)
> > > >
> > > > The method would iterate over the enum values defined by the class
> and
> > > use
> > > > the name() method on each value for defining the header. This way I
> can
> > > > define an enum for my headers, use it when specifying the format and
> > when
> > > > retrieving values from the records.
> > > >
> > > > Thoughts?
> > > > Benedikt
> > > >
> > >
> >
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message