Resource Description Framework (RDF) in use

Before the lab


Lab instructions

1 SPARQL - demo

  1. Go to SPARQLer
    1. check the Force the accept header to text/plain regardless
    2. test available result formats for example queries (JSON output / text output / CSV output / TSV output)
    3. run the Construct query and analyze the result
  2. 8-) What do SELECT queries do?
  3. 8-) What do CONSTRUCT queries do?

2 SPARQL queries - basics

  1. In this exercise we will use Twinkle (screenshots)
  2. Run Twinkle
    On Charon: Open Terminal and type:
     $ twinkle 
  3. Test the examples for PeriodicTable and PlanetFeed (Choose File → Open → examples/…)
  4. Let's get back to our FOAF files. Do you have yours? 8-O
  5. Execute queries on your foaf file to retrieve :
    • friends who have name and e-mail defined
    • friends who have name and e-mail defined and optional homepage
    • friends who have name and e-mail defined and optional homepage, sorted by name descending
  • 8-) Put the constructed queries in the report.


PREFIX rdf: <>
PREFIX foaf: <>

    ?x rdf:type foaf:Person . 
    ?x foaf:name ?name

3 SPARQL queries - options

In this exercise use the FOAF files of your friends. Hint: cooperate, ask your friends to give you the URI of their FOAF :!:

Run Twinkle and execute queries on chosen foaf file to retrive :

  • people whose name starts with 'K'
  • people who are older than 18 years old
  • people whose name starts with 'K' or are older than 18 years old, make search caseinsensitive
  • people having e-mails on server
  • name of people, who have homepage or e-mail on server

8-) Put the queries in the report.


  • To view the semantic information and conveniently visualize RDF files you can install (at home) the Tabulator extension to your Web browser.

If you want to know more

pl/dydaktyka/semantic_web/new-semweb-rdfinuse.txt · ostatnio zmienione: 2017/07/17 08:08 (edycja zewnętrzna) Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0