You are on page 1of 25

LINKED DATA

Pertemuan 9
Amalia, ST, MT
Sumber :
• http://linkeddatabook.com/editions/1.0/#htoc9
• https://www.w3.org/DesignIssues/LinkedData.html
• https://www.w3.org/2001/sw/BestPractices/VM/http-
examples/2005-11-18/
Publikasi Data
• Use URIs as names for things
• Use HTTP URIs so that people can look up those names.
• When someone looks up a URI, provide useful information, using the
standards (RDF*, SPARQL)
• Include links to other URIs. so that they can discover more things.
Semua objek harus diberikan URI
• Untuk mempublish data di web, semua objek harus memiliki
identifier, untuk itu harus diberikan URI.
Kualitas Data
Contoh kualitas data
• Berapa stars untuk data.gov.uk?
Contoh
kualitas data
Berapa stars untuk data.gov.uk?
Contoh
kualitas data
Berapa stars untuk data.go.id?
Prinsip Dasar
• Prinsip Dasar Linked Data
• Identifikasi semua URI (bukan hanya dokumen web dan juga digital konten
namun juga semua objek termasuk konsep yang abstrak)
• people, places and cars
• Contoh abstrak : relationship type of knowing somebody
• the set of all green cars in the world, or the color green itself.
Making URIs Defererenceable -> Semua URI
harus ada referensinya
• HTTP Clients dapat melihat URI melalui HTTP protokol
• Server harus menyediakan dekripsi tentang resource yang
diidentifikasi oleh URI.
• This applies to URIs that are used to identify classic HTML documents,
as well as URIs that are used in the Linked Data context to identify
real-world objects and abstract concepts.
• Descriptions of resources are embodied in the form of Web
documents. Descriptions that are intended to be read by humans are
often represented as HTML. Descriptions that are intended for
consumption by machines are represented as RDF data.
Making URIs Defererenceable
Bahan bacaan tentang materi ini :
http://linkeddatabook.com/editions/1.0/#htoc9

There are two different strategies to make URIs that identify real-world
objects dereferenceable.
• 303 URIs

• Hash URIs
303 URIs
• Real-world objects, like houses or people, can not be transmitted over
the wire using the HTTP protocol.
• Thus, it is also not possible to directly dereference URIs that identify
real-world objects
• Therefore, in the 303 URIs strategy, instead of sending the object
itself over the network, the server responds to the client with the
HTTP response code 303 See Other and the URI of a Web document
which describes the real-world object. This is called a 303 redirect. In
a second step, the client dereferences this new URI and gets a Web
document describing the real-world object.
Deferencing HTTP URI
• The client performs a HTTP GET request on a URI identifying a real-world object
or abstract concept. If the client is a Linked Data application and would prefer an
RDF/XML representation of the resource, it sends an Accept:
application/rdf+xml header along with the request. HTML browsers would send
an Accept: text/html header instead.
• The server recognizes that the URI identifies a real-world object or abstract
concept. As the server can not return a representation of this resource, it answers
using the HTTP 303 See Other response code and sends the client the URI of a
Web document that describes the real-world object or abstract concept in the
requested format.
• The client now performs an HTTP GET request on this URI returned by the server.
• The server answers with a HTTP response code 200 OK and sends the client the
requested document, describing the original resource in the requested format.
Contoh Kasus
• Imagine Big Lynx wants to serve data about their Managing
Director Dave Smith on the Web.
• This data should be understandable for humans as well as for
machines.
• Big Lynx therefore defines a URI reference that identifies the person
Dave Smith (real-world object) and publishes two documents on its
Web server: an RDF document containing the data about Dave
Smith and an HTML document containing a human-readable
representation of the same data.
Big Lynx uses the following three URIs to refer
to Dave and the two documents:
• http://biglynx.co.uk/people/dave-smith (URI identifying the person
Dave Smith)
• http://biglynx.co.uk/people/dave-smith.rdf (URI identifying the
RDF/XML document describing Dave Smith)
• http://biglynx.co.uk/people/dave-smith.html (URI identifying the
HTML document describing Dave Smith)
Dengan Curl :
• curl -I -H "Accept:text/html, application/rdf+xml"
http://biglynx.co.uk/people/dave-smith
HASH URI
• The hash URI strategy builds on the characteristic that URIs may
contain a special part that is separated from the base part of the URI
by a hash symbol (#). This special part is called the fragment
identifier.
• When a client wants to retrieve a hash URI, the HTTP protocol
requires the fragment part to be stripped off before requesting the
URI from the server. This means a URI that includes a hash cannot be
retrieved directly and therefore does not necessarily identify a Web
document. This enables such URIs to be used to identify real-world
objects and abstract concepts, without creating ambiguity
Praktek Di Rumah, untuk mempublish RDF mu
• Untuk membuat sebuah RDF yang sdh open data dapat mengikuti
best practice :
• https://www.w3.org/TR/swbp-vocab-pub/
• Ikuti langkah2 pada bagian Recipe 1. Minimal configuration for a 'hash
namespace’
• Contoh lainnya yaitu pada bagian Recipe 2. Minimal configuration for
a 'slash namespace'
• Ikuti dari step 1 sampai testing
• Coba juga Recipe 3 sampai 5
Cek Response Dari Server untuk RDF
Kode 200 dan 303 dari server
• Kode 200 OK menkonfirmasi jika RDF memang dapat diambil, dan
ditampilkan langsung oleh server
• Kode 303 menampilkan alamat URL lain yang menjelaskan RDF
Contoh :
• BigLynx merupakan sebuah perusahaan fake untuk produksi film.
Perusahaan ini menyediakan 3 buah URI pada server mereka, URI untuk
mendeskripsikan Dave Smith(real-world-object), URI untuk data tentang
dave smith dlm format RDF dan URI identifikasi dave smith dalam versi
HTML :
• http://biglynx.co.uk/people/dave-smith (URI identifying the person Dave Smith)
• http://biglynx.co.uk/people/dave-smith.rdf (URI identifying the RDF/XML document
describing Dave Smith)
• http://biglynx.co.uk/people/dave-smith.html (URI identifying the HTML document
describing Dave Smith)
• Untuk dapat memperoleh RDF data yang mendeskripsikan dave-smith
maka langkah yang harus dilakukan :
• Koneksi ke server biglynx : http://biglynx.co.id
• Buat request :
Contoh :
• Server akan membalas :

• Ini artinya :
• 303 adalah pesan redirect dari server, dimana server menginformasikan
kepada client bahwa web document yang diminta berda pada lokasi
http://biglynx.co.uk.

• Selanjutnya client dapat mencoba untuk dereference URI yang diredirect oleh
server
Client meminta sesuai URI yg diberikan server
Eksplorasi DBPedia
Tugas kelompok
Tugas Minggu Ini :
Eksplorasi wiki.dbPedia.org pada bagian apply :
• Sparklis
• Dbpedia Chatbot
• Chaudron
• RelFinder
• DBPedia Spotlight
• http://en.lodlive.it/
Buat (pilih 3 saja dari aplikasi yg tersedia di atas) buat essay tentang 3 aplikasi tersebut yang terdiri dari :
1. Cover ( nama personil kelompok, judul Essay, logo USU)
2. Bab I Pendahuluan (sekilas tentang DBPedia, Manfaat DBPedia, aplikasi yang telah berhasil di
kembangkan oleh DBPedia org)
3. Bab 2 (penjelasan ttg aplikasi yang dipilih, cara kerjanya, tujuannya, kelebihan dan kelemahannya (jika
ada)
4. Penutup (kesimpulan dan saran)

Tugas dibuat dalam bentuk softcopy dengan format docx, diupload paling lambat 1 minggu setelah perkuliahan ini.
Satu kelompok hanya mengupload satu tugas saja dengan menggunakan salah satu akun personil kelompoknya.

You might also like