This session is about publishing structured data in RDF, following Linked Data principles and best practices. It starts with observing existing data on the Web, then follows by modelling your own data by reusing known vocabularies and linking your data to other data sources.
In this part, we will examine data from a well known Linked Data provider, DBpedia. We will do most of the work in a Web browser. Do the following:
Start a Web browser.
Open a blank text file that you will save as <yourfirstname>-<yourlastname>.txt. You will put answers to the questions asked below and send the file at the end of the session. Your answers should be very short.
dbo:birthDate. What kind of information does this property provide? Write your answer in English (or French) in the text file.dbo:birthPlace. Move your mouse on the second link in the Value column. On the bottom left of the browser window, you should see the URL to which this link is pointing to. Write this URL in your text filehttp://dbpedia.org/page/England) consider the Property dbp:areaKm. What is the number in the Value column? What does the text between brackets represent? Take a look at dbp:gvaPerCapita. What does the value formally represent? What is its type? Write your short answers in the text file.owl:sameAs (not to be confused with schema:sameAs) and look at the values there. You can see URIs that point to other domains. All of them contain RDF data. Find RDF files that describe Tim Berners-Lee at the Deutsche National Bibliothek, and at the BBC. As in DBpedia, the data served by these organisations is usually displayed in HTML, but there are links to the RDF data.PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> in preamble of a file implies that any occurence of xsd:something in the remainder of the file is syntactic sugar for <http://www.w3.org/2001/XMLSchema#something>. The URI associated to a prefix is called a namespace, as in XML. Look again at the Turtle document describing Tim Berners-Lee, which should start with a list of prefix declarations. What namespaces belong to DBpedia (namespace URIs that include dbpedia.org)? Write both prefixes and namespace URIs in your answer.Now that you are a little familiar with DBpedia, consider the exercise from last session where you had to describe Mines Saint-Étienne, using Wikipedia infobox. A solution to the exercise was made available. Rewrite the RDF graph by trying to use DBpedia IRIs as much as possible. Not all relative IRIs in the solution can be replaced by IRIs from DBpedia, but do so wherever possible.
Write a Turtle document that encodes the same data as what is visualised in the following graph:
Save the code to a file with name YourFirstName-YourLastName-graph.ttl.
Now that you have seen how an existing Linked Data web site works, you will be editing and publishing your own RDF files. You will be describing your personal profile in order to build a distributed social network.
You will be writing some RDF in the Turtle format. Use the Turtle Editor that I showed in my presentation and make sure that you reguarly save what you write in a file (you'll need it in the next lecture). You will make use of what is called the Friend Of A Friend vocabulary (FOAF) and therefore the RDF document that you make will be called your FOAF profile.
Your Turtle should start with the following prefix declarations:
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX ex: <http://example.org/> # for predicates you couldn't find elsewhere
PREFIX profile: <#> # for resources you describe yourself
card:i and az:me to identify themselves. You can use profile:i or profile:me for your own description. Antoine Zimmermann's FOAF profile says az:me a foaf:Person (while Tim Berners-Lee's profile has card:i a :Person, but given the prefix declaration, they are both referring to the same IRI http://xmlns.com/foaf/0.1/Person). Remember that the keyword a is a shorthand for the IRI http://www.w3.org/1999/02/22-rdf-syntax-ns#type that could also be written rdf:type. All IRIs that are used in the object position of a rdf:type triple (that is, after the a keyword) are classes. Write that you are person (in Turtle).http://dbpedia.org/resource/Semantic_Web that DBpedia defines to identify the Semantic Web. You can add more topics of interest (use DBpedia Lookup to find resources).ex:, a “put it all” prefix.foaf:knows. Add a triple that would state that you know at least one of your classmates. What IRI did you choose to identify them? Why could it be a problem? You'll see in the next assignment how to resolve this problem with Linked Data.In your file describing yourself, indicate that you are following the Semantic Web course, that this course has a session in room 214, and add all the data from the file you edited previously, transcribing the graphical view of a graph to Turtle.