[ { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow/assertion", "@graph": [ { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow/view-preset-test", "http://purl.org/dc/terms/description": [ { "@value": "Testing" } ], "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": "View/preset test" } ], "https://w3id.org/kpxl/grlc/endpoint": [ { "@id": "https://w3id.org/np/l/nanopub-query-1.1/repo/type/11daee46fdfff957dc17b46f5dc1a618045afd4f5634d5334ce9db19c3689a3c" } ], "https://w3id.org/kpxl/grlc/sparql": [ { "@value": "prefix rdfs: \r\n prefix dct: \r\n prefix np: \r\n prefix npa: \r\n prefix npx: \r\n prefix gen: \r\n\r\n # endpoint: .../repo/type/11daee46... (the gen:ViewDisplay type-repo)\r\n select distinct ?display ?view (coalesce(?viewKindOptional, ?view) as ?viewKind)\r\n ?label ?displayType ?displayMode ?np ?pubkey ?date where {\r\n values ?_resource_multi_iri {}\r\n\r\n # --- shared authority gate: binds ?pubkey to the admins of the owning space,\r\n # or leaves it UNBOUND when the resource has no space (e.g. an ORCID profile) ---\r\n service {\r\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . }\r\n {\r\n graph ?stateG {\r\n { ?_resource_multi_iri npa:isMaintainedBy ?space . } union { bind(?_resource_multi_iri as ?space) }\r\n ?ri a gen:RoleInstantiation ; npa:inverseProperty gen:hasAdmin ;\r\n npa:forSpace ?space ; npa:forAgent ?adminAgent .\r\n ?acct a npa:AccountState ; npa:agent ?adminAgent ; npa:pubkey ?pubkey .\r\n }\r\n } union {\r\n filter not exists {\r\n graph ?stateG {\r\n { ?_resource_multi_iri npa:isMaintainedBy [] }\r\n union { [] a gen:RoleInstantiation ; npa:forSpace ?_resource_multi_iri }\r\n }\r\n }\r\n }\r\n }\r\n\r\n {\r\n # --- branch (a): standalone view displays — LOCAL pattern on the endpoint repo ---\r\n graph npa:graph {\r\n ?np npx:hasNanopubType gen:ViewDisplay .\r\n ?np npa:hasValidSignatureForPublicKeyHash ?pubkey .\r\n filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }\r\n ?np dct:created ?date .\r\n ?np npx:embeds ?display .\r\n ?np np:hasAssertion ?a .\r\n optional { ?np rdfs:label ?label }\r\n }\r\n graph ?a {\r\n ?display gen:isDisplayOfView ?view .\r\n ?display gen:isDisplayFor ?_resource_multi_iri .\r\n optional { values ?displayType { gen:PartLevelViewDisplay gen:TopLevelViewDisplay } ?display a ?displayType . }\r\n optional { values ?displayMode { gen:ActivatedViewDisplay gen:DeactivatedViewDisplay } ?display a ?displayMode . }\r\n }\r\n }\r\n union\r\n {\r\n # --- branch (b): preset-supplied views — a remote SERVICE (presets live in other repos) ---\r\n service {\r\n graph npa:graph {\r\n ?np npx:hasNanopubType gen:PresetAssignment .\r\n ?np npa:hasValidSignatureForPublicKeyHash ?pubkey .\r\n filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }\r\n ?np dct:created ?date .\r\n ?np npx:embeds ?assignment .\r\n ?np np:hasAssertion ?a .\r\n optional { ?np rdfs:label ?label }\r\n }\r\n graph ?a {\r\n ?assignment gen:isAssignmentFor ?_resource_multi_iri .\r\n ?assignment gen:isAssignmentOfPreset ?presetRef .\r\n optional { values ?displayMode { gen:ActivatedPresetAssignment gen:DeactivatedPresetAssignment } ?assignment a ?displayMode . }\r\n }\r\n graph npa:graph { ?presetNp npx:embeds ?presetRef ; np:hasAssertion ?pa . }\r\n graph ?pa {\r\n ?presetRef a gen:Preset .\r\n { ?presetRef gen:hasTopLevelView ?view . bind(gen:TopLevelViewDisplay as ?displayType) }\r\n union { ?presetRef gen:hasView ?view . bind(gen:PartLevelViewDisplay as ?displayType) }\r\n }\r\n }\r\n }\r\n\r\n optional { # viewKind resolution, kept local\r\n select ?view ?viewKindOptional {\r\n graph npa:graph {\r\n ?vkNp npx:hasNanopubType gen:ResourceView .\r\n filter not exists { ?vkNpx npx:invalidates ?vkNp . }\r\n ?vkNp npx:embeds ?view ; np:hasAssertion ?vka .\r\n }\r\n graph ?vka { ?view a gen:ResourceView ; dct:isVersionOf ?viewKindOptional . }\r\n }\r\n }\r\n }\r\n order by desc(?date)" } ] } ] }, { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow/Head", "@graph": [ { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] }, { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow/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/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow", "http://purl.org/dc/terms/created": [ { "@value": "2026-06-03T11:47:33.130+02:00", "@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/publicdomain/zero/1.0/" } ], "http://purl.org/nanopub/x/embeds": [ { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow/view-preset-test" } ], "http://purl.org/nanopub/x/wasCreatedAt": [ { "@id": "http://localhost:37373/" } ], "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/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8" }, { "@id": "https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate": [ { "@id": "https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k" } ] }, { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow/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": "qrhJP3QYRxgPAwG1Xu3rPfo3p6TE0woWCWzJg+kUnuTXIQ9zia081P7dNi9vgnTmWiWooJtxELRUmMwdCmQ7vz7TNiaKEX0StTpqrqLq02LoksfNT62i3DeabmlQKoapCViP7OiMyLe0M9BsNS+Dz8iuvF52BIeCC34KOHHbF0g=" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] }, { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow/provenance", "@graph": [ { "@id": "https://w3id.org/np/RAj2bKNyyK2WMh5GM43OHx3zU6CDoOPQkDmXSRt0sL8Ow/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://orcid.org/0000-0002-1267-0234" } ] } ] } ]