SourceForge.net Logo   JRecord

JRecord
 

JRecord

This project provides code to

  1. Read and write files of length based records (both fixed length records and Length field based records).
  2. Read and write CSV files.
  3. Read and Write Flat Fixed width files (Text and Binary) via either a Xml-Record-Layout or a Cobol Copybook..
  4. Read and write XML files (via StAX parser).
  5. Common IO routines across all File Types (XML, CSV, Fixed field Width).
  6. Support for various Flat file formats (Fixed, Delimited, Length based Files (i.e. Mainframe VB).

Guiding Principles

  1. Method of reading / writing files should be the same no matter what the file format is.
  2. Programmer should be shielded from the files format.
  3. You should be able to edit files using the files description (Cobol Copybook, Xml or what ever).
  4. Package should be flexible - easy to add new file formats or Record-Layout formats.

Package Structure

The JRecord package consists of

Issues

  1. Code was written as part of the RecordEditor not as a Java library, This has both advantages and disadvantages:
  2. A way of tailoring the conversion of Cobol Copybooks is needed.
  3. Currently the System has 2 ways of representing a Record-Layout

    LayoutDetail

    The original format it holds only the bare minimum needed by the package

    ExternalRecord

    A general purpose interchange format. This was introduced latter on to support conversion between file formats / Database (RecordEditor).

    Having two classes representing the same thing is not ideal. I may provide greater support for ExternalRecord's through out the package. There is a class ToLayoutDetail that can convert one to the other

To Do

  1. Support for more files Structures
  2. Support for Shorter Type-Names.
  3. Greater Flexibility in importing Cobol Copybooks
  4. Support for more Cobol dialects.
  5. More work on the Documentation.
  6. More options for parsing XML files (would be useful to convert child elements to fields).
  7. One possible change is to have the Open methods return the object. This would allow
            AbstractLineReader reader = new XmlLineReader(true).open(filename);
        or
            AbstractLineReader reader = LineIOProvider.getInstance()
    				.getLineReader(Constants.IO_FIXED_LENGTH).open(filename);                                                  
    
    any thoughts anybody.
  8. Bettetr class naming standards.

 

JRecord at SourceForge Download Page Forums