From: Cristina S. <csa...@vi...> - 2010-09-20 14:38:43
|
Dear Olaf, Thanks a lot for your prompt response. I understand now why this happens. I have enabled the SemanticWebClientConfig.ENABLE_SINDICE parameter, and executed several queries but I still get results from only the foaf implementation. Could you please give me an example where the Sindice configuration provides more information? Kind regards, Cristina 2010/9/20 Olaf Hartig <ha...@in...> > Hello Cristina, > > On Monday 20 September 2010 07:52:55 Cristina Sarasua wrote: > > Hi, > > > > I would like to ask something about the Semantic Web Client Library. > > > > I've been executing some SPARQL queries using the code specified in [1]. > > > > With the following query: > > > > String queryString = > > "PREFIX foaf: <http://xmlns.com/foaf/0.1/> " + > > "SELECT ?i ?p WHERE {" + > > "?i ?p <http://www.w3.org/People/Berners-Lee/card#i> . " + > > "}"; > > > > I get resources from different sources. > > > > But, with this query: > > > > String queryString = > > "PREFIX foaf: <http://xmlns.com/foaf/0.1/> " + > > "SELECT ?i ?p WHERE {" + > > "?i ?p foaf:Person . " + > > "}"; > > > > all the results belong to the same source - the document where foaf is > > implemented. > > That's a result of the way the SWClLib executes queries. It uses a new > approach for query execution which we call link traversal based query > execution. The SWClLib Web site outlines the idea of this approach. Did > you read how this approach works? > You find a more detailed description of this approach in my paper at > ISWC 2009. > > So, what the query engine does for your example query is the following: > Given > we start with an empty queried dataset (a.k.a. cache). SWClLib looks up the > URI for foaf:Person, retrieves the RDF graph that defines the FOAF > vocabulary, > and adds this graph to the queried dataset. Now it tries to find RDF > triples in > the queried dataset that match the triple pattern in your query. That's > only > triples from the FOAF vocab graph (because that's the only one we have). > The > FOAF vocab graph does not contain RDF links that SWClLib can follow (where > "following" here means looking up URIs to retrieve further RD graphs). > Hence, > SWClLib cannot discover more data. That's always a problem with this query > approach when the query contains only URIs for vocabulary terms (or t-Box > concepts as you call them) but no URIs for individual things (i.e. > instances > of classes defined in vocabularies). > > Notice, however, that I added Sindice support to the SWClLib. With Sindice > support enabled the SWClLib does not only look up URI (using the HTTP > protocol) but it also queries the Sindice search engine for additional RDF > graphs that contain RDF triples with the URI. This practice may give you > more > results for your second query. But, it's very expensive in terms of query > execution time. Therefore, Sindice support is disabled by default. The Web > site documents how to enable it. > > > I wonder whether the Semantic Web Client Library does not retrieve > > resources from different sources when querying about T-Box, or whether > > this is just a coincidence. > > It's not about t-Box or a-Box. To the SWClLib everything are just RDF > graphs, > SWClLib does not do any kind of reasoning. > > Greetings, > Olaf > > > Thanks in advance. > > > > Kind regards, > > > > Cristina > > > > [1] http://www4.wiwiss.fu-berlin.de/bizer/ng4j/semwebclient/#using > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > ng4j-namedgraphs mailing list > ng4...@li... > https://lists.sourceforge.net/lists/listinfo/ng4j-namedgraphs > |