Returns all outputs (e.g. publications) linked to the given project via frapo:hasOutput, with the output's label, its type(s) and publication date (when described by a space member), restricted to links and descriptions authored by a member, maintainer, or admin of the project's space.
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dct: <http://purl.org/dc/terms/> prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix nt: <https://w3id.org/np/o/ntemplate/> prefix frapo: <http://purl.org/cerif/frapo/> prefix gen: <https://w3id.org/kpxl/gen/terms/> prefix fabio: <http://purl.org/spar/fabio/> select ?publication ?publication_label (group_concat(distinct str(?type); separator=" ") as ?type_multi_iri) (group_concat(distinct ?typeLabel; separator="\n") as ?type_label_multi) (sample(?pubdate0) as ?pubdate) ?np ("^" as ?np_label) where { values ?_project_multi_iri {} service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> { select (group_concat(?mpk; separator=" ") as ?memberPubkeys) where { graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?stateG . } values ?_project_multi_iri {} graph ?stateG { ?_project_multi_iri npa:isMaintainedBy? ?space . ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:forAgent ?agent ; npa:hasRoleType ?roleType . filter(?roleType in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole)) ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk . } } } graph npa:graph { ?np npa:hasValidSignatureForPublicKeyHash ?npPubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?npPubkey . } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } ?np np:hasAssertion ?a . ?np np:hasPublicationInfo ?pi . } filter(contains(?memberPubkeys, ?npPubkey)) graph ?a { ?_project_multi_iri frapo:hasOutput ?publication . } optional { graph ?pi { ?publication nt:hasLabelFromApi ?publication_label . } } optional { graph npa:graph { ?dnp npa:hasValidSignatureForPublicKeyHash ?dpk . filter not exists { ?dnpx npx:invalidates ?dnp ; npa:hasValidSignatureForPublicKeyHash ?dpk . } filter not exists { ?dnp npx:hasNanopubType npx:ExampleNanopub . } ?dnp np:hasAssertion ?da . } filter(contains(?memberPubkeys, ?dpk)) graph ?da { ?publication a ?type . filter(strstarts(str(?type), "http://purl.org/spar/fabio/")) optional { ?publication dct:date ?pubdate0 } } bind(strafter(str(?type), "http://purl.org/spar/fabio/") as ?typeLabel) } } group by ?publication ?publication_label ?np order by desc(?pubdate)