data-shapes-test-suite.tests.core.property.node-001.ttl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdf4j-shacl-testsuite Show documentation
Show all versions of rdf4j-shacl-testsuite Show documentation
Test suite for the SHACL Shapes Constraint Language
The newest version!
@prefix dash: .
@prefix ex: .
@prefix mf: .
@prefix owl: .
@prefix rdf: .
@prefix rdfs: .
@prefix sh: .
@prefix sht: .
@prefix xsd: .
ex:Anon
rdf:type ex:Person ;
ex:firstName "Anon" ;
.
ex:Issue
rdf:type rdfs:Class ;
rdf:type sh:NodeShape ;
rdfs:label "Issue" ;
rdfs:subClassOf rdfs:Resource ;
sh:property ex:Issue-assignedTo ;
sh:property ex:Issue-submittedBy ;
.
ex:Issue-assignedTo
sh:path ex:assignedTo ;
sh:class ex:Person ;
sh:node [
rdfs:comment "All assignees must have an email and a last name." ;
sh:property [
sh:path ex:email ;
sh:maxCount 1 ;
sh:minCount 1 ;
] ;
sh:property [
sh:path ex:lastName ;
sh:maxCount 1 ;
sh:minCount 1 ;
] ;
] ;
.
ex:Issue-submittedBy
sh:path ex:submittedBy ;
sh:class ex:Person ;
sh:minCount 1 ;
.
ex:Issue_1
rdf:type ex:Issue ;
ex:assignedTo ex:Anon ;
ex:submittedBy ex:Anon ;
rdfs:label "Issue 1" ;
.
ex:Issue_2
rdf:type ex:Issue ;
ex:assignedTo ex:JohnDoeWithEmail ;
ex:submittedBy ex:Anon ;
rdfs:label "Issue 2" ;
.
ex:JohnDoeWithEmail
rdf:type ex:Person ;
ex:email "[email protected]" ;
ex:firstName "John" ;
ex:lastName "Doe" ;
.
ex:Person
rdf:type rdfs:Class ;
rdf:type sh:NodeShape ;
rdfs:label "Person" ;
rdfs:subClassOf rdfs:Resource ;
sh:property [
sh:path ex:email ;
ex:datatype xsd:string ;
rdfs:label "email" ;
] ;
sh:property [
sh:path ex:firstName ;
rdfs:label "first name" ;
sh:datatype xsd:string ;
sh:maxCount 1 ;
sh:minCount 1 ;
] ;
sh:property [
sh:path ex:lastName ;
rdfs:label "last name" ;
sh:datatype xsd:string ;
] ;
.
<>
rdf:type mf:Manifest ;
mf:entries (
) ;
.
rdf:type sht:Validate ;
rdfs:label "Test of sh:node at property shape 001" ;
mf:action [
sht:dataGraph <> ;
sht:shapesGraph <> ;
] ;
mf:result [
rdf:type sh:ValidationReport ;
sh:conforms "false"^^xsd:boolean ;
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:Issue_1 ;
sh:resultPath ex:assignedTo ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NodeConstraintComponent ;
sh:sourceShape ex:Issue-assignedTo ;
sh:value ex:Anon ;
] ;
] ;
mf:status sht:approved ;
.