Hi Patrick

Thank you so much for your email!

Super helpful to point out that SPARQL is restful. I'm not sure how I
missed that in all the stuff I was reading.

I guess the next step would be to form the web request in iOS and specify
the format of the response to RDF XML. Think I'll be using GXML to parse
the data.

You rock, helped me completely!

Tony

On 9 January 2012 07:59, Patrick van Kleef <[email protected]> wrote:

> Hi Antonio,
>
>
>
>> This is my first day to the mailing list, hope you are all well.
>>
>> So I have been scouring the web furiously but have just come upon
>> disparate information on how to use sparql and dbpedia in iphone
>> applications. I am new to semantic web and sparql, but need to find a way
>> to be able to query the dbpedia live endpoint and parse its results in iOS.
>>
>> My problems
>> 1. How do I send a SPARQL request to the DBPedia sparql Endpoint - a link
>> to a tutorial or code samples would be perfect!
>>
>
> Basically any SPARQL interface is a restful interface, so you can create a
> sparql url by adding the query and format options as parameters.
>
> Consider the following url:
>
> Demo: Find me 100 example concepts in the DBPedia dataset.
>
> http://dbpedia.org/sparql?**default-graph-uri=http%3A%2F%**
> 2Fdbpedia.org&qtxt=select+**distinct+%3FConcept+where+%7B%**
> 5B%5D+a+%3FConcept%7D+limit+**100%0D%0A&format=text%2Fhtml&**timeout=10000<http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&qtxt=select+distinct+%3FConcept+where+%7B%5B%5D+a+%3FConcept%7D+limit+100%0D%0A&format=text%2Fhtml&timeout=10000>
>
> As a demonstration this uses the qtxt parameter to fill in the fields on
> the form so you can see what is going on. When you press the "Run Query"
> button, it will give you a table. If you look at the addressbar of your
> browser you will see that the &qtxt has been replaced by &query which
> triggers the /sparql endpoint to automatically execute the query.
>
>
>
>  2. How does the result of the query get returned back and how do I
>> consume it.
>>
>
> By setting the Format selector from HTML to Json or RDF/XML you can change
> the way the result set of your query is returned. Again after you have
> pressed the "Run Query" button, you can see how changes to the form change
> the &format field in the addressbar.
>
>
>  3. What can I use to parse the response of this request. Will one of the
>> iOS XMLParsers be sufficient?
>>
>
> See above.
>
>
>
>> Thanks all. Any links to good resources would be amazing. Google doesn't
>> seem to be coming up with the goods at the moment
>>
>
> I am seeing plenty of Google links that maybe of interest but you can
> start with:
>
> [1] http://wiki.dbpedia.org/**GetHelp <http://wiki.dbpedia.org/GetHelp>
> [2] http://answers.semanticweb.**com/questions/13101/rest-**
> service-for-dbpedia<http://answers.semanticweb.com/questions/13101/rest-service-for-dbpedia>
> [3] http://blog.3kbo.com/2008/08/**11/dbpedia-examples-using-**
> linked-data-and-sparql/<http://blog.3kbo.com/2008/08/11/dbpedia-examples-using-linked-data-and-sparql/>
>
>
>
> Hope this helps
>
>
> Patrick
>
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to