Hello Andy,
you're right, but I guess here - just from what he showed - there are
fundamental Java basics missing, as he tries to use a method local
object in another method.
Kind regards,
Lorenz
Please read:
http://stackoverflow.com/help/mcve
[[
Describe the problem. "It doesn't work" is not a problem statement.
Tell us what the expected behavior should be. Tell us what the exact
wording of the error message is, and which line of code is producing
it. Put a brief summary of the problem in the title of your question.
]]
On 21/05/16 14:39, kumar rohit wrote:
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