From: <tr...@do...> - 2013-06-16 23:54:05
|
<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>Property paths using the * operator can generate incorrect results</td> </tr> <tr> <td><b>Project:</b></td> <td>Core Library (dotNetRDF.dll)</td> </tr> <tr> <td><b>Created By:</b></td> <td>ash</td> </tr> <tr> <td><b>Date:</b></td> <td>2013-06-17 12:53 AM</td> </tr> <tr> <td><b>Comment:</b></td> </tr> <tr> <td colspan="2"><p> I've hit this as well. If it helps, here is a sample query and test data:</p> <p> public void DotNetRdfPathTest()</p> <p> {</p> <p> var myGraph = new OntologyGraph();</p> <p> myGraph.LoadFromFile(@"C:\Temp\DotNetRdfPathTest\dotnetrdfpathtest.ttl");</p> <p> var queryResults = myGraph.ExecuteQuery(</p> <p> "SELECT * WHERE { ?subject <<a href="http://www.w3.org/2000/01/rdf-schema#label">http://www.w3.org/2000/01/rdf-schema#label</a>> ?name . ?subject <<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#type">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</a>>/<http://www.w3.org/2000/01/rdf-schema#subClassOf>* <<a href="http://example.org/unnamed#Level1_1">http://example.org/unnamed#Level1_1</a>> . ?subject a ?type . } ");</p> <p> var results = queryResults as SparqlResultSet;</p> <p> if (results == null)</p> <p> {</p> <p> throw new InvalidOperationException("Was expecting a SparqlResultSet");</p> <p> }</p> <p> </p> <p> foreach (var result in results)</p> <p> {</p> <p> var id = ((IUriNode)result.Value("subject")).Uri;</p> <p> var name = ((ILiteralNode)result.Value("name")).Value;</p> <p> var type = ((IUriNode)result.Value("type")).Uri;</p> <p> </p> <p> Console.WriteLine("{0} {1} {2}", id, name, type);</p> <p> }</p> <p> }</p> <p> -------------</p> <p> # baseURI: <a href="http://example.org/unnamed">http://example.org/unnamed</a></p> <p> </p> <p> @prefix : <<a href="http://example.org/unnamed#">http://example.org/unnamed#</a>> .</p> <p> @prefix owl: <<a href="http://www.w3.org/2002/07/owl#">http://www.w3.org/2002/07/owl#</a>> .</p> <p> @prefix rdf: <<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a>> .</p> <p> @prefix rdfs: <<a href="http://www.w3.org/2000/01/rdf-schema#">http://www.w3.org/2000/01/rdf-schema#</a>> .</p> <p> @prefix xsd: <<a href="http://www.w3.org/2001/XMLSchema#">http://www.w3.org/2001/XMLSchema#</a>> .</p> <p> </p> <p> :Level1</p> <p> rdf:type rdfs:Class .</p> <p> </p> <p> :Level1_1</p> <p> rdf:type rdfs:Class ;</p> <p> rdfs:subClassOf :Level1 .</p> <p> </p> <p> :Level1_2</p> <p> rdf:type rdfs:Class ;</p> <p> rdfs:subClassOf :Level1 .</p> <p> </p> <p> :level1_1_item1</p> <p> rdf:type :Level1_1 ;</p> <p> rdfs:label "level1_1 item 1" .</p> <p> </p> <p> :level1_2_item_1</p> <p> rdf:type :Level1_2 ;</p> <p> rdfs:label "level1_2 item 1" .</p> <p> </p> <p> :level1_2_item_2</p> <p> rdf:type :Level1_2 ;</p> <p> rdfs:label "level1_2 item 2" .</p> <p> </p> <p> :level_1_1_item_2</p> <p> rdf:type :Level1_1 ;</p> <p> rdfs:label "level1_1 item 2" .</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=349" target="_blank">http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=349</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> |