OntoDiffGraph is an application developed with the objective of displaying the difference between two versions of an ontology through the use of a graph.
The graph notation used by OntoDiffGraph is based on the VOWL notation, however it had to suffer several changes in order to add the difference notation.
In order to parse and manipulate ontologies the application uses OWL API, with this Java library it is possible to obtain all the information necessary to find the difference between ontologies.
To draw the graph the application uses the Canvas class from JavaFX.
|Class||Classes are represented as blue circles with a black border and their class name inside.|
|Object Property||Object Properties are represented as blue rectangles with their property name inside.|
|Data Property||Data Properties are represented as green rectangles with their property name.|
|Annotation Property||Annotation Properties are represented as yellow rectangles with their property name.|
|Datatype||Datatypes are represented as yellow rectangles with black borders that contain the name of their type inside.|
|Imported Class/Property||Imported classes are represented as dark blue circles and imported properties are represented as dark blue rectangles. This color overrides the default color of the element.|
|Anonymous Elements||Anonymous elements are represented with their default shape and colours but they do not contain any text inside.|
|Element Characteristics||Element characteristics (Functional, Inverse Functional, Transitive, Symmetric, Asymmetric, Reflexive and Irreflexive) are represented as white rectangles with a black border containing the name of the characteristic inside.|
||The remaining graph elements are used to connect several nodes together. They are represented by their element name and the lines connecting them to several nodes. If the connection needs to connect to multiple nodes, an extra node (white colour, black border and a ∪ symbol) is added to the graph.|
To display changes in the graph, the edges will be green or red and the nodes will display a border with a green or red colour.
The green colour means that the element was added to the ontology and red colour means that the element was removed from the ontology.
The creation/removal of an axiom connecting multiple nodes will display the edges with green/red colour and the edge label with a border of one of these colours.
It is possible to also have changes in the group of nodes targeted by an axiom. In the image to the right it is possible to observe changes in the object property domain and the data property domain.
This case study was created to show how to visualize differences in an ontology using OntoDiffGraph. In this case study the MOD ontology was used to achieve this objective.
The different versions of the ontology used in this case study are available in Related Documents.
We open OntoDiffGraph and click on the option “Create Ontology Diff” located in the “File” menu.
After clicking the option, a window should pop out asking the user to select the older version of the ontology. We double click the older version of the MOD ontology and a new window should pop out.
The new window that pops out should ask for another file, the most recent version of the ontology. We double click the most recent version and OntoDiffGraph will start calculating the differences and generating the graph.
At this step the graph should be visible to the user, however there is a lot of information that is not relevant in this case study, graph elements that don’t display any difference can be hidden from the user by ticking the box “Show Minimal View” in the Options Tab.
If the user wants to see what are the classes or object, data and annotation properties that were added/removed from the ontology, they can use the tabs located in the left side of the application.
The elements are sorted by alphabetical order and have the colour green or red to display any change made to that element.
If the user wants instead to see the differences in the axioms related to an element, such as domains or ranges, the graph makes this process easier for the user.
When there are problems locating an element in the graph the user can click an name from the list of elements in the left to quickly jump to a certain node in the graph.
However if the user is trying to find the answer to “How many DataPropertyDomain axioms were removed or added?” using the graph it will take a lot of time.
This is because these axioms are scattered all over the graph, making it very hard for the user to find all of them.
The best method to use in this scenario will be to use the tab “Axiom Diff” and filter the list of axioms.
Through the use of all the features available in OntoDiffGraph the user should be able to answer multiple types of questions about the differences in the versions of the MOD ontology.
Make sure you have Java 8 installed before trying run the application.