📜 ⬆️ ⬇️

Ontodia + Caché - an ontology visualizer for navigating InterSystems Caché stored entities


About Ontodia Library


For a start, it makes sense to dwell on what Ontodia is and what the Caché DBMS is. Perhaps we will start with the so far less well-known product - Ontodia. Ontodia is the result of a joint project of the international laboratory ISST of the ITMO University and the company VISmart, which develops software in the field of semantic web (semantic web). The Ontodia service was originally a web application designed to visualize exclusively linked data (linked data) and ontologies. We created this service because we did not manage to find simple, accessible and effective tools for clearly visualizing the associated data of the semantic web.

A typical use case for Ontodia was a sequence of 3 steps:



3 steps usecase for Ontodia
')
Ontodia is always available to use and perform the actions described in this scenario - the address of the service www.ontodia.org .
An overview of the basic features in screencast format is available here .

As the service developed and during the collection of feedback on the service, we found out that there is a request for graphical visualization of data stored in relational and object databases. The greatest interest was shown by the Russian team of InterSystems Corporation.

Gradually, the Ontodia service began to expand its functionality and went beyond the boundaries of semantic data. First of all, the ability to work with object DBMS was added (Caché DBMS, by and large, refers to such) through the implemented Rest API, through which data was received.

In the next step, the Ontodia service was allocated to a separate JavaScript library. The library code is now published on github . All server functions, namely access control, user management, storage of created charts, etc. from this point on, platforms were run that used Ontodia as a library. In this particular case, InterSystems Caché has become such a platform.

Sequence diagram: Ontodia-Server Interaction

Allocation of a stand-alone library allowed for simplified integration with platforms. The scenario of interactions between the platform, on the example of the Caché DBMS and the library was as follows:

  1. Caché DBMS server calls the library code when the user accesses the URL
  2. The library requests from the Caché DBMS server the necessary data set for it to be displayed on the graph. The server provides the requested data.
  3. Ontodia restores the data scheme in graph terms (links, vertices, link properties and vertex properties)
  4. The user initiates the saving of the diagram and Ontodia sends to the JSON server to store the diagram


About InterSystems Caché


Now we need to talk about the platform that has integrated Ontodia into itself. If you look broadly, then InterSystems Caché is a database management system, and if it is even wider, it is an environment for developing applications related to data processing. It is considered that Caché is also a multi-model DBMS, that is, it provides several methods of storing, presenting and accessing data on the basis of these representations at once.

In fact, Ontodia is another way of presenting data in Caché, enabling the user to get an idea of ​​the structure of data organization in terms of stored classes and the relationships between them (including the ranks and semantics of relationships), as well as visualizing the properties of stored instances of classes, their relationships with other instances in the database and navigate the entities in the database.


Ontodia features for Caché


The Ontodia library is able to display the following components of a data set on an interactive graph:


Display Features


Each vertex of the graph is displayed as a rectangle with rounded corners. Inside each rectangle in large letters indicate the name of the object, and small letters on the color bar indicate which class this object belongs to. The bar at the top allows you to distinguish classes by color.

Visualization of nodes

A single click on the vertex of the graph shifts the focus to the vertex and displays all the objects associated with it in the Instances panel.

Instances panel

Double-click on the top to open the list of object properties.

Object properties

Links are displayed as lines, arrows correspond to the directions of links, each link is labeled with its name.

After a brief acquaintance with the graphic language of Ontodia, it is time to show how the data from Caché is displayed and how Ontodia allows you to interact with the graph.


Graph display control


  1. At the beginning, Ontodia displays the tree of classes, the data set transferred to it in the Class tree panel (see picture) and allows you to drag classes to the graph workspace (in the middle). Supports search in the class tree with filtering results as you type characters.

  2. The user can view all instances of any of the classes. Instances are filtered in the Instances panel when you click on any of the classes in the tree. If there are too many instances, we have provided a simple search by string.

  3. The user can drag one or more instances from the Instances panel onto the diagram workspace.

  4. The user can control the display of links - in the Connections panel, he can choose which types of links to display on the graph, and also indicate whether he needs signatures to the links. This feature allows you to control the “population” of the diagram and to avoid an excessive number of elements and links.

  5. The user can delete specific vertices as well as links, thereby forming the necessary data set for him to display.

  6. The user can move to the workspace vertices and communication, achieving the best from a visual point of view, the layout of elements.

  7. The user can zoom in and out the graph, move it entirely in the workspace and fit the graph into the borders of the screen.

  8. Double-clicking on any of the vertices will reveal the properties of the selected object.

Below is an example of a chart, which took about 30 seconds to create.

Example of a diagram produced in Ontodia


Navigation options


Ontodia makes it possible not only to create any number of data representations (diagrams), but also allows you to explore data and graphically structure its structure. To do this, the user can:


Navigating the data using Ontodia


Where to try and where to find out more


"Link to the demo .
»Link to screencast about Ontodia .
»The project repository is publicly available here .


How to install


To install the latest library running through the Rest API with Caché, you need to import the OntodiaCache package. To do this, download the archive here , and then import the OntodiaCache.xml file (see the archive named ontodia-cache-release.zip) into Caché Studio ( tutorial ). As a result, you get all the necessary resources, and compilation will lead to the creation of a new web application.


How to start


When the installation is complete, go to the Caché server at the following link [server URL] /csp/ontodia-cache/index.html.

In order to specify exactly which namespace to use when rendering data, add the namespace parameter and the value of this parameter to the address bar with the name of the desired namespace.

Example: localhost : 57772 / csp / ontodia-cache / index.html? Namespace = Samples


Building a new version of OntodiaCache.xml


To build a project you need to install the NodeJS platform. If you have NodeJS, clone the source code of the repository and run npm install in the project root directory. All necessary modules will be installed via NPM.

The next step is to install the old version of the OntodiaCache.xml file - see the “How to install” section.

From now on, to build, you will need to run the npm run webpack in the project root directory. Running the command will create the necessary source code, which should be moved to the InterSystems Caché Studio server directory ({Server folder} \ Cache \ CSP \ {namespace}

Example: C: \ InterSystems \ Cache \ CSP \ growth_cache) and on the basis of which you can develop a new version of the library.

Finally, in InterSystems Caché Studio, click on the root element of the Workspace panel and select the item “export to xml” in the context menu, then select the folder in which to place the new version of the .xml file.


What's next


In our plans to expand the functionality of the library, namely:


We understand that creating a new version with the above-listed priority functions takes a lot of time. We ourselves do not want to wait that long, so we will be glad to any help or contribution to the improvement of Ontodia.


Feedback


Latest news about the project can be found in our blog .
You can contact us by mail .

Source: https://habr.com/ru/post/310402/


All Articles