CERN -> IPT Group -> FrameMaker at CERN
Information Service User's Guide

3.2 Defining new information type

Software developer should use the OKS Schema Editor application to define a new IS information type. This definition will be stored in a file in the XML format. For information about the OKS Schema Editor see [10]. The OKS Schema Editor have to be started with the following command:

> is_edit_repository.sh [[xml_file]...]

This script runs the OKS Schema Editor and loads the xml_file files into it. These files contain your own IS types definitions. If you don't have it yet just run the script without parameters and create a new XML file using the OKS Schema Editor menus. In this file you can define any number of your own IS information types.


There is one class that is always loaded by the is_edit_repository.sh script to the OKS Schema Editor. This is the abstract Info class that must be used either as direct or as indirect base class for any user-defined information classes.

In order to define a new IS type, using OKS Schema Editor, one has to accomplish the following steps:

  1. Create new XML file (only if it has not been yet created) and set this file as active. Active means that all new class declarations will be stored in this file.
  2. Create new class. This class must inherit either from the Info class or from another IS class visible in the OKS Schema Editor.
  3. Create attributes for the new class. For each attribute one has to provide a type and optionally a description.
  4. Save you XML file and exit schema editor.

Figure 3.1 shows the OKS Schema Editor windows with the two classes: Person and Employee. The Employee class inherits the Person and the Person in turn inherits the abstract Info class.

Figure 3.1   Person and Employee classes in the OKS Schema Editor

 


2 July 1998 - WebMaster
Copyright © CERN 1998