[ { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY/provenance", "@graph": [ { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY/Head", "@graph": [ { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] }, { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY/pubinfo", "@graph": [ { "@id": "https://orcid.org/0000-0002-1267-0234", "http://xmlns.com/foaf/0.1/name": [ { "@value": "Tobias Kuhn" } ] }, { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY", "http://purl.org/dc/terms/created": [ { "@value": "2026-06-24T11:50:46Z", "@type": "http://www.w3.org/2001/XMLSchema#dateTime" } ], "http://purl.org/dc/terms/creator": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ], "http://purl.org/dc/terms/license": [ { "@id": "https://creativecommons.org/licenses/by/4.0/" } ], "http://purl.org/nanopub/x/introduces": [ { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY/get-all-spaces" } ], "http://purl.org/nanopub/x/supersedes": [ { "@id": "https://w3id.org/np/RAlSgMFS1RJc1z7DM69BQ6HT2FEo46fm9JER7bQ6q1TA8" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate": [ { "@id": "https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate": [ { "@id": "https://w3id.org/np/RA0J4vUn_dekg-U1kK3AOEt02p9mT2WO03uGxLDec1jLw" }, { "@id": "https://w3id.org/np/RAoTD7udB2KtUuOuAe74tJi1t3VzK0DyWS7rYVAq1GRvw" }, { "@id": "https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate": [ { "@id": "https://w3id.org/np/RARuOLDzf45L_wBceBownrcLLvAKP-2yB-uwJJx8H7IWI" } ] }, { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY/sig", "http://purl.org/nanopub/x/hasAlgorithm": [ { "@value": "RSA" } ], "http://purl.org/nanopub/x/hasPublicKey": [ { "@value": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" } ], "http://purl.org/nanopub/x/hasSignature": [ { "@value": "NgstlKnIqUOmZslb6NXywgfnVFJLoiR+WNYJ+gI6nEg96wIjQqCx8RTiooHxuxd9Am2T194XEOb9q40d1ruEizluNnZgkTAmSLDo7M2nn6Upim6Mxtj94OUmJCvwlj9WOefs6gOeM3swa7G4WJhb8P+XZCn3uCYUqQLwqg3vjck=" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY/assertion", "@graph": [ { "@id": "https://w3id.org/np/RAvO2pFGy2AONKhIur4XAE_aJcVVeM9pEBoZPfxjl1NUY/get-all-spaces", "http://purl.org/dc/terms/description": [ { "@value": "Returns one row per known space with its label, type IRI and short type name, plus the number of members (Admin + Maintainer + Member tiers) and the number of observers (Observer tier), ordered by member count (most first), then alphabetically by space label. Intended for the /spaces table view." } ], "http://purl.org/dc/terms/license": [ { "@id": "http://www.apache.org/licenses/LICENSE-2.0" } ], "@type": [ "https://w3id.org/kpxl/grlc/grlc-query" ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get all spaces" } ], "https://w3id.org/kpxl/grlc/endpoint": [ { "@id": "https://w3id.org/np/l/nanopub-query-1.1/repo/spaces" } ], "https://w3id.org/kpxl/grlc/sparql": [ { "@value": "prefix rdfs: \nprefix npa: \nprefix npx: \nprefix gen: \n\nselect ?space_iri (sample(?lbl) as ?space_iri_label) (sample(?t) as ?type) (sample(?tlbl) as ?type_label) (coalesce(sample(?mc), 0) as ?members_count) (coalesce(sample(?oc), 0) as ?observers_count) where {\n graph npa:spacesGraph {\n ?spaceRef a npa:SpaceRef ; npa:spaceIri ?space_iri .\n ?def a npa:SpaceDefinition ;\n npa:forSpaceRef ?spaceRef ;\n npa:viaNanopub ?np .\n }\n graph npa:graph {\n ?np rdfs:label ?lbl .\n ?np npx:hasNanopubType ?t .\n filter(strstarts(str(?t), \"https://w3id.org/kpxl/gen/terms/\"))\n filter(?t != gen:Space)\n }\n filter not exists { graph npa:graph { ?invNp npx:invalidates ?np . } }\n bind(strafter(str(?t), \"https://w3id.org/kpxl/gen/terms/\") as ?tlbl)\n optional {\n select ?space_iri (count(distinct ?memberAgent) as ?mc) (count(distinct ?observerAgent) as ?oc) where {\n graph npa:graph { npa:hasCurrentSpaceState ?g . }\n graph ?g {\n ?ri a gen:RoleInstantiation ; npa:forSpace ?space_iri ; npa:forAgent ?agent ; npa:hasRoleType ?tier .\n }\n bind(if(?tier != gen:ObserverRole, ?agent, ?unboundM) as ?memberAgent)\n bind(if(?tier = gen:ObserverRole, ?agent, ?unboundO) as ?observerAgent)\n } group by ?space_iri\n }\n} group by ?space_iri order by desc(coalesce(sample(?mc), 0)) lcase(sample(?lbl))" } ] } ] } ]