I want to query, if certain ObjectPropery (OP) exist between two classes inside an OWL2 file. I'm using JENA API to construct the SPARQL queries.
What I have tried till now:
First I used the SELECT query to check the classes for a given OP:
" { SELECT ?domain ?range WHERE {\n" +
":isManagedBy rdfs:domain ?domain; \n" +
" rdfs:range ?range. \n } }" +
"}";
Then I wrapped it with ASK query
" ASK WHERE { \n" +
" { SELECT ?domain ?range WHERE {\n" +
":isManagedBy rdfs:domain ?domain; \n" +
" rdfs:range ?range. \n } }" +
"}";
It seems to give me the answer, but I think, I'm mixing up so many things in this query:
My Goal: Is to query if certain fact exist inside the OWL file or not (Boolean Answer)
Eg: OWL Snippet
<owl:ObjectProperty rdf:ID="isManagedBy">
<rdf:type rdf:resource="owl#FunctionalProperty" />
<rdfs:domain rdf:resource="#FunctionManagement" />
<rdfs:range rdf:resource="#SymposiumPlanner2013"/>
</owl:ObjectProperty>
What I would like to check: isManagedBy(FunctionManagement, SymposiumPlanner2013)
exists or not.