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