Difference between revisions of "Protege4GettingStarted"

From Protege Wiki
Jump to: navigation, search
(Stacked views)
(Reconfigure the User Interface: screenshots for configuring)
Line 104: Line 104:
 
All changes will be saved when Protege is properly shut down (or the save can be forced by selecting "Save current layout" in the Tabs menu).
 
All changes will be saved when Protege is properly shut down (or the save can be forced by selecting "Save current layout" in the Tabs menu).
  
[[Image:asserted-supers.png|frame|none|screenshot of the asserted superclass heirarchy view]]
+
Position the new view over the top of an existing one:
 +
[[Image:PositionNewViewOnTop.png|600px|none]]
  
 +
Drop the new view over the top of an existing one - the result is a stack:
 +
[[Image:DropNewViewOnTop.png|600px|none]]
 +
 +
Position the new view below an existing one:
 +
[[Image:PositionNewViewBelow.png|600px|none]]
 +
 +
Drop the new view below an existing one - the result is another split (surrounding views are resized to fit):
 +
[[Image:DropNewViewBelow.png|600px|none]]
  
 
== Human Readable Entity Names ==
 
== Human Readable Entity Names ==

Revision as of 05:48, August 14, 2008

Getting Started with Protege 4.x OWL

This page contains instructions for getting started with the OWL editor in Protege 4.x.


Back to Protege4UserDocs


Download

If you haven't already done so, you need to download and install Protege 4.0 from the Protege website. If you are a new user, please go to the main download page and register first, which helps us to track the number of Protege users: http://protege.stanford.edu/download/download.html.

If you are an existing user, you can proceed directly to the installer page: http://protege.stanford.edu/download/prerelease-alpha/index.html.

Note: On the main download page, you will also find links to a release notes page for each new build of Protege 4.0, as well as a link to the location of the source code: http://protege.stanford.edu/download/registered.html#p4.


screenshot of protege 4.0 installer page


Install & Run Protege

Once you have navigated to the installer page, click the "Download Installer for <xxx-platform>" button to run the installer:


screenshot of protege 4.0 installer


Run Protege from the location where you installed shortcuts or from the Protege installation directory specified during the installation process. On a Windows machine, you can double-click the Protege executable file (Protege.exe), or use the run batch file (run.bat). If you choose to use the batch file, please make sure the JAVA_PATH variable is set correctly. On the Mac there will be a Protege.app, or you can run using one of the scripts. Note: by default, Protege 4.0 is configured to run in a fairly small memory footprint ~200MB. To get optimum performance, you can change this using our instructions on setting the heap size.

You will now be presented with the Welcome screen from which you can create a new ontology or open an existing ontology from your local machine or from the Web. We can start by opening an existing ontology. Note: once you have opened or saved an ontology, it will be easily available to click on in the "Open Recent" box.


screenshot of protege 4.0 welcome screen


Download the pizza ontology from http://www.co-ode.org/ontologies/pizza (the unclassified version in RDF syntax will work as an example).

Select Open OWL ontology from the Welcome screen and find the pizza.owl file on your filesystem.

You will now be presented with the main Protege workspace, which opens by default to the Active Ontology tab. This tab shows an overview of the pizza ontology, including metrics on its contents, annotations about the ontology as a whole, and other imported ontologies (if any imports exist). The drop-down on the toolbar displays the currently active ontology, that is to say, the one into which all edits take place. When working on a single ontology this concept of the active ontology is not a concern.


screenshot of the active ontology tab in the protege-owl editor


Navigation

Now switch to the Entities Tab.

The Entities tab is the workhorse of the ontology editor. From this location, you can explore all of the classes, properties and individuals in an ontology. As you may have already noticed, each tab is made up of several views which can be resized, removed, floated, split, and layered (more about views later). The selection model is global such that when a class, property or individual is selected in the trees on the left-hand side, the right pane changes to display the selection immediately. In addition, most views implement hypertext navigation so that links can be followed easily regardless of which view you are using. Opening up the hierarchies and selecting a class or property displays the appropriate description on the right. Backward and forward navigation is possible with the left and right arrow buttons in the toolbar, which act just like a Web browser.


screenshot of the entities tab in the protege-owl editor


Another easy way to navigate around the contents of an ontology is to perform a search. The find box in the toolbar performs a global search over any named entity in an ontology. In addition, the hierarchy views have their own find dialogs (first, click anywhere in the view to give it focus, then Ctrl-F on Windows, Command-F on Mac).


Reasoning

Reasoning with your ontology is one of the most commonly performed activities and Protege 4.0 comes with 2 built-in reasoners, FaCT++ and Pellet. To classify your ontology, open the Reasoner menu and select one of the available reasoners. FaCT++ will automatically classify your ontology. Pellet requires that you select classify. Once you have done this the class hierarchy on the Entites tab changes to show the inferred class hierarchy. Unsatisfiable classes appear in red under Nothing and everything else appears in the hierarchy under their inferred superclasses. The asserted class hierarchy is still available, stacked under the asserted one.


screenshot of the inferred class hierarchy


Investigate other tabs

  • OWLViz - requires installation of Graphviz before anything will be visible. This tab shows a graphical representation of the class subsumption hierarchy. A full description of OWLViz is available in the OWLViz manual.
  • DL Query - requires the ontology to have been classified before it will return results. An arbitrary class description can be entered and the reasoner is queried for the sub/super classes, inferred members, etc., depending on what is selected.


Investigate views

Each tab is made up of multiple views - each with its own perspective on the ontology, or just one aspect of the ontology (like the last selected class).

Views can be stacked on top of each other, in which case you will see additional tabs for exposing them.

Examples of this are the usage views that are by default on the Entities, Classes, Properties and Individuals tabs. Select the tab to make the view visible.

screenshot of the usage view hidden behind the annotations view
screenshot of the usage view after selecting its tab

All of the views that are on tabs by default and many more that aren't are listed in the Views menu. You can add and remove views to create you own custom interfaces (see below).


Reconfigure the User Interface

Reconfiguring the user interface is easy! Adding and removing tabs and views is possible through the Tabs and View menus. Try removing the Classes and Properties tabs to unclutter the screen. Try adding a view to the Entities tab:

  1. Switch back to the Entities Tab
  2. Select a class to make sure the Selected Entity view is showing class views.
  3. Select View | Class Views | Asserted Superclass Hierarchy. Now, when you float over the editor, a blue outline shows where the new view will be dropped - either on top of, above, below, left, or right of each of the current views.
  4. When happy with the position, click the left mouse button to drop the view (if you want to cancel this operation just click somewhere on the toolbar instead).
  5. The superclass tree view is now visible (the tree shows the "upside-down" version of the subclass tree, using the current class as the root).

All changes will be saved when Protege is properly shut down (or the save can be forced by selecting "Save current layout" in the Tabs menu).

Position the new view over the top of an existing one:

PositionNewViewOnTop.png

Drop the new view over the top of an existing one - the result is a stack:

DropNewViewOnTop.png

Position the new view below an existing one:

PositionNewViewBelow.png

Drop the new view below an existing one - the result is another split (surrounding views are resized to fit):

DropNewViewBelow.png

Human Readable Entity Names

Many ontologies use meaningless identifiers as the names of classes, properties and individuals. If your class hierarchy just looks like a mess of numbers or other computer-generated rubbish, but you have labels for each entity, you can ask Protege to use these labels instead.

  1. Select File | Preferences.
  2. Select the Renderer tab of the preferences dialog.
  3. Choose Render entities using annotation values.
  4. Where labels are provided, Protege will now display these in all views. If a label is missing it will continue to show the entity's ID.
  5. The annotation that is getting used to render the label (as well as the language) can be selected by pressing the Annotations... button.

The current renderer selected will be preserved next time you open Protege to save this step in the future.

Please also see this note about naming and rendering of entities.

screenshot of entity rendering preferences