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? Do I need to add URI nodes to the
model, and if so, how?

Thanks,
Joachim

Reply via email to