next up previous
Next: The Graph Editor Up: Editing Telos Objects Previous: The Token Level

Defining Attributes of Tokens

At first let's have a look at the department class, defined in exercise 3.3:

Department in Class with
         attribute
               head: Manager
end

There is a link between Department and Manager of category attribute with label head at the class-level. Now we have to establish a link between Production and Lloyd of category head at the token-level. The label of this link must be a unique name for all links with the source object "Production". We choose head_of_Production as name.

The resulting Telos frame is:

Production in Department with
  head
    head_of_Production : Lloyd
end

Exercise 3.4:

a)
Add the frames for Lloyd, Phil, Eleonore and Albert to the object base.
b)
Add the Telos frames for Production, Marketing, Administration, and Research and the links between the departments and their manager to the object base.
c)
The four managers have the following salaries:

tabular95

Add this information to the object base. Use "LloydsSalary", "PhilsSalary", etc. as labels. (Remember that you can load an existing object from the object base into the Telos Editor by using "Load frame".)

The destination objects of attribute instantiations must be existing objects in the database or instances of the system builtin classes Integer, Real or String. Objects which instantiate these classes are generated automatically when referenced in a Telos-frame. At this point it is important to recognize, that attributes specified at the class level do not need to be instantiated at the instance level. On the other hand an instance of a class containing an attribute may contain several instances of this attribute.

Example:

George in Employee with
        name
                GeorgesName: "George D. Smith"
        salary
                GeogesBaseSalary : 30000;
                GeorgesBonusSalary : 3000
end

The attribute dept and boss have no instances, while salary is instantiated twice.

To complete the token level, we have to add more employees to the object base.

Exercise 3.5:
Add the following employees to the object base

tabular105


Use MichaelsDepartment etc. as labels for the attributes.

Now the first step in building the example application is completed. The next chapter describes a basic tool of the usage environment which can be used for inspecting the object base: the GraphBrowser.


next up previous
Next: The Graph Editor Up: Editing Telos Objects Previous: The Token Level

ConceptBase Team