You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Ford, Mark" <mf...@quelsys.com> on 2003/06/25 19:02:01 UTC

[SURVEY] Commons-csv or not?

I have some code and test case for parsing comma-separated-values including
support for escaped quotes and escaped commas as generated by Excel (don't
know if there's an official spec or not). 

I use it in production code for things like importing data into a database
but the biggest use I've found is in building test cases for db related
code. I use it to create mock resultsets (using the mock objects jar) and
pre-populate them with data for my test cases.

The interface is really simple:

CSVParser.parse(String aLine, List aListToAppendTo);

Any interest for the commons project? Perhaps a new project or perhaps
folded into some existing project? I'm new here so I don't really know where
to start. Sorry if this is off-topic or if there's a FAQ somewhere I missed!

Re: [SURVEY] Commons-csv or not?

Posted by Martin Cooper <ma...@apache.org>.

On Wed, 25 Jun 2003, Ford, Mark wrote:

> I have some code and test case for parsing comma-separated-values including
> support for escaped quotes and escaped commas as generated by Excel (don't
> know if there's an official spec or not).
>
> I use it in production code for things like importing data into a database
> but the biggest use I've found is in building test cases for db related
> code. I use it to create mock resultsets (using the mock objects jar) and
> pre-populate them with data for my test cases.
>
> The interface is really simple:
>
> CSVParser.parse(String aLine, List aListToAppendTo);
>
> Any interest for the commons project? Perhaps a new project or perhaps
> folded into some existing project? I'm new here so I don't really know where
> to start. Sorry if this is off-topic or if there's a FAQ somewhere I missed!

This doesn't sound like something that would have a life of its own as an
independent component, but I think it could be valuable as part of some
other component. The commons-codec component springs to mind, since it has
an eclectic mix of functionality that could include CSV. However, I'm not
involved with codec, so I'll leave that decision for those who are. ;-)

--
Martin Cooper


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re[2]: [SURVEY] Commons-csv or not?

Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello All!

Just lurkering your discussion..

JM> I agree. IMHO the focus should be on any type of legacy, structured
JM> ASCII files containing some notion of "record".

Does not this give the new name to the project (not only the scope)
  ascii
  import-ascii

oh wait, and if it is not ASCII? if it is KOI8-R?

what about

  texteater ? :-)    commons-texteater

or

  eattxt
  txteat
  txtfood
  txtfuel

  txtpower
  txtpowered
  textpowerd
  textpow

  textpaw (is "pow" a  part of an animal's leg?)

  txtpaw           commons-textpaw
  textpaws         commons-textpaws

  txtstep
  steptext         commons-steptext

- Anton


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [SURVEY] Commons-csv or not?

Posted by Ryan Hoegg <rh...@isisnetworks.net>.
Looks great.  Actually, Cocoon has a CSVGenerator now that turns CSV 
files into XML SAX events.  Perhaps factoring stuff out of there is 
appropriate if we want to create an independent effort here.

The other formats you mentioned interest me greatly, especially EDIFACT.

--
Ryan Hoegg
ISIS Networks
http://www.isisnetworks.net

Simon Kitching wrote:

>Hmm .. an "import-stuff-into-xml" project? Interesting...
>
>I have in fact written exactly this for my current employer, for a
>(continuously expanding) series of formats. We then apply stylesheets to
>the results, for various purposes.
>
>I doubt I could contribute any code, but can definitely confirm that I
>would have used such a library if it had existed about a year ago when I
>started (and had been sufficiently flexible/complete)!
>
>I could also contribute a collection of weird and wonderful formats as
>invented by our clients :-)
>
>Here's a few possible formats in addition to csv:
>* ASN.1
>* windows .ini files
>* java .properties files
>* EDIFACT
>* apache-httpd .conf format :-)
>
>And here's some potential "competitors", which also import data into xml
>formats:
>* Microsoft Biztalk
>* IBM Websphere Business Integration
>
>Note that I'm not pushing for or against the existence of this project.
>Just had some thoughts to toss into the discussion....
>
>Cheers,
>
>Simon
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [SURVEY] Commons-csv or not?

Posted by Simon Kitching <si...@ecnetwork.co.nz>.
Hmm .. an "import-stuff-into-xml" project? Interesting...

I have in fact written exactly this for my current employer, for a
(continuously expanding) series of formats. We then apply stylesheets to
the results, for various purposes.

I doubt I could contribute any code, but can definitely confirm that I
would have used such a library if it had existed about a year ago when I
started (and had been sufficiently flexible/complete)!

I could also contribute a collection of weird and wonderful formats as
invented by our clients :-)

Here's a few possible formats in addition to csv:
* ASN.1
* windows .ini files
* java .properties files
* EDIFACT
* apache-httpd .conf format :-)

And here's some potential "competitors", which also import data into xml
formats:
* Microsoft Biztalk
* IBM Websphere Business Integration

Note that I'm not pushing for or against the existence of this project.
Just had some thoughts to toss into the discussion....

Cheers,

Simon


On Thu, 2003-06-26 at 18:43, Jeremias Maerki wrote:
> On 25.06.2003 19:59:19 Joe Germuska wrote:
> > A CSV project seems a bit too narrowly focused.
> 
> I agree. IMHO the focus should be on any type of legacy, structured
> ASCII files containing some notion of "record". It's very interesting to
> have code around to easily convert such files to XML (SAX-Events), for
> example.
> 
> > I guess I'd think it belongs in IO, of all the choices Henri 
> > suggested.  In a sense you could associate it with Digester, but 
> > that's probably not really the best place for it.
> 
> Having said the above, I think it doesn't belong neither to IO, nor to
> Codec. I think it's a separate little project. The Digester idea is
> interesting, but I agree.
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [SURVEY] Commons-csv or not?

Posted by Jeremias Maerki <de...@greenmail.ch>.
On 25.06.2003 19:59:19 Joe Germuska wrote:
> A CSV project seems a bit too narrowly focused.

I agree. IMHO the focus should be on any type of legacy, structured
ASCII files containing some notion of "record". It's very interesting to
have code around to easily convert such files to XML (SAX-Events), for
example.

> I guess I'd think it belongs in IO, of all the choices Henri 
> suggested.  In a sense you could associate it with Digester, but 
> that's probably not really the best place for it.

Having said the above, I think it doesn't belong neither to IO, nor to
Codec. I think it's a separate little project. The Digester idea is
interesting, but I agree.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


RE: [SURVEY] Commons-csv or not?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I have some potentially complementary code that produces objects
> from lines in a delimited (or fixed-length) data file

I have code that does the same thing from a ResultSet, similar to how JSP
does it from request parameters.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [SURVEY] Commons-csv or not?

Posted by Joe Germuska <Jo...@Germuska.com>.
At 1:33 PM -0400 6/25/03, Henri Yandell wrote:
>I've also got this style of code in my GenJavaCore library
>[http://www.generationjava.com/projects/GenJavaCore.shtml], so am happy to
>donate etc into it.
>
>Would it be best placed as a Csv project, as a part of Poi, as a part of
>Codec or as a part of IO?
>
>In my version, I went with the Reader/Writer metaphor, and more in the way
>of interface methods.

A CSV project seems a bit too narrowly focused.  I have some 
potentially complementary code that produces objects from lines in a 
delimited (or fixed-length) data file, using beanutils to populate 
the objects.  It could use a bit more work, but I'd help fit it in 
with some other project if one started up.

I guess I'd think it belongs in IO, of all the choices Henri 
suggested.  In a sense you could associate it with Digester, but 
that's probably not really the best place for it.

Joe

-- 
--
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"If nature worked that way, the universe would crash all the time." 
	--Jaron Lanier

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [SURVEY] Commons-csv or not?

Posted by Henri Yandell <ba...@generationjava.com>.
I've also got this style of code in my GenJavaCore library
[http://www.generationjava.com/projects/GenJavaCore.shtml], so am happy to
donate etc into it.

Would it be best placed as a Csv project, as a part of Poi, as a part of
Codec or as a part of IO?

In my version, I went with the Reader/Writer metaphor, and more in the way
of interface methods.

Hen

On Wed, 25 Jun 2003, Peter Royal wrote:

> On Wednesday, June 25, 2003, at 01:02  PM, Ford, Mark wrote:
> > I have some code and test case for parsing comma-separated-values
> > including
> > support for escaped quotes and escaped commas as generated by Excel
> > (don't
> > know if there's an official spec or not).
> >
> > I use it in production code for things like importing data into a
> > database
> > but the biggest use I've found is in building test cases for db related
> > code. I use it to create mock resultsets (using the mock objects jar)
> > and
> > pre-populate them with data for my test cases.
> >
> > The interface is really simple:
> >
> > CSVParser.parse(String aLine, List aListToAppendTo);
> >
> > Any interest for the commons project? Perhaps a new project or perhaps
> > folded into some existing project? I'm new here so I don't really know
> > where
> > to start. Sorry if this is off-topic or if there's a FAQ somewhere I
> > missed!
>
> even if its not accepted as a commons project, i'm interested in the
> code! maybe a small project at sf.net or java.net would do..
> -pete
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [SURVEY] Commons-csv or not?

Posted by Peter Royal <pr...@apache.org>.
On Wednesday, June 25, 2003, at 01:02  PM, Ford, Mark wrote:
> I have some code and test case for parsing comma-separated-values 
> including
> support for escaped quotes and escaped commas as generated by Excel 
> (don't
> know if there's an official spec or not).
>
> I use it in production code for things like importing data into a 
> database
> but the biggest use I've found is in building test cases for db related
> code. I use it to create mock resultsets (using the mock objects jar) 
> and
> pre-populate them with data for my test cases.
>
> The interface is really simple:
>
> CSVParser.parse(String aLine, List aListToAppendTo);
>
> Any interest for the commons project? Perhaps a new project or perhaps
> folded into some existing project? I'm new here so I don't really know 
> where
> to start. Sorry if this is off-topic or if there's a FAQ somewhere I 
> missed!

even if its not accepted as a commons project, i'm interested in the 
code! maybe a small project at sf.net or java.net would do..
-pete


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org