Protege-Frames also allows you to create slots that can be used to describe relationships between classes that are not defined by the class hierarchy. This can be done using slots of type Instance or of type Class. For example, an editor may be
responsible for one or more employees. We can create a slot that represents this relationship between the
Editor and
Employee classes as follows:
- Select Editor in the Class Hierarchy pane.
- Click the Create Slot
button to create and attach a new slot to Editor.
- In the resulting slot form, type responsible_for in the Name field.
- Select Instance from the Value Type menu.
A new field, Allowed Classes, is displayed below the Value Type menu.
- Click the Add Class button that appears at the top right of the Allowed Classes area. A Select Classes dialog box displays all the classes in the project. Select Employee and click OK.
- To allow an editor to be responsible for more than one employee, click multiple in the Cardinality area to the right of the Value Type area.
After completing steps 1 through 6, the slot form for
responsible_for looks as follows:
What have we done? We have created a slot that can hold one or more
instances of the
Employee class as its value. Later, when we create an instance of the
Editor class, and we want to specify who that editor is responsible for, we can choose one or more instances of the
Employee class to fill in the value of the
responsible_for slot.