The Semantic Web #3 - URI


Published on

This is a lecture note #3 for my class of Graduate School of Yonsei University, Korea.
It describes URI for the Semantic Web.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

The Semantic Web #3 - URI

  1. 1. Linked Data &Semantic WebTechnology The Semantic Web Part 3. URI for the Semantic Web Dr. Myungjin Lee
  2. 2. 2Linked Data & Semantic Web Technology
  3. 3. How to Identify Objects? Object refer to Object stand for refer to Concept symbolize stand for Concept “Namdeamun” symbolize Symbol URI Symbol 3Linked Data & Semantic Web Technology
  4. 4. URI, Thing, and Representation looks up URI Person Machine refers URI links identifies and names URI Thing represents Representation <html xmlns="" xml:lang="en" lang="en"> <head> <title>Namdaemun |</title> <link rel="alternate" type="application/rdf+xml" href="" title="RDF" /> </head> <body onLoad="init();"> <div id="header"> <div> <h1 id="title">Namdaemun</h1> <div id="homelink"> &nbsp;at <a href=""></a> 4Linked Data & Semantic Web Technology
  5. 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 5Linked Data & Semantic Web Technology
  6. 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 6Linked Data & Semantic Web Technology
  7. 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 • • • 7Linked Data & Semantic Web Technology
  8. 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 8Linked Data & Semantic Web Technology
  9. 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. 9Linked Data & Semantic Web Technology
  10. 10. URIs for Real-World Objects URI looks up identifies and Person names Machine Description for Agents describes <rdf:RDF> <rdf:Description rdf:about=""> <rdf:type rdf:resource="" /> <rdf:type rdf:resource="" /> <owl:sameAs rdf:resource="" /> <owl:sameAs rdf:resource="" /> Thing <owl:sameAs rdf:resource="" /> <owl:sameAs rdf:resource="" /> <owl:sameAs rdf:resource="" /> representsRepresentation for Web Browsers<html xmlns="" xml:lang="en" lang="en"> <head> <title>Namdaemun |</title> <link rel="alternate" type="application/rdf+xml" href="" title="RDF" /></head> <body onLoad="init();"> <div id="header"> <div> <h1 id="title">Namdaemun</h1> <div id="homelink"> &nbsp;at <a href=""></a> 10Linked Data & Semantic Web Technology
  11. 11. The Desired Relationships <URI-of-alice> a foaf:Person; foaf:name "Alice"; foaf:mbox <>; foaf:homepage <> . Resource identifier (URI) ID for semantic web applications for web browsers RDF HTML RDF document URI HTML document URI 11Linked Data & Semantic Web Technology
  12. 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 12Linked Data & Semantic Web Technology
  13. 13. Hash URIs • URIs to represent the company, Alice, and Bob – • Example Inc., the company – • Bob, the person – • Alice, the person 13Linked Data & Semantic Web Technology
  14. 14. 303 URIs forwarding to Document(s) • URIs to represent the company, Alice and Bob – • Example Inc., the company – • Bob, the person – • Alice, the person 14Linked Data & Semantic Web Technology
  15. 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 15Linked Data & Semantic Web Technology
  16. 16. Cool URIs • Simplicity – short and mnemonic • Stability – remain as long as possible • Manageability – issue your URIs in a way that you can manage 16Linked Data & Semantic Web Technology
  17. 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 – • Identifier for Alice, the person – • Alices homepage – • RDF document with description of Alice <> foaf:page <>; rdfs:isDefinedBy <>; a foaf:Person; foaf:name "Alice"; foaf:mbox <>; ... 17Linked Data & Semantic Web Technology
  18. 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} Document http://{domain}/doc/{concept}/{reference} http://{domain}/doc/{concept}/{reference}/ Representation {doc.file-extension} Definition of the http://{domain}/def/{concept} scheme concept List of scheme http://{domain}/doc/{concept} identifiers Set http://{domain}/set/{concept} 18Linked Data & Semantic Web Technology
  19. 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 – 19Linked Data & Semantic Web Technology
  20. 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 20Linked Data & Semantic Web Technology
  21. 21. References • • • • • • • • • • • 21Linked Data & Semantic Web Technology