|
Navigation: Quick Start Tutorials > Refining queries with the graphical interface |
![]() ![]()
|
Creating and submitting a simple query like the one described in the previous topic is quite easy but not so helpful. Instead of parsing through all the results to find what you want, a more effective way to deal with this is to refine your search. We describe here how this can be done.
Add a restriction:
To refine the query created in the previous topic you first need to discover what the possible refinement options are.
| 1. | Click on the query root node in the query panel. All properties (features) of the concept represented in the selected node are displayed in the Refinements panel: |

| 2. | Scrolling down the list of properties you can identify which one would obtain the results that are closer to what you want. For example you might be interested in tools which implement some algorithm. By right-clicking on the implements property the following popup menu appears: |

| 3. | If you wanted to find tools that implemented a specific algorithm you would create a HasValue restriction. If instead you were interested in the number of algorithms a tool implemented you would create a Cardinality restriction. Here select the SomeValuesFrom restriction from the menu to signify that you only want to make sure that there is some algorithm associated with the tool: |

Add more restrictions:
In the same manner you can add more restrictions to better refine your search. You can add as many restrictions as necessary.
Here are the general steps needed to add a restriction:
| 1. | Click on the node in the query tree you want to refine. |
| 2. | If the node can be refined, all available refinements are displayed in the Refinements panel. |
| 3. | Right-click on a property in the Refinements panel to refine the query node over that property. |
| 4. | Select an appropriate restriction from the popup menu. |
| 5. | If the restriction requires it (e.g. Has Value restrictions), specify the required parameters. |
Suppose that you wanted to refine the query described in the previous section as follows:
Search for tools that implement some algorithm, belong to "Vincent Cheutet", require at least 2 other tools and their execution platform is Linux.
This can be visualized as follows:
Search for tools that:
implement some algorithm,
belong to "Vincent Cheutet",
require at least 2 other tools, and
their execution platform is Linux.
This makes it easier to identify what restrictions should be imposed on the query:
|
|
|
|
|
|
|
To extend the query created in the previous section to include all the restrictions mentioned you should follow the next steps:
| 1. | Click on the SoftwareTool node in the Query tree. |

| 2. | Right-click on the hasOwner property in the Refinements panel and select the HasValue restriction. |

| 3. | In the Select Instance dialog select the class PersonInfo in the left panel and then scroll down on the right to find the "Vincent_Cheutet" instance. Select the instance and then click on |

The Query panel has now become:

| 4. | Click on the SoftwareTool node in the Query tree. Then right-click on the requiresTool property in the Refinements panel (any of the requiresTool entries will do). From the popup menu select the Cardinality restriction. In the Cardinality property dialog insert 2 as the value and |

| 5. | For the last restriction click again on the SoftwareTool node in the Query tree. Scroll down in the Refinements panel to find the hasExecutionPlatform property. Right-click on the property and select the Datatype restriction from the popup menu. In the Datatype property dialog insert Linux as the value and |

The Query panel has now become:

Add a nested restriction:
You can continue the example query formulated in the previous section by extending it to add a nested restriction. In this query only the first restriction node (besides the query root node) can be further refined. What is refined in this node is the concept of Algorithm. To refine this concept we can assume that we are not interested in algorithms in general, but in algorithms that implement a specific functionality.
To create the restriction proceed as follows:
| 1. | Click on the |

| 2. | Scroll down in the Allowed classes section of the Select instance dialog to find the TransformFunctionality class. Click on the class and then select the AffineTransformAlgorithm instance from the Instances panel on the right. |

Finally, the Query panel has become:

See also: