title: Is it possible to query inferred Einstein Riddle knowledge from OWLIM?
body: <p>I have OWLIM repository populated with Einstein Riddle owl.
  <a href="https://stackoverflow.com/questions/25967784/qcrs-vs-functional-property">Link1</a> - <a href="https://stackoverflow.com/questions/4145706/how-to-get-individual-results-while-solving-einsteins-riddle-with-owl-in-prot%C3%A9g">Link2</a>. Is it possible to query inferred knowledge from OWLIM using sparql ? To get same results as on individual tab in Protege ?</p>
  
  <p>SPARQL:</p>
  
  <pre><code>PREFIX riddle: &lt;http://www.iis.nsk.su/persons/ponom/ontologies/einsteins_riddle_en.owl#&gt;
  SELECT DISTINCT ?kto ?co
  WHERE { 
  ?kto riddle:drinks ?co .
  ?kto a owl:Thing .
  ?co a owl:Thing .
  </code></pre>
  
  <p>Protege and OWLIM have same result, only explicit knowledge. </p>
  
  <pre><code>co  kto 
  ---------------------------------------------
  http://www.iis.nsk.su/persons/ponom/ontologies/einsteins_riddle_en.owl#tea  http://www.iis.nsk.su/persons/ponom/ontologies/einsteins_riddle_en.owl#Ukrainian
  </code></pre>
  
  <p>But (according to my information) in Protege, SPARQL query works only on existing knowledge and OWLIM build up repository with existing and inferred triples. So I expected inferred triples too.</p>
  
  <p>P.S.:
  Query to get count of inferred triples (OWLIM):</p>
  
  <pre><code>SELECT (COUNT(*) as ?count)
  FROM &lt;http://www.ontotext.com/implicit&gt;
  WHERE {
     ?s ?p ?o .
  }
  </code></pre>
  
  <p>returns 0.</p>
  
  <p>** ** ** <strong>EDIT:</strong> ** ** **</p>
  
  <p>My configuration:</p>
  
  <pre><code>#
  # Sesame configuration template for a owlim repository
  #
  @prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;.
  @prefix rep: &lt;http://www.openrdf.org/config/repository#&gt;.
  @prefix sr: &lt;http://www.openrdf.org/config/repository/sail#&gt;.
  @prefix sail: &lt;http://www.openrdf.org/config/sail#&gt;.
  @prefix owlim: &lt;http://www.ontotext.com/trree/owlim#&gt;.
  
  [] a rep:Repository ;
     rep:repositoryID "Riddle" ;
     rdfs:label "Einstein Riddle Getting Started" ;
     rep:repositoryImpl [
       rep:repositoryType "openrdf:SailRepository" ;
       sr:sailImpl [
         sail:sailType "owlim:Sail" ; 
  
         owlim:base-URL "http://www.iis.nsk.su/persons/ponom/ontologies/einsteins_riddle_en.owl#" ;
  
         # There must be exactly the same number of semicolon separated entries in
         # the defaulNS and imports fields
         owlim:defaultNS "http://www.iis.nsk.su/persons/ponom/ontologies/einsteins_riddle_en.owl#" ;
         owlim:imports "./ontology/zebra.owl" ;
  
         owlim:entity-index-size "5000000" ;
         owlim:repository-type "file-repository" ;
         owlim:ruleset "owl-max" ;
         owlim:storage-folder "storage" ;
  
         # OWLIM-SE parameters
         owlim:cache-memory "180m" ; 
  
         # OWLIM-Lite parameters
         owlim:noPersist "false" ;
  
         # Other OWLIM-SE parameters
         # owlim:enable-context-index "false" ;
         owlim:check-for-inconsistencies "true" ;
         # owlim:disable-sameAs "false" ;
         owlim:enable-optimization "true" ;
         owlim:enablePredicateList "true" ;
         # owlim:entity-id-size "32" ;                 # 32/40
         # owlim:fts-memory "20m" ;
         # owlim:ftsIndexPolicy "never" ;              # never/onStartup/onShutdown/onCommit
         # owlim:ftsLiteralsOnly "false" ;
         # owlim:in-memory-literal-properties "false" ;
         # owlim:enable-literal-index "true" ;
         # owlim:index-compression-ratio "-1" ;        # -1/10-50
         # owlim:owlim-license "" ;
         # owlim:predicate-memory "80m" ;
         # owlim:query-timeout "-1" ;
         # owlim:tokenization-regex "[\p{L}\d_]+" ;
         # owlim:tuple-index-memory "80m" ;
         # owlim:useShutdownHooks "true" ;
         # owlim:transaction-mode "safe" ;
         # owlim:read-only "false" ;
  
         # Other OWLIM-Lite parameters
         # owlim:jobsize "1000}" ;
         # owlim:new-triples-file ""
  
        ]
     ].
  </code></pre>
  
  <p>And it doesn't matter if I use owl2-rl or owl2-ql or w/e else. Always same result. Only number of inferred triples changes to positive.</p>
  
  <pre><code>08:51:40 Executing query 'Who drinks What'
  co  kto 
  ---------------------------------------------
  einsteins_riddle_en:tea einsteins_riddle_en:Ukrainian   
  
  08:51:40 1 result(s) in 63ms.
  08:51:40 Executing query 'Number of inferred triples'
  count   
  ---------------------------------------------
  "770"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt;   
  </code></pre>
  
  <p>Inferred triples are useless for me, sample of them:</p>
  
  <pre><code>p   s   o   
  ---------------------------------------------
  rdf:type    rdf:type    rdf:Property    
  rdf:type    rdfs:subPropertyOf  rdf:Property    
  rdf:type    rdfs:subClassOf rdf:Property    
  rdf:type    rdfs:domain rdf:Property    
  rdf:type    rdfs:range  rdf:Property    
  rdf:type    owl:equivalentClass rdf:Property    
  rdf:type    psys:transitiveOver rdf:Property    
  ...
  </code></pre>