@prefix ex:<https://purl.expasy.org/sparql-examples/neXtProt/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ex:NXQ_00288 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Biological Process and Molecular Function GO terms related to UniPathway metabolic pathways"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://nextprot.org/rdf/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT (str(?pathwayname) as ?unipathway) ?related (str(?pathlabel) as ?GO_BP) (str(?pathlabel2) as ?GO_MF) WHERE {
 ?entry :isoform ?iso.
 ?iso :pathway ?pathannot .
 ?pathannot :term ?pathterm; rdfs:comment ?pathwayname.
 ?pathterm :related ?related .
 {?related a :GoBiologicalProcessCv ; rdfs:label ?pathlabel .}
 UNION
 {?related a :GoMolecularFunctionCv ; rdfs:label ?pathlabel2 .}
}""" ;
    schema:keywords "pathway",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> .

