https://w3id.org/np/RAC-5NUqwCvpKqRsK70qVwTEfOyTQdZpzvbONdNNVEHFM
.trig | .trig.txt | .jelly | .jelly.txt | .jsonld | .jsonld.txt | .nq | .nq.txt | .xml | .xml.txt
@prefix this: <https://w3id.org/np/RAC-5NUqwCvpKqRsK70qVwTEfOyTQdZpzvbONdNNVEHFM> .
@prefix sub: <https://w3id.org/np/RAC-5NUqwCvpKqRsK70qVwTEfOyTQdZpzvbONdNNVEHFM/> .
@prefix np: <http://www.nanopub.org/nschema#> .
@prefix grlc: <https://w3id.org/kpxl/grlc/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix nt: <https://w3id.org/np/o/ntemplate/> .
@prefix npx: <http://purl.org/nanopub/x/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix orcid: <https://orcid.org/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
sub:Head {
this: a np:Nanopublication;
np:hasAssertion sub:assertion;
np:hasProvenance sub:provenance;
np:hasPublicationInfo sub:pubinfo .
}
sub:assertion {
sub:get-project-info a grlc:grlc-query;
dct:description "Returns key-value facts for display on a project page (a gen:Project, which is also a gen:Space): its description, start date, end date, project lead(s), and admins. Description and dates are read from the project's latest non-invalidated definition nanopub. Project leads are the validated holders of the project-lead role (gen:hasRole .../projectLeadRole) and admins are the validated admins (npa:hasRoleType gen:AdminRole) of the project, both resolved via the spaces repository. A lead's label uses the canonical foaf:name from the trust state when present, otherwise falls back to the foaf:name or nt:hasLabelFromApi declared for the agent in the pubinfo of the role-grant nanopub (npa:viaNanopub), and finally to the agent IRI. Each property occupies one row; the Value column is a multi-value cell so properties with several values (multiple leads or admins) list them all in a single row. Both columns use the '_noheader' convention so the redundant header row is dropped.";
dct:license <http://www.apache.org/licenses/LICENSE-2.0>;
rdfs:label "Get project info";
grlc:endpoint <https://w3id.org/np/l/nanopub-query-1.1/repo/full>;
grlc:sparql """prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dct: <http://purl.org/dc/terms/>
prefix schema: <http://schema.org/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nt: <https://w3id.org/np/o/ntemplate/>
prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
select distinct ?Property_noheader ?Property_label ?Value_multi_val_noheader ?Value_label_multi where {
values ?_resource_multi_iri {}
graph npa:graph {
?np npx:introduces ?_resource_multi_iri ; npa:hasValidSignatureForPublicKeyHash ?pubkey ; np:hasAssertion ?a .
filter not exists { ?inv npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . }
}
graph ?a { ?_resource_multi_iri a gen:Project }
optional {
select (group_concat(distinct ?descEsc; separator=\"\\n\") as ?descVal) where {
values ?_resource_multi_iri {}
graph npa:graph {
?npd npx:introduces ?_resource_multi_iri ; npa:hasValidSignatureForPublicKeyHash ?pkd ; np:hasAssertion ?ad .
filter not exists { ?invd npx:invalidates ?npd ; npa:hasValidSignatureForPublicKeyHash ?pkd . }
}
graph ?ad { ?_resource_multi_iri dct:description ?desc . }
bind(replace(replace(str(?desc), \"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\"), \"[\\r\\n]+\", \"\\\\\\\\n\") as ?descEsc)
} having (count(?desc) > 0)
}
optional {
select (group_concat(distinct substr(str(?sd), 1, 10); separator=\"\\n\") as ?startVal) where {
values ?_resource_multi_iri {}
graph npa:graph {
?nps npx:introduces ?_resource_multi_iri ; npa:hasValidSignatureForPublicKeyHash ?pks ; np:hasAssertion ?asd .
filter not exists { ?invs npx:invalidates ?nps ; npa:hasValidSignatureForPublicKeyHash ?pks . }
}
graph ?asd { ?_resource_multi_iri schema:startDate ?sd . }
} having (count(?sd) > 0)
}
optional {
select (group_concat(distinct substr(str(?ed), 1, 10); separator=\"\\n\") as ?endVal) where {
values ?_resource_multi_iri {}
graph npa:graph {
?npe npx:introduces ?_resource_multi_iri ; npa:hasValidSignatureForPublicKeyHash ?pke ; np:hasAssertion ?aed .
filter not exists { ?inve npx:invalidates ?npe ; npa:hasValidSignatureForPublicKeyHash ?pke . }
}
graph ?aed { ?_resource_multi_iri schema:endDate ?ed . }
} having (count(?ed) > 0)
}
optional {
select (group_concat(?lead2; separator=\"\\n\") as ?leadVal) (group_concat(?leadName; separator=\"\\n\") as ?leadLabel) where {
select ?lead2 (coalesce(max(?leadNmState), max(?leadNmPub), ?lead2) as ?leadName) where {
values ?_resource_multi_iri {}
service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g . }
graph ?g { ?ri a gen:RoleInstantiation ; npa:forSpace ?_resource_multi_iri ; gen:hasRole <https://w3id.org/np/RAei8Dr3uv5mhWDfkgmX39wbhFe_1fsF_zFBrzYt94LZQ/projectLeadRole> ; npa:forAgent ?lead ; npa:viaNanopub ?leadNp . }
optional { graph ?g { ?lead foaf:name ?leadNmState . } }
}
optional { graph npa:graph { ?leadNp np:hasPublicationInfo ?lpi . } graph ?lpi { ?lead foaf:name ?leadNmPub1 . } }
optional { graph npa:graph { ?leadNp np:hasPublicationInfo ?lpi2 . } graph ?lpi2 { ?lead nt:hasLabelFromApi ?leadNmPub2 . } }
bind(coalesce(?leadNmPub1, ?leadNmPub2) as ?leadNmPub)
bind(str(?lead) as ?lead2)
} group by ?lead2
} having (count(?lead2) > 0)
}
optional {
select (group_concat(?admin2; separator=\"\\n\") as ?adminVal) (group_concat(?adminName; separator=\"\\n\") as ?adminLabel) where {
select distinct ?admin2 ?adminName where {
values ?_resource_multi_iri {}
service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?g . }
graph ?g { ?ri2 a gen:RoleInstantiation ; npa:forSpace ?_resource_multi_iri ; npa:hasRoleType gen:AdminRole ; npa:forAgent ?admin . }
optional { graph ?g { ?admin foaf:name ?adminName0 . } }
}
bind(coalesce(?adminName0, str(?admin)) as ?adminName)
bind(str(?admin) as ?admin2)
}
} having (count(?admin2) > 0)
}
values (?key ?Property_noheader ?Property_label) {
('Description' dct:description 'Description:')
('StartDate' schema:startDate 'Start Date:')
('EndDate' schema:endDate 'End Date:')
('Lead' gen:hasProjectLead 'Project Lead:')
('Admins' gen:hasAdmin 'Admins:')
}
bind(if(?key='Description', ?descVal, if(?key='StartDate', ?startVal, if(?key='EndDate', ?endVal, if(?key='Lead', ?leadVal, ?adminVal)))) as ?Value_multi_val_noheader)
filter(bound(?Value_multi_val_noheader))
bind(if(?key='Lead', ?leadLabel, if(?key='Admins', ?adminLabel, '')) as ?Value_label_multi)
}
order by (if(?key='Description', 1, if(?key='StartDate', 2, if(?key='EndDate', 3, if(?key='Lead', 4, 5)))))""" .
}
sub:provenance {
sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234 .
}
sub:pubinfo {
orcid:0000-0002-1267-0234 foaf:name "Tobias Kuhn" .
this: dct:created "2026-06-30T11:54:46Z"^^xsd:dateTime;
dct:creator orcid:0000-0002-1267-0234;
dct:license <https://creativecommons.org/licenses/by/4.0/>;
npx:embeds sub:get-project-info;
npx:supersedes <https://w3id.org/np/RA17SntraXQMGUNXu3dWbWA4kg10388Aeuf6VBB9VSPHo>;
rdfs:label "Get project info";
nt:wasCreatedFromProvenanceTemplate <https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU>;
nt:wasCreatedFromPubinfoTemplate <https://w3id.org/np/RA0J4vUn_dekg-U1kK3AOEt02p9mT2WO03uGxLDec1jLw>,
<https://w3id.org/np/RAoTD7udB2KtUuOuAe74tJi1t3VzK0DyWS7rYVAq1GRvw>, <https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI>;
nt:wasCreatedFromTemplate <https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k> .
sub:sig npx:hasAlgorithm "RSA";
npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB";
npx:hasSignature "mOeZ5UMpL/2UIHFB4g4ddFZ9CZv6O4sM9a2rYw8WjvWAPFUhuM8nKhMuvCIM9AEnGDQQyFpPjHTYSG/UdM0LankY3PwvR8uWnE7eRMgNF+XxBG1FWUc6BriY7qgATWzFBNiOTh7XZ7/5ch+EyqCS7MXvKROYpFHamEkpGuZ+uyg=";
npx:hasSignatureTarget this:;
npx:signedBy orcid:0000-0002-1267-0234 .
}