#
# example SPARQL query 170
#

@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_170 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Usage of name properties for instances of each class defined in cello: ontology"""@en ; 
    schema:keywords "id" , "sy" , "miss" , "misspelling" , "reg" , "registration" , "label" , "name" , "recommendedName" , "misspellingName" , "private" , "semantics" ; 
    schema:target <https://sparql.cellosaurus.org/sparql> ; 
    sh:select """
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select distinct ?entity_type ?sub_prop
where {
  # values ?entity_type { cello:CellLine } # uncomment to see name properties used for cello:CellLine instances
  ?sub_prop rdfs:subPropertyOf* rdfs:label .
  ?entity ?sub_prop ?_ .
  ?entity a ?entity_type .
  filter strstarts(str(?entity_type), (str(cello:)))
}
order by ?entity_type
limit 1000
    """
    .

