Online Help TEDIMessage

Unit JclEDI_UNEDIFACT

Types

TEDIMessage

   The TEDIMessage object contains and manages TEDISegment objects.

   In JclEDI_ANSIX12.pas: Use the TEDITransactionSet object instead since TEDIMessage object is not defined.

 Procedure and Properties

procedure InternalCreateHeaderTrailerSegments; virtual;
property SegmentUNH: TEDITransactionSetSegment
  read FUNHSegment write SetUNHSegment;
property SegmentUNT: TEDITransactionSetSegment
  read FUNTSegment write SetUNTSegment;

   InternalCreateHeaderTrailerSegments creates the EDI transaction set header and trailer segments and is called in the constructor.

   The SegmentUNH property is the message header segment.

   The SegmentUNT property is the message trailer segment.

   It is important to note that the TEDIMessage object does not make any assumptions on the data contained within the message header or trailer segments, and it is up the programmer to accurately maintain the data within these segments.

   For custom EDI implementations the message header and trailer segments can be used with a varying number of elements within these segments.

 Function

function InternalCreateSegment: TEDISegment; virtual;

   InternalCreateaSegment will create a TEDISegment object and is used by InternalCreateEDIDataObject.

 Function

function InternalAssignDelimiters: TEDIDelimiters; override;

   Acquires a TEDIDelimiter reference from the TEDIMessage parent object.

 Function

function InternalCreateEDIDataObject: TEDIDataObject; override;

   This function calls InternalCreateSegment

 Functions and Procedures

function AddSegment: Integer;
function AppendSegment(Segment: TEDISegment): Integer;
function InsertSegment(InsertIndex: Integer): Integer; overload;
function InsertSegment(InsertIndex: Integer; Segment: TEDISegment): Integer;
  overload;
procedure DeleteSegment(Index: Integer); overload;
procedure DeleteSegment(Segment: TEDISegment); overload;
function AddSegments(Count: Integer): Integer;
function AppendSegments(SegmentArray: TEDISegmentArray): Integer;
function InsertSegments(InsertIndex, Count: Integer): Integer; overload;
function InsertSegments(InsertIndex: Integer;
  SegmentArray: TEDISegmentArray): Integer; overload;
procedure DeleteSegments; overload;
procedure DeleteSegments(Index, Count: Integer); overload;

   Segment item management functions and procedures.

 Function

function Assemble: string; override;

   This function implements the assembling of EDI data into EDI file format.

 Procedure

procedure Disassemble; override;

   This procedure implements the disassembling of EDI data from EDI file format.

 Property

property Segment[Index: Integer]: TEDISegment read GetSegment write SetSegment;
  default;

   This property allows direct and easy access to the TEDISegment objects managed by the object list in TEDIMessage.

 Property

property Segments: TEDIDataObjectList read FEDIDataObjects;

   A property that exposes the object list in TEDIMessage.

 Property

property SegmentCount: Integer read GetCount;

   Gets the count of TEDISegment objects. The message header and trailer segments are not included in this count.

Usage

Notes & Examples

< Under Construction >