On 16/05/11 20:26, Joachim Baran wrote:
Hi!

   I am having trouble with this simple query: "SELECT ?a0 ?a1 FROM
dataset:simple WHERE { ?a0 rdf:type ?a1 }"

   When I run it on an empty model, I get see the exception:
"java.lang.UnsupportedOperationException: ?a1 is not a URI node"

   I create the model and run the query as follows:
         DataSource source = DatasetFactory.create();
         Model model = ModelFactory.createDefaultModel();
         source.addNamedModel("...omitted...", model);
         source.setDefaultModel(model);
         QueryExecution queryExecution = QueryExecutionFactory.create(query,
source);
         ResultSet results = queryExecution.execSelect();

   Should that not work out of the box?

Yes.

Do I need to add URI nodes to the
model, and if so, how?

Could you provide some information - a minimal, complete example. When I tried your example, after fixing it up, it worked for me so I must have done something different. Stacktrace?

And which version of ARQ is this?

        Andy


Thanks,
Joachim

Reply via email to