GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

SHACL

Shapes Constraint Language (SHACL) is a World Wide Web Consortium (W3C) standard language for describing Resource Description Framework (RDF) graphs. SHACL has been designed to enhance the semantic and technical interoperability layers of ontologies expressed as RDF graphs. SHACL models are defined in terms of constraints on the content, structure and meaning of a graph. SHACL is a highly expressive language. Among others, it includes features to express conditions that constrain the number of values that a property may have, the type of such values, numeric ranges, string matching patterns, and logical combinations of such constraints. SHACL also includes an extension mechanism to express... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

Shapes Constraint Language (SHACL) is a World Wide Web Consortium (W3C) standard language for describing Resource Description Framework (RDF) graphs. SHACL has been designed to enhance the semantic and technical interoperability layers of ontologies expressed as RDF graphs. SHACL models are defined in terms of constraints on the content, structure and meaning of a graph. SHACL is a highly expressive language. Among others, it includes features to express conditions that constrain the number of values that a property may have, the type of such values, numeric ranges, string matching patterns, and logical combinations of such constraints. SHACL also includes an extension mechanism to express more complex conditions in languages such as SPARQL and JavaScript. SHACL Rules add inferencing capabilities to SHACL, allowing users to define what new statements can be inferred from existing (asserted) statements. ==Terminology== SHACL lets its users describe shapes of data, targeting where a specific shape applies. ===Property shapes=== A property shape describes characteristics of graph nodes that can be reached via a specific path. A path can be a single predicate (property) or a chain of predicates. A property shape must always specify a path. This is done by using sh:path predicate. One can think of property shapes that use simple paths as describing values of certain properties e.g., values of an age property or values of a works for property. Complex paths can specify a combination of different predicates in a chain, including the inverse direction, alternative predicates and transitive chains. Property shapes can be defined as part of a node shape. In this case, a node shape points to property shapes using sh:property predicate. Property shapes can also be "stand-alone" i.e., completely independent from any node shapes. ===Node shapes=== A node shape describes characteristics of specific graph nodes irrespective of how you get to them. It can, for example, be said that certain graph nodes must be literals or a URIs, etc. It is common to include property shapes into a node shape, effectively defining values of many different properties of a node. For example, a node shape for an employee may incorporate property shapes for age and works for properties. ===Constraints=== A constraint is a way to describe characteristics of values. A shape contains one or more constraint declarations. SHACL provides many pre-built constraint types. For example, sh:datatype is used to describe the type of literal values e.g., if they are strings or integers or dates. sh:minCount is used to describe the minimum required number of values. sh:length is used to describe the number of characters for a value. ===Targets=== A target connects a shape with data it describes. The ways to define a shape target are: State that a node shape is a class; the constraint applies to all instances of the class State that a shape targets members of a certain class. State that a shape targets a specific resource by giving its URI. State that a shape targets all subjects or all objects of triples with a certain predicate. Use a SPARQL query to select the targeted resources. Target declarations can be included in a node shape or in a property shape. However, when a property shape is a part of a node shape, its own targets are ignored. SHACL uses rdfs:subClassOf statements to identify targets. A shape targeting members of a class, also targets members of all its subclasses. In other words, all SHACL definitions for a class are inherited by subclasses.

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"SHACL". 1791149703. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1378545085

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·