@prefix this: <https://w3id.org/np/RArNrZgAJ8qdpgekZE8bvJ8KGJP8N14itZ828PHRLJkR0> .
@prefix sub: <https://w3id.org/np/RArNrZgAJ8qdpgekZE8bvJ8KGJP8N14itZ828PHRLJkR0/> .
@prefix np: <http://www.nanopub.org/nschema#> .
@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: np:hasAssertion sub:assertion ;
    np:hasProvenance sub:provenance ;
    np:hasPublicationInfo sub:pubinfo ;
    a np:Nanopublication .
}
sub:assertion {
  sub:get-spaces-by-admin-orcid dct:description "Returns the list of spaces for which the given user (ORCID) is the admin." ;
    dct:license <http://www.apache.org/licenses/LICENSE-2.0> ;
    a <https://w3id.org/kpxl/grlc/grlc-query> ;
    rdfs:label "List spaces by admin ORCID" ;
    <https://w3id.org/kpxl/grlc/endpoint> <https://w3id.org/np/l/nanopub-query-1.1/repo/full> ;
    <https://w3id.org/kpxl/grlc/sparql> """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 kpxl_terms: <https://w3id.org/kpxl/gen/terms/>

select ?space ?label ?np ?date where {
  graph npa:graph {
    ?np npa:hasValidSignatureForPublicKey ?pubkey .
    filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkey . }
    ?np dct:created ?date .
    ?np npx:introduces ?space .
    ?np npx:hasNanopubType kpxl_terms:Space .
    ?np rdfs:label ?label .
    ?np np:hasAssertion ?assertion .
    filter not exists {
      ?npx npx:introduces ?space .
      ?npx dct:created ?datex .
      filter(?datex > ?date)
    }
  }
  graph ?assertion {
    ?space kpxl_terms:hasAdmin ?_resource_iri .
  }
} order by ?label""" .
}
sub:provenance {
  sub:assertion prov:wasAttributedTo orcid:0000-0001-8492-0354 .
}
sub:pubinfo {
  orcid:0000-0001-8492-0354 foaf:name "Ashley Caselli" .
  this: dct:created "2026-01-26T10:30:51.285Z"^^xsd:dateTime ;
    dct:creator orcid:0000-0001-8492-0354 ;
    dct:license <https://creativecommons.org/licenses/by/4.0/> ;
    npx:embeds sub:get-spaces-by-admin-orcid ;
    npx:wasCreatedAt <https://nanodash.petapico.org/> ;
    nt:wasCreatedFromProvenanceTemplate <https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU> ;
    nt:wasCreatedFromPubinfoTemplate <https://w3id.org/np/RA0J4vUn_dekg-U1kK3AOEt02p9mT2WO03uGxLDec1jLw> , <https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI> ;
    nt:wasCreatedFromTemplate <https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k> .
  sub:sig npx:hasAlgorithm "RSA" ;
    npx:hasPublicKey "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvMIewwOiXTCCbq5hKKbyWFZ7rx45vEfSB0qUOWWKtS7XcOhoikf7RFHHgicuG1rB6h1hBZI5uHpnJLLDAA4cV7YOC5RnY7YWlKvYL5n0fVVgdCCVkUfljHwA4qX3WDZY6LaLW+E5v16Yxsb69g41/v3fEtyGrSyAKi1MkjACROvI66cLVjQAksfaA3ZIDMTlkcCQqIoR7hkx3Y9Memgr2/rq5kHD72tUQqlBnmBDQqUVZvLrXYU44p9sZPsrY9cKhGv84DgBLZMenm0Su6gqT5M/tEVHe9I3Kviqxc5EKhCspzhQZmKrM9GpPNL3MGrIKaIk5+JJFB9ahWt1cLGRqQIDAQAB" ;
    npx:hasSignature "BLBY7VFIvrTEYS7blwagFmMI5mBblGEmnwlDRUssdzlshbGc2DeZyJ+9CYmtVWnISJYqZMpG+duWLn/qilT76/VQR2BsCvIK6H+B274QcF07BWWxjIWDqgzqOB1l997opLgjaHR/yOSMk0AAS/LeOmg5xeGTB6BkdBem0c1+hEoqiWc4p+4Husyn8l+ByP97tFdgr9WxNQ3XGCtsLy/G69XokLkY2p2SlD3rabc1w3ppCBbbbihWCtf/HSKbSKvVB5Yhx6RLwNjHdQdWvF428xS3lKdIaT9vm1pWa9LIyD65iLkP7i+UoEp6bkawQS/mXMaLp1uMuyr4Ux4JTsrjRQ==" ;
    npx:hasSignatureTarget this: ;
    npx:signedBy orcid:0000-0001-8492-0354 .
}