From: Frederic R. <fre...@un...> - 2011-01-10 21:11:00
|
Hi, I'm trying to run the Java example given in section 5.2 of the documentation page http://www4.wiwiss.fu-berlin.de/bizer/ng4j/semwebclient/#using --------------------------------------------------- SemanticWebClient semweb = new SemanticWebClient(); //Logger.getLogger("de.fuberlin.wiwiss.ng4j.semwebclient").setLevel(Level.TRACE); String queryString = "PREFIX foaf: <http://xmlns.com/foaf/0.1/> " + "SELECT DISTINCT ?i WHERE {" + "<http://www.w3.org/People/Berners-Lee/card#i> foaf:knows ?p . " + "?p foaf:interest ?i ." + "}"; Query query = QueryFactory.create(queryString); QueryExecution qe = QueryExecutionFactory.create( query,semweb.asJenaModel("default")); ResultSet results = qe.execSelect(); ResultSetFormatter.out(System.out, results, query); //semweb.close(); -------------------------------------------------- The program terminated but returns : ----- | i | ===== ----- In fact, the simpler query : ------------------------------------------------------------------- "PREFIX foaf: <http://xmlns.com/foaf/0.1/> " + "SELECT DISTINCT ?p WHERE {" + "<http://www.w3.org/People/Berners-Lee/card#i> foaf:knows ?p . " + "}" ------------------------------------------------------------------- doesnt return any triple neither. While tracing the execution with the logger I saw this : ----------------------------------------------------------------- Queue result graph: <http://www.w3.org/People/Berners-Lee/card> (76 triples) ----------------------------------------------------------------- so I dont understand why there is no match against the triple set retreived from <http://www.w3.org/People/Berners-Lee/card> ... whats wrong ? (I'm using ng4j-0.9.3 and jena-2.6.2) Greetings, -- Frédéric Raimbault |