- From: Tomasz Pluskiewicz via GitHub <sysbot+gh@w3.org>
- Date: Thu, 03 Nov 2022 19:32:49 +0000
- To: public-hydra-logs@w3.org
Here's a potentially more real-life example of what could be achieved when using SHACL for some crazy-ass member assertions. Imagine you use singleton property style of property attributes (maybe that would be possible in RDF* too but I won't be able to figure that our on the spot). The canonical example is **marriage** ```turtle # Bob married Jane on October 10th 2000 <Bob> ex:married#1 <Jane> . ex:married#1 rdfs:subPropertyOf ex:married ; schema:date "2000-10-10" . # Frank married Lucy on May 20th 1995 <Frank> ex:married#2 <Lucy> . ex:married#2 rdfs:subPropertyOf ex:married ; schema:date "1995-05-20" . <Bob> a schema:Person . <Jane> a schema:Person . <Frank> a schema:Person . <Lucy> a schema:Person . ex:married a owl:SymmetricProperty . ``` Here's a collection of people married before 2000 ```turtle <married-before-y2k> a hydra:Collection ; hydra:memberAssertion [ hydra:object [ a sh:NodeShape ; sh:targetClass schema:Person ; ] ; hydra:property [ a sh:NodeShape ; sh:property [ sh:path schema:date ; sh:maxExclusive "2000-01-01"^^xsd:date ; ] , [ sh:path rdfs:subPropertyOf ; sh:hasValue ex:married ; ] ] ; ] ; . ``` A hypothetical collection handler would be able to translate these member assertion shapes to a query like ```sparql SELECT ?member WHERE { ?member ?property ?spouse . # hydra:object assertion(s) ?spouse rdf:type schema:Person . # hydra:property assertion ?property rdfs:subPropertyOf ex:married ; schema:date ?date . FILTER ( ?date < "2000-01-01"^^xsd:date ) } ``` -- GitHub Notification of comment by tpluscode Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/248#issuecomment-1302576522 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 3 November 2022 19:32:50 UTC