next up previous contents
Next: Caching of Query Results Up: ConceptBase Graph Editor Previous: Popup Menu

Editing of Telos Objects

 

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:

   figure1115
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.

Creating Individuals:
If you want to create a new individual object, you just have to specify the object name. You have to enter a valid Telos object name, for example it must not contain spaces. In addition, you can select a graphical type for the object. Note that the selection of the graphical type has no effect in the database, e.g. by selecting the graphical type of a class (ClassGT) the object will not declared as an instance of Class. If you have performed the commit operation, the object will get the ``correct'' graphical type from the server.

Creating Instantiations:
In the dialog for instantiations, you have to enter the name of the instance and the name of the class in the two text fields. If the object entered does not yet exist, it will be created and represented in the default graphical type.

Creating Specializations:
This dialog is similar to the one before except that you specify here the name of the subclass and the name of the superclass. Objects that do not exist yet, will be created and represented in the default graphical type.

Creating Attributes:
This is the most complex dialog as you have to specify the source, the label, the value, and the category of the attribute. The source and the value (or destination) of the attribute are normal object names. The label may be any valid Telos label. The attribute category has to be a select expression specifying an attribute category (e.g., Employee!salary, see chapter 2). The attribute category can be selected from a listbox by clicking on the ``Select'' button next to the text field of the attribute category. All attribute categories that apply to the current source of the attribute will be shown. Note that the list will be empty if the source object does not yet exist in the database.

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 gif.

   figure1123
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.


next up previous contents
Next: Caching of Query Results Up: ConceptBase Graph Editor Previous: Popup Menu

ConceptBase Team