unlockha / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
1 stars 0 forks source link

Add record padding to be used in parsing #100

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?  If applicable, please provide a
mapping configuration and sample record input to recreate the problem.

We have fixed-length files that may have a lot of spaces that are trimmed from 
line ends, so one or more fields are "missing" with last field possibly 
partially specified

What is the expected output? What do you see instead?

It would be great to have recordPadding setting used during parse.
Currently we have to mark all the fields as  minOccurs="0" 
lenientPadding="true".

What version of BeanIO are you using? What JDK version?

BeanIO 2.1.0.M2 jdk1.7.0_45

Original issue reported on code.google.com by tiv...@gmail.com on 9 Jan 2014 at 3:21

GoogleCodeExporter commented 8 years ago
I don't want to assume what you might mean by a "recordPadding" setting, can 
you provide more details on that?

Thanks,
Kevin

Original comment by kevin.s...@gmail.com on 11 Jan 2014 at 8:23

GoogleCodeExporter commented 8 years ago
Well, say we have a fixed-width record of 5 fields 20 chars each, 100 chars 
total. But in file all trailing spaces can be trimmed, so that record can have 
any effective width, say 36 chars. During unmarshalling this produces a lot of 
problems unless all the fields are marked minOccurs="0" lenientPadding="true". 
It would be great to have single record or stream setting for it

Original comment by tiv...@gmail.com on 12 Jan 2014 at 11:50

GoogleCodeExporter commented 8 years ago
Is this something to solve under issue 50 (It would be great for BeanIO to 
pickup it's properties from mapping file top-level <property> element)
Some settings can be general settings which are applied to all elements unless 
specified different in a specific element.

Original comment by TypWrit...@gmail.com on 15 Aug 2014 at 12:37