https://w3id.org/np/RA9XMsgA86KtCXZq3KXA03Ewr9mgPTNfivYurHKRq_nGw
.trig | .trig.txt | .jelly | .jelly.txt | .jsonld | .jsonld.txt | .nq | .nq.txt | .xml | .xml.txt
@prefix this: <https://w3id.org/np/RA9XMsgA86KtCXZq3KXA03Ewr9mgPTNfivYurHKRq_nGw> .
@prefix sub: <https://w3id.org/np/RA9XMsgA86KtCXZq3KXA03Ewr9mgPTNfivYurHKRq_nGw/> .
@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-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 <http://www.apache.org/licenses/LICENSE-2.0>;
rdfs:label "Get the more specific statements that a statement generalises";
grlc:endpoint <https://w3id.org/np/l/nanopub-query-1.1/repo/full>;
grlc:sparql """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/>
prefix hycl: <http://purl.org/petapico/o/hycl#>
prefix cito: <http://purl.org/spar/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 <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> {
select ?mpk where {
values ?__context_multi_iri {}
graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> 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 <https://creativecommons.org/licenses/by/4.0/>;
npx:embeds sub:get-more-specific-statements;
rdfs:label "Get the more specific statements that a statement generalises";
nt:wasCreatedFromProvenanceTemplate <https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU>;
nt:wasCreatedFromPubinfoTemplate <https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8>,
<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 "pisgtNaoDQoIohhhBV6CWoMdm4fDWP5LkRLuiJ2PjoI1WjbKvWFjruYGX7qoX+6OdDUuVt8WH4eySewlysqcaIMSb67Ga+4yqtNUYqI8rwk2riUWUaMtnZteMcQ5YJJ1VHLnCjBtFhfKWYPNw5YMWwtcXKhshT/mqnKVHC60CEM=";
npx:hasSignatureTarget this:;
npx:signedBy orcid:0000-0002-1267-0234 .
}