how to load .owl file in java and retrieve the value from sparql query and then response should send to client
<pre><code>OntModel model = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_MICRO_RULE_INF);
        String inputFileName="Restaurant.owl";
        InputStream in = FileManager.get().open( inputFileName );
        if (in == null) {
            throw new IllegalArgumentException(
                 "File: " + inputFileName + " not found");
        }
        model.read(in, null);

        String queryString =
                "prefix table:&lt;http://www.owl-ontologies.com/Restaurant.owl#"+        
                "prefix rest: &lt;http://localhost:8080&gt; "           +
                "prefix ext: &lt;java:org.geospatialweb.arqext.&gt; "             +
                "select ?restaurant where {?restaurant a owl:Class ; "      +
                "rdfs:subClassOf ?upahar. "                  +
                "?upahar owl:onProperty restaurant:hasMealType ;"  +
                "owl:someValuesFrom restaurant:Veg" +
                "}";
        com.hp.hpl.jena.query.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>
