#
# example SPARQL query 169
#

@prefix schema: <https://schema.org/> . 
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 
@prefix sh: <http://www.w3.org/ns/shacl#> . 
@prefix cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/> .


cello:Query_169 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Super property and equivalent property of each property defined in the cello ontology"""@en ; 
    schema:keywords "ontology" , "property" , "semantics" , "private" ; 
    schema:target <https://sparql.cellosaurus.org/sparql> ; 
    sh:select """
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
select ?cello_prop ?hasSuperProp ?rdfs_superProp ?hasEqProp ?owl_equivalentProp  where {
  ?cello_prop a rdf:Property .
  ?cello_prop rdfs:isDefinedBy cello: .
  optional { ?cello_prop owl:equivalentProperty ?owl_equivalentProp . }
  optional { ?cello_prop rdfs:subPropertyOf ?rdfs_superProp . }
  bind(if(bound(?owl_equivalentProp),"yes", "no") as ?hasEqProp)
  bind(if(bound(?rdfs_superProp),"yes", "no") as ?hasSuperProp)
}
order by ?rdfs_superProp ?owl_equivalentProp ?parent ?cello_prop
    """
    .

