SHACL Enablement

SHACL is a W3C standard constraint language that is used to define well-formedness conditions on RDF graphs (see What is SHACL).

EDG uses SHACL in ontologies to describe characteristics of class instances e.g, what properties they may have and what type of values are expected for the properties.

Note

  • If an ontology contains instances, generate SHACL shapes to fully use search over instances.

  • Otherwise, only free text search is available.

Converting non-SHACL ontologies

Automatic translation is described in From OWL to SHACL in an Automated Way.

Note

  • The blog reflects a “point in time” status of the translation and the translation in EDG may be periodically extended.

See Transform > Convert OWL Axioms to SHACL Constraints.

To add SHACL declarations to a class that is not yet defined to be a Node Shape, select it and then use Modify > Enable SHACL constraints for this class.

SHACL requirements for working with Reference Datasets and Data Graphs

Working with TopBraid EDG asset collections that use ontologies as their data schemas requires that classes that define the resources (assets) of interest are:

  1. SHACL Node shapes and

  2. Declared to be public (or protected) classes/shapes of an ontology that defines them.

All necessary requirements are already addressed for the majority of collection types e.g., Taxonomies, Data Asset Collections, etc., – in other words, for any collection that is based on a pre-built ontology shipped with EDG.

Since Reference Datasets and Data Graphs are based on your own, custom ontologies, you will need to add the necessary information yourself. A class can be made public by adding it to the GraphQL public classes on the Form Panel for the collection.

TopBraid EDG Enterprise Ontology - Public Class

TopBraid EDG Enterprise Ontology - Public Class

For additional technical details behind these requirements see SHACL GraphQL.

Note

If your property labels contain hyphens ( – ), you should give them a GraphQL field name without a hyphen.

To populate GraphQL field name for a property, navigate to a property shape form and enter a value for “GraphQL field name”. GraphQL name is also required if you are defining a shape for rdfs:label. It should be rdfs_label