General

Who should use this framework?

Developers and companies that need to integrate and communicate their Java with other legacy systems that use programming languages like COBOL that uses positional data.


How do I get read-only access to the source control repository?

Follow this link for more instructions.


How is Layout Parser licensed?

This framework is licensed under GNU Lesser General Public License (LGPL) wich is a "free-to-use, business-friendly license". You can read the full license details here.


Can it be used in a commercial product?

Hell yes! You can read the full license details here.

How do i...

How do I start?

You should first create a configuration xml file. In this file there should be a:

          <maskDef> tag to define your masks for all layouts (1)
          <layout> tag to link all layouts of your system
          <typeHandler> tag to handle all the needed types of your layout (2)
       

(1): this tag is optional. you can also specify masks inside of the layout files.

(2): this tag is optional, if and only if there's no "special" classes

After that you should create a layout xml file. In this file there should be a:

          <maskDef> tag to define your masks for all layouts (1)
          <layout> tag to define your layout.
		

(1): this tag is optional. you can also specify masks inside of the layout files.

After you've built these files, you can make a call to net.sf.layoutParser.build.ConfigBuilder("myConfig.xml") to load all your configuration parameters and layouts into memory. Then you can start using the framework by calling net.sf.layoutParser.processor.LayoutProcessor.

For a detailed explanation of what kind of fields should be filled in these xml files, and how to properly use the framework take a look at our documentation section!


How do I map a bean to data and data into beans?

In both cases you have 2 options.

In the case of transforming a bean into positional data you can:


How do I map data to a already instantiated bean (with values and all)?

With this example you'll get a bean at the end, that have all previously set data, and all the positional information parsed into it too.

It's important to notice that the parse method will override any data already set previously.

          MyBean b = new MyBean();
          b.setFoo("BAR");
          
          b = net.sf.layoutParser.processor.LayoutProcessor.parse(new StringReader("POSITIONALDATABLABLABLA"), b);