title: Trying to create a Sparql query using Jena's java api
body: <p>I created an Ontology model in Java using the Apache Jena library, and I entered pizza ontology.
  I am trying to make a sparql query but the table print is blank, although normaly there are answers to my query.
  Am I doing something wrong...?
  Here is the code:</p>
  
  <pre><code>OntModel model = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_MICRO_RULE_INF);
  String inputFileName="pizza.owl";
  InputStream in = FileManager.get().open( inputFileName );
  if (in == null) {
      throw new IllegalArgumentException(
           "File: " + inputFileName + " not found");
  }
  model.read(in, null);
  
  String queryString =
          "prefix pizza: &lt;www.co-ode.org/ontologies/pizza/pizza.owl#Pizza&gt; "+        
          "prefix rdfs: &lt;" + RDFS.getURI() + "&gt; "           +
          "prefix owl: &lt;" + OWL.getURI() + "&gt; "             +
          "select ?pizza where {?pizza a owl:Class ; "      +
          "rdfs:subClassOf ?restriction. "                  +
          "?restriction owl:onProperty pizza:hasTopping ;"  +
          "owl:someValuesFrom pizza:PeperoniSausageTopping" +
          "}";
  Query query = QueryFactory.create(queryString);
  QueryExecution qe = QueryExecutionFactory.create(query, model);
  com.hp.hpl.jena.query.ResultSet results =  qe.execSelect();
  
  ResultSetFormatter.out(System.out, results, query);
  qe.close();
  </code></pre>