Is it possible to describe a Singleton Property with SHACL?

138 views Asked by At

Is it possible to describe Singleton Properties in SHACL? That is, instead of requiring a single foaf:name on a foaf:Person there’s a requirement of a unique predicate that that has a rdf:singletonPropertyOf of foaf:name.

So in


@prefix foaf: <http://xmlns.com/foaf/0.1/> . 
@prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

_:person1 a foaf:Person .
_:person1 <name> "Person 1" .
<name> a rdf:Property.
<name> rdf:singletonPropertyOf foaf:name.
_:person2 a foaf:Person.
_:person2 <knows> _:person1.
<knows> a rdf:Property.
<knows> rdf:singletonPropertyOf foaf:knows.

_:person1 is valid but _:person2 isn’t.

0

There are 0 answers