Basic Editing with Protégé
See also the document structOntology v Protégé?
This basic guide begins after Protégé 4 is installed. If you need assistance on installation, see the installation help page.
Upon start-up, you will see the initial Protégé intro screen:
You have a number of options to load ontologies into the system. For simplicity sake, let's assume you already have a working ontology stored on your local computer. For the first time access, you will need to choose the "Open OWL ontology" option, and then follow the dialog to find your stored ontology on your local file system.
Once you have loaded an ontology for the first time, the next time you start Protégé you will then be able to choose a previously loaded ontology from the intro screen listing. In this case, we have chosen one of our previous ontology files, which is highlighted in yellow in the figure above.
The 'koala' example as shown is one of the more useful ones to see ontology construction.
Upon selecting an ontology file, the program will then start.
The Protégé application has a fairly standard layout. Major options and settings are provided from a main menu, shown at top. Key views of the ontology are shown by a number of tabs, shown arrayed below the main menu level:
Each tab presents a number of "views" arranged within the tab pane. In default mode, these "views" (subpanes) are pre-set as defaults and should be sufficient for initial use and familiarization.
By default, the main screen opens with the tab showing the overall view of the current (active) ontology, as shown above.
[Should you desire to change the actual views, you pick an item from the View main menu, and then place where you want it on the tabbed pane. Once you pick a listed view, and then move your mouse over the tabbed pane, you will see a circle icon with a solid dot:
As you move your mouse around the tab pane, you will see a blue-bordered box that shows you where the new subpane will appear. When you click the mouse, that is where the subpane will appear.
Note that each subpane has a colored header that identifies what kind of object view it is; also, each subpane header has a number of icons that indicate you can split the subpane vertically or horizontally, float it, or close it.]
Overview of Tabs
The tabs in the Protégé interface show the various entities (objects or properties) within the ontology. We will skip the first Entities tab since it is a "mixed" view of multiple entity types and is often where you might want to create your own tailored views (see above).
The first tab you should start with is the Classes tab. Classes are the major building blocks ("nouns") within your ontology. (Depending on whether you are also metamodeling with your ontology, what you enter in the Classes tab also gets reflected in the Individuals tab; see below.)
Most all tabs, including this one, show a listing of the subject entities in a tree structure in the leftmost subpane. Here is where you do the selection and viewing of your desired entities.
(Note that all such trees have as their root node the "Thing" entity, which is the standard root element in an OWL ontology.)
When first opened, this subpane generally begins with its tree in collapsed mode. However, if there are nested items below in the tree, you will see a right-pointing arrow. Clicking on it causes the arrow to now point downward and for that level of tree hierarchy to be expanded.
Upon selecting an item in the tree, its background color changes to blue and details then begin to appear in the other subpanes for that item.
In the standard Class views, we see the tree of classes, an annotation subpane and a description of the structural relationships (sub-classes and other class specifications).
Like the header color of various object views, different entities in Protégé are also keyed by symbol color and size, From the Class tab, you can see that class entities are shown by yellow-orange circles. As we proceed through the other tabs and entity types, note how these symbols and colors change.
For More Information
For more information about the role and management of classes, see Sections 4.1 to 4.3 and 4.8 in the Protégé manual.
The Individuals tab has a similar layout to Classes. In this particular case, we are metamodeling most classes as individuals, so we see somewhat duplicated information here, but only from the Individual (instance) perspective:
For the time being, only enter true individuals (and not those resulting from "punning" and metamodeling) on this tab. Otherwise, punned NamedIndividuals can actually be entered and managed solely via the Classes tab.
Object Properties Tab
Object properties define the relationships (predicates) between two objects (also called individuals) in an OWL ontology. Structurally, object properties are the edges that connect the nodes in an OWL ontology graph.
Note that object properties are distinct from annotation and datatype properties. The role of annotation properties is to provide descriptive metadata about ontology entities; annotation properties do not participate in structural inferencing or reasoning. The role of datatype properties is to define the allowable data types and values for data values related to objects.
Defining and managing the restrictions and other use conditions on the predicates between objects is accomplished under the Object Properties tab. Like the other tabs, it has a tree layout on the left, with descriptive and defining information on the subpanes to the right:
In initial phases, you will likely do little with this tab, and then only to enter new predicates or change their annotation properties (see below). Over time, as you learn more, you will likely need to get more involved in defining the domains, ranges, disjointedness, and restrictions applied to these properties. This is the tab under which all of these object property assignments get made.
For More Information
For more information about the role and use of properties, see Sections 4.4 to 4.7 in the Protégé manual. The manual also has many sections providing guidance on property restrictions and interactions, which are also essential reading.
As you learn more, you will also want to define data property information. By that point, however, you will have become familiar enough with the standard Protégé interface that interacting with that tab should be straightforward.
Tabs are also where many of the plug-ins available to Protégé appear after they are installed. Once such plug-in, OWLViz, comes as part of the standard Protégé distribution package. It provides a basic network or graph view of your ontology:
For more on OWLViz, see its own help guide (this is also true of other plug-ins).
General Tab Management
Under the Tabs item on the Protégé main menu you can turn off and on available tabs (by clicking on the menu item, which will show a checkmark appearing or not). You can also define your own tabs, with your own specific views, if you so choose.
Editing and Annotating
Of course, one major role of Protégé is as an editor of ontologies, often related (but certainly not limited) to annotations.
From the Classes tab (as an example), we can invoke the annotation editor directly from the annotation subpane by chosing the green plus icon:
That brings up an editor menu that will show all available annotation properties available in the left editor pane; what you enter occurs in the right editor pane.
(Note: the property highlighted in the left hand pane is the last one used.)
Once you enter the information in the right-hand pane, it is also good practice to assign it a language ("en" for English in our case) and then press OK to conclude the update.
Alternatively, individual annotation properties may be edited by picking the blue with dot icon associated with each item:
The process repeats as before. You can also use this popup menu to highlight a different entry in the left-hand panel for adding a new annotation if you so choose.
In addition to editing (blue with dot icon), each annotation property item can also be deleted (red X icon) or further annotated (black icon with the @ icon):
These four basic icons (green, blue, red, black) occur throughout the interface and may be used in a similar manner for other entities.
Declaring an Annotation Property
The above relies on the listing of annotation properties already registered to the system. To add a new annotation property we need to follow these steps.
- Go to the Active Ontology tab (or some other location where a "Annotation property hierarchy" view exists)
- Click on any of the existing annotation properties in the annotation property hierarchy view
- Click on the 'Add sibling' icon on this view (shown as highlighted)
- This will invoke the new entry editor, where upon you enter the new annotation property:
This new annotation property is now available for the same assignment and editing actions above.
You change and invoke preferences by selecting the Preferences item on the File main menu. This brings up a popup window with a tabbed dialog. It is worthwhile getting familiar with the items on this popup, since your choices and assignments here affect how the Protégé interface looks and acts to you.
One of the key items to set is how labels and such render within the interface. When picking the Render tab on the popup, we see the following:
This is the default setting, which renders (shows) entities in the interface with their full path value.
For example, when looking at the annotation properties hierarchy, the properties have labels such as:
Or, when looking at the left-hand tree view, we also see this tree presentation:
Note that the labels are shown with spaces between words and phrases (more than a single term) are also shown in quotes.
If this is not to your preference, you could change to a URI fragment rendering, which basically drops the standard part of the URI in displaying labels. (This is our preferred rendering.) You do so on the Render tab of the Preferences popup by selecting the different radiobutton:
Now, our same annotations properties hierarchy has shorter labels:
But, our tree view now shows the actual fragment as the label (no longer the preferred label), which removes the space before terms but also drops the quotes for phrases:
You are encouraged to play with these various rendering settings until you achieve the look you want for Protégé.
You should become familiar with all of the tabs under the Preferences popup and to experiment with what you like. Expanded trees are often desirable as the default, for example.
One additional setting we do recommend is under the New Entities tab (which is important because this tab governs how newly added items are shown in the interface). We recommend starting with the 'active ontology URL' as your standard default choice.
With this basic introduction, you are now ready to learn more about the nuances of this tool for actual ontology building and management. To proceed, you should check out the Protégé manual. Another useful source is the general intro page to Protégé 4 user documentation.
You may also want to check out the general Protégé category for other use guides on this wiki.
Protégé stores its preferences within Java. Should something get messed up in the operation of Protégé, it may very well be hidden within these Java preferences and nearly impossible to find.
If you suspect there are settings issues within your Protégé, follow the instructions in clearing preferences in Java; it may very well correct your issues.