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.


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 : <> .

:matti a :Person ;
:name "Matti" ;
:knows :maija ;
:hasChild :liisa .
@prefix rdf: <> .
@prefix rdfs: <> .
@prefix foaf: <> .
@prefix ex: <> .

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


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 and rdf to the RDF namespace

Use the same empty prefix as in the previous examples: @prefix : <> .

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 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...