From: <tr...@do...> - 2013-07-18 14:19:19
|
<p>A new comment has been added to the following issue.</p> <table border="0"> <tr> <td width="90px" valign="top"><b>Title:</b></td> <td>Describe query not returning the correct triples</td> </tr> <tr> <td><b>Project:</b></td> <td>Core Library (dotNetRDF.dll)</td> </tr> <tr> <td><b>Created By:</b></td> <td>Rob Vesse</td> </tr> <tr> <td><b>Date:</b></td> <td>2013-07-18 03:18 PM</td> </tr> <tr> <td><b>Comment:</b></td> </tr> <tr> <td colspan="2"><p> This behaviour is by design, the reason it worked back in 0.5.0 and now doesn't is that way back in 0.7.0 we made the decision to change our default behaviour around the default graph to better align with the SPARQL standard and the default behaviour of other popular SPARQL tools.</p> <p> To understand why the query no longer works you need to understand how we now treat the default graph. An in-memory store has a single unnamed graph and a collection of named graphs, prior to 0.7.0 if you didn't explicitly specify a default graph we took it to be what is commonly called the union default graph. So queries that specified no default graph actually operated over all graphs (both named and unnamed) in the store. From 0.7.0 onwards the behaviour changed so unless explicitly specified the default graph is only the unnamed graph of the store.</p> <p> What this means in the case of your DESCRIBE query is that the WHERE clause uses a GRAPH clause to access a named graph so is able to access the data in that graph. But then when we come to attempt to form the description of your resource we are only looking at the default graph which is the unnamed graph and happens to be empty in your example so you end up with an empty description.</p> <p> The reason a SELECT works fine is that the WHERE clause is using a GRAPH clause so again sees the data in your named graph but in the case of a SELECT we then simply return that data.</p> <p> Your DESCRIBE query can be rewritten to give a non-empty description by making the named graph the default graph for the query e.g.</p> <p> DESCRIBE ?s FROM <http://graph> WHERE { ?s <http://dummy/pred> <http://dummy/world> }</p> <p> Hope this helps,</p> <p> Rob</p></td> </tr> </table> <p> More information on this issue can be found at <a href="http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=372" target="_blank">http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=372</a></p> <p style="text-align:center;font-size:8pt;padding:5px;"> If you no longer wish to receive notifications, please visit <a href="http://www.dotnetrdf.org/tracker/Account/UserProfile.aspx" target="_blank">your profile</a> and change your notifications options. </p> |