ITB commons is the set of shared Java libraries on which all Interoperability Test Bed validators are built. Each module produces a separate JAR that you can include as a Maven dependency.
These validators use the libraries:
- The RDF validator, for validating RDF data using SHACL.
- The XML validator, for validating XML data using XML Schema and Schematron.
- The JSON validator, for validating JSON and YAML data using JSON Schema.
- The CSV validator, for validating CSV data using Table Schema.
This library is maintained by the European Commission's DIGIT and specifically the Interoperability Test Bed, a conformance testing service for projects involved in the delivery of cross-border public services. Learn more on the Interoperability Test Bed page.
| Module | Purpose |
|---|---|
validation-commons-parent |
Parent POM for the modules of this project. |
validator-parent |
Parent POM for validator implementations outside this project. |
validation-commons |
Common beans, base classes and utilities (file management, validator configuration). |
validation-commons-web |
Common web layer: base classes, JS/CSS resources and Thymeleaf templates for the validators' UI. |
validation-commons-war |
Utilities for packaging validators as web applications. |
validation-commons-jar |
Utilities for packaging validators as command-line tools. |
validation-commons-report |
Generation of validation reports as PDF. |
validation-plugins |
Support for custom validator plugins. |
In the dependency snippets below, replace VERSION with the snapshot or release version you need.
The parent POM for this project's own modules. It is a separate module so that its build behaviour is not inherited by validator implementations. Common build settings (properties and dependency versions) come from the root POM file. To use it as a parent, a module's POM should contain:
<parent>
<groupId>eu.europa.ec.itb.commons</groupId>
<artifactId>validation-commons-parent</artifactId>
<version>VERSION</version>
<relativePath>../commons-parent</relativePath>
</parent>The parent POM for validator implementations outside this project. Common build settings (properties and dependency versions) come from the root POM file. To use it as a parent, a validator's POM should contain:
<parent>
<groupId>eu.europa.ec.itb.commons</groupId>
<artifactId>validator-parent</artifactId>
<version>VERSION</version>
<relativePath/>
</parent>Common beans, base classes and utilities for all validators (the validators' "common" layer). It mainly covers
file management and validator configuration. To use it, add this dependency to your pom.xml:
<dependency>
<groupId>eu.europa.ec.itb.commons</groupId>
<artifactId>validation-commons</artifactId>
<version>VERSION</version>
</dependency>Common beans, base classes and utilities for the validators' web layer. It also includes the web resources (JS, CSS) and Thymeleaf templates, with reusable fragments, for the validators' UI.
<dependency>
<groupId>eu.europa.ec.itb.commons</groupId>
<artifactId>validation-commons-web</artifactId>
<version>VERSION</version>
</dependency>Common utilities for packaging validators as web applications.
<dependency>
<groupId>eu.europa.ec.itb.commons</groupId>
<artifactId>validation-commons-war</artifactId>
<version>VERSION</version>
</dependency>Common utilities for packaging validators as command-line tools, including the base classes for running validations and reporting their results from the command line.
<dependency>
<groupId>eu.europa.ec.itb.commons</groupId>
<artifactId>validation-commons-jar</artifactId>
<version>VERSION</version>
</dependency>Support for generating validation reports as PDF documents.
<dependency>
<groupId>eu.europa.ec.itb.commons</groupId>
<artifactId>validation-commons-report</artifactId>
<version>VERSION</version>
</dependency>Support for custom validator plugins.
<dependency>
<groupId>eu.europa.ec.itb.commons</groupId>
<artifactId>validation-plugins</artifactId>
<version>VERSION</version>
</dependency>To fully support plugins in a validator you need to do the following. The dependency itself is also brought in
transitively by validation-commons.
- Define a bean of type
PluginConfigProvider.validation-commonsprovides a default implementation,DomainPluginConfigProvider, that loads plugin configuration from the domain configuration file. - In the validator's own validation process, use the
PluginManagerto load the plugins and call them.
The input passed to plugins and the output expected from them depend on the type of validator. Each validator's README documents these.
ITB commons is not published on a public Maven repository. To build a validator locally you must first build and install these libraries yourself. All their dependencies are publicly available.
- A JDK installation (17+).
- Maven (3+).
| Action | Command |
|---|---|
| Build and install all libraries | mvn install -DskipTests=true |
| Run unit tests with coverage | mvn test |
| Build javadocs | mvn javadoc:javadoc javadoc:aggregate |
To report a security vulnerability, please follow this repository's security policy.
The best way to contribute is to share your feedback, questions and suggestions by opening an issue in this repository. For more elaborate contributions, and for more information, see CONTRIBUTING.md.
This software is shared using the European Union Public Licence (EUPL) version 1.2.
Third-party library licences and attributions are listed in NOTICE.md.
The authors of this library waive any and all liability linked to its usage or the interpretation of results produced by its downstream validators.
For feedback or questions about this library, please post an issue in this repository. You can also contact the Test Bed team by email at DIGIT-ITB@ec.europa.eu.
ITB commons is used in the Test Bed's validators. Check these out for more information:
- The RDF validator: see overview, source, detailed guide and Docker Hub image.
- The XML validator: see overview, source, detailed guide and Docker Hub image.
- The JSON validator: see overview, source, detailed guide and Docker Hub image.
- The CSV validator: see overview, source, detailed guide and Docker Hub image.
