Ontologies

Visualization

Alignment

User Guide

Publications

Demo

Files

Downloads

Contacts

VisOn Status description



Author : David Loup
Date : 01/10/2004

The purpose of this document is to present the status of the VisOn application, its work in progress and the important parts of the program which would need to be improved, completed or updated. We will try and describe the structure of the program for the next programmer to be able to modify easily certain parts of the software.

Content of this file :

1. Package Description
2. JGraph
3. Functionalities
4. Algorithmic improvements
5. Interface improvement
6. License

 

1. Package Description

Here follows the description of the different packages which are part of the VisOn application.

ca.umontreal.iro.vison.export :

Classes to export graphs in PNG or JPG images using the functions from the JGraph API. PDF and SVG to be added. The package also contains all the program parts which need to read files, i.e. the classes which load the different available algorithms, the default weights configuration and the similarity functions. It should so be renamed ca.umontreal.iro.vison.io, or something like that.

ca.umontreal.iro.vison.gui :

The main package containing all the graphical classes. The GraphTests class is used to perform tests on the JGraph API and is independant. The OLGraph class is not a graphical one but is the most important : it extends the JGraph basic class and builds a graph to be displayed, from the OL-Graph object built by the classes in the package ca.umontreal.iro.olgraph. GUI is the main class and is the one that must be run. GUIParameters defines the colors associated to the nodes and other constants. An XML file would be a better option...

ca.umontreal.iro.vison.nodesInfo :

A part of the program which displays information about nodes when they are clicked. This part is not used anymore and had been put aside for priority reasons, but it could be interesting to keep developing it and improving it.

ca.umontreal.iro.vison.jgraph :

All the JGraph extensions created by David Loup, sometimes from code available in the JGraph tutorial, the FAQ of the forums. Contains custom shapes for nodes, and improved edges management.

ca.umontreal.iro.vison.layout :

The package containing the different layout algorithms. Right now, only the Sugiyama algorithm is used but it is not optimal. New algorithms developed by the JGraph community should be imported here.

ca.umontreal.iro.vison.draw :

The classes of this package creates the graphical forms of the different nodes encountered when analyzing the OL-Graph.

ca.umontreal.iro.vison.util :

Some utilities functions shared by different classes should be put here. Only contains the File filter now.

2. JGraph

In order to represent the ontologies as OL-Graph, we decided to use the JGraph API which deals with the positioning of nodes, drag
and drop, resizing, etc. The JGraph community is very active and keeps releasing new versions of their softwares. When the project began (July 2004) we worked with JGraph 4 and now a new version is available with many improvements. The first thing to do would be to import this new version into VisOn.

First, one must get the binary jar file from Sourceforge. Here is the list of the different subprojects concerning JGraph :

  • JGraph, the base API to build graph
  • JGraph Pad, a graph editor. Although we don't edit the graphs we generate, this part has VERY useful code : PDF and SVG exportation for example, to be imported in VisOn.
  • JGraphAddons : The parts of these addons which interest us particularly are the new shapes (Ellipse, Diamonds) and the layout algorithms. Below is the current status of these parts.

The package ca.umontreal.iro.vison.jgraph contains all the updates of the JGraph classes required by our application. That is, the custom shapes (Ellipse, Diamonds, and new Rectangles to make a more coherent look), and new Edges classes to avoid overlapping edges. The new version of JGraphaddons probably offers these new shapes, it would be better to use theirs for future support and compastibility. Nevertheless, the present source code should be kept somewhere and could serve as a model for further developments.

The package ca.umontreal.iro.vison.export contains the classes used to export generated graphs into JPG or PNG files, as well as a beginning of code for SVG and PDF (barely functional). Here again, the new version probably offers better possibilities, but it seems there need to be some re-enginnering of some classes. It will probably be the part needing the most work to adapt and re-engineer the present source code. The export methods apply to a GPGraph object (used by the GraphPad editor) and we only work with OLGraph (that extend JGraph) objects. The Export classes quickly developed tried to overrule this, but the result is not perfect in SVG (we cannot scroll when viewing the file) and not usable in PDF (only a part of the graph is represented).

The package ca.umontreal.iro.vison.layout contains all the layout algorithms, any new algorithm should be added here. A layout algorithm is applied using the static method applyLayout() JGraphLayoutAlgorithm, with an algorithm object and the graph as parameters. It's already the current way, so there is just to import the new algorithms in the new package and test them.

Finally, it is important to note that the JGraph programmers are very available : any question asked on the forums of the sites will probably get a detailed answer, and they have been very helpful during the development, don't hesitate to ask for help.

 

3. Functionalities

The most important functionality needing to be implemented is the visualization of aligned entities when displaying two ontologies in a parallel way. A click on an entity from the first ontology should focus the second graph on the aligned entity. There is not much code to be done in the GUI, but the implementation of the OL-Graph by Mohamed Touzani needs to be modified. As the alignment works with OWL objects (from the OWL API), we will need a hashtable to map OWL objects with OL-Graph nodes. This hashtable should be correctly built as the construction of the graph goes.
See the package ca.umontreal.iro.olgraph for further information.

See the valueChanged() method in the GUI class, it contains a start, which currently tries and get in the second graph the cell with the same name as the one selected in the first graph.

 

4. Algorithmic improvements

The algorithm which is building the visual graph from the OL-Graph has been improved several times but may benefit from a code factorisation.

 

5. Interface improvements

Here again, there is probably some redundant code which could be packed in external utilities functions. Moreover, the exceptions should be centralized as far as possible : every exception thrown could be sent to the highest part of the program which would deal with it, most of the time by displaying the error message in a popup window. Some printStackTrace() calls remain.

 

6. License

The new version of JGraph is now under the LGPL License. The VisOn application hasn't been released yet, nor made public, so after importing the new JGraph version please be careful to include the License in the release and be sure all the required copyrights are present in the files.

 

 

Copyright University of Montreal

Website created by David Loup