Introduction



Semantic Web
      &
 Linked Data
Resource Description Framework
●   W3C standard since 1999
●   Graph data model
●   Triples (graph elements)
    ●   Subject: resource URI
    ●   Property: resource URI
    ●   Object: resource URI or literal value
●   Multiple syntaxes
●   Stored in triplestores
●   SPARQL query language
Triples/Quads
Graph         Subject           Property            Object
        http://www.w3.org/ http://www.w3.org/ http://www.w3.org/
        People/EM/contact# 1999/02/22-rdf-    2000/10/swap/pim/c
        me                 syntax-ns#type     ontact#Person
        http://www.w3.org/ http://www.w3.org/ "Eric Miller"
        People/EM/contact# 2000/10/swap/pim/c
        me                 ontact#fullName
        http://www.w3.org/ http://www.w3.org/ mailto:em@w3.org
        People/EM/contact# 2000/10/swap/pim/c
        me                 ontact#mailbox
        http://www.w3.org/ http://www.w3.org/ "Dr."
        People/EM/contact# 2000/10/swap/pim/c
        me                 ontact#personalTit
                           le

Example from RDF Primer
RDF graph
Multiple syntaxes
●   RDF/XML (the only W3C standard so far)
●   Plain text
    ●   Turtle (soon W3C standard)
    ●   N-Triples
    ● Notation3
●   Namespaces is a shorthand mechanism
    ●   foo: http://example.org/somewhere/
    ●   ex: http://example.org/somewhere/
    ●   foo:bar = http://example.org/somewhere/bar
    ●   foo:bar == ex:bar
RDF/XML syntax
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#">
  <contact:Person rdf:about="
http://www.w3.org/People/EM/contact#me">
    <contact:fullName>Eric Miller</contact:fullName>
    <contact:mailbox rdf:resource="mailto:em@w3.org"/>
    <contact:personalTitle>Dr.</contact:personalTitle>
 </contact:Person>
</rdf:RDF>
Turtle syntax
@prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#> .


<http://www.w3.org/People/EM/contact#me> a contact:Person ;
    contact:fullName "Eric Miller" ;
    contact:mailbox <mailto:em@w3.org> ;
    contact:personalTitle "Dr." .
OWL (Web Ontology Language)
●   Based on formal semantics
    ●   Enables inference (reasoning)
●   Open world assumption
    ●   Unknown is not false but undefined
●   Builds on RDF Schema
    ●   Class (set of individuals)
    ●   Property
        –   Datatype
        –   Object
    ●   Instance (individual)
Ontologies
●   Established, reusable vocabularies/schemas
    ●   DublinCore: basic metadata
    ●   FOAF: person and contact information
    ●   SIOC: social media descriptions
    ●   GoodRelations: e-commerce
SPARQL: RDF query language
●   RDF graph pattern matching
●   The only standard NoSQL query language
●   SPARQL forms        ●   SPARQL Update forms
    ●   SELECT              ●   INSERT DATA
    ●   ASK                 ●   DELETE DATA
    ●   DESCRIBE            ●   INSERT/DELETE
    ●   CONSTRUCT           ●   LOAD
                            ●   CLEAR
SPARQL example
PREFIX contact: <http://www.w3.org/2000/10/swap/pim/contact#>
SELECT *
{ ?person contact:mailbox ?mbox }




                ?person                            ?mbox
http://www.w3.org/People/EM/contact#me   mailto:em@w3.org
RDF & SPARQL tools
●   Frameworks
    ●   Apache Jena
    ●   Sesame
●   Triplestores
    ●   Dydra (cloud)
    ●   Stardog
    ●   Virtuoso
    ●   BigData
Linked Data
●   Linked Data = RDF + REST
●   Linked Data platform (soon W3C standard)
    ●   Item resources and container resources
    ●   Implement HTTP methods
    ●   Accept and return RDF descriptions
●   Uniform generic web API
●   The only global data integration approach
Linked Data usage
●   Open datasources
    ●   DBPedia
    ●   Linked Life Data
    ●   UK Open Data
●   In companies
    ●   BBC: Semantic Publishing
    ●   IBM: Linked Data Basic Profile 1.0
Further reading
●   RDF Primer
●   OWL 2 Web Ontology Language Primer
●   SPARQL by Example
●   Learning SPARQL
●   Linked Data: Evolving the Web into a Global Data S
Graphity
●   Generic open-source Linked Data platform
    ●   Independent from domain models and datasources
●   Architecture
    ●   Model: pure RDF, no object model (above RDF API)
        –   Generated SPARQL queries load RDF from triplestore
    ●   View
        –   XSLT transforms RDF/XML to XHTML
    ●   Controller
        –   JAX-RS web application matches requests, queries &
            transforms
Thanks. Questions?
●   Martynas Jusevičius
●   Vilnius/Copenhagen
●   martynas@graphity.org
●   @pumba_lt

Semantic Web introduction

  • 1.
  • 2.
    Resource Description Framework ● W3C standard since 1999 ● Graph data model ● Triples (graph elements) ● Subject: resource URI ● Property: resource URI ● Object: resource URI or literal value ● Multiple syntaxes ● Stored in triplestores ● SPARQL query language
  • 3.
    Triples/Quads Graph Subject Property Object http://www.w3.org/ http://www.w3.org/ http://www.w3.org/ People/EM/contact# 1999/02/22-rdf- 2000/10/swap/pim/c me syntax-ns#type ontact#Person http://www.w3.org/ http://www.w3.org/ "Eric Miller" People/EM/contact# 2000/10/swap/pim/c me ontact#fullName http://www.w3.org/ http://www.w3.org/ mailto:[email protected] People/EM/contact# 2000/10/swap/pim/c me ontact#mailbox http://www.w3.org/ http://www.w3.org/ "Dr." People/EM/contact# 2000/10/swap/pim/c me ontact#personalTit le Example from RDF Primer
  • 4.
  • 5.
    Multiple syntaxes ● RDF/XML (the only W3C standard so far) ● Plain text ● Turtle (soon W3C standard) ● N-Triples ● Notation3 ● Namespaces is a shorthand mechanism ● foo: http://example.org/somewhere/ ● ex: http://example.org/somewhere/ ● foo:bar = http://example.org/somewhere/bar ● foo:bar == ex:bar
  • 6.
    RDF/XML syntax <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#"> <contact:Person rdf:about=" http://www.w3.org/People/EM/contact#me"> <contact:fullName>Eric Miller</contact:fullName> <contact:mailbox rdf:resource="mailto:[email protected]"/> <contact:personalTitle>Dr.</contact:personalTitle> </contact:Person> </rdf:RDF>
  • 7.
    Turtle syntax @prefix contact:<http://www.w3.org/2000/10/swap/pim/contact#> . <http://www.w3.org/People/EM/contact#me> a contact:Person ; contact:fullName "Eric Miller" ; contact:mailbox <mailto:[email protected]> ; contact:personalTitle "Dr." .
  • 8.
    OWL (Web OntologyLanguage) ● Based on formal semantics ● Enables inference (reasoning) ● Open world assumption ● Unknown is not false but undefined ● Builds on RDF Schema ● Class (set of individuals) ● Property – Datatype – Object ● Instance (individual)
  • 9.
    Ontologies ● Established, reusable vocabularies/schemas ● DublinCore: basic metadata ● FOAF: person and contact information ● SIOC: social media descriptions ● GoodRelations: e-commerce
  • 10.
    SPARQL: RDF querylanguage ● RDF graph pattern matching ● The only standard NoSQL query language ● SPARQL forms ● SPARQL Update forms ● SELECT ● INSERT DATA ● ASK ● DELETE DATA ● DESCRIBE ● INSERT/DELETE ● CONSTRUCT ● LOAD ● CLEAR
  • 11.
    SPARQL example PREFIX contact:<http://www.w3.org/2000/10/swap/pim/contact#> SELECT * { ?person contact:mailbox ?mbox } ?person ?mbox http://www.w3.org/People/EM/contact#me mailto:[email protected]
  • 12.
    RDF & SPARQLtools ● Frameworks ● Apache Jena ● Sesame ● Triplestores ● Dydra (cloud) ● Stardog ● Virtuoso ● BigData
  • 13.
    Linked Data ● Linked Data = RDF + REST ● Linked Data platform (soon W3C standard) ● Item resources and container resources ● Implement HTTP methods ● Accept and return RDF descriptions ● Uniform generic web API ● The only global data integration approach
  • 14.
    Linked Data usage ● Open datasources ● DBPedia ● Linked Life Data ● UK Open Data ● In companies ● BBC: Semantic Publishing ● IBM: Linked Data Basic Profile 1.0
  • 15.
    Further reading ● RDF Primer ● OWL 2 Web Ontology Language Primer ● SPARQL by Example ● Learning SPARQL ● Linked Data: Evolving the Web into a Global Data S
  • 16.
    Graphity ● Generic open-source Linked Data platform ● Independent from domain models and datasources ● Architecture ● Model: pure RDF, no object model (above RDF API) – Generated SPARQL queries load RDF from triplestore ● View – XSLT transforms RDF/XML to XHTML ● Controller – JAX-RS web application matches requests, queries & transforms
  • 17.
    Thanks. Questions? ● Martynas Jusevičius ● Vilnius/Copenhagen ● [email protected] ● @pumba_lt