Returns basic key-value facts about a given space (type, start and end date for time-limited spaces, and the root-definition nanopub), taken from its latest non-invalidated space-declaration nanopub signed by an admin of the 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 schema: <http://schema.org/> prefix gen: <https://w3id.org/kpxl/gen/terms/> select distinct ?Property ?Value ?Value_label where { values ?_space_multi_iri {} service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> { graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . } graph ?stateG { ?ri a gen:RoleInstantiation ; npa:inverseProperty gen:hasAdmin ; npa:forSpace ?_space_multi_iri ; npa:forAgent ?admin . ?acct a npa:AccountState ; npa:agent ?admin ; npa:pubkey ?pubkey . } } graph npa:graph { ?np npa:hasValidSignatureForPublicKeyHash ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . } ?np np:hasAssertion ?a . } graph ?a { ?_space_multi_iri a gen:Space . } optional { graph ?a { ?_space_multi_iri a ?typeIri . filter(?typeIri != gen:Space) } } optional { graph ?a { ?_space_multi_iri schema:startDate ?startVal } } optional { graph ?a { ?_space_multi_iri schema:endDate ?endVal } } values ?Property { "Type" "Start date" "End date" "Root definition" } bind(if(?Property="Type", replace(str(?typeIri),"^.*/",""), if(?Property="Start date", str(?startVal), if(?Property="End date", str(?endVal), str(?np)))) as ?Value) filter(bound(?Value)) bind(if(?Property="Root definition", "^", "") as ?Value_label) } order by (if(?Property="Type",1,if(?Property="Start date",2,if(?Property="End date",3,4))))