[jira] [Commented] (CSV-85) Allow comments to be returned in CSVRecord

2012-03-26 Thread Emmanuel Bourg (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238931#comment-13238931
 ] 

Emmanuel Bourg commented on CSV-85:
---

Ok for ignoring the comments before the header.

> Allow comments to be returned in CSVRecord
> --
>
> Key: CSV-85
> URL: https://issues.apache.org/jira/browse/CSV-85
> Project: Commons CSV
>  Issue Type: Improvement
>Reporter: Sebb
>
> It might be useful to provide a comment field in the CSVRecord class.
> This would be null if no comment is present for that record.
> A line consisting of only a comment would have a size() of 0.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CSV-85) Allow comments to be returned in CSVRecord

2012-03-26 Thread Sebb (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238916#comment-13238916
 ] 

Sebb commented on CSV-85:
-

OK, that makes sense, and should be relatively easy to implement.

The only detail still missing is what to do about the header record (if 
specified).

It would be simplest to just treat it as a normal record, i.e. comments would 
be ignored when evaluating the column names.


> Allow comments to be returned in CSVRecord
> --
>
> Key: CSV-85
> URL: https://issues.apache.org/jira/browse/CSV-85
> Project: Commons CSV
>  Issue Type: Improvement
>Reporter: Sebb
>
> It might be useful to provide a comment field in the CSVRecord class.
> This would be null if no comment is present for that record.
> A line consisting of only a comment would have a size() of 0.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CSV-85) Allow comments to be returned in CSVRecord

2012-03-26 Thread Emmanuel Bourg (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238900#comment-13238900
 ] 

Emmanuel Bourg commented on CSV-85:
---

Assuming that inline comments are dropped, I would define a record comment as 
the concatenation of the comment lines preceding the current record in the file 
(up to the previous record).

1. The simple case, a one line comment:

{code}
# Comment
a,b,c,e,f
{code}

Expected record comment: "Comment" (the comment char and the leading space are 
removed)

2. A comment on multiple lines

{code:none}
# Very Long
# Comment
a,b,c,e,f
{code}

Expected record comment: "Very Long\nComment"

3. A comment on multiple lines, with blank lines interleaved

{code:none}
# Very Long

# Comment
a,b,c,e,f
{code}

Here the result depends on the empty line handling. If empty lines are ignored 
this is equivalent to the previous case. If empty lines are not ignored, this 
will produce two records, the first one with the comment "Very Long" and the 
second one with "Comment".

> Allow comments to be returned in CSVRecord
> --
>
> Key: CSV-85
> URL: https://issues.apache.org/jira/browse/CSV-85
> Project: Commons CSV
>  Issue Type: Improvement
>Reporter: Sebb
>
> It might be useful to provide a comment field in the CSVRecord class.
> This would be null if no comment is present for that record.
> A line consisting of only a comment would have a size() of 0.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CSV-85) Allow comments to be returned in CSVRecord

2012-03-26 Thread Sebb (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238863#comment-13238863
 ] 

Sebb commented on CSV-85:
-

{code}
a,b,c#Inline comment (1)
#Separate comment (2)
d,e,f,#Inline comment (3)
{code}

In the first case, the record would have 3 values and a comment, in the second, 
0 values and a comment, and the 3rd would have 4 values and a comment.

At present, the code treats (1) as part of the 3rd value, but it does allow 
case (3) - but thinks there are 3 values.
Maybe only separate comment lines should be allowed, but that is not the case 
currently.

> Allow comments to be returned in CSVRecord
> --
>
> Key: CSV-85
> URL: https://issues.apache.org/jira/browse/CSV-85
> Project: Commons CSV
>  Issue Type: Improvement
>Reporter: Sebb
>
> It might be useful to provide a comment field in the CSVRecord class.
> This would be null if no comment is present for that record.
> A line consisting of only a comment would have a size() of 0.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CSV-85) Allow comments to be returned in CSVRecord

2012-03-26 Thread Emmanuel Bourg (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238831#comment-13238831
 ] 

Emmanuel Bourg commented on CSV-85:
---

How do you define a comment associated to a record?

> Allow comments to be returned in CSVRecord
> --
>
> Key: CSV-85
> URL: https://issues.apache.org/jira/browse/CSV-85
> Project: Commons CSV
>  Issue Type: Improvement
>Reporter: Sebb
>
> It might be useful to provide a comment field in the CSVRecord class.
> This would be null if no comment is present for that record.
> A line consisting of only a comment would have a size() of 0.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira