How to use TopBraid as a data validation server » TopQuadrant, Inc

+1 919.300.7945     Blog     Downloads     Purchase     Contact

How to use TopBraid as a data validation server

Posted by Holger Knublauch on June 13, 2017

RDF data validation is the process of checking a (data) graph against constraints from a schema definition. In the Shapes Constraint Language (SHACL), constraints are themselves expressed in a RDF syntax, in so-called shapes graphs. SHACL-based validation engines can (among others) be used to reject data that contains malformed instances of a class (such as a Person with three parents). Some engines can furthermore suggest how to fix malformed data. Since any data that is added into an organization's knowledge base should satisfy certain quality contracts, constraint validation is a mission-critical task.

The TopBraid platform includes comprehensive support for SHACL, including rich user interfaces for editing SHACL-based data models, see our earlier blog post on Using SHACL Data Constraints in the TopBraid Web products EVN and EDG. In addition to these interactive features, the TopBraid Live product (which is also part of EVN and EDG and, for testing purposes, in TopBraid Composer Maestro Edition) includes a simpler web service for programmatic access to the SHACL validation engine. This feature was introduced with version 5.3.1. In its most basic form, the validation servlet can be called as a GET or POST request against the URL

http://localhost:8083/tbl/shaclValidation

which takes the following parameters:

  • dataGraph (source code of data graph) or dataGraphURL (to load from a URL)
  • dataGraphFormat (“ttl” (default) or “json” or “rdfxml”)
  • dataGraphImports (true to process owl:imports in data graph)
  • shapesGraph (source code of shapes graph) or shapesGraphURL (to load from a URL)
  • shapesGraphFormat (“ttl” (default) or “json” or “rdfxml”)
  • shapesGraphImports (true to process owl:imports in shapes graph)
  • validateShapes (true to also validate any shape definitions in the data graph)
  • output (“ttl” (default) or “json” (for JSON-LD) or “html”)

The servlet also comes with a simple HTML interface:

SHACLValidationPage

This produces a results page listing details on all constraint violations:

SHACLValidationResults

 

Archives

About TopQuadrant | Glossary | Privacy Statement | Legal | Terms of Use
© Copyright 2001-2017 TopQuadrant, Inc. All Rights Reserved.