UNPKG

extract-cbd-shape

Version:

Extract an entity based on CBD and a SHACL shape

38 lines (30 loc) 1.03 kB
@prefix ex: <http://example.org/> . ## Next blank nodes test ex:A ex:P1 _:b0 . _:b0 ex:P2 _:b1 . _:b1 ex:P3 _:b2 . _:b2 ex:P4 ex:O . ## When extracting C, 4 triples should be fetched ## When extracting B, 8 triples should be retrieved by combining named graphs and CBD ex:B ex:P1 ex:O1 ex:C . ex:B ex:P2 ex:O2 ex:C . ex:B ex:P3 ex:O3 ex:C . ex:B ex:P4 ex:O4 ex:C . ex:D ex:P1 ex:O5 ex:B . ex:D ex:P2 ex:O6 ex:B . ex:E ex:P3 ex:O7 ex:B . ex:F ex:P4 ex:O8 ex:B . # Real-world-like example of what becomes possible thanks to named graphs: putting conflicting triples in separate graphs and contextualizing them. ex:LDES1 ex:member ex:Activity1, ex:Activity2 . ex:Activity1 a ex:Create ; ex:created "2023-09-01T12:00Z" ; ex:creator <https://pietercolpaert.be/#me> ; ex:object ex:Object1 . ex:Activity2 a ex:Update ; ex:created "2023-09-01T13:00Z" ; ex:creator <https://pieterheyvaert.com/#me> ; ex:object ex:Object1 . ex:Activity1 { ex:Object1 a ex:StreetName ; ex:label "Station street" . }