company logo

ODL exchange schema definition

The ODL schema definition is a script equivalent to the dictionary definition. It follows the same rules as defining a structure in the dictionary.

In order to provide self-contained OIF files, the ODL schema can be passed on top of an OIF file.

Specification

The BNF describes the common structure of an OIF file. The OIF file might be preceded by an exchange schema definition, which must start with the SCHEMA keyword. The details for schema definitions are described in OSI language reference.

The example below shows a complete definition for a Person data exchange schema. In order to define the main data type, i.e. the data type defining the instances in the collection passed in the import file, the schema name should be set to the name of the main structure.

SCHEMA XPerson {

  STRUCT XAddress {

         STRING   f_zip        SOURCE(zip);

         STRING   f_city       SOURCE(city);

         STRING   f_street     SOURCE(street);

         STRING   f_number     SOURCE(number);  

  };

  

  STRUCT XPerson {

    ATTRIBUTE {

         STRING   f_pid        SOURCE(pid);

         STRING   f_name       SOURCE(name);

         STRING   f_first_name SOURCE(first_name);

         STRING   f_birth_data SOURCE(birth_date);

         STRING   f_sex        SOURCE(sex);

         STRING   f_married    SOURCE(married);

         STRING   f_income     SOURCE(income);

    };

    REFERENCE XAddress  f_location[3] SOURCE(location);    

  };

};

Definition: 

OIF                   := [ schema_dcl ] | OIFData

// ... OIFData definition

// bnf references

odl_symbols          ::= class(OSI)

schema_dcl           ::= ref(schema_dcl)

Usage

Since OIF is able to transfer complex data, the file or exchange schema is usually defined in the dictionary. In order to transfer self-contained files, it is, however, suggested to create OIF files containing data and schema.