All we have done so far is create a slot which defines the general attribute
name. To truly incorporate it in our ontology, we need to assign it to a class, e.g., we want every instance of the
Author class to have a name.
To do this, we will return to the Classes Tab and edit the
Author class. Any attributes you create or assign to a class are displayed in the Class Editor, to the right of the Class Browser. We have already used the Class Editor to change the name of the classes we have created, and also to change the role of the
Author class to Abstract. Now we will use the Class Editor to view and name slots.
To assign the slot
name to a class:
- Click on the Classes Tab.
- Highlight the class Author in the Class Hierarcy pane.
Take a moment to look at the Class Editor to the right. This area has a Name (which we have already changed to Author), the role (Abstract), as well as documentation and constraints. Below these fields is the Template Slots pane, which takes up the entire lower half of the Class Editor pane. This is the area that lists all the slots assigned to a class. Currently it is empty.
- To add the slot to the class, click the Add Slot
button. The slot buttons appear at the far right of the Protege-Frames window, just above the Template Slots pane.
- When you click the Add Slot button, the Select Template Slots dialog box displays all the slots in your project in alphabetical order (with the exception of the Protege system classes, which are listed at the bottom of the slot hierarchy).
- Select name and click OK.
If you look at the Template Slots for Author, you see that name has been added to the list of Template Slots, along with its properties, in this case, its cardinality (an author can have only one name) and the slot type, String.