Get use cases with examples for a resource
has assertion: assertion
has provenance: provenance
has publication info: pubinfo
type: Nanopublication
created: 2026-07-30T10:35:13Z
creator: Tobias Kuhn
license: https://creativecommons.org/licenses/by/4.0/
embeds: Get use cases with examples for a resource

Get use cases with examples for a resource
description: This query returns the use cases (categories) declared for a given entity (a Space or Maintained Resource), together with the concrete examples attached to each use case. Only the latest valid version of each use case definition is considered.
license: LICENSE-2.0
type: grlc-query
sparql: prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dct: <http://purl.org/dc/terms/> prefix schema: <http://schema.org/> 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 nt: <https://w3id.org/np/o/ntemplate/> select ?usecase ?usecase_label ?comment ?topic ?topic_label ?examples_multi_iri ?examples_label_multi (?usecase as ?usecase_ref) ?np ("^" as ?np_label) where { { select ?usecase (iri(strafter(max(concat(str(?date), " ", str(?np0))), " ")) as ?np) where { graph npa:graph { ?np0 npx:hasNanopubType gen:UseCase . ?np0 npa:hasValidSignatureForPublicKeyHash ?pubkey . filter not exists { ?npi npx:invalidates ?np0 ; npa:hasValidSignatureForPublicKeyHash ?pubkey . } filter not exists { ?np0 npx:hasNanopubType npx:ExampleNanopub . } ?np0 dct:created ?date . ?np0 np:hasAssertion ?a0 . } values ?_entity_multi_iri {} graph ?a0 { ?usecase rdfs:subClassOf gen:UseCase . ?usecase gen:isUseCaseFor ?_entity_multi_iri . } } group by ?usecase } graph npa:graph { ?np np:hasAssertion ?a . ?np np:hasPublicationInfo ?pi . } optional { graph ?a { ?usecase rdfs:label ?usecase_label . } } optional { graph ?a { ?usecase rdfs:comment ?comment . } } optional { graph ?a { ?usecase schema:about ?topic . } } optional { graph ?pi { ?topic nt:hasLabelFromApi ?topic_label . } } optional { { select ?usecase (group_concat(str(?example); separator=" ") as ?examples_multi_iri) (group_concat(?exlabel_esc; separator="\n") as ?examples_label_multi) where { { select ?usecase ?example (coalesce(min(?exl), str(?example)) as ?exlabel) where { graph npa:graph { ?exnp npx:hasNanopubType gen:UseCase . ?exnp npa:hasValidSignatureForPublicKeyHash ?expubkey . filter not exists { ?exnpi npx:invalidates ?exnp ; npa:hasValidSignatureForPublicKeyHash ?expubkey . } filter not exists { ?exnp npx:hasNanopubType npx:Example…

sig
has algorithm: RSA
signed by: Tobias Kuhn