@prefix ex: <https://sparql.uniprot.org/.well-known/sparql-examples/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ex:86_taxonomy_rank_and_scientific_name a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Retrieve the rank and the scientific name of an taxonomic record. Not all taxonomic records have a <a href=\"http://purl.uniprot.org/core/rank\">rank</a> associated with them."^^rdf:HTML ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX up: <http://purl.uniprot.org/core/>

SELECT
  ?taxon 
  ?scientificName
  ?rank
WHERE {
  ?taxon a up:Taxon ;
         up:scientificName ?scientificName .
  OPTIONAL {
    ?taxon up:rank ?rank
  }
}""" ;
    schema:keywords "taxonomy" ;
    schema:target <https://sparql.uniprot.org/sparql/> .

