@prefix this: . @prefix sub: . @prefix np: . @prefix grlc: . @prefix dct: . @prefix nt: . @prefix npx: . @prefix xsd: . @prefix rdfs: . @prefix orcid: . @prefix prov: . @prefix foaf: . sub:Head { this: a np:Nanopublication; np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo . } sub:assertion { sub:get-more-specific-statements a grlc:grlc-query; dct:description "Given a general statement (an AIDA sentence), this query returns the more specific statements it generalises via hycl:hasMoreGeneralMeaningThan, one row per statement, with its kind (a finding that obtains support from a source, a general statement that itself generalises further statements, or a plain statement), the projects it declares itself relevant for, and its own nanopublication. It is meant as a part-level view on a statement page: the statement is the page's part and the page's context resource (a space, or a resource maintained by one) is filled into the context parameter automatically. Only links and statements asserted in nanopublications signed by a current admin, maintainer or member of the context space or of one of its sub-spaces (the spaces whose IRI extends it with a slash) are considered, with invalidated, superseded and example nanopublications skipped. The membership lookup is a federated sub-select sharing no variables with the rest of the query, so it runs once; without a context the gate is empty and nothing is returned."; dct:license ; rdfs:label "Get the more specific statements that a statement generalises"; grlc:endpoint ; grlc:sparql """prefix np: prefix npa: prefix npx: prefix gen: prefix hycl: prefix cito: select ?statement ?statement_label ?kind ?project_multi_iri ?project_label_multi ?np ?np_label where { { select ?statement ?kind (group_concat(distinct str(?project); separator=\"\\n\") as ?project_multi_iri) (group_concat(distinct ?projectLabel; separator=\"\\n\") as ?project_label_multi) (sample(?dnp) as ?np) where { { select (group_concat(?mpk; separator=\" \") as ?memberPubkeys) where { service { select ?mpk where { values ?__context_multi_iri {} graph npa:graph { npa:hasCurrentSpaceState ?stateG . } graph ?stateG { ?ri a gen:RoleInstantiation ; npa:forSpace ?sp ; 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 . } # The context is the space itself or a resource it maintains; the space and its # sub-spaces (IRI extended with a slash) are matched in a filter rather than with # a zero-length property path, because when the optional context is absent an # unbound path subject scans the whole state graph and times out, while the # bound() guard short-circuits to an empty gate. filter(bound(?__context_multi_iri) && ( ?sp = ?__context_multi_iri || strstarts(str(?sp), concat(str(?__context_multi_iri), \"/\")) || exists { graph ?stateG { ?__context_multi_iri npa:isMaintainedBy ?mb . filter(?sp = ?mb || strstarts(str(?sp), concat(str(?mb), \"/\"))) } })) } } } } graph npa:graph { ?gnp np:hasAssertion ?ga ; npa:hasValidSignatureForPublicKeyHash ?gpk . filter not exists { ?gInv npx:invalidates ?gnp ; npa:hasValidSignatureForPublicKeyHash ?gpk } filter not exists { ?gSup npx:supersedes ?gnp } filter not exists { ?gnp npx:hasNanopubType npx:ExampleNanopub } } filter(contains(?memberPubkeys, ?gpk)) graph ?ga { ?_statement_iri hycl:hasMoreGeneralMeaningThan ?statement . } optional { graph npa:graph { ?dnp np:hasAssertion ?da ; npa:hasValidSignatureForPublicKeyHash ?dpk . filter not exists { ?dInv npx:invalidates ?dnp ; npa:hasValidSignatureForPublicKeyHash ?dpk } filter not exists { ?dSup npx:supersedes ?dnp } filter not exists { ?dnp npx:hasNanopubType npx:ExampleNanopub } } filter(contains(?memberPubkeys, ?dpk)) graph ?da { ?statement a hycl:AIDA-Sentence . } } optional { graph npa:graph { ?rnp np:hasAssertion ?ra ; npa:hasValidSignatureForPublicKeyHash ?rpk . filter not exists { ?rInv npx:invalidates ?rnp ; npa:hasValidSignatureForPublicKeyHash ?rpk } filter not exists { ?rSup npx:supersedes ?rnp } } filter(contains(?memberPubkeys, ?rpk)) graph ?ra { ?statement gen:isRelevantFor ?project . } bind(replace(str(?project), \"^.*/\", \"\") as ?projectLabel) } bind(exists { graph ?fa { ?statement cito:obtainsSupportFrom ?src } } as ?isFinding) bind(exists { graph ?ma { ?statement hycl:hasMoreGeneralMeaningThan ?sub } } as ?isGeneral) bind(if(?isFinding, \"finding\", if(?isGeneral, \"general statement\", \"statement\")) as ?kind) } group by ?statement ?kind } bind(replace(replace(replace(replace(replace(replace(replace(strafter(str(?statement), \"http://purl.org/aida/\"), \"[+]\", \" \"), \"%2C\", \",\"), \"%3A\", \":\"), \"%28\", \"(\"), \"%29\", \")\"), \"%2F\", \"/\"), \"%25\", \"%\") as ?statement_label) bind(\"^\" as ?np_label) } order by ?kind ?statement_label""" . } 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-09-11T13:00:09Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-more-specific-statements; rdfs:label "Get the more specific statements that a statement generalises"; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "pisgtNaoDQoIohhhBV6CWoMdm4fDWP5LkRLuiJ2PjoI1WjbKvWFjruYGX7qoX+6OdDUuVt8WH4eySewlysqcaIMSb67Ga+4yqtNUYqI8rwk2riUWUaMtnZteMcQ5YJJ1VHLnCjBtFhfKWYPNw5YMWwtcXKhshT/mqnKVHC60CEM="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }