@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-positions-for-person a grlc:grlc-query; dct:description "Returns all positions held by a given person, with the title, the organization, the department or group, and the start and end years. A position with no end year is one that is still held."; dct:license ; rdfs:label "Get positions for person"; grlc:endpoint ; grlc:sparql """prefix rdfs: prefix dct: prefix np: prefix npa: prefix npx: prefix wd: prefix vivo: select ?position ?position_label ?organization ?organization_label ?unit ?startYear ?endYear ?np (\"^\" as ?np_label) where { graph npa:graph { ?np npa:hasValidSignatureForPublicKeyHash ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . } filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . } ?np np:hasAssertion ?a . ?np np:hasPublicationInfo ?pi . ?np npx:introduces ?position . } graph ?a { ?position a vivo:Position . ?_person_iri wd:P39 ?position . optional { ?position rdfs:label ?position_label . } optional { ?position wd:P108 ?organization . } optional { ?position dct:description ?unit . } optional { ?position wd:P580 ?startYear . } optional { ?position wd:P582 ?endYear . } } # The organization label lives in pubinfo, not the assertion. OPTIONAL wraps # GRAPH and not the reverse: `GRAPH ?x { OPTIONAL {...} }` drops the whole row. optional { graph ?pi { ?organization rdfs:label ?organization_label . } } } order by desc(?startYear) desc(?endYear)""" . } 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-08-28T17:32:25Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:introduces sub:get-positions-for-person; rdfs:label "Get positions for person"; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "Sd1OlE2e8POmXw0ODES1rWoN33/oNP0mcI/NoofoSD9b/F6/Xe456ByRP7mVv+VoWA+4AW2fHL/taohCZjbz7q2SF/xFnqTbQXssP7dMcZp13LtkLuNnX9QfeECioT2TM2F65zu9Aq+pHBXbkAGDK0ZOjKH6zxKU1UJCLr1QkKo="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }