please any one can help me to prepare object oriented design for EDI structure, I want to know what is classes and attributes of it. EDI structure:
ISA*00* 00 *08*9251730000 *12*7142569388T *050215*1514*U*00401*000005132*0*P*>~ GS*IN*2137279234*7142569388*040713*1514*000000001*X*004010UCS~ ST*810*0001~ BIG*040713*1001*040625*P89320~ N1*BT*ACME DISTRIBUTING COMPANY~ N3*P.O. BOX 33327~ N4*ANYTOWN*NJ*44509~ N1*ST*THE CORNER STORE~ N3*601 FIRST STREET~ N4*CROSSROADS*MI*48106~ N1*RI*SMITH CORPORATION~ N3*900 EASY STREET~ N4*BIG CITY*NJ*15455~ PER*AD*C.P.JONES*TE*6185558230~ ITD*01*3*2*10~ IT1*3*CA*12.75**VC*6900~ IT1**12*EA*.475**VC*P450~ IT1**4*EA*.94**VC*1640Y~ IT1**1*DZ*3.4**VC*1507~ TDS*5111*~ CAD*M****CONSOLIDATED TRUCK~ CTT*4*20~ SE*21*0001~ GE*1*000000001~ IEA*1*000005132~
This is an edi x.12 invoice file. I don't know what you mean by "prepare object oriented design". EDI contains raw data according to a spec ... if you don't have a spec you need to get one from your trading partners. The details of the interpretation (especially things like discounts (SACs), ITD (terms), are very specific to the vendor. Each trading partner might require different N1 segments, for example. Some trading partners send the "bill to company" in the N1*BY segment, some in the N1*BT. YOU NEED a spec from the trading partners to interpret the data. The syntax of edi is defined, but not the usage and interpretation.
Per wanted to create an OOP struture, that implies a data structure and methods to operate on that structure. The classes you'd use (inherited from each other) might be EDI_DOCUMENT_CLASS -> EDI_810_CLASS -> EDI_810_VENDOR_SPECIFIC_CLASS. Per the methods that operate on this, you have to know what you want to do with the data. Translate it and import it into a database? Transform it and send it somewhere? Do you need to validate it (probably a good idea)? Do you need to read it? Do you need to create it? Do you need to respond to the transmission with a 997?
As Sethcran says above, to store the data in a structure you need to accommodate several things: