title: OWL Class Expression for Data Property
body: <p>In my ontology, I have an individual that has this data property</p>
  
  <p><code>hasName "somaName"^^string</code>,</p>
  
  <p>however, when i'm building a class expression and sending to the reasoner for get the instances, I'm getting an empty set with the following query,</p>
  
  <pre><code>OWLClassExpression x = schema.getFactory().getOWLDataHasValue(schema.getDataProperty("hasName"), schema.getFactory().getOWLLiteral("somaName"));
  System.out.println(reasoner.getInstances(x, true));
  </code></pre>
  
  <p><strong>the getDataProperty is just a small method:</strong></p>
  
  <pre><code>public OWLDataProperty getDataProperty(String dataProperty){
          return factory.getOWLDataProperty("#"+dataProperty,pm);
      }
  </code></pre>