I looking for a good quey that allows me to get the roots elements of a Ontology. Also, I need to know wich one of these roots have children...
I have each ontology in a NAMED GRAPH.... This is what I using for it but the query is taking too much. SELECT DISTINCT ?root ?label (COUNT(?child) AS ?nChild) FROM <http://ontologyURI> WHERE { ?root a ?class . ?class rdfs:subClassOf owl:Class . ?root rdfs:label ?label . OPTIONAL { ?root rdfs:subClassOf ?super . } OPTIONAL { ?child rdfs:subClassOf ?root . } FILTER (!bound(?super)) } GROUP BY ?root ?label Any idea? Thanks... -- *FEDERICO LÓPEZ GÓMEZ* Estudiante Ingeniería de Sistemas Universidad del Valle - Sede Tuluá
