Skip to content
Alpha: see what works today →
Menu

Named question about pod

Which file states each thing

The store loads each file twice: into the default graph, which the other questions read, and into a graph named by its address, which GRAPH ?file reads. A file states a thing when it says something about it, or names it as the value of a statement: a patient profile has no file of its own, so the files that name it are where it is stated. Named marks a row for a file that names the thing, and rebuilt a view or the labels, which the build writes. Files the build did not write come first, and among them the file a thing arrived in, if it has one.

The query

PREFIX cascade: <https://ns.cascadeprotocol.org/cascade#>
PREFIX pim: <http://www.w3.org/ns/pim/space#>

SELECT DISTINCT ?thing ?file ?named ?rebuilt
WHERE {
  { { SELECT DISTINCT ?file ?thing
      WHERE {
        ?owner pim:storage ?root .
        GRAPH ?file { ?thing ?property ?value }
        FILTER (isIRI(?thing) && STRSTARTS(STR(?file), STR(?root)))
      } }
    BIND (false AS ?named)
    BIND (EXISTS { ?file a cascade:View } AS ?rebuilt) }
  UNION
  { { SELECT DISTINCT ?file ?thing
      WHERE {
        ?owner pim:storage ?root .
        GRAPH ?file { ?subject ?property ?thing }
        FILTER (isIRI(?thing) && STRSTARTS(STR(?file), STR(?root)))
      } }
    BIND (true AS ?named)
    BIND (EXISTS { ?file a cascade:View } AS ?rebuilt) }
}
ORDER BY ?thing ?rebuilt ?named ?file

Terms it reads

cascade:View · pim:storage

Rules and decision notes that name it

No rule or decision note writes its path.

Its rows on Alex Rivera's pod

The first 10 of 1520 rows, as Alex Rivera's explorer shows them. Every row of every question is in answers.json.

thingfilenamedrebuilt
http://creativecommons.org/publicdomain/mark/1.0/https://pod.alex-rivera.example/references/25/25623afd-6445-4394-8174-93ffacaea90e.ttltruefalse
http://snomed.info/id/10509002https://pod.alex-rivera.example/records/conditions/05/05779cc230852a999c62d121b25f8802b362565e76a1b16265d6400700b42fc3.ttltruefalse
http://snomed.info/id/10509002https://pod.alex-rivera.example/records/conditions/39/39e1a7302b7c13374a9f9baf4a484443eb65d37494a26e1d9c48e67872a355c9.ttltruefalse
http://snomed.info/id/10509002https://pod.alex-rivera.example/clinical/conditions.ttltruetrue
http://snomed.info/id/111088007https://pod.alex-rivera.example/records/allergies/7f/7f274eec61b969f1d9851c79b3f74e13726bd09c3d8600223d7911b51f433b7b.ttltruefalse
http://snomed.info/id/111088007https://pod.alex-rivera.example/records/allergies/d1/d1c6a279e7f48dca712d8474713eb83ca773518c763a76b6cd461679450fd8dd.ttltruefalse
http://snomed.info/id/111088007https://pod.alex-rivera.example/clinical/allergies.ttltruetrue
http://snomed.info/id/195967001https://pod.alex-rivera.example/records/conditions/0e/0e86033b766fbf3928a663e81c75291612edfaaa0e9224949e10e2ffcd6cfd0c.ttltruefalse
http://snomed.info/id/195967001https://pod.alex-rivera.example/records/conditions/8f/8faf1907f073eac610022df24839e2d4132d18b3c1c4a2e738b67fc7e911015f.ttltruefalse
http://snomed.info/id/195967001https://pod.alex-rivera.example/clinical/conditions.ttltruetrue

queries/questions/pod/Which file states each thing.rq on GitHub ↗