title: SPARQL "ASK" query to check if object property exist between two classes (Not b/w individuals)
body: <p>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. </p>
  
  <p>What I have tried till now: </p>
  
  <p>First I used the SELECT query to check the classes for a given OP:</p>
  
  <pre><code>  " { SELECT ?domain ?range WHERE {\n" +
          ":isManagedBy rdfs:domain ?domain; \n" +
          " rdfs:range ?range. \n } }"  +
                          "}";
  </code></pre>
  
  <p>Then I wrapped it with ASK query </p>
  
  <pre><code>" ASK WHERE { \n" +
       " { SELECT ?domain ?range WHERE {\n" +
          ":isManagedBy rdfs:domain ?domain; \n" +
           " rdfs:range ?range. \n } }"  +
      "}";
  </code></pre>
  
  <p>It seems to give me the answer, but I think, I'm mixing up so many things in this query: </p>
  
  <p>My Goal: Is to query if certain fact exist inside the OWL file or not (Boolean Answer)</p>
  
  <p>Eg: OWL Snippet</p>
  
  <pre><code>&lt;owl:ObjectProperty rdf:ID="isManagedBy"&gt;
            &lt;rdf:type rdf:resource="owl#FunctionalProperty" /&gt;
              &lt;rdfs:domain rdf:resource="#FunctionManagement" /&gt;
              &lt;rdfs:range rdf:resource="#SymposiumPlanner2013"/&gt;
      &lt;/owl:ObjectProperty&gt;   
  </code></pre>
  
  <p>What I would like to check: <code>isManagedBy(FunctionManagement, SymposiumPlanner2013)</code> exists or not.  </p>