Difference between revisions of "PrF UG queries create query"

From Protege Wiki
Jump to: navigation, search
Line 78: Line 78:
 
     </p>
 
     </p>
 
     <div>[[Image:PrF_UG_queries_query_slot_entry.png|frame|none|
 
     <div>[[Image:PrF_UG_queries_query_slot_entry.png|frame|none|
           Slot entry bar]]</div>
+
           Slot entry bar, empty]]</div>
  
 
   <li><p>
 
   <li><p>
Line 86: Line 86:
 
     If no class is selected, all slots are available.
 
     If no class is selected, all slots are available.
 
     </p>
 
     </p>
     <div>[[Image:PrF_UG_queries_query_select_slot.png|
+
     <div>[[Image:PrF_UG_queries_query_select_slot.png|frame|none|
           queries_query_select_slot]]</div>
+
           Select Slot dialog, "date_hired" selected]]</div>
  
 
   <li><p>
 
   <li><p>
Line 94: Line 94:
 
     and the criteria menu immediately to the right will be displayed.
 
     and the criteria menu immediately to the right will be displayed.
 
     </p>
 
     </p>
     <div>[[Image:PrF_UG_queries_query_slot_filled.png|
+
     <div>[[Image:PrF_UG_queries_query_slot_filled.png|frame|none|
           queries_query_slot_filled]]</div>
+
           Slot entry bar, filled]]</div>
  
 
   <li><p>
 
   <li><p>
Line 102: Line 102:
 
     the choices are based on the slot's Value Type.
 
     the choices are based on the slot's Value Type.
 
     </p>
 
     </p>
     <div>[[Image:PrF_UG_queries_query_menu_contains.png|
+
     <div>[[Image:PrF_UG_queries_query_menu_contains.png|frame|none|
           queries_query_menu_contains]]</div>
+
           pull-down criteria menu]]</div>
  
 
   <li><p>
 
   <li><p>
Line 119: Line 119:
 
       For [[PrF_UG_slots_value_type_class|Class]] value type,
 
       For [[PrF_UG_slots_value_type_class|Class]] value type,
 
       click the <b>Select Class</b>
 
       click the <b>Select Class</b>
       [[Image:PrF_UG_all_object.add.gif|all_object.add]] button
+
       ([[Image:PrF_UG_all_object.add.gif|all_object.add]]) button
 
       and select a class from the dialog.
 
       and select a class from the dialog.
 
       The query will find all instances where the slot value
 
       The query will find all instances where the slot value
Line 134: Line 134:
 
       For [[PrF_UG_slots_value_type_instance|Instance]] value type,
 
       For [[PrF_UG_slots_value_type_instance|Instance]] value type,
 
       click the <b>Select Instance</b>
 
       click the <b>Select Instance</b>
       [[Image:PrF_UG_all_object.add.gif|all_object.add]]
+
       ([[Image:PrF_UG_all_object.add.gif|all_object.add]])
 
       or <b>Select Query</b>
 
       or <b>Select Query</b>
       [[Image:PrF_UG_queries_query.gif|queries_query]] button
+
       ([[Image:PrF_UG_queries_query.gif|queries_query]]) button
 
       and select a value from the dialog box.
 
       and select a value from the dialog box.
 
       </p>
 
       </p>
Line 156: Line 156:
 
To [[PrF_UG_queries_run_query|run]] the query, click the <b>Find</b> button:
 
To [[PrF_UG_queries_run_query|run]] the query, click the <b>Find</b> button:
  
[[Image:PrF_UG_queries_query_find.png|queries_query_find]]
+
<div>[[Image:PrF_UG_queries_query_find.png|frame|none|
 +
      Find button]]</div>
  
 
To [[PrF_UG_queries_saving_query|save]] the query in the Query Library,
 
To [[PrF_UG_queries_saving_query|save]] the query in the Query Library,
 
give it a name and click the <b>Add Query to Library</b>
 
give it a name and click the <b>Add Query to Library</b>
[[Image:PrF_UG_queries_query.library.add.gif|queries_query.library.add]] button.
+
([[Image:PrF_UG_queries_query.library.add.gif|queries_query.library.add]]) button.
 +
 
  
 
</div>
 
</div>

Revision as of 13:23, October 25, 2008

Creating a Single Query


Protege-Frames User's Guide
Queries
The Queries Tab
The Query Editor
The Search Results Pane
The Query Library Pane
Creating a Single Query
Combining Multiple Queries
Chaining Multiple Queries
Running a Query
Saving a Query
Retrieving a Query
Clearing a Query
Exporting Query Results
Glossary, Editing Help

The Queries Tab allows you to query your project and locate all instances that match the criteria you specify. You can create a simple query, or combine multiple criteria to restrict or expand your results.

You can create a simple query based on a class, a slot, or both. When you specify a slot, you also specify the criteria for matching the slot:

  • A query based solely on a class will find all instances of the selected class and all of its subclasses.

  • A query based solely on a slot will find all instances whose value at the slot match the criteria you specify.

  • A query based on a class and a slot will find all instances of the class that match the criteria at the selected slot.

Note: Sometimes the query buttons or query entry bar will not display correctly. You can refresh the query entry by clicking on another tab and then returning to the Query Tab.

The directions below show how to select a class first, then a slot. You can also select the slot first and then the class; this is useful if you remember the slot name, but are not certain of the classes that it is attached to. To do this, select the slot as in Steps 3 and 4, then select the class as in Steps 1 and 2. In this case, the Select Classes dialog box will show only those classes that have the selected slot.

To create a query:

  1. To specify a class, click the Select Class (all_object.add) button above the Class entry bar. (If you wish to create a query based solely on a slot, start at Step 3.)

    Class entry bar
  2. Select the class you want from the Select Classes dialog box, then click OK. (If you wish to create a query solely on that class, you are now ready to run it.)

    Select Classes dialog, "Employee" selected
  3. Click OK.

    Class entry bar
  4. To specify a slot, click the Select Slot (all_object.add) button, above the Slot entry bar.

    Slot entry bar, empty
  5. Select a slot from the Select Slot dialog box. If you selected a class, only slots attached to that class will be shown. If no class is selected, all slots are available.

    Select Slot dialog, "date_hired" selected
  6. Click OK. The slot will be filled in and the criteria menu immediately to the right will be displayed.

    Slot entry bar, filled
  7. Make a selection from the pull-down criteria menu. This menu becomes active after you select a slot; the choices are based on the slot's Value Type.

    pull-down criteria menu
  8. Enter a value for comparison at the entry bar to the right. The entry method for this value depends on the slot value type.

    • For Boolean value type, select whether the slot value is true or false.

    • For Class value type, click the Select Class (all_object.add) button and select a class from the dialog. The query will find all instances where the slot value contains (or does not contain) the selected class.

    • For Float or Integer value type, enter the number to which you want to compare the slot value.

    • For Instance value type, click the Select Instance (all_object.add) or Select Query (queries_query) button and select a value from the dialog box.

    • For Symbol value type, the possible values are displayed as a drop-down list. Select a symbol from this list.

      Note: Sometimes the query buttons or query entry bar will not display correctly. You can refresh the query entry by clicking on another tab and then returning to the Query Tab.

To run the query, click the Find button:

Find button

To save the query in the Query Library, give it a name and click the Add Query to Library (queries_query.library.add) button.