![]() | ![]() | ![]() |
Following is a very brief introduction to the RecordEditor and the Examples provided.
This package uses Layouts to describe a record or Line. The system uses a 3 level definition of each record as follows.
Field | Java Class |
---|---|
Layout | net.sf.RecordEditor.record.LayoutDetail |
Record | net.sf.RecordEditor.record.RecordDetail |
Field | net.sf.RecordEditor.record.types.FieldDetails |
Java class net.sf.RecordEditor.record.Line represents one line (or data record) in the file. The main methods are
Java classes that implement the interface net.sf.RecordEditor.record.types.Type are used to convert a field's value between the external representation and a Java String representation for display on the screen.
The TypeManager is used store the Type's and CellFormat's. You can use the static method getSystemTypeManager to get the system TypeManager. The method register is used to define new Types to the system.
1: TypeManager typeManager = TypeManager.getSystemTypeManager();
The examples are in the directory <install_directory>/src package net.sf.RecordEditor.examples.
Before you do anything else, you must update the constants in net.sf.RecordEditor.examples.Constants
All the examples require RecordEdit.jar to be added to the java class path. This jar will be in <install_directory>/lib or <install_directory>/jars directory
Example class's CobolCopybookReader.java and CopybookToLayout.java + example programs XmplEditViaCobol.java and XmplEditSpecificFile3.java require both RecordEdit.jar LayoutEdit.jar to be added to the java class path.
Java Class | Purpose | ||||||||
---|---|---|---|---|---|---|---|---|---|
CobolCopybookReader.java | A Cobol Copybook Interface. | ||||||||
Constants.java | Constants used by the examples. You may need to Update this file. | ||||||||
FileToVelocity.java | This class will format
For example if a Record-Layout of "ams Receipt" then the
following classes will be generated
| ||||||||
FormatComboExample
| Example of a Format
| ||||||||
LineDTAR0020.java
| Sample hand coded line example
| ||||||||
TypeCheckBoxYN.java
| Sample Type and Cell_Format interfaces
| ||||||||
TypeComboExample.java
| Sample Type and Cell_Format interfaces
| ||||||||
CopybookToLayout.java
| Converts a XML/Cobol Copybook to a Layout
| ||||||||
XmplDecider.java
| Example of using Record Deciders (java classes that decide which layout to use)
| ||||||||
XmplEditFormat1
| Example of adding a Format to the RecordEditor
| ||||||||
XmplEditSpecificFile1.java
| Edit a specified file with the RecordEditor
| ||||||||
XmplEditSpecificFile2.java
| This is an example of editing a specific file using the Record Frame (i.e. one record per frame)
| ||||||||
XmplEditSpecificFile3.java
| This is an example of editing a specific file using your own JTable
| ||||||||
XmplEditSuppliedData.java
| This is an example of editing program supplied data with the RecordEditor
| ||||||||
XmplEditType1.java
| Example of defining your own Types
| ||||||||
XmplFileStructure1.java
| This is a example of introducing a new file structure (Mainframe VB with a maximum block size of 9040)
| ||||||||
XmplFileStructure2.java
| This is a example of introducing a new file structure. In this case
this file structure is for Comma / Tab delimited files with the Column names on the second line of the file
| ||||||||
XmplFileToVelocity1.java
| This is an example of formatting selected files from a directory using Velocity (via FileToVelocity.java).
| ||||||||
XmplLineBuilder.java
|
This class takes a Record-Layout and generates 3 java class's (using Velocity):
| ||||||||
XmplLineIO1.java
| Demonstrates Reading a file using RecordEditor's Line Based Routines.
See "Reading a File" for more details.
| ||||||||
XmplLineIO2.java
| Demonstrates Reading and writing files using RecordEditor's Line Based Routines. It also
illustrates LineIOProvider and LineProvider.
| ||||||||
XmplLineIO2.java
| Demonstrates Reading files using the CobolCopybookReader interface.
| ||||||||
XmplLineIoVLR1.java
| Example of reading a Standard Variable length record file (VB file on the mainframe).
|
![]() | ![]() | ![]() |