A set of SPARQL examples that are used in different SIB resources
Super property and equivalent property of each property defined in the cello ontology
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
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?cello_prop"):::projected
v5("?hasEqProp"):::projected
v6("?hasSuperProp"):::projected
v2("?owl_equivalentProp"):::projected
v3("?parent")
v1("?rdfs_superProp"):::projected
c4(["cello:"]):::iri
c2(["rdf:Property"]):::iri
v4 --"a"--> c2
v4 --"rdfs:isDefinedBy"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."owl:equivalentProperty".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."rdfs:subPropertyOf".-> v1
end
bind0[/"if(bound(?owl_equivalentProp),'yes','no')"/]
v2 --o bind0
bind0 --as--o v5
bind1[/"if(bound(?rdfs_superProp),'yes','no')"/]
v1 --o bind1
bind1 --as--o v6