It should be quite obvious that showing the complete error will ease the process of helping you...
And even more, showing the whole method.

Given that the first part is the main() method that contains the Java object 'model', why do you think that it's accessible from within another method sparqltest() ?
I'd suggest to read some Java tutorials first.

Hello

I created a model in main method like:

  OntModel model=ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
InputStream in = FileManager.get().open("C:/Users/Desktop/vehicle.owl");
if (in==null) {
throw new IllegalArgumentException(
"File: " +  " not found ");
}
model.read(in, "");
sparqltest();

________________________________________
In sparqltest() method I used Sparql query and

  Query query = QueryFactory.create(queryString);
QueryExecution qe =  QueryExecutionFactory.create( query,model);

The model argument in "QueryExecutionFactory.create( query,model);" gives
me error.
I know it is a local variable in main() method but how can we remove this
error ?

regards

--
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

Reply via email to