I am trying to write a query
Hospitals and hasNameWithWords value "center"^^string
This query returns me the instances that has the hospitals that has "center" in its name in Protege 4.2 with FACT++ reasoner as well as Hermit reasoner
but when i input the same query in the OWL-API's DL Query Example thats available in the website http://sourceforge.net/p/owlapi/code/ci/aef6981535f07a2d0d44c394b9f4d5415f36025a/tree/contract/src/test/java/org/coode/owlapi/examples/DLQueryExample.java
I don't get any result.
But it gives me result when i write simple queries such as
Hospitals
Is it because the reasoner in the code is not able to make the inference?
What other reasoner would be better?