Académique Documents
Professionnel Documents
Culture Documents
http://protegewiki.stanford.edu/wiki/OntoViz
OntoViz
by Michael Sintek
Tab Widget Michael Sintek July 11, 2007 Mozilla Public License. OntoViz website (http://protegewiki.stanford.edu/index.php/OntoViz) Protege-Frames Protege-OWL Protege Client-Server
For Application
Topic(s)
Visualization
Affiliation
Edit this plugin Retrieved from "http://protegewiki.stanford.edu /wiki/OntoViz" Categories: Tab Widget | Plugin This page was last modified on August 31, 2010, at 22:02.
The OntoViz Tab allows you to visualize Protege ontologies with AT&T's highly sophisticated Graphviz visualization software.
Contents
1 Versions & Compatibility 2 Changelog 3 Detailed Description 4 Installation 4.1 Mac specific notes on installation 5 Documentation 5.1 Creating a graph 5.2 Fine tuning your graph 6 Screenshots 7 Level of Support
1 of 11
11/16/2011 7:03 PM
http://protegewiki.stanford.edu/wiki/OntoViz
Protege-OWL 3.2.1
If you click on the button below to add a new version of OntoViz, you will be asked to define a page title for the new version. Please adhere to the naming convention of OntoViz X.X.X when you define the new page! Add New Version
Changelog
Version OntoViz 1.0 Changes in this version no release notes were maintained for this version
Detailed Description
The OntoViz Tab allows you to visualize Protege ontologies with the help of a highly sophisticated graph visualization software called Graphviz (http://www.graphviz.org/) from AT&T. The types of visualizations are highly configurable and include: Picking a set of classes or instances to visualize part of an ontology Displaying slots and slot edges Specifying colors for nodes and edges. When picking only a few classes or instances, you can apply various closure operators (e.g., subclasses, superclasses) to visualize their vicinity.
Installation
The OntoViz Tab is bundled with the "full" installation of Protege (http://protege.stanford.edu/download/download.html) (please use version 3.3.1 or 3.4). Once you have installed Protege, you must also: a). Install the appropriate version of the Graphviz (http://www.graphviz.org/) graph visualization software for your platform. b). Modify your "protege.properties" file to specify where you installed Graphviz. For example, if you installed Graphviz in C:\Program Files\ATT\Graphviz\, you would add the following line to protege.properties:
dot.command=C\:\\Program\ Files\\ATT\Graphviz\\bin\\dot
NOTE: you may need to modify your file structure to match the path in your protege.properties file. Check protege.properties for more details. The protege.properties file is located in the root directory of your Protege installation and an example protege.properties file is included in the OntoViz subdirectory for your reference
<protege-install-dir>/plugins/dfki.protege.ontoviz/protege.properties
In addition to specifying the path to the Graphviz dot executable, you can set the following optional attributes:
dot.font=<font-name> (optional; usually Arial) dot.fontsize=<size-specification> (optional; usually -2 or -3) dot.fontpath=<path-to-ttf-directory> (needed on some flavors of Unix; on Solaris: /usr/openwin/lib/X11/fonts/TrueType)
2 of 11
11/16/2011 7:03 PM
http://protegewiki.stanford.edu/wiki/OntoViz
Copy the Graphviz application and Examples directory into your newly created directory. In the Finder, locate the file named "protege.properties" in the Protege directory, and open it with TextEdit (right-click, open, other, select TextEdit). You need to add a line to the file that tells Protege where to find the Graphviz UNIX executable. For me, the line of text looks exactly like:
dot.command=/Users/andy/Developer/Tools/Graphviz/Graphviz.app/Contents/MacOS/dot
Save and close TextEdit. Comment from another Mac user: these instructions did not work for me. I added the following property to the protege.properties Property Table (accessible from the File | Preferences... | Property Files tab): Property = OWLViz.Dot.Path, Value = full path name of location of dot executable Then it worked for me. If you don't see any graphs after you begin using the OntoViz Tab in Protege, verify that the dot.command value does in fact represent the "dot" UNIX executable. The easiest way to do this is with the Terminal and "ls" command. Copy the dot.command value from the protege.properties file and paste it into a Terminal window:
terminal> ls /Users/andy/Developer/Tools/Graphviz/Graphviz.app/Contents/MacOS/dot
If the file is not found, you will then need to correct the path value in protege.properties.
Documentation
To enable the OntoViz Tab in Protege, choose the menu item Project -> Configure, check the checkbox next to the entry for the OntoViz tab widget, and click OK.
Creating a graph
To create a graph, select a class from your ontology in the Classes pane, click the "add class" button in the upper left "Config" area of the tab, check several of the options such as "sub", "sup", "slx", and click the "Create Graph" button. The same process can be used for creating graphs of instances by using the "add instance" instead of the "add class" button. To remove an entry from the Config table, use the "remove class" button.
3 of 11
11/16/2011 7:03 PM
http://protegewiki.stanford.edu/wiki/OntoViz
Selecting a node in the graph displays the corresponding class in the classes tree (and vice versa):
You can also use the middle and right mouse buttons for zooming:
4 of 11
11/16/2011 7:03 PM
http://protegewiki.stanford.edu/wiki/OntoViz
sub/sup: compute the subclass and superclass closures if frame is a class (independently; otherwise we would always end up with all classes):
closure := closure U subClosure U supClosure
slx/isx: for all classes/instances in closure, find the classes/instances that are reachable by a slot of type INSTANCE or CLASS (the maximum depth can be configured on the global options window; default is 1 for classes and 3 for instances):
closure := closure U slotExtension
slt/sle/sys: (globally) mark all frames in closure accordingly If sys is not true, in all steps above ignore system classes and slots. It is also possible to add a class more than once to the Config table with a different options set. Some examples using the newspaper project might be: a. Inspect one class in the middle of the ontology, e.g., Employee.
Employee sup slt sys Employee sub shows all superclasses of Employee WITH template slots and all subclasses WITHOUT template slots
5 of 11
11/16/2011 7:03 PM
http://protegewiki.stanford.edu/wiki/OntoViz
2. Options for slots Slots can be configured individually by pressing the colored "S" button. A slot can be configured as "default", "hidden", or "configured" (at the moment, a configured slot means that the user selected color and preferred arrow direction). Furthermore, all "default" slots can be hidden ("hide slots as default" check box). To configure a slot, click on the "default" cell in the table.
6 of 11
11/16/2011 7:03 PM
http://protegewiki.stanford.edu/wiki/OntoViz
3. Global options The following global options are available in the "Ontoviz Global Options" dialog by clicking on the "Op" button. save as gif - save the graph as a GIF image in the directory where the project resides, or in the main Protege directory, if the project has not yet been saved show io :STANDARD-CLASS edges - if this box is checked, instances of ("io") :STANDARD-CLASS links are shown (results in really huge graphs!) show system own slots - if this box is checked, system own slots are shown (e.g., :NAME), which are not very useful except for debugging system stuff slot edges dashed - use dashed lines for slot edges (useful for printing) show instances only - don't show the classes (useful if you want to inspect complex relationships between many instances) on the colors tab, you can configure colors for nodes and edges.
Screenshots
To follow are some additional screenshots of the OntoViz Tab. The graphs were generated using the newspaper example project that comes with all installations of Protege. Please note that these screenshots were created using an older version of Protege.
7 of 11
11/16/2011 7:03 PM
http://protegewiki.stanford.edu/wiki/OntoViz
8 of 11
11/16/2011 7:03 PM
http://protegewiki.stanford.edu/wiki/OntoViz
9 of 11
11/16/2011 7:03 PM
http://protegewiki.stanford.edu/wiki/OntoViz
10 of 11
11/16/2011 7:03 PM
http://protegewiki.stanford.edu/wiki/OntoViz
Level of Support
Unsupported. The source code for this tab is available in the Protege Subversion repository. To view the code, please use this URL: http://smi-protege.stanford.edu/svn/ontoviz-tab/trunk/ ... or, to check out the code, you may use this URL: http://smi-protege.stanford.edu/repos/protege/ontoviz-tab/trunk/ If you have questions about OntoViz, you can try posting them on the protege-discussion mailing list (http://mailman.stanford.edu/mailman/listinfo/protegediscussion) and someone from the Protege community may be able to help you.
11 of 11
11/16/2011 7:03 PM