Dear all,

I have a problem querying labels in Jena with Pellet reasoner.
The ontologies I'm using were populated with OWL-API and Pellet. Now I
would ask for some labels. So I write:

KnowledgeBase kb = reasoner.getKB();
PelletInfGraph graph = new
org.mindswap.pellet.jena.PelletReasoner().bind( kb );

InfModel model = ModelFactory.createInfModel( graph );
Query q = QueryFactory.create(query);
QueryExecution qe = QueryExecutionFactory.create( q, model );
ResultSet rs = qe.execSelect(); 

The query simple asks for labels:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?subject ?object
        WHERE { ?subject rdfs:label ?object }

I get no result. I tried the query in Protegè with the same ontologies
and it works properly. Other queries work, the problem is limited to
labels . So, what I'm missing in the code ?
Cheers,
Daniele

Reply via email to