Swirrl / pmd-rdf-validations

PMD Validations for cubes etc...
MIT License
3 stars 0 forks source link
datacube rdf-validator validation

PMD RDF data validations

A collection of RDF validation queries ready to be used against RDF data using the RDF Validator.

Pre-requisities

  1. Clone this github repo
  2. Install clojure cli tools using brew install clojure/tools/clojure (see clojure cli docs for other installations)

Usage

Change into the repos working directory and run:

$ clojure -M:pmd4:validate -e http://my/sparql/endpoint

Inspecting this projects deps.edn will show that we define the aliases :pmd4 (for the pmd4 suite), :pmd-qb (for the pmd-qb) whilst :validate pulls in the swirrl validation tool.

Hence to also run :pmd-qb you would simply run clojure -M:pmd4:pmd-qb:validate -e http://my/sparql/endpoint

How this works

The above deps.edn configuration file declaratively specifies dependencies on two suites of SPARQL query validations. These two suites happen to located at different paths within the same git repository, though they could easily be in separate repositories. It additionally then specifies a dependency on the RDF Validator itself under the :validate alias.

Running the command clojure -M:validate <args> will then automatically cause the dependencies to be fetched, cached for future use and put on the JVMs classpath before finally executing the RDF Validator application with the specified suites.

As the RDF Validator supports finding and loading validation suites from the java classpath the dependent suites will then be executed. The validator defines a simple manifest for discovering and executing suites specified in this manner.

Trouble shooting

Licence

The MIT License (MIT)

Copyright (C) 2021 Swirrl IT LTD