This course has already ended.

The latest instance of the course can be found at: Semantic Web: 2024 MOOC

Presenting RDF graphs

In these exercises we will learn to use different serializations of RDF graphs.

Here is an example of a visualized RDF graph.

../_images/ex2.1_rdf_as_triplets.png

First, we will familiarize ourselves with the simplest serialization N-triples

A+ presents the exercise submission form here.

Visualizing a Turtle serialization

Next in line is the more convenient Turtle-format, which we already had a glance at Turtle while exploring DBpedia data in a previous exercise.

Visualize the below RDF Turtle definitions using the RDF Grapher service. Notice the empty prefix.

@prefix : <http://esimerkki.fi/> .

:matti a :Person ;
:name "Matti" ;
:knows :maija ;
:hasChild :liisa .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://esimerkki.fi/> .

ex:matti a foaf:Person ;
   foaf:name "Matti" ;
   foaf:knows ex:maija ;
   ex:hasChild ex:liisa .

ex:maija a foaf:Person ;
   foaf:name "Maija" .

ex:liisa a foaf:Person ;
   foaf:name "Liisa" .

foaf:Person rdfs:label "Henkilö"@fi .
What does the a in the above serializations transform into in RDF-Grapher visualizations?

Presenting RDF graphs in the Turtle notation

../_images/ex2.4_rdf_as_turtle.png

Serialize the RDF graph given in the above image in the Turtle format. You may want to validate it by visualizing it in the RDF Grapher service before submitting. Boxes with blue borders represent resources and boxes with black borders represent literals.

The prefix dc points to Dublin Core namespace http://purl.org/dc/elements/1.1/ and rdf to the RDF namespace http://www.w3.org/1999/02/22-rdf-syntax-ns#.

Use the same empty prefix as in the previous examples: @prefix : <http://esimerkki.fi/> .

A+ presents the exercise submission form here.

Converting Turtle serialization to RDF/XML

Convert the previous exercise’s RDF graph from Turtle to RDF/XML serialization by using the RDF Serializer service of the LDF.fi portal.

A+ presents the exercise submission form here.

JSON-LD notation

JSON-LD is a W3C standardized, JSON-based format to serialize Linked Data. Look through the video

which lays out the idea and essential properties of JSON-LD. A more in-depth description can be found from the following sources:

These questions are about JSON-LD and answers can be found from the video above. Please note that you must answer both questions at once.

What is the attribute/keyword @id used for?
What is the attribute/keyword @context used for?
Posting submission...