@prefix ex: <https://sparql.swisslipids.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:8 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:label "Mapping SwissLipids to LIPID MAPS"@en ;
    rdfs:comment """Retrieve mapping between SwissLipids lipid identifiers and their corresponding LIPID MAPS identifiers.
Output should include SwissLipids identifier and name plus the LIPID MAPS identifier. 
"""@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX lipidmaps: <https://www.lipidmaps.org/rdf/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

# Example 8
SELECT ?slm ?slmName ?lipidmaps
WHERE {
  ?slm rdfs:label ?slmName . 
  # Corresponding LIPID MAPS
  ?slm rdfs:seeAlso ?lipidmaps .
  FILTER (strstarts(str(?lipidmaps), str(lipidmaps:))) .
}
ORDER BY ?slm""" ;
    schema:target <https://sparql.swisslipids.org/sparql/> .

