Questions tagged [shacl]

Use this tag on questions concerning the Shapes Constraint Language for RDF: SHACL.

SHACL is a language for validating RDF graphs against a set of conditions. These conditions are also expressed in the form of RDF graphs, called "shapes". Beyond validation, shapes may facilitate user interface building, code generation, and data integration.

117 questions
13
votes
4 answers

OWL Property Restrictions vs. SHACL

Given a choice between OWL Property Restrictions and SHACL, is there any reason to choose the OWL approach any more? Particularly with respect to cardinality constraints, I'm wondering whether SHACL is considered to supercede OWL. The syntax appears…
jaco0646
  • 15,303
  • 7
  • 59
  • 83
4
votes
1 answer

SHACL - Attribute is optional, but if it exists, it has to have once a specific value

a class has an optional attribute. If you use this attribute, you have to set it once to a specific value. All other uses of this attribute are not restricted. The real world example is dcat:themeTaxonomy used in dcat:Catalog in DCAT-AP. If used, it…
Ludger
  • 41
  • 2
4
votes
1 answer

SHACL to compare values on two different nodes?

I am trying to write a SHACL constraint for a date comparison where the start date must be less than or equal to an end date. When the dates are attached to the same node using the :beginDate and :endDate predicates, the constraint is straight…
Tim
  • 929
  • 12
  • 30
4
votes
0 answers

Generating SPARQL Query from SHACL

I have a specific situation where I need to automatically generate SPARQL queries based on the SHACL schemas of the incoming data. I wonder if Jena or any other semantic tool/library can help do that? I saw something on the Jena code based but…
MaatDeamon
  • 9,532
  • 9
  • 60
  • 127
3
votes
1 answer

What is the difference between "myURI.com"^^xsd:anyURI and ?

The title covers my question pretty well. I've looked into the xsd standard, the rdf standard but found no direct answer to my question. I'm trying to understand whether there is a difference in "meaning" between both…
Robin
  • 135
  • 10
3
votes
1 answer

How should sh:shapesGraph be interpreted in comparison to owl:import?

I am struggling to comprehend how sh:shapesGraph should be used. So far I've used a SHACL validator that does traverse the owl:import and brings content to the data graph so that I can benefit from rdfs:subClassOf etc. But, according to the SHACL…
O-U-O
  • 69
  • 5
3
votes
1 answer

Can a SHACL validator return subject of validated object as focus node?

we're trying to validate some data but right now the SHACL validation is on the anonymous object of a triple so focus node comes back empty. What we want is to get the subject of that triple as focus node. I created a small example to illustrate my…
CrocoDillon
  • 126
  • 5
3
votes
1 answer

SHACL validation using dash:reifiableBy

I am testing validation of RDF data using SHACL in TopBraidComposer Maestro Edition (v 6.3.2). During my analysis of SHACL, I came across the document DASH Reification Support for SHACL. Chapter 2 of that document defines the property…
jechterhoff
  • 175
  • 2
  • 9
3
votes
1 answer

What is the difference between these shape graphs which use sh:or?

I have the following Data Graph. @prefix hr: . @prefix rdf: . @prefix rdfs: . @prefix sch:
James Hudson
  • 844
  • 6
  • 19
3
votes
1 answer

Difference between OWL/SHACL and RIF

I'm trying to wrap my head around the first principles that stood behind w3c's effort to define OWL, SHACL. While also defining RIF - Rule Interchange Format Does RIF and SHACL answer the same problem? If not what is the need that each of these…
Maxim Veksler
  • 29,272
  • 38
  • 131
  • 151
3
votes
1 answer

Install new plugin to Protégé

I wish to install a new plugin to Protégé, that is not listed in the default Protégé plugin library. Does anyone have any experience doing this, and may point me in the right direction? The plugin I wish to install is SHACL4P. If anyone knows about…
veleda
  • 147
  • 2
  • 7
2
votes
2 answers

How to impose the uniqueness of data property values via SHACL

I cannot figure out how to impose the uniqueness of a data property value via SHACL. The following excerpts are lite versions of the examples presented by Henriette Harmse in her personal blog. Suppose we have the following data: @prefix ex:…
Stratos K
  • 341
  • 2
  • 14
2
votes
0 answers

Verify rdf:Container(rdf:Seq) using shacl constraints

I am currently trying to build a constraint validation shape for an incoming object of the type rdf:Seq. The shacl shapes I have used, use the path to identify triple and then add additional constraint validations on datatype, length and count. But,…
Shri
  • 51
  • 4
2
votes
1 answer

SHACL closed shape with superclass inheritance

For example in Java, I can close off a class by declaring it as final. It will still inherit from its superclass, however: public abstract class Super { final boolean test = true; } public final class Sub extends Super { public static void…
Konrad Höffner
  • 11,100
  • 16
  • 60
  • 118
2
votes
0 answers

How to apply SHACL to subclasses instead of instances?

If I have a class, for example "Animal", then I can use SHACL to validate its instances: :Elefant a :Animal; :family :Elephantidae; :order :Proboscidea. :AnimalShape a sh:NodeShape; sh:targetClass :Animal; sh:property [sh:Path :family],…
Konrad Höffner
  • 11,100
  • 16
  • 60
  • 118
1
2 3 4 5 6 7 8