Creating defined classes in Protege

The named classes in Protege are the classes which one integrates into the ontology (taxonomy) manually. These classes' superclasses are defined during their creation. The members (individuals) and subclasses of these classes have to be added manually. Defined classes, also called restrictions, define which individuals are elements of this class. A reasoner can automatically classify them as well a show relationships (superclasses, subclasses) to other classes in the ontology.
1 answer

defined classes in Protege

There are two ways to create a defined class: Use the graphical method (less expressible), or use the text box (more expressible). The graphical method is intuitive, so only the syntactical method will be defined here.

The Protégé tutorial shows how the definitions (restrictions) are made by adding to the superclasses of the class. I’ve added the equivalent classes instead, and found that it works just as well.
When clicking on the plus sign next to equivalent classes or superclasses a window pops up with four tabs: Class expression editor, asserted class hierarchy, object restriction editor and data restriction editor. In the class expression editor there is a text box, in which the classes can be defined with a special syntax.

There are several kinds of restrictions: some (existential, meaning it has to be related to at least one), only (universal, meaning it has to be related to all), min (define the minimal amount of related individuals), max (define the maximal amount of related individuals), exactly (define the exact amount of related individuals) and value (define the related individual).

In this example scenario there are the classes: Car, Truck, LargeMotor, MiddleMotor and SmallMotor.
The object properties: isIn (is in the car or truck)
If one would want to define a class which only contains individuals which are in cars: isIn some Car
Individuals with are in cars or trucks: hasA some (LargeMotor or MiddleMotor)
Individuals which are in a Rolls Royce phantom: isIn value rollsRoycePhantom
Individuals which are in exactly 2 cars: isIn exactly 2 Cars