Browse Source

Adding an initial version of the shacl file.

Lucas Albertins 2 years ago
parent
commit
61bb95d482
1 changed files with 40 additions and 0 deletions
  1. 40 0
      examples/oml/SystemDesignOntology2Layers/src/shacl/shacl.ttl

+ 40 - 0
examples/oml/SystemDesignOntology2Layers/src/shacl/shacl.ttl

@@ -0,0 +1,40 @@
+@prefix sh: <http://www.w3.org/ns/shacl#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+
+@prefix comp: <http://ua.com.be/sdo2l/vocabulary/component#> .
+@prefix base: <http://ua.com.be/sdo2l/vocabulary/base#> .
+
+# The namespace for fse shacl shapes.
+@prefix comp-shapes: <http://ua.com.be/sdo2l/vocabulary/component-shapes#> .
+
+# The following defines `fse-shapes` as the ontology for sh:declare prefixes to be added to each SPARQL query.
+comp-shapes:
+	a owl:Ontology ;
+	owl:imports sh: ;
+	sh:declare [
+		sh:prefix "comp" ;
+		sh:namespace "http://ua.com.be/sdo2l/vocabulary/component#"^^xsd:anyURI ;
+	]  ;
+	sh:declare [
+		sh:prefix "base" ;
+		sh:namespace "http://ua.com.be/sdo2l/vocabulary/base#"^^xsd:anyURI ;
+	]  ;
+	sh:declare [
+		sh:prefix "rdf" ;
+		sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ;
+	] .
+	
+comp-shapes:Car_contains_4_Wheels_shacl
+	a sh:NodeShape ;
+	sh:targetClass comp:CarComponent ;
+	sh:property [
+		sh:path base:contains ;
+		sh:class comp:WheelComponent ;
+		sh:nodeKind sh:IRI ;
+		sh:minCount 3 ;
+		sh:maxCount 3 ;
+	] ;
+	sh:closed false .