Named question about pod
What each folder holds
A file's folder is its address after the storage root the owner's profile names, and GRAPH ?file reads one file at a time. Each row is one folder, one type of thing its files describe, and how many of them. A two-character folder only spreads files out, so its files count toward the folder above it. A version states no type of its own, so in a records folder the row with no type stated is its versions. The labels file names nearly everything, and is left out here; so is a thing described in a folder other than its own, such as the owner in each judgment they made.
The query
PREFIX cascade: <https://ns.cascadeprotocol.org/cascade#>
PREFIX pim: <http://www.w3.org/ns/pim/space#>
SELECT ?folder ?type (COUNT(DISTINCT ?thing) AS ?things)
WHERE {
{ SELECT DISTINCT ?file ?thing ?root
WHERE {
?owner pim:storage ?root .
GRAPH ?file { ?thing ?property ?value }
FILTER (isIRI(?thing) && STRSTARTS(STR(?file), STR(?root)))
} }
OPTIONAL { GRAPH ?file { ?thing a ?stated } }
BIND (CONCAT("/", REPLACE(STRAFTER(STR(?file), STR(?root)), "([0-9a-f]{2}/)?[^/]*$", "")) AS ?folder)
BIND (COALESCE(?stated, "no type stated") AS ?type)
FILTER (BOUND(?stated) || NOT EXISTS { ?file a cascade:View })
FILTER (!STRSTARTS(STR(?thing), STR(?root)) || STRSTARTS(STR(?thing), CONCAT(STR(?root), SUBSTR(?folder, 2))))
}
GROUP BY ?folder ?type
ORDER BY ?folder ?type
Terms it reads
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 49 rows, as Alex Rivera's explorer shows them. Every row of every question is in answers.json.
| folder | type | things |
|---|---|---|
| / | cascade:PodManifest | 1 |
| / | cascade:AllergyOrIntolerance | 4 |
| / | cascade:MedicalProcedure | 2 |
| / | cascade:PatientProfile | 1 |
| / | cascade:ProblemOrDiagnosis | 4 |
| / | cascade:Vaccination | 1 |
| / | cascade:View | 6 |
| / | prov:SoftwareAgent | 1 |
| / | cascade:Judgment | 20 |
| / | cascade:MatcherJudgmentAssertion | 10 |