.. include:: /includes.rst.txt .. comments - headings # with overline, for parts * with overline, for chapters = for sections - for subsections ^ for subsubsections " for paragraphs * for H5 + for H6 .. index:: pair: SHACL ; Enablement .. _shacl_enablement_target: 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. 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. The translation in EDG is extensible as it is implemented as a set of SHACL rules. See the file */TopBraid/SHACL/owl2shacl.ttl* in the EDG workspace for the logic of the transform. Also note that the OWL2SHACL transform can be extended using a graph containing additional transforms by setting the *OWL-to-SHACL rules graph* under *Server Administration, Advanced Parameters*. There are also SHACL-to-RDFS and SHACL-to-OWL features in EDG. See the files */TopBraid/SHACL/shacl2rdfs.shapes.ttl* and */TopBraid/SHACL/shacl2owl.shapes.ttl* in the EDG workspace for the logic of the transform. Converting non-SHACL ontologies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Non-SHACL ontologies can be converted to SHACL via the ontology utility: :ref:`convert_owl_axioms_to_shacl`. It gives you a choice of keeping OWL statements and adding SHACL or replacing OWL with SHACL. Majority of RDFS/OWL will be converted. However, some of the complex OWL axioms may require further manual translation. To add SHACL declarations to a class that is not yet defined to be a *Node Shape*, select it and then use the gear |gear icon| menu **> Enable SHACL constraints for this class**. .. note:: * If an ontology contains instances, generate SHACL shapes to fully use search over instances. * Otherwise, only free text search is available. 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. .. figure:: _images/edg_enterprise_ontology_public_class.jpeg :alt: TopBraid EDG Enterprise Ontology - Public Class :align: center :class: edg-figure-l **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* .. |gear icon| image:: _images/edg_gear_icon.png :width: 20