Skip to content
Alpha: see what works today →
Menu

Named question about pod

Which view lists each kind

An app finds a Solid pod's data through its type index: each registration names a type and the file that lists things of that type. Here each of those files is a view, and the entries are the things it lists. A view is never edited by hand; the build writes it from the records and the judgments.

The query

PREFIX cascade: <https://ns.cascadeprotocol.org/cascade#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX solid: <http://www.w3.org/ns/solid/terms#>

SELECT ?title ?type ?view (COUNT(DISTINCT ?entry) AS ?entries)
WHERE {
  ?registration a solid:TypeRegistration ; solid:forClass ?type ; solid:instance ?view ; dct:title ?title .
  OPTIONAL { ?entry a ?type ; cascade:entryMember [] }
}
GROUP BY ?title ?type ?view
ORDER BY ?title ?view

Terms it reads

cascade:entryMember · dct:title · solid:TypeRegistration · solid:forClass · solid:instance

Rules and decision notes that name it

No rule or decision note writes its path.

Its rows on Alex Rivera's pod

5 rows, as Alex Rivera's explorer shows them.

titletypeviewentries
Allergiescascade:AllergyOrIntolerancehttps://pod.alex-rivera.example/clinical/allergies.ttl4
Conditionscascade:ProblemOrDiagnosishttps://pod.alex-rivera.example/clinical/conditions.ttl4
Immunizationscascade:Vaccinationhttps://pod.alex-rivera.example/clinical/immunizations.ttl1
Patient profilecascade:PatientProfilehttps://pod.alex-rivera.example/clinical/patient-profile.ttl1
Procedurescascade:MedicalProcedurehttps://pod.alex-rivera.example/clinical/procedures.ttl2

queries/questions/pod/Which view lists each kind.rq on GitHub ↗