3. How to Identify Objects?
Object
refer to
Object
stand for refer to
Concept
symbolize
stand for
Concept
“Namdeamun”
symbolize
Symbol
URI
Symbol
3
Linked Data & Semantic Web Technology
4. URI, Thing, and Representation
looks up
URI
Person http://data.kdata.kr/resource/Namdaemun
Machine
refers
URI
http://data.kdata.kr/resource/Sungnyemun
links identifies
and
names
URI
Thing
http://dbpedia.org/resource/Namdaemun
represents
Representation
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Namdaemun | kdata.kr</title>
<link rel="alternate" type="application/rdf+xml" href="http://data.kdata.kr/data/Namdaemun" title="RDF" />
</head>
<body onLoad="init();">
<div id="header">
<div>
<h1 id="title">Namdaemun</h1>
<div id="homelink"> at <a href="http://kdata.kr">kdata.kr</a>
4
Linked Data & Semantic Web Technology
5. URI (Uniform Resource Identifier)
• a string of characters used to identify a name or a web resource
• URN (Uniform Resource Name)
– persistent, location-independent identifiers for resources
• URL (Uniform Resource Locator)
– a means of locating the resource
5
Linked Data & Semantic Web Technology
6. How to call Jim?
in a class
1 2 3
1 John Grace Jin
2 Sam Tom Jim
• URN 3 Kevin Dan Scott
– resource identification by name
– teacher: “Student Jim!”
• URL
– resource identification as location
– teacher: “Student who seats in the 2nd row and 3rd column
6
Linked Data & Semantic Web Technology
7. Syntax of URN and URL
• URN
– urn:<namespace identifier>:<namespace-specific string>
– Examples
• urn:isbn:0451450523
• urn:issn:0167-6423
• urn:ietf:rfc:2648
• URL
– scheme://username:password@domain:port/path?query_string#fragment_id
– Examples
• http://vnc.example.com:5800
• http://en.example.org/wiki/URL
• http://semantics.kr/search?first_name=John&last_name=Doe
7
Linked Data & Semantic Web Technology
8. Cool URIs for the Semantic Web
• how to use URIs for things that are not Web pages, such as
people, products, places, ideas and concepts
• how the Semantic Web can (and should) be realized as a part of
the Web
• W3C Interest Group Note, 03 December 2008
8
Linked Data & Semantic Web Technology
9. URIs for Real-World Objects
• Be on the Web
– Given only a URI, machines and people should be able to retrieve a
description about the resource identified by the URI from the Web.
– Machines should get RDF data and humans should get a readable
representation, such as HTML.
• Be unambiguous
– There should be no confusion between identifiers for Web documents and
identifiers for other resources.
9
Linked Data & Semantic Web Technology
10. URIs for Real-World Objects
URI
http://data.kdata.kr/resource/Namdaemun looks up
identifies
and Person
names Machine
Description for Agents
describes
<rdf:RDF>
<rdf:Description rdf:about="http://dbpedia.org/resource/Namdaemun">
<rdf:type rdf:resource="http://dbpedia.org/class/yago/GatesOfKorea" />
<rdf:type rdf:resource="http://www.opengis.net/gml/_Feature" />
<owl:sameAs rdf:resource="http://pl.dbpedia.org/resource/Sungnyemun" />
<owl:sameAs rdf:resource="http://cs.dbpedia.org/resource/Namdemun" />
Thing <owl:sameAs rdf:resource="http://es.dbpedia.org/resource/Namdaemun" />
<owl:sameAs rdf:resource="http://dbpedia.org/resource/Namdaemun" />
<owl:sameAs rdf:resource="http://it.dbpedia.org/resource/Namdaemun" />
represents
Representation for Web Browsers
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Namdaemun | kdata.kr</title>
<link rel="alternate" type="application/rdf+xml" href="http://data.kdata.kr/data/Namdaemun" title="RDF" />
</head>
<body onLoad="init();">
<div id="header">
<div>
<h1 id="title">Namdaemun</h1>
<div id="homelink"> at <a href="http://kdata.kr">kdata.kr</a>
10
Linked Data & Semantic Web Technology
11. The Desired Relationships
<URI-of-alice> a foaf:Person;
foaf:name "Alice";
foaf:mbox <mailto:alice@example.com>;
foaf:homepage <http://www.example.com/people/alice> .
Resource identifier (URI)
ID
for semantic web applications for web browsers
RDF HTML
RDF document URI HTML document URI
11
Linked Data & Semantic Web Technology
12. Two Solutions for Identifying Real-World Objects
• Hash URIs
– using a fragment, a special part that is separated from the rest of the URI
by a hash symbol (“#”)
• 303 URIs forwarding to Document(s)
– to use a special HTTP status code, 303 See Other, to give an
indication
12
Linked Data & Semantic Web Technology
13. Hash URIs
• URIs to represent the company, Alice, and Bob
– http://www.example.com/about#exampleinc
• Example Inc., the company
– http://www.example.com/about#bob
• Bob, the person
– http://www.example.com/about#alice
• Alice, the person
13
Linked Data & Semantic Web Technology
14. 303 URIs forwarding to Document(s)
• URIs to represent the company, Alice and Bob
– http://www.example.com/id/exampleinc
• Example Inc., the company
– http://www.example.com/id/bob
• Bob, the person
– http://www.example.com/id/alice
• Alice, the person
14
Linked Data & Semantic Web Technology
15. Choosing between 303 and Hash
• Hash URIs
– for small and stable sets of resources when the terms are often used
together
– for simply uploading static RDF files to a Web server
– for large sets of data that are beyond the point where it is practical to serve
all related resources in a single document
• 303 URIs
– for such data sets, making neater-looking URIs, but with an impact on
run-time performance and server load
15
Linked Data & Semantic Web Technology
16. Cool URIs
• Simplicity
– short and mnemonic
• Stability
– remain as long as possible
• Manageability
– issue your URIs in a way that you can manage
16
Linked Data & Semantic Web Technology
17. Linking
• to be linked with each URI related to a real-word object to help
information consumers understand their relation
• three URIs related to Alice
– http://www.example.com/id/alice
• Identifier for Alice, the person
– http://www.example.com/people/alice
• Alice's homepage
– http://www.example.com/data/alice
• RDF document with description of Alice
<http://www.example.com/id/alice>
foaf:page <http://www.example.com/people/alice>;
rdfs:isDefinedBy <http://www.example.com/data/alice>;
a foaf:Person;
foaf:name "Alice";
foaf:mbox <mailto:alice@example.com>;
...
17
Linked Data & Semantic Web Technology
18. Designing URI Sets for the UK Public Sector
• URIs:
– name the set and describe its characteristics
– identify for the real-world „Things‟ in a single concept
– provide a means of looking up data on the web
– provide mechanisms to:
• lookup an Identifier URI and be redirected to its Document URI
• discover and get each of the Representation URIs
URI Type URI structure Examples
Identifier http://{domain}/id/{concept}/{reference} http://education.data.gov.uk/id/school/78
Document http://{domain}/doc/{concept}/{reference} http://education.data.gov.uk/doc/school/78
http://{domain}/doc/{concept}/{reference}/
Representation http://education.data.gov.uk/doc/school/78/doc.rdf
{doc.file-extension}
Definition of the http://{domain}/def/{concept} http://education.data.gov.uk/def/school
scheme concept
List of scheme http://{domain}/doc/{concept} http://education.data.gov.uk/doc/school
identifiers
Set http://{domain}/set/{concept} http://education.data.gov.uk/set/school
18
Linked Data & Semantic Web Technology
19. URI Design Principles: Creating Unique URIs for Government Linked Data
• These principles should produce:
– URIs that are easily re-hosted
– Concise URIs with as little "cruft" as possible
– URIs that span many domains including
• URI Template:
'http://' BASE '/' 'id' '/' ORG '/' CATEGORY ( '/' TOKEN )+
• Example
– States and Territories
• Owner
– federal
• Suggested
– http://BASE/id/us/state/NAME
• Example
– http://logd.tw.rpi.edu/id/us/state/Vermont
19
Linked Data & Semantic Web Technology
20. URI and IRI
• IRI (Internationalized Resource Identifier)
– While URIs are limited to a subset of the ASCII character set, IRIs may
contain characters from the Universal Character Set (Unicode/ISO 10646).
– use UTF-8 and %HH-escaping for conversion to URIs
Encoding
(server side/ us-asciior %HH utf-8 or %HH
undefined)
original characters <====> bytes URI IRI
March us-ascii/utf-8 4D 61 72 63 68 March March
März iso-8859-1 4D E4 72 7A M%E4rz M%E4rz
März macintosh 4D 8A 72 7A M%8Arz M%8Arz
März utf-8 4D C3 A4 72 7A M%C3%A4rz März
20
Linked Data & Semantic Web Technology