The Graph Editor supports also the creation and deletion of Telos objects. A Telos object in the context of the Graph Editor is a proposition as described in chapter 2. As described there, there are four types of Telos objects:
Figure 4.11: Create Object dialogs for Individuals, Attributes, Instantiations, and Specializations
For each object type, we provide a dialog to create this object type as shown in figure 4.11. This dialog is opened by clicking on one of the ``Create'' buttons in the tool bar, or by selecting an ``Add ...'' item from the popup menu (e.g, ``Add instance'' or ``Add subclass''). If there are some objects selected in the current frame, then the object names of these objects will be inserted into the text fields of the dialog in the order they have been selected (i.e., the first text field will contain the name of the object which has been selected first). Furthermore, if you move the cursor into a text field in the ``Create Object'' dialog and select an object in the graph, then the name of this object will be inserted into the text field.
As changes might lead to a temporary inconsistent state of the database, we do not execute the changes directly on the database. They are stored in an internal buffer in the Graph Editor and executed when you hit the ``Commit'' button in the tool bar.
If you have specified the attribute category, you can also select the attribute value from a listbox by clicking on the ``Select'' button next to the text field for the attribute value. The listbox will show all instances of the destination of the attribute category (e.g. all instances of Department for the category Employee!dept).
If you select the radio button ``Show Attribute Instantiation'' then the Graph Editor will also show the instantiation link for the attribute. For example, if you create a new attribute for John with the label JohnsDept in the attribute category Employee!dept, then the instantiation link between John!JohnsDept and Employee!dept will also be shown. As the graph gets quite confusing with too many links, this radio button is not selected by default.
Deletion of objects is also possible. As this operation should not be mixed up with the removal of an object from the current view, this operation is just available from the popup menu (item ``Delete Object from Database'').
As you might make mistakes while editing the model, there is the possibility
of undoing changes. The button ``Show added/removed objects'' list all objects
that have been added or removed (since the last succesful commit or since the connection has been
established). A screenshot of the dialog is shown in figure 4.12.
The left list shows the objects that have been added, the right list shows the objects
that have been removed. By clicking on the button ``Re-Insert/Delete'' object, the selected
objects will be re-inserted in or deleted from the graph
.
Figure 4.12: List of objects which have been added or removed
If you are satisfied with the changes you have done, you can click on the ``Commit'' button. Then, the Graph Editor will transform the objects to be added or removed into a list of Telos frames and send them to the server using the TELL, UNTELL, or RETELL operation. If the operation was successful, all explicit objects will be checked if they are still valid and if their graphical type has changed (as in the ``Validate and update'' operation from the ``Current Connection'' menu). If there is an error, the error messages of the server will be displayed in a message box. The internal buffer with the objects to add or remove will be not changed in this case.