INF3580/4580 Semantic Technologies Spring 2015

Similar documents
Today s Plan. INF3580 Semantic Technologies Spring RDF on the Web. Outline. Lecture 13: Publishing RDF Data on the Web.

From the Web to the Semantic Web: RDF and RDF Schema

Reminder: RDF triples

Semantics. Matthew J. Graham CACR. Methods of Computational Science Caltech, 2011 May 10. matthew graham

Today s Plan. INF3580/4580 Semantic Technologies Spring Reminder: RDF triples. Outline. Lecture 4: The SPARQL Query Language.

Introducing Linked Data

Web 2.0 Lecture 8: Resource Description Framework

O.Curé [1 ] Mashup, Microformats, RDFa and GRDDL

BUILDING THE SEMANTIC WEB

Semantic Web Publishing. Dr Nicholas Gibbins 32/4037

INF3580/4580 Semantic Technologies Spring 2017

Chapter 3 Other RDF-Related Technologies: Microformats, RDFa and GRDDL

Today s Plan. 1 Repetition: RDF. 2 Jena: Basic Datastructures. 3 Jena: Inspecting Models. 4 Jena: I/O. 5 Example. 6 Jena: ModelFactory and ModelMaker

SEMANTIC WEB AN INTRODUCTION. Luigi De

Library of Congress BIBFRAME Pilot. NOTSL Fall Meeting October 30, 2015

The Semantic Web Revisited. Nigel Shadbolt Tim Berners-Lee Wendy Hall

Why You Should Care About Linked Data and Open Data Linked Open Data (LOD) in Libraries

Semantic Days 2011 Tutorial Semantic Web Technologies

Today s Plan. 1 Repetition: RDF. 2 Jena: Basic Datastructures. 3 Jena: Inspecting Models. 4 Jena: I/O. 5 Example. 6 Jena: ModelFactory and ModelMaker

Multi-agent Semantic Web Systems: RDF Models

Microformat Sh Schema.org

RDF AND SPARQL. Part I: Basics of RDF. Dresden, August Sebastian Rudolph ICCL Summer School

Web Standards Mastering HTML5, CSS3, and XML

Syntax and processing rules for embedding RDF through attributes

Contents. G52IWS: The Semantic Web. The Semantic Web. Semantic web elements. Semantic Web technologies. Semantic Web Services

INFO/CS 4302 Web Informa6on Systems

Semantic Web Fundamentals

Semantic Web Fundamentals

The Data Web and Linked Data.

RDFa: Embedding RDF Knowledge in HTML

Provenance Situations: Use Cases for Provenance on Web Architecture

Linked data and its role in the semantic web. Dave Reynolds, Epimorphics

Mapping Relational data to RDF

Building Blocks of Linked Data

Artificial Intelligence Techniques. Internet Applications 2

Unit 1 a Bird s Eye View on RDF(S), OWL & SPARQL

RDF and RDB 2 D2RQ. Mapping Relational data to RDF D2RQ. D2RQ Features. Suppose we have data in a relational database that we want to export as RDF

RESOURCES DESCRIPTION FRAMEWORK: RDF

Linked Data & Semantic Web Technology.

Multi-agent and Semantic Web Systems: Querying

Linked Data: What Now? Maine Library Association 2017

Semantic Web Tools. Federico Chesani 18 Febbraio 2010

The Semantic Web. What is the Semantic Web?

Are you afraid of Semantic Web?

Semantic Web and Linked Data

Semantic Web Programming

> Semantic Web Use Cases and Case Studies

Semantiska webben DFS/Gbg

OSM Lecture (14:45-16:15) Takahira Yamaguchi. OSM Exercise (16:30-18:00) Susumu Tamagawa

Outline RDF. RDF Schema (RDFS) RDF Storing. Semantic Web and Metadata What is RDF and what is not? Why use RDF? RDF Elements

Semantic Web and Python Concepts to Application development

DC-Text - a simple text-based format for DC metadata

Improved Methods for Tagging and Semantic-Annotation for the Semantic-based OpenAPI Retrieval System *

Semantic Technologies and CDISC Standards. Frederik Malfait, Information Architect, IMOS Consulting Scott Bahlavooni, Independent

Knowledge Representation for the Semantic Web

Making the Web searchable Towards Semantic Search

Linked Open Data. University of Rome "Tor Vergata" ART: Artificial Intelligence Tor Vergata. "The Semantic Web done right" Tim Berners-Lee

Querying Semantic Web Data

SemClip - Overcoming the Semantic Gap Between Desktop Applications

Semantic Web Systems Querying Jacques Fleuriot School of Informatics

Introduction to Linked Data

Semantic Web. Lecture 12: SW Programming Dr. Knarig Arabshian

Lab 4 CSS CISC1600, Spring 2012

XML Metadata Standards and Topic Maps

Semantic Web. RDF and RDF Schema. Morteza Amini. Sharif University of Technology Spring 90-91

Web Information System Design. Tatsuya Hagino

The RDF layer. Riccardo Rosati. Knowledge Representation and Semantic Technologies

Current State of the Semantic Web

User Interaction: XML and JSON

What is a web site? Web editors Introduction to HTML (Hyper Text Markup Language)

Linked Data Evolving the Web into a Global Data Space

Linked Data. Department of Software Enginnering Faculty of Information Technology Czech Technical University in Prague Ivo Lašek, 2011

Semantic Web Technologies: Assignment 1. Axel Polleres Siemens AG Österreich

Temporality in Semantic Web

Web of Hypertext (RDFa, Microformats) and Web of Data

Implementing and extending SPARQL queries over DLVHEX

The Semantic Web. Challenges with today s Web the Semantic Web Technology Example of use Status Semantic Web in e-learning

CS144 Notes: Web Standards

KawaWiki: A Semantic Wiki Based on RDF Templates

Ivan Herman. F2F Meeting of the W3C Business Group on Oil, Gas, and Chemicals Houston, February 13, 2012

SPARQL. Fausto Giunchiglia and Mattia Fumagallli. University of Trento

What's New in RDF 1.1

SADI Semantic Web Services

RDFa 1.1 Primer - Second Edition

Mapping between Digital Identity Ontologies through SISM

WebGUI & the Semantic Web. William McKee WebGUI Users Conference 2009

RDF for Life Sciences

SPARQL. Dr Nicholas Gibbins

Semantic Web Technologies

Interacting with Linked Data Part I: General Introduction

Linked Data and RDF. COMP60421 Sean Bechhofer

Building Interoperable Metadata

Profiles Research Networking Software API Guide

The Semantic Web DEFINITIONS & APPLICATIONS

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

RuleML and SWRL, Proof and Trust

Semantic Web Lecture Part 1. Prof. Do van Thanh

A Developer s Guide to the Semantic Web

An Architecture to Discover and Query Decentralized RDF Data

Transcription:

INF3580/4580 Semantic Technologies Spring 2015 Lecture 15: RDFa Martin Giese 11th May 2015 Department of Informatics University of Oslo

Repetition 18 June: Guest lecture, Lars Marius Garshol 25 May: no lecture (Whit Monday) 1st June is reserved for Repetition No fixed lecture material You, the students, say what you want to hear Let me know in time, so I m prepared. Drop a mail to martingi@ifi.uio.no until 18th May INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 2 / 29

Today s Plan 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 3 / 29

Outline Reminder 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 4 / 29

RDF on the Web Reminder RDF data exists in many forms: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29

RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29

RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29

RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29

RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29

RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29

RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) As metadata in PDF/A files INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29

RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) As metadata in PDF/A files As data model behind SPARQL query endpoints INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29

RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) As metadata in PDF/A files As data model behind SPARQL query endpoints for instance dbpedia.org, dblp, and others INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29

RDF on the Web Reminder RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc. FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) As metadata in PDF/A files As data model behind SPARQL query endpoints for instance dbpedia.org, dblp, and others Embedded in HTML, as RDFa INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 5 / 29

Outline Linking RDF to HTML 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 6 / 29

Linking RDF to HTML The Problem The HTML web contains lots of human-readable information How can clients discover the location of corresponding machine-readable information?? INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 7 / 29

Linking RDF to HTML Embedding RDF/XML in (X)HTML First idea: Embed RDF/XML in HTML or XHTML: <html> <head> <title>my Homepage</title> <rdf:rdf> <rdf:description rdf:about="#me"> <foaf:name>martin Giese</foaf:name>... INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 8 / 29

Linking RDF to HTML Embedding RDF/XML in (X)HTML First idea: Embed RDF/XML in HTML or XHTML: <html> <head> <title>my Homepage</title> <rdf:rdf> <rdf:description rdf:about="#me"> <foaf:name>martin Giese</foaf:name>... Not recommended: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 8 / 29

Linking RDF to HTML Embedding RDF/XML in (X)HTML First idea: Embed RDF/XML in HTML or XHTML: <html> <head> <title>my Homepage</title> <rdf:rdf> <rdf:description rdf:about="#me"> <foaf:name>martin Giese</foaf:name>... Not recommended: Does not fit HTML or XHTML DTDs INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 8 / 29

Linking RDF to HTML Embedding RDF/XML in (X)HTML First idea: Embed RDF/XML in HTML or XHTML: <html> <head> <title>my Homepage</title> <rdf:rdf> <rdf:description rdf:about="#me"> <foaf:name>martin Giese</foaf:name>... Not recommended: Does not fit HTML or XHTML DTDs No satisfactory solution, due to flexible RDF vocabulary INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 8 / 29

Linking RDF to HTML Embedding RDF/XML in (X)HTML First idea: Embed RDF/XML in HTML or XHTML: <html> <head> <title>my Homepage</title> <rdf:rdf> <rdf:description rdf:about="#me"> <foaf:name>martin Giese</foaf:name>... Not recommended: Does not fit HTML or XHTML DTDs No satisfactory solution, due to flexible RDF vocabulary B.t.w. there is a metadata element in SVG for this! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 8 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation type the media type of the related document INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation type the media type of the related document href the URL of the other document INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation type the media type of the related document href the URL of the other document title the title of the other document INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation type the media type of the related document href the URL of the other document title the title of the other document (and some more) INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

HTML LINK elements Linking RDF to HTML LINK may occur inside HTML HEAD elements relate a document to other documents CSS style sheets Alternative languages Next, previous, index, etc. Can contain attributes: rel the kind of relation type the media type of the related document href the URL of the other document title the title of the other document (and some more) E.g. a style sheet: <html> <head> <title>my Homepage</title> <link rel="stylesheet" type="text/css" href="style.css"> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 9 / 29

LINKing to RDF Linking RDF to HTML To link to an RDF representation: <LINK rel="alternate" type="application/rdf+xml" title="rdf/xml version" href="http://dbpedia.org/data/oslo.xml"> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 10 / 29

Linking RDF to HTML LINKing to RDF To link to an RDF representation: <LINK rel="alternate" type="application/rdf+xml" title="rdf/xml version" href="http://dbpedia.org/data/oslo.xml"> Also: rel="meta" INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 10 / 29

Linking RDF to HTML LINKing to RDF To link to an RDF representation: <LINK rel="alternate" type="application/rdf+xml" title="rdf/xml version" href="http://dbpedia.org/data/oslo.xml"> Also: rel="meta" Note: difference between meta-data and alternative representation INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 10 / 29

Linking RDF to HTML LINKing to RDF To link to an RDF representation: <LINK rel="alternate" type="application/rdf+xml" title="rdf/xml version" href="http://dbpedia.org/data/oslo.xml"> Also: rel="meta" Note: difference between meta-data and alternative representation Various web browser plugins exist to detect these LINKs INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 10 / 29

Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29

Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29

Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29

Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29

Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29

Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 Generated by a few servers, recognized by a few clients INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29

Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 Generated by a few servers, recognized by a few clients Same information as in LINK HTML element, but as HTTP header: Link: <foaf.rdf>; rel="alternate"; type="application/rdf+xml" INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29

Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 Generated by a few servers, recognized by a few clients Same information as in LINK HTML element, but as HTTP header: Link: <foaf.rdf>; rel="alternate"; type="application/rdf+xml" Advantages: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29

Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 Generated by a few servers, recognized by a few clients Same information as in LINK HTML element, but as HTTP header: Link: <foaf.rdf>; rel="alternate"; type="application/rdf+xml" Advantages: can be sent also with non-html data INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29

Linking RDF to HTML HTTP Link: response headers Problems with <LINK> elements: Only works with HTML data, not PDF, Images, etc. Need to download HTML content and search LINK. Idea: put information in HTTP response header. Non-standardized proposal, originally by Berners-Lee, 1992 Generated by a few servers, recognized by a few clients Same information as in LINK HTML element, but as HTTP header: Link: <foaf.rdf>; rel="alternate"; type="application/rdf+xml" Advantages: can be sent also with non-html data requires only HEAD request INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 11 / 29

Outline RDFa 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 12 / 29

RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29

RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well Use a different serialization that blends well with (X)HTML! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29

RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well Use a different serialization that blends well with (X)HTML! From the RDFa specification (http://www.w3.org/tr/rdfa-syntax/) The aim of RDFa is to allow a single RDF graph to be carried in various types of document mark-up. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29

RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well Use a different serialization that blends well with (X)HTML! From the RDFa specification (http://www.w3.org/tr/rdfa-syntax/) The aim of RDFa is to allow a single RDF graph to be carried in various types of document mark-up. XHTML in spec., but works with HTML and other XML INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29

RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well Use a different serialization that blends well with (X)HTML! From the RDFa specification (http://www.w3.org/tr/rdfa-syntax/) The aim of RDFa is to allow a single RDF graph to be carried in various types of document mark-up. XHTML in spec., but works with HTML and other XML RDFa adds a fixed set of attributes to (X)HTML INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29

RDFa Once More: Embedding RDF in (X)HTML Directly embedding RDF/XML in (X)HTML does not work well Use a different serialization that blends well with (X)HTML! From the RDFa specification (http://www.w3.org/tr/rdfa-syntax/) The aim of RDFa is to allow a single RDF graph to be carried in various types of document mark-up. XHTML in spec., but works with HTML and other XML RDFa adds a fixed set of attributes to (X)HTML Document type: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/markup/dtd/xhtml-rdfa-1.dtd"> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 13 / 29

RDFa RDFa Processing Web browsers ignore RDFa attributes RDFa processors extract a single RDF graph from a document <html> XHTML+RDFa </html> Web browser RDFa processor Web page RDF graph INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 14 / 29

RDFa Concepts RDFa RDFa adds semantic annotations to INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29

RDFa Concepts RDFa RDFa adds semantic annotations to hyper-links (href) INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29

RDFa Concepts RDFa RDFa adds semantic annotations to hyper-links (href) textual content INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29

RDFa RDFa Concepts RDFa adds semantic annotations to hyper-links (href) textual content RDFa attributes can appear in (almost) any element INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29

RDFa RDFa Concepts RDFa adds semantic annotations to hyper-links (href) textual content RDFa attributes can appear in (almost) any element As the XHTML is processed, there is always a current subject that generated triples refer to INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29

RDFa RDFa Concepts RDFa adds semantic annotations to hyper-links (href) textual content RDFa attributes can appear in (almost) any element As the XHTML is processed, there is always a current subject that generated triples refer to The current subject starts as the base URI of the document, but can change on the way INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 15 / 29

RDFa Reminder: (X)HTML Meta and Link Links and metadata in HTML header: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>page 507</title> <meta name="author" content="sigrid Undset" /> <link rel="prev" href="page506.html" /> <link rel="next" href="page508.html" /> </head> <body>...</body> </html> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 16 / 29

RDFa Reminder: (X)HTML Meta and Link Links and metadata in HTML header: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>page 507</title> <meta name="author" content="sigrid Undset" /> <link rel="prev" href="page506.html" /> <link rel="next" href="page508.html" /> </head> <body>...</body> </html> Meaning of name and rel informal INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 16 / 29

RDFa Reminder: (X)HTML Meta and Link Links and metadata in HTML header: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>page 507</title> <meta name="author" content="sigrid Undset" /> <link rel="prev" href="page506.html" /> <link rel="next" href="page508.html" /> </head> <body>...</body> </html> Meaning of name and rel informal Only a few values defined by the standard INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 16 / 29

RDFa property and rel RDFa semantic meta and link in RDFa: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"> <head> <title>mg s home page</title> <meta property="dc:creator" content="martin Giese" /> <link rel="foaf:topic" href="foaf.rdf#me" /> </head> <body>...</body> </html> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 17 / 29

RDFa RDFa property and rel semantic meta and link in RDFa: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"> <head> <title>mg s home page</title> <meta property="dc:creator" content="martin Giese" /> <link rel="foaf:topic" href="foaf.rdf#me" /> </head> <body>...</body> </html> Extracted triples: (<> is base URI!) <> dc:creator "Martin Giese". <> foaf:topic <foaf.rdf#me>. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 17 / 29

Attribute rel on A elements RDFa Any hyper-link can be given a meaning : This document is licensed under a <a xmlns:cc="http://creativecommons.org/ns#" rel="cc:license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/"> Creative Commons License </a>. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 18 / 29

RDFa Attribute rel on A elements Any hyper-link can be given a meaning : This document is licensed under a <a xmlns:cc="http://creativecommons.org/ns#" rel="cc:license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/"> Creative Commons License </a>. Extracted triple: <> cc:license <http://creativecommons.org/.../3.0/>. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 18 / 29

RDFa Attribute rel on A elements Any hyper-link can be given a meaning : This document is licensed under a <a xmlns:cc="http://creativecommons.org/ns#" rel="cc:license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/"> Creative Commons License </a>. Extracted triple: <> cc:license <http://creativecommons.org/.../3.0/>. Can use rev instead of rel to swap subject and object INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 18 / 29

The property attribute RDFa rel is for resource objects, property for literal objects: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:dc="http://purl.org/dc/elements/1.1/"> <head>...</head> <body> <h1 property="dc:title">kransen</h1> Written in <span property="dc:created">1920</span> </body> </html> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 19 / 29

The property attribute RDFa rel is for resource objects, property for literal objects: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:dc="http://purl.org/dc/elements/1.1/"> <head>...</head> <body> <h1 property="dc:title">kransen</h1> Written in <span property="dc:created">1920</span> </body> </html> Extracted triples: <> dc:title "Kransen" ; dc:created "1920". INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 19 / 29

The property attribute RDFa rel is for resource objects, property for literal objects: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:dc="http://purl.org/dc/elements/1.1/"> <head>...</head> <body> <h1 property="dc:title">kransen</h1> Written in <span property="dc:created">1920</span> </body> </html> Extracted triples: <> dc:title "Kransen" ; dc:created "1920". Can also use content attribute together with property: <span property="dc:created" datatype="xsd:datetime" content="2007-09-16t16:00:00-05:00"> September 16th at 4pm </span> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 19 / 29

Changing the Subject RDFa about changes subject of contained rel and property annotations: <div about="http://.../foaf.rdf#me" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <p property="foaf:name">martin Giese</p> <p> Email: <a rel="foaf:mbox" href="mailto:mg@mail.no"> mg@mail.no</a></p> <p> Phone: <a rel="foaf:phone" href="tel:+47-31415926"> 31 41 59 26</a></p> </div> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 20 / 29

Changing the Subject RDFa about changes subject of contained rel and property annotations: <div about="http://.../foaf.rdf#me" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <p property="foaf:name">martin Giese</p> <p> Email: <a rel="foaf:mbox" href="mailto:mg@mail.no"> mg@mail.no</a></p> <p> Phone: <a rel="foaf:phone" href="tel:+47-31415926"> 31 41 59 26</a></p> </div> Extracted triples: <http://.../foaf.rdf#me> foaf:name "Martin Giese" ; foaf:mbox <mailto:mg@mail.no> ; foaf:phone <tel:+47-31415926>. INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 20 / 29

Types and Blank Nodes RDFa typeof adds an rdf:type triple INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 21 / 29

RDFa Types and Blank Nodes typeof adds an rdf:type triple Missing URIs can lead to blank nodes: <div typeof="foaf:person" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <p property="foaf:name">martin Giese</p> <p> Email: <a rel="foaf:mbox" href="mailto:mg@mail.no"> mg@mail.no</a></p> </div> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 21 / 29

RDFa Types and Blank Nodes typeof adds an rdf:type triple Missing URIs can lead to blank nodes: <div typeof="foaf:person" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <p property="foaf:name">martin Giese</p> <p> Email: <a rel="foaf:mbox" href="mailto:mg@mail.no"> mg@mail.no</a></p> </div> Extracted triples: [] a foaf:person ; foaf:name "Martin Giese" ; foaf:mbox <mailto:mg@mail.no> ; INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 21 / 29

Know Your Friends RDFa Missing objects collected from contained elements (chaining): <div xmlns:foaf="http://xmlns.com/foaf/0.1/" about="foaf.rdf#me" rel="foaf:knows"> <ul> <li typeof="foaf:person"> <a property="foaf:name" rel="foaf:homepage" href="http://www.kjetil.kjernsmo.net/">kjetil</a> </li> <li typeof="foaf:person"> <a property="foaf:name" rel="foaf:homepage" href="http://heim.ifi.uio.no/martige/">martin</a> </li> </ul> </div> INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 22 / 29

RDFa Triples From Chaining Example http:/...kjernsmo.net/ foaf:homepage foaf:knows foaf:name rdf:type Kjetil foaf.rdf#me foaf:knows rdf:type foaf:person foaf:name foaf:homepage Martin http:/.../martige/ INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 23 / 29

RDFa Summary RDFa Allows to hide an RDF graph in an XHTML document INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29

RDFa Summary RDFa Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29

RDFa Summary RDFa Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29

RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29

RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29

RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29

RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML See spec. at http://www.w3.org/tr/rdfa-syntax/ INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29

RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML See spec. at http://www.w3.org/tr/rdfa-syntax/ Nothing you couldn t do with a LINK and an RDF file INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29

RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML See spec. at http://www.w3.org/tr/rdfa-syntax/ Nothing you couldn t do with a LINK and an RDF file Can be convenient to have information in one place INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29

RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML See spec. at http://www.w3.org/tr/rdfa-syntax/ Nothing you couldn t do with a LINK and an RDF file Can be convenient to have information in one place Used by Google as one data format for Rich Snippets https://developers.google.com/structured-data/ INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29

RDFa RDFa Summary Allows to hide an RDF graph in an XHTML document XHTML processor can ignore RDFa RDFa processor can extract RDF graph Treat links and text as subjects/objects and literals Many, many more details! Specification hardly less complicated than RDF/XML See spec. at http://www.w3.org/tr/rdfa-syntax/ Nothing you couldn t do with a LINK and an RDF file Can be convenient to have information in one place Used by Google as one data format for Rich Snippets https://developers.google.com/structured-data/ NOTE: this lecture was about RDFa 1.0. Search the web for RDFa 1.1! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 24 / 29

Outline Conclusion 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 25 / 29

Topics Covered Conclusion RDF, principles, Turtle syntax INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29

Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29

Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF The SPARQL Query Language INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29

Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF The SPARQL Query Language Basics of the RDFS and OWL ontology languages INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29

Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF The SPARQL Query Language Basics of the RDFS and OWL ontology languages Basics of model semantics and reasoning INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29

Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF The SPARQL Query Language Basics of the RDFS and OWL ontology languages Basics of model semantics and reasoning Linked Open Data, RDFa INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29

Conclusion Topics Covered RDF, principles, Turtle syntax The Jena API for RDF The SPARQL Query Language Basics of the RDFS and OWL ontology languages Basics of model semantics and reasoning Linked Open Data, RDFa Publishing Databases as RDF INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 26 / 29

Topics Not Covered Conclusion Rule Languages (SWRL, RIF, Jena rules, etc.) INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29

Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29

Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29

Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29

Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics Some details of OWL INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29

Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics Some details of OWL Details of OWL 2 profiles INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29

Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics Some details of OWL Details of OWL 2 profiles Logical theory: Soundness, Completeness,... INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29

Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics Some details of OWL Details of OWL 2 profiles Logical theory: Soundness, Completeness,... (You ain t seen nothing yet :-) INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29

Conclusion Topics Not Covered Rule Languages (SWRL, RIF, Jena rules, etc.) SW application structures Semantic Web Services Details of RDF/RDFS model semantics Some details of OWL Details of OWL 2 profiles Logical theory: Soundness, Completeness,... (You ain t seen nothing yet :-) And many more! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 27 / 29

Help! I Can t Get Enough! Conclusion For more information on theory: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29

Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29

Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29

Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29

Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: Book on Semantic Web Programming INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29

Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: Book on Semantic Web Programming Standards texts on W3C Web pages INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29

Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: Book on Semantic Web Programming Standards texts on W3C Web pages Google INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29

Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: Book on Semantic Web Programming Standards texts on W3C Web pages Google Still not enough? INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29

Help! I Can t Get Enough! Conclusion For more information on theory: Book on Foundations of SW Technologies Take a course in logic or automated reasoning For more information on practical questions: Book on Semantic Web Programming Standards texts on W3C Web pages Google Still not enough? Contact us for possible MSc topics! INF3580/4580 :: Spring 2015 Lecture 15 :: 11th May 28 / 29