Upgrade to Pro — share decks privately, control downloads, hide ads and more …

lobid: LOD-Dienst und Web-API

lobid
March 11, 2014

lobid: LOD-Dienst und Web-API

Presentation by Adrian Pohl at Köln API Meeting, 2014-03-11.

lobid

March 11, 2014
Tweet

More Decks by lobid

Other Decks in Technology

Transcript

  1. lobid:
    LOD-Dienst und Web-API
    Köln-API-Treffen. Köln, 11.03.2014.
    Adrian Pohl

    View Slide

  2. Struktur
    2
    Pohl: lobid - LOD-Dienst und Web-API
    1. Hintergrund
    2. Web-APIs
    3. JSON-LD to the Rescue
    4. lobid-API
    5. Demo

    View Slide

  3. 1. Hintergrund
    3

    View Slide

  4. Das hbz
    4
    „Hochschulbibliothekszentrum des Landes
    Nordrhein-Westfalen“
    Gegründet 1973
    Dem Ministerium für Innovation, Wissenschaft und
    Forschung zugeordnet
    Sitz in Köln
    Dienstleistungen für Bibliotheken (hauptsächlich
    aus NRW)
    Produkte: Verbunddatenbank, Fernleihe, DigiBib,
    Konsortiale Erwerbung, lobid, ...
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  5. Linked Open Data (LOD)
    5
    Grundidee: Interoperabilität durch gemeinsames,
    flexibles Datenmodell und einheitliche Identifier
    Datenmodell: Subjekt-Prädikat-Objekt, z. B.:
    .
    HTTP-URIs als Identifier für Subjekt, Prädikat und
    (optional) Objekt:


    .
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  6. Ziele
    6
    Pohl: lobid - LOD-Dienst und Web-API
    Warum Bibliotheksdaten als LOD bereitstellen?
    Vernetzung von Bibliotheksinformationen
    Indexierung und Auffindbarkeit (z. B. durch Google)
    Interoperabilität
    Einfache Wiederverwendung
    das alles: durch Verwendung von Web-Standards

    View Slide

  7. Problem
    7
    "Semantic Web"-Community sehr akademisch
    "Linked Open Data" sollte das ändern, was nur
    bedingt geklappt hat → für viele ist LOD nicht
    interessant
    Aber: Web 2.0 und Web-APIs sind erfolgreich
    Um APIs entsteht App-Ökosystem
    Nutzung von APIs ist Normalität für Webentwickler
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  8. 2. Web-APIs
    8

    View Slide

  9. (Web-)APIs
    9
    API = "Application Programming Interface"
    Programmierschnittstelle für andere
    Anwendungsentwickler
    Web-APIS:
    HTTP-basiert, d. h. Zugriff mittels HTTP-Methoden (GET, PUT,
    POST, DELETE)
    liefern JSON und/oder XML
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  10. API: Motivation
    10
    APIs sind ein essentieller Bestandteil von
    wiederverwendbaren Modulen
    Module kommunizieren über API, kennen keine
    Implementierungsdetails
    Implementierung so austauschbar und veränderbar
    – ohne dass alle API-Clients (=Anwendungen)
    angepasst werden müssen
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  11. Beispiel-Anfrage: github-API
    11
    GET https://api.github.com/users/acka47
    Antwort (JSON):
    {
    "login": "acka47",
    "id": 160292,
    "url": "https://api.github.com/users/acka47",
    "name": "Adrian Pohl",
    "company": "hbz",
    "blog": "http://www.uebertext.org",
    "created_at": "2009­12­01T10:29:19Z",
    "updated_at": "2013­10­09T09:41:07Z"
    }
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  12. LOD vs. Web-APIs
    12
    Pohl: lobid - LOD-Dienst und Web-API
    LOD Web-APIs

    HTTP-URIs für Dinge & ihre
    Beschreibungen

    RDF

    SPARQL

    URLs für Ressourcen &
    Repräsentation

    JSON und/oder XML

    HTTP-Methoden mit
    URL-Parametern

    View Slide

  13. 3. JSON-LD to the Rescue
    13

    View Slide

  14. 14
    {
    "login": "acka47",
    "id": 160292,
    "url": "https://api.github.com/users/acka47",
    "name": "Adrian Pohl",
    "company": "hbz",
    "blog": "http://www.uebertext.org"
    }

    View Slide

  15. 15
    {
    "@context":
    {
    "login": "http://xmlns.com/foaf/0.1/nick",
    "id": "http://purl.org/dc/terms/identifier",
    "url":
    {
    "@id": "http://xmlns.com/foaf/0.1/page",
    "@type": "@id"
    },
    "name": "http://xmlns.com/foaf/0.1/name",
    "company": "http://www.w3.org/ns/org#memberOf",
    "blog":
    {
    "@id": "http://xmlns.com/foaf/0.1/weblog",
    "@type": "@id"
    },
    "email": "http://xmlns.com/foaf/0.1/mbox"
    },
    "login": "acka47",
    "id": 160292,
    "url": "https://api.github.com/users/acka47",
    "name": "Adrian Pohl",
    "company": "hbz",
    "blog": "http://www.uebertext.org"
    }

    View Slide

  16. 16
    {
    "@context":
    {
    "login": "http://xmlns.com/foaf/0.1/nick",
    "id": "http://purl.org/dc/terms/identifier",
    "url":
    {
    "@id": "http://xmlns.com/foaf/0.1/page",
    "@type": "@id"
    },
    "name": "http://xmlns.com/foaf/0.1/name",
    "company": "http://www.w3.org/ns/org#memberOf",
    "blog":
    {
    "@id": "http://xmlns.com/foaf/0.1/weblog",
    "@type": "@id"
    },
    "email": "http://xmlns.com/foaf/0.1/mbox"
    },
    "login": "acka47",
    "id": 160292,
    "url": "https://api.github.com/users/acka47",
    "name": "Adrian Pohl",
    "company": "hbz",
    "blog": "http://www.uebertext.org"
    }

    View Slide

  17. JSON-LD-Kontext
    17
    {
    "@context":
    {
    "login": "http://xmlns.com/foaf/0.1/nick",
    "id": "http://purl.org/dc/terms/identifier",
    "url":
    {
    "@id": "http://xmlns.com/foaf/0.1/page",
    "@type": "@id"
    },
    "name": "http://xmlns.com/foaf/0.1/name",
    "company": "http://www.w3.org/ns/org#memberOf",
    "blog":
    {
    "@id": "http://xmlns.com/foaf/0.1/weblog",
    "@type": "@id"
    },
    }
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  18. JSON-LD > Turtle
    18
    @prefix foaf: .
    []
    160292 ;
    "hbz" ;
    foaf:name "Adrian Pohl" ;
    foaf:nick "acka47" ;
    foaf:page ;
    foaf:weblog .
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  19. JSON-LD > Turtle
    19
    @prefix foaf: .
    []
    160292 ;
    "hbz" ;
    foaf:name "Adrian Pohl" ;
    foaf:nick "acka47" ;
    foaf:page ;
    foaf:weblog .
    Pohl: lobid - LOD-Dienst und Web-API
    Kein URI

    View Slide

  20. API + JSON-LD = Linked Data
    20
    JSON-LD: RDF in JSON serialisieren
    Web-Entwickler können damit sofort etwas
    anfangen
    Bestehende Daten können relativ einfach in Linked
    Data überführt werden:
    URIs prägen, z.B. https://api.github.com/users/acka47#thing
    JSON-LD-Kontext ergänzen
    Vorteil: JSON-LD-Kontext ermöglicht Abstraktion von
    konkreter RDF-Modellierung
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  21. 4. lobid-API
    21

    View Slide

  22. lobid
    22
    lobid.org: LOD-Dienst des hbz, seit 2010 ('linking
    open bibliographic data')
    Titeldaten, Organisationsdaten, Normdaten
    (Schlagwörter, Personen etc.)
    Zunächst: Dumps & Triple Store
    Verschiedene Probleme & neue Anforderungen (z.
    B. Auto-Suggest für Normdaten) → ab 2012 neues
    Backend entwickelt
    Seit November 2013 ist lobid-API produktiv
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  23. API anstatt und Triple Store
    23
    Triple-Store als API? - Triple-Store cool, aber als API
    problematisch (z.B. Performance)
    Wegen Performance (z.B. Auto-Suggest) anderer
    Ansatz: Suchmaschinentechnologie – aber:
    Suchmaschine als API?
    API unabhängig von Implementierung! API als
    stabile Abstraktion über Daten!
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  24. API-Anfragen
    24
    GET /resource?id=0940450003
    GET /resource?name=Faust
    GET /organisation?id=DE­832
    GET /organisation?name=fachhochschule+köln
    GET /person?id=118580604
    GET /person?name=loki+schmidt
    GET /resource?author=118580604
    GET /resource?subject=4414195­6
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  25. API-Antworten
    25
    GET /person?name=Loki+Schmidt&format=full
    [{
    "@id": "http://d­nb.info/gnd/118836617",
    "gnd:preferredNameForThePerson": "Schmidt, Hannelore",
    "gnd:variantNameForThePerson“: [
    "Glaser, Hannelore",
    "Schmidt, Loki"
    ],
    "gnd:dateOfBirth" : ”1919”,
    "gnd:dateOfDeath": ”2010”,
    ...
    }]
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  26. Implementierung I
    26
    Was rauskommt: JSON-LD über HTTP sowie auch
    andere RDF-Serialisierungen
    Hinter API andere Implementierungen denkbar,
    auch z.B. mit Triple Store
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  27. Implementierung II
    27
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  28. Live-Demonstration
    28
    http://lobid.org/api
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  29. Danke.
    Fragen?
    Gerne jetzt oder auch später an
    [email protected] oder @lobidOrg.
    29

    View Slide

  30. Weiterführende Informationen
    30
    JSON-LD: http://json-ld.org/
    hbz-LOD-blog: https://wiki1.hbz-nrw.de/pages/viewrecentblogposts.action?key=SEM
    lobid-API-Dokumentation: http://lobid.org/api
    lobid-Code & Issues: https://github.com/lobid/
    Pohl: lobid - LOD-Dienst und Web-API

    View Slide

  31. Lizenz
    31
    Pohl: lobid - LOD-Dienst und Web-API
    Diese Folien stehen unter einer
    Creative-Commons-Lizenz:
    http://creativecommons.org/licenses/by/3.0/de/

    View Slide