Share
Embed
lobid: LOD-Dienst und Web-API
Presentation by Adrian Pohl at Köln API Meeting, 2014-03-11.
lobid
March 11, 2014
Transcript
31 slides
-
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 -
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 -
Linked Open Data (LOD) 5 Grundidee: Interoperabilität durch gemeinsames, flexibles
Datenmodell und einheitliche Identifier Datenmodell: Subjekt-Prädikat-Objekt, z. B.: <Faust> <geschrieben von> <Goethe> . HTTP-URIs als Identifier für Subjekt, Prädikat und (optional) Objekt: <http://lobid.org/resource/HT010460356> <http://purl.org/dc/terms/creator> <http://d-nb.info/gnd/118540238> . Pohl: lobid - LOD-Dienst und Web-API -
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 -
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 -
(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 -
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 -
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": "20091201T10:29:19Z", "updated_at": "20131009T09:41:07Z" } Pohl: lobid - LOD-Dienst und Web-API -
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 -
14 { "login": "acka47", "id": 160292, "url": "https://api.github.com/users/acka47", "name": "Adrian
Pohl", "company": "hbz", "blog": "http://www.uebertext.org" } -
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" } -
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" } -
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 -
JSON-LD > Turtle 18 @prefix foaf: <http://xmlns.com/foaf/0.1/> . [] <http://purl.org/dc/terms/identifier>
160292 ; <http://www.w3.org/ns/org#memberOf> "hbz" ; foaf:name "Adrian Pohl" ; foaf:nick "acka47" ; foaf:page <https://api.github.com/users/acka47> ; foaf:weblog <http://www.uebertext.org> . Pohl: lobid - LOD-Dienst und Web-API -
JSON-LD > Turtle 19 @prefix foaf: <http://xmlns.com/foaf/0.1/> . [] <http://purl.org/dc/terms/identifier>
160292 ; <http://www.w3.org/ns/org#memberOf> "hbz" ; foaf:name "Adrian Pohl" ; foaf:nick "acka47" ; foaf:page <https://api.github.com/users/acka47> ; foaf:weblog <http://www.uebertext.org> . Pohl: lobid - LOD-Dienst und Web-API Kein URI -
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 -
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 -
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 -
API-Anfragen 24 GET /resource?id=0940450003 GET /resource?name=Faust GET /organisation?id=DE832 GET /organisation?name=fachhochschule+köln
GET /person?id=118580604 GET /person?name=loki+schmidt GET /resource?author=118580604 GET /resource?subject=44141956 Pohl: lobid - LOD-Dienst und Web-API -
API-Antworten 25 GET /person?name=Loki+Schmidt&format=full [{ "@id": "http://dnb.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 -
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 -
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 -
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/