next up previous contents
Next: Usage as Applet Up: An Example Session with Previous: Editing Telos Objects using

Using the Query Facility

We now want to ask the server for all Employees working for Angus. We first clear the window of the Editor field by clicking the Clear menu item. Then we define a new query class (AngusEmployees):

QueryClass AngusEmployees isA Employee with
constraint
    c: $ A(this,boss,Angus) $
end

We can tell this query, so that it is stored in ConceptBase and we can reuse it later, or we can just ask the query, i.e. the query will told temporarily and evaluated. If we ask the query, the answer is displayed in the Telos Editor field as well as in the history window. Figure 4.25 shows the ConceptBaseWorkbench containing the query class and the answer.

   figure1236
Figure 4.25: Query class and its answer

We can also execute this query from the Graph Editor. From the menu ``Current connection'' we select ``Query to server''. A dialog we ask for the name of query class. If we have told the example query, we can type AngusEmployees in the text field and hit on the ``Submit Query''. The query will be evaluated and the objects in the result will be shown in the list box. We can select the objects which should be added to the graph (multiple selection with the Shift-key is possible) and click on the ``Show objects'' button. The selected objects will be added to the graph, however with no connection to existing objects.



ConceptBase Team