Semantic Web
Application Architecture                                               DON WILLEMS
                           INTELLIGENT SYSTEMS ONTOLOGY LUNCH MEETING MAY 10TH 2011
based on:
Chapter 4 - Semantic Web Application Architecture
Semantic Web for the Working Ontologist
Dean Allemang and Jim Hendler
ISBN 978-0-12-373556-0
Application Architecture
Ontology Models are build so that they can be
used.

Used by applications that take advantage of
information distributed over the Web.

 We need to describe the structure of a Semantic
 Web Application

    The components

    The inputs
Parsers/Serialisers

Where do the triples come from?

   RDF files on the web (static or dynamic)

   Databases mapped to RDF

   Extracted from unstructured data (text)
Parsers
<rdf:Description rdf:about="http://www.example.com/books/Allemang:2008:SWW:1386668">
 <rdf:type rdf:resource="http://purl.org/ontology/bibo/Book"/>
 <dc:creator rdf:nodeID="lnode2011050917254739087"/>
 <dc:creator rdf:nodeID="lnode2011050917254739096"/>
 <bibo:authorList rdf:nodeID="lnode2011050917254739104"/>
 <dc:title>Semantic Web for the Working Ontologist: Effective Modeling in RDFS and OWL</ns0:title>
 <dc:date>2008-01-01</ns0:date>
 <dc:publisher rdf:nodeID="lnode2011050917254739117"/>
</rdf:Description>




  Transform RDF data
  into an application’s
  data model
Serialisers
   Reverse operation of
   the parser

   Transform an
   application’s data
   model into RDF


:Allemang2008SWW1386668 rdf:type          bibo:Book
               dc:creator     _:lnode2011050923341497724 ,
                          _:lnode2011050923341497734 ;
               bibo:authorList _:lnode2011050923341497742 ;
               dc:title     "Semantic Web for the Working Ontologist: Effective Modeling in RDFS
                           and OWL" ;
               dc:date       "2008-01-01" ;
               dc:publisher _:lnode2011050923341497755 .
Parsers/Serialisers
Round-trip possible

The same RDF (text) file is not guaranteed
Converters

 More data is available as (non-RDF) structured
 or tabular data.

   Databases

   Spreadsheets

 Needs a mapping to transform the data to the
 application’s data model (as triples).
Converters
@book{Allemang:2008:SWW:1386668,
  author = {Dean Allemang and James Hendler},
  title = {Semantic Web for the Working Ontologist: Effective Modeling in RDFS and OWL},
  year = {2008},
  isbn = {0123735564, 9780123735560},
  publisher = {Morgan Kaufmann Publishers Inc.},
  address = {San Francisco, CA, USA},
}
Scrapers

Another rich source are Web pages

Two approaches:

 Author has no knowledge or interest in
 providing structured data --> Scrapers

 Author provides marked up content
RDFa & microformats
A way to add structured information to
unstructured documents

    Microformats
      Uses a standard vocabulary to translate a webpage
      to RDF (using XSLT)

    RDFa (Resource Description Framework – in – attributes)
      Provides a way to add semantic attributes

      Parsers to extract RDF exist

    No impact on how a browser displays the page
Google rich snippets
Google rich snippets provide a way for web
developers to provide a small sample of content to
a Google Search Results page.

This content is provided by either Microformats or
RDFa




         http://googlewebmastercentral.blogspot.com/2009/05/introducing-rich-snippets.html
Google rich snippets


MICROFORMATS




                        RDFA
RDF Stores
A Database that stores RDF

 Sesame, ARC2 with MySQL, Jena, Virtuoso,
 Redland

 Uses a parser to import data

 Uses a serialiser to export data

 May also include a query engine
RDF Stores

Fundamentally includes a way to merge two
data sets

  Resources with the same URI are equivalent
  in the merged data set

Moving data from one store to another store
implementation is simple compared to
relational databases.
RDF Stores
      Subject                Predicate                 Object
 :Allemang2008SWW1386668        rdf:type                bibo:Book

 :Allemang2008SWW1386668       dc:creator      _:lnode2011050923341497724

 :Allemang2008SWW1386668       dc:creator      _:lnode2011050923341497734

 :Allemang2008SWW1386668     bibo:authorList   _:lnode2011050923341497742

                                               "Semantic Web for the Working
 :Allemang2008SWW1386668         dc:title
                                                   Ontologist: Effective...”

 :Allemang2008SWW1386668      dc:publisher     _:lnode2011050923341497755

 :Allemang2008SWW1386668        dc:date               "2008-01-01"

_:lnode2011050923341497755      rdf:type             foaf:Organization

_:lnode2011050923341497755   foaf:basedNear           "San Francisco"
SPARQL

RDF stores typically support a query language

SPARQL Query Language for RDF

RDF stores often provide a SPARQL endpoint

  A web application to access the database
  using SPARQL
SPARQL
:Allemang2008SWW1386668 rdf:type          bibo:Book
               dc:creator     _:lnode2011050923341497724 ,
                          _:lnode2011050923341497734 ;
               bibo:authorList _:lnode2011050923341497742 ;
               dc:title     "Semantic Web for the Working Ontologist: Effective Modeling in RDFS
                           and OWL" ;
               dc:date       "2008-01-01" ;
               dc:publisher _:lnode2011050923341497755 .

_:lnode2011051008072144635 rdf:type       foaf:Person ;
               foaf:familyName "Allemang" ;
               foaf:givenName "Dean" ;
               foaf:name     "Dean Allemang" .


_:lnode2011051008072144646 rdf:type       foaf:Person ;
               foaf:familyName "Hendler" ;
               foaf:givenName "James" ;
               foaf:name     "James Hendler" .

_:lnode2011051008072144653 rdf:type    rdf:List ;
               rdf:first  _:lnode2011051008072144635 ;
               rdf:rest  _:lnode2011051008072144657 .

_:lnode2011051008072144657 rdf:type    rdf:List ;
               rdf:first  _:lnode2011051008072144646 ;
               rdf:rest  <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

_:lnode2011051008072144666 rdf:type      ns2:Organization ;
               foaf:name     "Morgan Kaufmann Publishers Inc." ;
               foaf:basedNear "San Francisco" .
SPARQL

SPARQL Select query
?s rdf:type foaf:Person .
?s foaf:name ?name


Results
?s =   _:lnode2011051008072144635   ?name = "Dean Allemang"
?s =   _:lnode2011051008072144646   ?name = "James Hendler"
SPARQL
RDF Applications

 An RDF Applications may include
   RDF parsers, serialisers, scrapers, and
   converters and an RDF query engine.

 Application decides which resources need
 to be converted/scraped (diary entries in
 XML, list of addresses from a web page).
RDF Applications

 RDF Graphs are merged to produce a single
 federated graph (mash-ups)



 Easy federation is possible due to the
 merging capabilities of RDF
RDF Applications

 Examples:
  Calendar integration

  Map integration

  Annotations

  Content Management
Thank you!

Semantic web application architecture

  • 1.
    Semantic Web Application Architecture DON WILLEMS INTELLIGENT SYSTEMS ONTOLOGY LUNCH MEETING MAY 10TH 2011
  • 2.
    based on: Chapter 4- Semantic Web Application Architecture Semantic Web for the Working Ontologist Dean Allemang and Jim Hendler ISBN 978-0-12-373556-0
  • 3.
    Application Architecture Ontology Modelsare build so that they can be used. Used by applications that take advantage of information distributed over the Web. We need to describe the structure of a Semantic Web Application The components The inputs
  • 4.
    Parsers/Serialisers Where do thetriples come from? RDF files on the web (static or dynamic) Databases mapped to RDF Extracted from unstructured data (text)
  • 5.
    Parsers <rdf:Description rdf:about="http://www.example.com/books/Allemang:2008:SWW:1386668"> <rdf:typerdf:resource="http://purl.org/ontology/bibo/Book"/> <dc:creator rdf:nodeID="lnode2011050917254739087"/> <dc:creator rdf:nodeID="lnode2011050917254739096"/> <bibo:authorList rdf:nodeID="lnode2011050917254739104"/> <dc:title>Semantic Web for the Working Ontologist: Effective Modeling in RDFS and OWL</ns0:title> <dc:date>2008-01-01</ns0:date> <dc:publisher rdf:nodeID="lnode2011050917254739117"/> </rdf:Description> Transform RDF data into an application’s data model
  • 6.
    Serialisers Reverse operation of the parser Transform an application’s data model into RDF :Allemang2008SWW1386668 rdf:type bibo:Book dc:creator _:lnode2011050923341497724 , _:lnode2011050923341497734 ; bibo:authorList _:lnode2011050923341497742 ; dc:title "Semantic Web for the Working Ontologist: Effective Modeling in RDFS and OWL" ; dc:date "2008-01-01" ; dc:publisher _:lnode2011050923341497755 .
  • 7.
    Parsers/Serialisers Round-trip possible The sameRDF (text) file is not guaranteed
  • 8.
    Converters More datais available as (non-RDF) structured or tabular data. Databases Spreadsheets Needs a mapping to transform the data to the application’s data model (as triples).
  • 9.
    Converters @book{Allemang:2008:SWW:1386668, author= {Dean Allemang and James Hendler}, title = {Semantic Web for the Working Ontologist: Effective Modeling in RDFS and OWL}, year = {2008}, isbn = {0123735564, 9780123735560}, publisher = {Morgan Kaufmann Publishers Inc.}, address = {San Francisco, CA, USA}, }
  • 10.
    Scrapers Another rich sourceare Web pages Two approaches: Author has no knowledge or interest in providing structured data --> Scrapers Author provides marked up content
  • 11.
    RDFa & microformats Away to add structured information to unstructured documents Microformats Uses a standard vocabulary to translate a webpage to RDF (using XSLT) RDFa (Resource Description Framework – in – attributes) Provides a way to add semantic attributes Parsers to extract RDF exist No impact on how a browser displays the page
  • 12.
    Google rich snippets Googlerich snippets provide a way for web developers to provide a small sample of content to a Google Search Results page. This content is provided by either Microformats or RDFa http://googlewebmastercentral.blogspot.com/2009/05/introducing-rich-snippets.html
  • 13.
  • 14.
    RDF Stores A Databasethat stores RDF Sesame, ARC2 with MySQL, Jena, Virtuoso, Redland Uses a parser to import data Uses a serialiser to export data May also include a query engine
  • 15.
    RDF Stores Fundamentally includesa way to merge two data sets Resources with the same URI are equivalent in the merged data set Moving data from one store to another store implementation is simple compared to relational databases.
  • 16.
    RDF Stores Subject Predicate Object :Allemang2008SWW1386668 rdf:type bibo:Book :Allemang2008SWW1386668 dc:creator _:lnode2011050923341497724 :Allemang2008SWW1386668 dc:creator _:lnode2011050923341497734 :Allemang2008SWW1386668 bibo:authorList _:lnode2011050923341497742 "Semantic Web for the Working :Allemang2008SWW1386668 dc:title Ontologist: Effective...” :Allemang2008SWW1386668 dc:publisher _:lnode2011050923341497755 :Allemang2008SWW1386668 dc:date "2008-01-01" _:lnode2011050923341497755 rdf:type foaf:Organization _:lnode2011050923341497755 foaf:basedNear "San Francisco"
  • 17.
    SPARQL RDF stores typicallysupport a query language SPARQL Query Language for RDF RDF stores often provide a SPARQL endpoint A web application to access the database using SPARQL
  • 18.
    SPARQL :Allemang2008SWW1386668 rdf:type bibo:Book dc:creator _:lnode2011050923341497724 , _:lnode2011050923341497734 ; bibo:authorList _:lnode2011050923341497742 ; dc:title "Semantic Web for the Working Ontologist: Effective Modeling in RDFS and OWL" ; dc:date "2008-01-01" ; dc:publisher _:lnode2011050923341497755 . _:lnode2011051008072144635 rdf:type foaf:Person ; foaf:familyName "Allemang" ; foaf:givenName "Dean" ; foaf:name "Dean Allemang" . _:lnode2011051008072144646 rdf:type foaf:Person ; foaf:familyName "Hendler" ; foaf:givenName "James" ; foaf:name "James Hendler" . _:lnode2011051008072144653 rdf:type rdf:List ; rdf:first _:lnode2011051008072144635 ; rdf:rest _:lnode2011051008072144657 . _:lnode2011051008072144657 rdf:type rdf:List ; rdf:first _:lnode2011051008072144646 ; rdf:rest <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> . _:lnode2011051008072144666 rdf:type ns2:Organization ; foaf:name "Morgan Kaufmann Publishers Inc." ; foaf:basedNear "San Francisco" .
  • 19.
    SPARQL SPARQL Select query ?srdf:type foaf:Person . ?s foaf:name ?name Results ?s = _:lnode2011051008072144635 ?name = "Dean Allemang" ?s = _:lnode2011051008072144646 ?name = "James Hendler"
  • 20.
  • 21.
    RDF Applications AnRDF Applications may include RDF parsers, serialisers, scrapers, and converters and an RDF query engine. Application decides which resources need to be converted/scraped (diary entries in XML, list of addresses from a web page).
  • 22.
    RDF Applications RDFGraphs are merged to produce a single federated graph (mash-ups) Easy federation is possible due to the merging capabilities of RDF
  • 23.
    RDF Applications Examples: Calendar integration Map integration Annotations Content Management
  • 24.