data-shapes-test-suite.tests.core.complex.personexample.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:Alice
rdf:type ex:Person ;
ex:ssn "987-65-432A" ;
.
ex:Bob
rdf:type ex:Person ;
ex:ssn "123-45-6789" ;
ex:ssn "124-35-6789" ;
.
ex:Calvin
rdf:type ex:Person ;
ex:birthDate "1999-09-09"^^xsd:date ;
ex:worksFor ex:UntypedCompany ;
.
ex:PersonShape
rdf:type sh:NodeShape ;
sh:closed "true"^^xsd:boolean ;
sh:ignoredProperties (
rdf:type
) ;
sh:property [
sh:path ex:ssn ;
sh:datatype xsd:string ;
sh:maxCount 1 ;
sh:pattern "^\\d{3}-\\d{2}-\\d{4}$" ;
] ;
sh:property [
sh:path ex:worksFor ;
sh:class ex:Company ;
sh:nodeKind sh:IRI ;
] ;
sh:property [
sh:path [
sh:inversePath ex:worksFor ;
] ;
sh:name "employee" ;
] ;
sh:targetClass ex:Person ;
.
<>
rdf:type mf:Manifest ;
mf:entries (
) ;
.
rdf:type sht:Validate ;
rdfs:label "Test of personexample" ;
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:Alice ;
sh:resultPath ex:ssn ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:PatternConstraintComponent ;
sh:sourceShape _:b61064 ;
sh:value "987-65-432A" ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:Bob ;
sh:resultPath ex:ssn ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MaxCountConstraintComponent ;
sh:sourceShape _:b61064 ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:Calvin ;
sh:resultPath ex:birthDate ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:ClosedConstraintComponent ;
sh:sourceShape ex:PersonShape ;
sh:value "1999-09-09"^^xsd:date ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:Calvin ;
sh:resultPath ex:worksFor ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:ClassConstraintComponent ;
sh:sourceShape [] ;
sh:value ex:UntypedCompany ;
] ;
] ;
mf:status sht:approved ;
.