From: Olaf H. <ha...@in...> - 2011-01-12 11:53:51
|
Hello Frédéric, You may try to increase the number of maximal depth of link following a bit. To do this you just have to add the following line after the creation of the semweb object: semweb.getConfig().setValue( SemanticWebClientConfig.MAXSTEPS, "5" ); Please report whether that helped. Greetings, Olaf On Monday 10 January 2011 20:42:42 Frederic Raimbault wrote: > 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.T > RACE); > > 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, |