This package holds Classes that describe a Files Structure RecordLayout + the lines (Line, XmlLine) in the File. It also hold Description-Classes used by the RecordEditor.

The important classes / interfaces are

  1. LayoutDetail Class that describes a file (and its lines) Structure -i.e. the various records and where the fields start / end.
         LayoutDetail  - Describes a file
           |
           +----- RecordDetail (1 or More) - Describes one record in the file
                    |
                    +------  FieldDetail (1 or More)  - Describes one field in the file 
    
  2. AbstractLine description of a Line Class that holds one line in a file.
  3. Line Normal implementation of a Line
  4. XmlLine Implementation of a Line for Xml files,
  5. FieldValue - Class to get/set a fields value - it is a reference to one field in a line.
The following example demonstrates getting a field value:
	            long sku = saleRecord.getFieldValue("KEYCODE-NO").asLong();


The following example demonstrates creating a line and writing it to a File:


	            int fileStructure = IFileStructureConstants.IO_FIXED_LENGTH;
	            CopybookLoader loader = new RecordEditorXmlLoader();
	            ExternalRecord extlayout = loader.loadCopyBook(copybookName, 0, 0, "", 0, 0, null);
	        
	            LayoutDetail layout = extlayout.asLayoutDetail();
	            AbstractLine saleRecord = new Line(layout);
	            AbstractLineWriter writer  = LineIOProvider.getInstance().getLineWriter(fileStructure);
	            
	            writer.open(salesFileOut);

	            saleRecord.getFieldValue("KEYCODE-NO").set(1331);
	            saleRecord.getFieldValue("STORE-NO").set(1);
	            saleRecord.getFieldValue("DATE").set(80921);
	            saleRecord.getFieldValue("DEPT-NO").set(100);
	            saleRecord.getFieldValue("QTY-SOLD").set(7);
	            saleRecord.getFieldValue("SALE-PRICE").set(7.00);
	            writer.write(saleRecord);