From f484511933872b95fec5137644c7d780723c3191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Pe=C3=B1a?= Date: Tue, 8 Nov 2022 10:41:19 +0100 Subject: [PATCH] SHACL --- HandsOn/Group01/shacl/report.ttl | 5 + HandsOn/Group01/shacl/shapes.ttl | 173 +++++++++++++++++++++++++++++++ 2 files changed, 178 insertions(+) create mode 100644 HandsOn/Group01/shacl/report.ttl create mode 100644 HandsOn/Group01/shacl/shapes.ttl diff --git a/HandsOn/Group01/shacl/report.ttl b/HandsOn/Group01/shacl/report.ttl new file mode 100644 index 00000000..6e383892 --- /dev/null +++ b/HandsOn/Group01/shacl/report.ttl @@ -0,0 +1,5 @@ +@prefix sh: . + +[ a sh:ValidationReport ; + sh:conforms true +] . \ No newline at end of file diff --git a/HandsOn/Group01/shacl/shapes.ttl b/HandsOn/Group01/shacl/shapes.ttl new file mode 100644 index 00000000..ad5d54c6 --- /dev/null +++ b/HandsOn/Group01/shacl/shapes.ttl @@ -0,0 +1,173 @@ +@prefix schema: . +@prefix rdf: . +@prefix sh: . +@prefix owl: . +@prefix ns: . +@prefix afn: . +@prefix xsd: . +@prefix mv: . +@prefix rdfs: . +@prefix uiote: . +@prefix dc: . + + + a sh:PropertyShape ; + rdfs:label "has connector" ; + sh:class uiote:Connector ; + sh:name "has connector" ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path ns:hasConnector . + + + a sh:PropertyShape ; + rdfs:label "latitude" ; + sh:datatype xsd:decimal ; + sh:name "latitude" ; + sh:nodeKind sh:Literal ; + sh:path schema:latitude ; + sh:pattern "(\\+|-)?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)" . + + + a sh:PropertyShape ; + rdfs:label "number of connectors" ; + sh:datatype xsd:integer ; + sh:name "number of connectors" ; + sh:nodeKind sh:Literal ; + sh:path ns:numberOfConnectors ; + sh:pattern "[\\-+]?[0-9]+" . + + + a sh:PropertyShape ; + rdfs:label "owner" ; + sh:datatype xsd:string ; + sh:name "owner" ; + sh:nodeKind sh:Literal ; + sh:path ns:owner ; + sh:pattern ".*" . + + + a sh:NodeShape ; + rdfs:label "Charging Station" ; + sh:name "Charging Station" ; + sh:nodeKind sh:IRI ; + sh:property , , , , , , , , , ; + sh:targetClass uiote:ChargingStation . + + + a sh:NodeShape ; + rdfs:label "Geo Coordinates" ; + sh:name "Geo Coordinates" ; + sh:nodeKind sh:IRI ; + sh:property , ; + sh:targetClass schema:GeoCoordinates . + + + a sh:PropertyShape ; + rdfs:label "plug type" ; + sh:datatype xsd:string ; + sh:name "plug type" ; + sh:nodeKind sh:Literal ; + sh:path mv:plugType ; + sh:pattern ".*" . + + + a ; + + , , , , , , , , , , , , , , , , ; + + . + + + a sh:PropertyShape ; + rdfs:label "cables annotation" ; + sh:datatype xsd:string ; + sh:name "cables annotation" ; + sh:nodeKind sh:Literal ; + sh:path ns:cablesAnnotation ; + sh:pattern ".*" . + + + a sh:PropertyShape ; + rdfs:label "time limit" ; + sh:datatype xsd:integer ; + sh:name "time limit" ; + sh:nodeKind sh:Literal ; + sh:path ns:timeLimit ; + sh:pattern "[\\-+]?[0-9]+" . + + + a sh:PropertyShape ; + rdfs:label "bookable" ; + sh:datatype xsd:string ; + sh:name "bookable" ; + sh:nodeKind sh:Literal ; + sh:path ns:bookable ; + sh:pattern ".*" . + + + a sh:PropertyShape ; + rdfs:label "price" ; + sh:datatype xsd:string ; + sh:name "price" ; + sh:nodeKind sh:Literal ; + sh:path schema:price ; + sh:pattern ".*" . + + + a sh:PropertyShape ; + rdfs:label "address" ; + sh:datatype xsd:string ; + sh:name "address" ; + sh:nodeKind sh:Literal ; + sh:path schema:address ; + sh:pattern ".*" . + + + a sh:PropertyShape ; + rdfs:label "city" ; + sh:datatype xsd:string ; + sh:name "city" ; + sh:nodeKind sh:Literal ; + sh:path schema:City ; + sh:pattern ".*" . + + + a sh:PropertyShape ; + rdfs:label "schedule" ; + sh:datatype xsd:string ; + sh:name "schedule" ; + sh:nodeKind sh:Literal ; + sh:path schema:Schedule ; + sh:pattern ".*" . + + + a ; + + "Shapes generated with no errors" ; + + "200"^^xsd:int . + + + a sh:PropertyShape ; + rdfs:label "longitude" ; + sh:datatype xsd:decimal ; + sh:name "longitude" ; + sh:nodeKind sh:Literal ; + sh:path schema:longitude ; + sh:pattern "(\\+|-)?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)" . + + + a sh:PropertyShape ; + rdfs:label "has geocoordinate" ; + sh:class schema:GeoCoordinates ; + sh:name "has geocoordinate" ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path ns:hasGeocoordinate . + + + a sh:NodeShape ; + rdfs:label "Connector" ; + sh:name "Connector" ; + sh:nodeKind sh:IRI ; + sh:property , ; + sh:targetClass uiote:Connector .