Hello dear jena users, I have some ontologies loaded into jena. I'm building a tool to explore them. The tool looks like this one (http://www.ontobee.org/ontology/STATO?iri=http://purl.obolibrary.org/obo/OBI_0200000)
I am trying to get a section like "Superclasses & Asserted Axioms" on the link before. This sections is able to tell by eg that one class "realizes some concretizes some (algorithm and (has part some objective specification)" Apparently, this website uses SPARQL queries (on the bottom of the page they "show SPARQL queries used in this page"). What would be the best way to get such result within jena, SPARQL, jena API or other ? Here is the kind of query based on virtuoso I guess, the transitiv option can be translated to jena ARQ, but it is not trivial for me. 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 DISTINCT ?ref ?refp ?label ?o FROM <http://purl.obolibrary.org/obo/merged/STATO> WHERE { ?ref ?refp ?o . FILTER ( ?refp IN ( owl:equivalentClass, rdfs:subClassOf ) ) . OPTIONAL { ?ref rdfs:label ?label } . { { SELECT ?s ?o FROM <http://purl.obolibrary.org/obo/merged/STATO> WHERE { ?o ?p ?s . FILTER ( ?p IN ( rdf:first, rdf:rest, owl:intersectionOf, owl:unionOf, owl:someValuesFrom, owl:hasValue, owl:allValuesFrom, owl:complementOf, owl:inverseOf, owl:onClass, owl:onProperty ) ) } } OPTION ( TRANSITIVE, t_in( ?s ), t_out( ?o ), t_step( ?s ) as ?link ). FILTER ( ?s= <http://purl.obolibrary.org/obo/OBI_0200000> ) } } ORDER BY ?label Thanks by advance
