From: Rob V. <rv...@do...> - 2012-09-18 15:50:17
|
Hi Dilshan I will tell you the answer but I get the impression that it won't really solve your problem which would appear to be that you don't know SPARQL very well? I would strongly suggest reading a good SPARQL tutorial like SPARQL by Example [1] or getting a book like Learning SPARQL [2] in order to help you learn SPARQL properly For now however you simply need to modify your query like so: SELECT * WHERE { <http://www.owl-ontologies.com/unnamed.owl#Ferrari> ?p ?o} Rob [1] http://www.cambridgesemantics.com/semantic-university/sparql-by-example [2] http://www.learningsparql.com From: DILSHAN SUMESHKA <sum...@ya...> Reply-To: DILSHAN SUMESHKA <sum...@ya...>, dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, September 18, 2012 6:11 AM To: "dot...@li..." <dot...@li...> Subject: [dotNetRDF-Support] Query > > Hi, > > > I used the following code, > > Object results = store.ExecuteQuery("SELECT * WHERE {?s ?p ?o}"); > if (results is SparqlResultSet) > { > //Print out the Results > SparqlResultSet rset = (SparqlResultSet)results; > int i = 0; > foreach (SparqlResult result in rset) > { > TextBoxLog.Text += i + " -" + result.ToString() + "\n"; > i++; > } > } > > > and it returned, > > ?s = http://www.owl-ontologies.com/unnamed.owl#Ferrari , ?p = > http://www.owl-ontologies.com/unnamed.owl#Speed, ?o = > 250^^http://www.w3.org/2001/XMLSchema#float > ?s = http://www.owl-ontologies.com/unnamed.owl# Ferrari , ?p = > http://www.owl-ontologies.com/unnamed.owl#Weight, ?o = > 100^^http://www.w3.org/2001/XMLSchema#float > ?s = http://www.owl-ontologies.com/unnamed.owl#McLaren, ?p = > http://www.owl-ontologies.com/unnamed.owl#Speed, ?o = > 255^^http://www.w3.org/2001/XMLSchema#string > > > How can I modify this in order to only select Ferrari type cars? > > > Many Thanks, > > Dilshan > ------------------------------------------------------------------------------ > Live Security Virtual Conference Exclusive live event will cover all the ways > today's security and threat landscape has changed and how IT managers can > respond. Discussions will include endpoint security, mobile security and the > latest in malware threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_____________________ > __________________________ dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |