@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix ex: <https://sparql.rhea-db.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:95_Get_uniprot_name_of_a_given_chebi_compound a sh:SPARQLExecutable, sh:SPARQLSelectExecutable;
  rdfs:comment "Get uniprot name of a given chebi compound"@en ;
  sh:select """PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rh:<http://rdf.rhea-db.org/>
PREFIX CHEBI:<http://purl.obolibrary.org/obo/CHEBI_>
PREFIX oboInOwl:<http://www.geneontology.org/formats/oboInOwl#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>

SELECT
  ?chebi
  ?chebiName
  ?chebiUniprotName
WHERE {
  BIND(CHEBI:57416 AS ?chebi)
  ?chebi rdfs:label ?chebiName .
  ?chebi oboInOwl:hasRelatedSynonym ?chebiUniprotName .
  ?axiom a owl:Axiom .
  ?axiom owl:annotatedSource ?chebi .
  ?axiom owl:annotatedProperty oboInOwl:hasRelatedSynonym .
  ?axiom owl:annotatedTarget ?chebiUniprotName .
  ?axiom oboInOwl:hasDbXref ?dbXref .
  FILTER (?dbXref="UniProt")
}""";
  schema:target <https://sparql.rhea-db.org/sparql> .
