All articles

Devi-NT: a model validation tool

As part of the back-end team, I worked on an internal tool designed to help Epimorphics’ developers compare database content with a data model, in order to validate the model specification files from another project (Sapi-NT). 

The model validation process

The goal with this tool was to automatically retrieve all the differences between a model file and the RDF dataset it describes – these are called “inconsistencies”. In order to do that, we extract a unit of specification from the model, build a SPARQL query that will return the resources not complying with that specification, and run it against the dataset. 

Currently, the validation looks for 14 different types of inconsistencies and the library can be easily extended to retrieve other kinds of inconsistencies in the future.

Devi-NT implementation

My project is composed of a validation library, and two applications that both rely on the library. They are written in Kotlin and deployed thanks to the Spring boot framework. The library uses the Apache Jena library to manage the Sparql queries. 

The first application is a command-line application (Devi-NT). It takes a model file and a Sparql database endpoint as arguments, runs the validation and logs the inconsistencies with a detailed description. Each inconsistency type has a warning level called a “severity” (that can be “Error”, “Warning”, “Info”, or “Ignore”) which can be configured before building the application.

The second application is a web application called Triple Advisor. It serves the validation output in three different formats: as plain text (which is similar to the command-line application’s output), as JSON, and as a web page. It uses the Kotlinx library for HTML rendering. It also provides a configuration page, meaning that you can run several validations with different configurations without having to rebuild or restart the app.

Takeaways

Working for Epimorphics was a very enjoyable experience. I felt very welcome on arriving as my supervisors made sure I was comfortable and had everything I needed to work in the best conditions. I received appropriate training to fully understand what was expected from my tool, how it would fit in with the Sapi-NT project and the different programming components I would need to use in my development work, which made me able to get involved in the project quickly.

Through this internship, I was hoping to improve my software development skills and discover what the team workflow was like at software companies. The experience matched my expectations. I learned a lot about web applications and linked data, and it allowed me to develop a web application from start to finish while working with another developer. I am glad I had the opportunity to discover Kotlin, which is a very interesting language, as well as the powerful Spring framework.

I liked that the project was interesting and challenging; and that it ended up being a full-stack project as I had time to develop both the back-end part (the data comparison library) and the front-end part (the graphical user interface). It was accurately tailored to my previous level of training whilst still being very educational.