The Protégé Short Note (Part 2)

sachini ranasinghe
3 min readNov 22, 2019

--

Named Classes and Disjoint Classes

Creating Named Classes

We should first go to the classes tab in Protégé window. You can see the “Thing” class which is super class of all the classes. Now we have to create the class hierarchy as we want. There are many ways to create named classes.

  • Using add subclass button and then entering class name.
add subclass button
  • Right clicking on the super class and click add sub class and then entering class name.
right click on the class you want to add sub classes to

Create classes Pizza, PizzaTopping and PizzaBase which are subclasses of Thing.

(we could also do this with add sibling classes button where we can add sibling classes to Pizza class which we create first)

  • Right clicking on the super class and click add sub classes and then entering class hierarchy or click tools menu at menu bar and click create class hierarchy.
To add a hierarchy of classes at once
add more than one subclass (Here as both sub classes have suffix “Base” it can be placed on suffix field)

Make all Topping types as below. Make all these sibling classes disjoint.

class hierarchy defined with tab spaces

With each tab a subclass level is defined. As example RedPepperTopping is subclass of PepperTopping which is a subclass of VegetableTopping.

Creating Disjoint Classes

Two classes are disjoint means that an individual (or object) cannot be an instance of more than one of these disjointed classes.

add disjoint classes
select all classes to be disjoint

--

--

No responses yet