|
I am willing to seek your opinion on if it is possible to design some SPARQL query that will return the concept definitions i.e. Assuming that I have an ontology, I want to retrieve the 'necessary and sufficient conditions' defined for any random concept within that Ontology via SPARQL queries (or for that matter, any API which could do that). I am writing a Java program and I need the program to retrieve concept definitions from ontology. Please suggest me your ideas. |
|
I don't know if you can do that with Sparql, i think it's not designed for such a task. But if you are not restricted to Sparql then you could give a try to the owlapi. http://owlapi.sourceforge.net/ hth josh i think you could use the method getAxims(clazz) in OWLOntology to get the concept definition for this clazz. Ok. Thanks for the clue, Tunichgud. I will try and write back. This is incorrect. OWL can be specified in RDF and SPARQL queries RDF, so it is possible. I've posed a more accurate answer to the question on SPARQL. 1
@Scott : I don't think its incorrect. I think that this and your's are two different approaches. This one is via using API and your's is by writing a query. I agree that knowing to write a query is better; however API also makes life easy. |
|
Do you ask for a single SPARQL query to get them all, and only those? I guess that even for the "restricted" case, where you only allow for valid OWL DL ontologies as input graphs, this would essentially require to implement a major part of the matching algorithm that underlies the reverse OWL 2 RDF Mapping... as a SPARQL query! The matching of the many different forms of class expressions is among the most complex aspects of this algorithm, and that algorithm is complex! So even if it would be technically feasible, I could not imagine anyone on earth who would want to execute such an insane exercise. But I don't really believe that it is possible at all, unless SPARQL would turn out to be Turing-complete. And for input beyond OWL 2 DL (i.e. for arbitrary RDF / OWL Full input), it is not even entirely well-defined what counts as a proper class expression or class axiom /syntactically/, and what not. But without such a definition, your question cannot even be answered in a meaningful and precise way with "yes" or "no" in such a scenario... |

