[ { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM/assertion", "@graph": [ { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM/list-preset-assignments", "http://purl.org/dc/terms/description": [ { "@value": "Lists the presets assigned in a given space ref (space IRI + root definition). Pass the ref's root nanopub (root_np); the query resolves the ref via npa:rootNanopub and reads the server-materialised npa:PresetAssignment rows scoped by npa:forSpaceRef from the trust-validated current space-state graph (only admin-authored assignments are materialised, so this is authorisation-scoped). Per (preset, resource) only the latest assignment by dct:created counts, and the preset is listed only when that latest row is still activated (npa:isActivated true) — a deactivation is a newer admin-authored row with npa:isActivated false. Columns match the IRI-keyed list-preset-assignments (preset, preset_label, deactivatePreset, added_by, date_added, np, np_label) so it drives the existing Preset assignments view unchanged. Ref-scoped variant: shows only that one ref's assignments rather than merging all refs claiming the IRI." } ], "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": "List preset assignments (ref-scoped)" } ], "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 dct: \nprefix np: \nprefix npa: \nprefix npx: \nprefix gen: \n\nselect ?preset (sample(?lbl) as ?preset_label) (str(?preset) as ?deactivatePreset)\n (sample(?user) as ?added_by) (?date as ?date_added) ?np (\"^\" as ?np_label)\nwhere {\n values ?_root_np_multi_iri {}\n graph npa:spacesGraph { ?ref npa:rootNanopub ?_root_np_multi_iri . }\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?g . }\n graph ?g {\n ?paRef a npa:PresetAssignment ; npa:forSpaceRef ?ref ; npa:ofPreset ?preset ; npa:forResource ?resource ;\n npa:isActivated ?activated ; npa:viaNanopub ?np ; dct:created ?date .\n }\n filter(?activated = true)\n filter not exists {\n graph ?g { ?pa2 a npa:PresetAssignment ; npa:forSpaceRef ?ref ; npa:ofPreset ?preset ; npa:forResource ?resource ; dct:created ?date2 . }\n filter(?date2 > ?date)\n }\n optional { graph npa:graph { ?np npx:signedBy ?user } }\n optional { ?pnp npx:embeds ?preset ; np:hasAssertion ?pa . graph ?pa { ?preset rdfs:label ?lbl } }\n}\ngroup by ?preset ?date ?np\norder by desc(?date)" } ] } ] }, { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM/provenance", "@graph": [ { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM/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/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM", "http://purl.org/dc/terms/created": [ { "@value": "2026-06-19T08:01:45Z", "@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/embeds": [ { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM/list-preset-assignments" } ], "http://purl.org/nanopub/x/supersedes": [ { "@id": "https://w3id.org/np/RAeLNbudAq68NdqfIL3mtT2YeLnIHZ5T52Qwl_rJzMJJk" } ], "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" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate": [ { "@id": "https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k" } ] }, { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM/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": "rZCEI2obPttHURYNRZ4uXF1pk30lgIB51nRBt0KcfetOHON2qKGFNgAYJ4y1MsxwXMij7GlKEVjW0cAYnzOM4yz3GEOHajseVtFlgtf/IPXSjeZwANHzk2IsON6/rixN9o8o0r0VtFzp3emjutLYtYN4pWz2iskisp1FxvQoYQ4=" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM/Head", "@graph": [ { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RA3zdn0g5v_BUNXkTdEFHDp4RkqX2qmqff0DYxxBj3UQM/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] } ]