Creating
a Blank Query
You can create a blank query using the PAL Expression
Editor. To do this, you can open the
editor in one of three ways:
The first two methods give identical results; they just reflect different
ways of viewing queries in Protégé. The third method actually attaches
the query to the class. Attaching a query to a class creates an
implicit range definition over all instances of the class, for all variables
that appear in the query statement and that are not defined by an explicit
range definition.
At the Queries Tab
To open the editor at the Queries tab:
- Go to the PAL Queries Tab
- Click the Create button at the
upper right of the Choose Queries pane.
A new query is created and the editor opens in a separate window.
At the Instances Tab
- Go to the Instances Tab.
- Display the classes under :SYSTEM-CLASS, display the classes under
:CONSTRAINT, and click on :PAL-CONSTRAINT to highlight it.
- Go to the Direct Instances pane and click the Create
button.
A new query is created and the PAL Expression
Editor
appears in the Forms pane of the Instances tab.
At the Classes Tab
To create a query at the Classes Tab, and attach
it to a class, you must first make sure the class is queriable. See Making a Class Queriable
for more information.
Once your class is queriable, you can create and attach a query:
- Go to the Classes Tab.
- Highlight the class to which you wish to attach the query to be
created.
The Class Form for the selected class is displayed at the right of the
Classes Tab.
- Click the Create
button at the upper right of the Class Queries pane in the Class
Form.
A new query is created and the PAL Expression
Editor
opens in a separate window.
Working With a New Query
Once the query has been created, you can:
- Name it by typing directly in the Name field
- Enter a description by typing directly in the Description
field.
- Define variable ranges by typing directly in the Range area, or using the Range Editor.
- Create a statement by typing directly in the Statement area, or using the Statement Editor.
PAL Queries User Interface/Creating a Blank Query
Next: Viewing a Query
PAL Table of Contents