+ All Categories
Home > Technology > The Semantic Web #3 - URI

The Semantic Web #3 - URI

Date post: 17-Nov-2014
Category:
Upload: myungjin-lee
View: 921 times
Download: 5 times
Share this document with a friend
Description:
This is a lecture note #3 for my class of Graduate School of Yonsei University, Korea. It describes URI for the Semantic Web.
Popular Tags:
21
Linked Data & Semantic Web Technology The Semantic Web Part 3. URI for the Semantic Web Dr. Myungjin Lee
Transcript
Page 1: The Semantic Web #3 - URI

Linked Data &Semantic WebTechnology

The Semantic WebPart 3. URI for the Semantic Web

Dr. Myungjin Lee

Page 2: The Semantic Web #3 - URI

2Linked Data & Semantic Web Technology

Page 4: The Semantic Web #3 - URI

4Linked Data & Semantic Web Technology

URI, Thing, and Representation

Thing

URI

Representation

http://data.kdata.kr/resource/Namdaemun

<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"> &nbsp;at <a href="http://kdata.kr">kdata.kr</a>

identifiesand

names

represents

looks up

URIhttp://dbpedia.org/resource/Namdaemun

URIhttp://data.kdata.kr/resource/Sungnyemun

links

refers

PersonMachine

Page 5: The Semantic Web #3 - URI

5Linked Data & Semantic Web Technology

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

Page 6: The Semantic Web #3 - URI

6Linked Data & Semantic Web Technology

How to call Jim?

• URN– resource identification by name– teacher: “Student Jim!”

• URL– resource identification as location– teacher: “Student who seats in the 2nd row and 3rd column

1 2 3

1 John Grace Jin

2 Sam Tom Jim

3 Kevin Dan Scott

in a class

Page 7: The Semantic Web #3 - URI

7Linked Data & Semantic Web Technology

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

Page 8: The Semantic Web #3 - URI

8Linked Data & Semantic Web Technology

Cool URIs for the Semantic Web

• how to use URIs for things that are not Web pages, such as peo-ple, 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

Page 9: The Semantic Web #3 - URI

9Linked Data & Semantic Web Technology

URIs for Real-World Objects

• Be on the Web– Given only a URI, machines and people should be able to retrieve a de-

scription about the resource identified by the URI from the Web.– Machines should get RDF data and humans should get a readable repre-

sentation, such as HTML.

• Be unambiguous– There should be no confusion between identifiers for Web documents and

identifiers for other resources.

Page 10: The Semantic Web #3 - URI

10Linked Data & Semantic Web Technology

URIs for Real-World Objects

Thing

URI

Representation for Web Browsers

http://data.kdata.kr/resource/Namdaemun

<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"> &nbsp;at <a href="http://kdata.kr">kdata.kr</a>

identifiesand

names

represents

looks up

PersonMachine

Description for Agents<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" /> <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" />

describes

Page 11: The Semantic Web #3 - URI

11Linked Data & Semantic Web Technology

The Desired Relationships

<URI-of-alice> a foaf:Person; foaf:name "Alice"; foaf:mbox <mailto:[email protected]>; foaf:homepage <http://www.example.com/people/alice> .

ID

RDF HTML

Resource identifier (URI)

RDF document URI HTML document URI

for web browsersfor semantic web applications

Page 12: The Semantic Web #3 - URI

12Linked Data & Semantic Web Technology

Two Solutions for Identifying Real-World Ob-jects• 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 indica-

tion

Page 13: The Semantic Web #3 - URI

13Linked Data & Semantic Web Technology

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

Page 14: The Semantic Web #3 - URI

14Linked Data & Semantic Web Technology

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

Page 15: The Semantic Web #3 - URI

15Linked Data & Semantic Web Technology

Choosing between 303 and Hash

• Hash URIs– for small and stable sets of resources when the terms are often used to-

gether– 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

Page 16: The Semantic Web #3 - URI

16Linked Data & Semantic Web Technology

Cool URIs

• Simplicity– short and mnemonic

• Stability– remain as long as possible

• Manageability– issue your URIs in a way that you can manage

Page 17: The Semantic Web #3 - URI

17Linked Data & Semantic Web Technology

Linking

• to be linked with each URI related to a real-word object to help in-formation 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:[email protected]>; ...

Page 18: The Semantic Web #3 - URI

18Linked Data & Semantic Web Technology

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

Representationhttp://{domain}/doc/{concept}/{reference}/{doc.file-extension} http://education.data.gov.uk/doc/school/78/doc.rdf

Definition of the scheme concept

http://{domain}/def/{concept} http://education.data.gov.uk/def/school

List of scheme identifiers

http://{domain}/doc/{concept} http://education.data.gov.uk/doc/school

Set http://{domain}/set/{concept} http://education.data.gov.uk/set/school

Page 19: The Semantic Web #3 - URI

19Linked Data & Semantic Web Technology

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:

• Example– States and Territories

• Owner– federal

• Suggested– http://BASE/id/us/state/NAME

• Example– http://logd.tw.rpi.edu/id/us/state/Vermont

'http://' BASE '/' 'id' '/' ORG '/' CATEGORY ( '/' TOKEN )+

Page 20: The Semantic Web #3 - URI

20Linked Data & Semantic Web Technology

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/undefined)

us-asciior %HH utf-8 or %HH

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

Page 21: The Semantic Web #3 - URI

21Linked Data & Semantic Web Technology

References• http://www.slideshare.net/lysander07/open-hpi-semweb02part1• http://www.slideshare.net/onlyjiny/linkeddata• http://en.wikipedia.org/wiki/Uniform_resource_identifier• http://en.wikipedia.org/wiki/Uniform_resource_name• http://en.wikipedia.org/wiki/Uniform_resource_locator• http://www.w3.org/TR/cooluris/• https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/60975/designing-URI-sets-uk-public-sector.pdf• http://data.gov.uk/resources/uris• http://logd.tw.rpi.edu/instance-hub-uri-design• http://en.wikipedia.org/wiki/Internationalized_Resource_Identifier• http://www.w3.org/2004/Talks/IUC25iri/Overview.html


Recommended