org.apache.turbine.util.CSVParser is giving me some trouble

I have an import routine that will probably have many fields left blank. 
Unfortunately it looks like if the first field is left blank, it throws 
off that whole line for retrieving values with ValueParser.

example

        row 1 always contains my headers
        System ID, Bank, Branch Number, Address

        subsequent rows carry data
        100,"Bank of America", 1230, "123 Main St."
        ,"Bank of America", 1432, "923 Front St."

I want to keep the format of the csv consistent for allowing multiple 
updates as well as new data entry en masse.

For line 1, all the data comes through correctly, if ValueParser can find 
a system id, then it will attempt to update the info rather than create a 
new entry. My goal is that for line 2, it will see no value for System ID 
and then attempt to create a new entry.

However, from my logs, all the fields are shifted one place to the left 
since System Id is blank

log output:

[Tue Nov 11 14:18:18 EST 2003] -- INFO -- Adding new PT_BRANCH
[Tue Nov 11 14:18:18 EST 2003] -- DEBUG -- ID not found, input as new participant.
[Tue Nov 11 14:18:18 EST 2003] -- DEBUG -- Bank: 8830
[Tue Nov 11 14:18:18 EST 2003] -- DEBUG -- Branch #: Franklinton
[Tue Nov 11 14:18:18 EST 2003] -- DEBUG -- Branch: SWL - SW Rural (Lake Charles)
[Tue Nov 11 14:18:18 EST 2003] -- DEBUG -- Region: 946 Pearl Street

so it should have been branch # 8830 and not Franklinton... bleah

any pointers on how to fix this or do I have to setup two different 
routines... one for imports and one for updates. I haven't tested to see 
if fields left blank in between are accounted for correctly.

I'm using tdk-2.2_01 release of turbine and utils

-- 
Regards,

Jeffery Painter

- --
[EMAIL PROTECTED]                     http://kiasoft.com
PGP FP: 9CE8 83A2 33FA 32B1 0AB1  4E62 E4CB E4DA 5913 EFBC

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
 
iD8DBQE/qEQE5Mvk2lkT77wRAnMJAJ9vJ6qOkg/mvqqIpz7troCEQJ8bFACglu/U
YNXabx7DZOV2Hd9LwSTmGpY=
=dWiu
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to