Transcript
Page 1: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Bibliotheksdatenpublikation und Linked Data

Lars G. Svensson

1

Page 2: Bibliotheksdatenpublikation und linked data

Wenn jemand nach Information sucht, geht er heute nicht in die Bibliothek

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 20142

Page 3: Bibliotheksdatenpublikation und linked data

Die Daten, die Bibliotheken erstellen, können aber helfen, die Suche effizienter zu machen

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 20143

Da ist es.

WOW!

Ph

oto

by W

en

dt

Com

mon

s (C

C B

Y):

htt

p:/

/ww

w.fl

ickr

.com

/ph

oto

s/w

en

dt-

libra

ry/5

19

09

02

31

6/

Page 4: Bibliotheksdatenpublikation und linked data

Außerhalb von Bibliotheken versteht man unsere Datenformate nicht…

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 20144

MARC 21

MAB 2

Z39.50ISBD

UNIMARC

FRBR

htt

p:/

/farm

1.s

tati

c.flic

kr.c

om

/15

9/3

42

22

04

23

_55

8ea7

03

f6_b

.jp

g

Page 5: Bibliotheksdatenpublikation und linked data

Dabei sollte es einfach sein, Bibliotheksdaten zu benutzen

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 20145

Photo

by K

IUI S

taff

(C

C B

Y):

htt

p:/

/ww

w.fl

ickr.co

m/p

hoto

s/kiu

i/3

69

38

23

00

5/

Library data

Otherdata

Somedata

Page 6: Bibliotheksdatenpublikation und linked data

Linked Library Data ist ein guter Anfang

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 20146

Lin

kin

g O

pen

Data

clo

ud

dia

gra

m,

by R

ich

ard

Cyg

an

iak

an

d A

nja

Jen

tzsc

h.

htt

p:/

/lod

-clo

ud

.net/

Page 7: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 20147

Das Semantic Web hat ein einfaches Datenmodell: RDF (Resource Description Framework)

http://d-nb.info/990075621

“Stolz und Vorurteil :Roman ”

Subjekt

Prädikat

Objekt

hatTitel

Page 8: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 20148

Das Semantic Web hat ein einfaches Datenmodell: RDF

http://d-nb.info/990075621

“Stolz und Vorurteil :Roman ”

http://d-nb.info/gnd/118505173

Subjekt

Prädikat

Objekt

Subjekt

Prädikat

Objekt

hatAutor

hatTitel

Page 9: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 20149

Das Semantic Web hat ein einfaches Datenmodell: RDF

http://d-nb.info/990075621

“Stolz und Vorurteil :Roman”

http://d-nb.info/gnd/118505173

“Austen, Jane”

Subjekt

Prädikat

Objekt

Subjekt

Prädikat

Objekt

Subjekt

Prädikat

Objekt

hatAutor

hatTitel

hatName

Page 10: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201410

Vokabulare definieren Klassen von Ressourcen und Relationen zwischen ihnen

http://d-nb.info/990075621

“Stolz und Vorurteil :Roman”

http://d-nb.info/gnd/118505173

“Austen, Jane”

hatAutor

hatTitel

hatName

bibo:Book

dc:creator

dc:title

foaf:name

foaf:Person

rdf:type

rdf:type

Page 11: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201411

In RDF müssen alle Ressourcen in Subjekt- und Prädikatposition eindeutige Identifiers haben

http://d-nb.info/990075621

“Stolz und Vorurteil :Roman”

http://d-nb.info/gnd/118505173

“Austen, Jane”

hatAutor

hatTitel

hatName

bibo:Book

dc:creator

dc:title

foaf:name

foaf:Person

rdf:type

rdf:type

Page 12: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201412

Eindeutige Identifiers sorgen dafür, dass wir wissen, worüber wir reden

– Wir wollen alles identifizieren können

– Objekte/Ressourcen müssen global identifizierbar sein

– Identifiers müssen zur generischen URI-Syntax kompatibel sein- http-URIs (http://d-nb.info/gnd/118915185)

- URNs (urn:nbn:de:bvb:20-opus-23317)

- Mailto (mailto:[email protected])

– An verschiedenen Typen von Identifiers hängen unterschiedliche Erwartungen- Persistenz der Ressource

- Auflösbarkeit

Page 13: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201413

Wenn zwei Sachen den gleichen Namen haben, aber unterschiedliche URIs, können wir sie unterscheiden

Titel- Dokumenttitel (dc:title)- Persönlicher Titel (foaf:title)- Akademischer Titel (gndo:academicDegree)- Kurstitel (crsw:has-title)- …

Page 14: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

– dc:title vs. http://purl.org/dc/elements/1.1/title

– foaf:title vs. http://xmlns.com/foaf/0.1/title

– gndo:academicDegree vs. http://d-nb.info/standards/elementset/gnd#academicDegree

– crsw:has-title vs. http://courseware.rkbexplorer.com/ontologies/courseware#has-title

dc, foaf, gndo und crsw sind Präfixe (prefixes), nachzuschlagen bei z. B. http://prefix.cc

something:like-this nennt man CURIE (compact URI)

14

URIs können unterschiedlich aussehen

Page 15: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201415

RDFS und OWL erlauben es, Typen und Beziehungen näher zu spezifizieren und somit die Sachen, für die wir uns interessieren, zu beschreiben

• Bücher• Autoren• (Verlags-)Orte• Verlage• Herausgeber• Themen• …

Page 16: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201416

Ähnlich wie bei der Katalogisierung betrachten wir zunächst sog. Individuen

Frankfurt am Main

Stolz und Vorurteil

Jane Austen

Hermann Hesse

Berlin

Suhrkamp

Das Glasperlen-

spiel

schrieb

veröffentlichte

hat Sitz in

Fischer

hat Sitz in

verö

ffent

licht

eschrieb

Page 17: Bibliotheksdatenpublikation und linked data

Als nächstes finden wir Gemeinsamkeiten

Frankfurt am Main

Stolz und Vorurteil

Jane Austen

Hermann Hesse

Berlin

Suhrkamp

Das Glasperlen-

spiel

schrieb

veröffentlichte

hat Sitz in

Fischer

hat Sitz in

verö

ffent

licht

eschrieb

Page 18: Bibliotheksdatenpublikation und linked data

Individuen, die Gemeinsamkeitenhaben, gehören zu derselben Klasse

Frankfurt am Main

Stolz und Vorurteil

Jane Austen

Hermann Hesse

Berlin

Suhrkamp

Das Glasperlen-

spiel

schrieb

veröffentlichte

hat Sitz in

Fischer

hat Sitz in

verö

ffent

licht

eschrieb

Veröffent-licher

Ort

Schreiber

Page 19: Bibliotheksdatenpublikation und linked data

19

Es gibt aber verschiedene Arten von Publikationen

Stolz und Vorurteil

Das Glasperlen-

spiel

Roman

Die Stadt

Kurzge-schicht

e

Erzählung

owl:subclassOfowl:subclassOf

rdf:type rdf:type rdf:type

owl:Class

rdf:type

Hermann Hesse

dct:creator

Page 20: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Und verschiedene Arten von z. B. Namen

20

Das Glasperlen-

spielDie Stadt

Hermann Hesse

„Das Glasperlenspiel“

„Hermann Hesse“

dc:title

gndo:preferredNameForThePerson

rdfs:label

foaf:name

Page 21: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Damit auch Computer RDF verstehen können, gibt es sog. Serialisierungen

• RDF/XML• Turtle• N-Triples• …

21

Page 22: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201422

Zurück zu Jane Austen…

http://d-nb.info/990075621

“Stolz und Vorurteil :Roman”

http://d-nb.info/gnd/118505173

“Austen, Jane”

hatAutor

hatTitel

hatName

bibo:Book

dct:creator

dc:title

foaf:name

foaf:Person

rdf:type

rdf:type

Page 23: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201423

Jane Austen in RDF/XML

<rdf:RDF xmlns:foaf=“http://xmlns.com/foaf/0.1/” xmlns:dc=“http://purl.org/dc/elements/1.1/” xmlns:dct=“http://purl.org/dc/terms/” xmlns:bibo=“http://purl.org/ontology/bibo/”>

<bibo:Book rdf:about=“http://d-nb.info/990075621”><dc:title>Stoltz und Vorurteil : Roman</dc:title> <dct:creator rdf:resource=“http://d-nb.info/gnd/118505173” />

</bibo:Book><foaf:Person rdf:about=“http://d-nb.info/gnd/118505173”>

<foaf:name>Jane Austen</foaf:name></foaf:Person></rdf:RDF>

Page 24: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Jane Austen in Turtle

@prefix foaf: <http://xmlns.com/foaf/0.1/> .@prefix dc: <http://purl.org/dc/elements/1.1/> .@prefix dct: <http://purl.org/dc/terms/> .@prefix bibo: <http://purl.org/ontology/bibo/> .@prefix gnd: <http://d-nb.info/gnd/> .

<http://d-nb.info/990075621> a bibo:Bookdc:title “Stoltz und Vorurteil : Roman” ;dct:creator gnd:118505173 .

gnd:118505173 a foaf:Person ;foaf:name “Jane Austen .

24

Page 25: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201425

<http://d-nb.info/990075621> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/ontology/bibo/Book>

<http://d-nb.info/990075621> <http://purl.org/dc/elements/1.1/title> “Stoltz und Vorurteil : Roman”<http://d-nb.info/990075621> <http://purl.org/dc/terms/creator> <http://d-nb.info/gnd/118505173><http://d-nb.info/gnd/118505173> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>

<http://xmlns.com/foaf/0.1/Person><http://d-nb.info/gnd/118505173> <http://xmlns.com/foaf/0.1/name> “Jane Austen”

Jane Austen in N-Triples

Page 26: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Zur Abfrage von RDF-Daten gibt es SPARQL (SPARQL Protocol and RDF Query Language)

PREFIX dc: <http://purl.org/dc/elements/1.1/>PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dct: <http://purl.org/dc/terms/>

SELECT ?title

WHERE {?book dc:title ?title ;

dct:creator ?author .?author foaf:name "Jane Austen“

}

26

Page 27: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Linked Data baut auf all diesen Sachen auf

27

1. Use URIs as names for things 2. Use HTTP URIs so that people can look up those

names. 3. When someone looks up a URI, provide useful

information, using the standards (RDF*, SPARQL)

4. Include links to other URIs so that they can discover more things.

http://www.w3.org/DesignIssues/LinkedData.html

Page 28: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201428

Das sog. „Five Star“-Schema behandelt aber nicht nur die Verlinkung

★Available on the web (whatever format) but with an open licence, to be Open Data

★★Available as machine-readable structured data (e.g. excel instead of image scan of a table)

★★★as (2) plus non-proprietary format (e.g. CSV instead of excel)

★★★★All the above plus, Use open standards from W3C (RDF and SPARQL) to identify things, so that people can point at your stuff

★★★★★All the above, plus: Link your data to other people’s data to provide context

http://www.w3.org/DesignIssues/LinkedData.html

Page 29: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201429

Übung: Klassen, Beziehungen, Instanzen

Auf den Gruppentischen finden Sie Kärtchen mit verschiedenen Worten. Ordnen Sie jedes der Karten einer der folgenden Gruppen zu:- Klasse- Beziehung- Instanz

Zeit: 15 Minuten

Page 30: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Um Daten auszutauschen, müssen wir eine gemeinsame Sprache sprechen

30

Piete

r B

rüg

hel d

. J.:

Turm

bau

zu

Bab

el (P

ub

lic D

om

ain

):

htt

ps:

//co

mm

on

s.w

ikim

ed

ia.o

rg/w

iki/Fi

le:T

he_T

ow

er_

of_

Bab

el,_o

il_on

_pan

el_

pain

tin

g_b

y_P

iete

r_B

rueg

hel_

th

e_Y

ou

ng

er.

jpg

Page 31: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201431

RDF ist eine abstrakte Syntax, die keine Semantik vorgibt

http://d-nb.info/990075621

“Stolz und Vorurteil :Roman”

http://d-nb.info/gnd/118505173

“Austen, Jane”

Page 32: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Die Semantik ergibt sich durch die Wahl der Vokabulare

Dublin Core Elements (dc)Dublin Core Terms (dct bzw. dcterms)Bibliographic Ontology (bibo)Simple Knowledge Organisation System (SKOS)GND-Ontologie (gndo)Friend of a Friend (foaf)RDF Schema (rdfs)Web Ontology Language (owl)…

32

Page 33: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Bei der Wahl der Vokabulare ist auch die Frage, was die eigenen Daten hergeben…

33

A manual for writers of research papers, theses, and dissertations : Chicago style for students and researchers / Kate L. Turabian ; revised by Wayne C. Booth, Gregory G. Colomb, Joseph M. Williams, and University of Chicago Press editorial staff. — 7th ed. — Chicago : University of Chicago Press, 2007. — xviii, 466 p. : ill. ; 23 cm. — (Chicago guides to writing, editing, and publishing). — Includes bibliographical references (p. 409-435) and index. — ISBN 978-0-226-82336-2 (cloth : alk. paper) : USD35.00. — ISBN 978-0-226-82337-9 (pbk. : alk. paper) : USD17.00

Page 34: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201434

Deutschsprachige Systeme trennen meist zwischen Norm- und Titeldaten

Page 35: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201435

Neu ist auch eine Tendenz, die bibliografische Beschreibung aufzuteilen

Page 36: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Es gibt auch mehr Modelle, als einem lieb ist…

Hierarchische Modelle– FRBR/RDA– BIBFRAME– schema.orgEinstufige Modelle– DINI-KIM– ISBD

36

Page 37: Bibliotheksdatenpublikation und linked data

37

Hundra-åringen (Work)

Hundra-åringen

(Expr, sv)

Hundra-åringen (2009)

Der hundert-jährige

(Expr, de)

Jonas Jonasson

Der hundert-jährige (2011)

Le vieux (Expr, fr)

Wibke Kuhn

Caroline Berg

Le viex (2011)

Le viex (2012)

Page 38: Bibliotheksdatenpublikation und linked data

38

Hundra-åringen (Work)

Hundra-åringen

(Expr, sv)

Hundra-åringen (2009)

Der hundert-jährige

(Expr, de)

Der hundert-jährige (2011)

Le vieux (Expr, fr)

Le viex (2011)

Hc.01 / DDC22: 839.73

803

Le viex (2012)

DDC23:839.738

DDC23:839.738

Hjec.01 / DDC22:840

Schweden, Mann, Greisenalter, Altenheim,

Flucht, Abenteuer, Belletr. Darstellung

DDC-SG:839, B

Page 39: Bibliotheksdatenpublikation und linked data

Hundra-åringen (Work)

Hundra-åringen

(Expr, sv)

Hundra-åringen (2009)

Der hundert-jährige

(Expr, de)

Der hundert-jährige (2011)

Le vieux (Expr, fr)

Le viex (2011)

Hc.01 / DDC22: 839.73

803

Le viex (2012)

DDC23:839.738

DDC23:839.738

Hjec.01 / DDC22:840

Schweden, Mann, Greisenalter, Altenheim,

Flucht, Abenteuer, Belletr. Darstellung

DDC-SG:839, B

Altenheim Mann

Hommes

MenOld age homes

Maisons de

Retraite

Page 40: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Die Frage ist, inwiefern die Modelle interoperabel sind

40h

ttp

://w

ww

.loc.

gov/b

ibfr

am

e/d

ocs

/im

ag

es/

wem

i-b

ibfr

am

e-p

rofile

-sm

all.

pn

g

Page 41: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201441

Wie viel Interoperabilität notwendig ist, hängt vom Austauschpartner ab

Such-maschi-

ne

Biblio-thek

Archiv,Museum

Biblio-thek

Foto

von

Doc

Searl

s (C

C B

Y):

h

ttp

://w

ww

.flic

kr.c

om

/ph

oto

s/d

ocs

earl

s/5

50

07

14

14

0/

Page 42: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Pause bis 15.15 Uhr

42

Foto

von

An

gelo

Lau

b (

CC

BY-

NC

-SA

): h

ttp

s://

flic

.kr/

p/4

QH

h

Page 43: Bibliotheksdatenpublikation und linked data

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201443

Eine kurze Einführung in Metafacture

Page 44: Bibliotheksdatenpublikation und linked data

Metafacture ist ein Framework für Datenverarbeitung

44

Stream modules

MetamorphFlux

Bausteine für Prozesse

Stream module mit eigener DSL* für Metadatentrans-formationen

DSL* für Prozessdefinition

*DSL: Domain specific Language

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 45: Bibliotheksdatenpublikation und linked data

Die Stream modules sind die Kernbausteine von Metafacture

45

Stream module

Empfängt typisierten Input:• strings• triples• objects•metadata events

Sendet typisierten Output:• strings• triples• objects•metadata events

Verarbeitet Input um einen bestimmten Output zu erstellen. Um die Wiederver-wendbarkeit zu erhöhen, sind die Aufgaben meist klein.

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 46: Bibliotheksdatenpublikation und linked data

Eine einfache Prozesskette kann so aussehen:

46

open-file as-lines decode-pica encode-formeta write("stdout")String

file namefile handle

file handlea string for each line

stringmetadata events

metadata eventsstring

a stringnothing

Lese und schreibe eine Datei mit PICA-records:

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 47: Bibliotheksdatenpublikation und linked data

Modulekonfiguration

• Entweder ein einzelner, obligatorischer Wert• Oder optionale key-value Paare

Die Module werden mit einfachen Parametern konfiguriert

47

Stream module

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 48: Bibliotheksdatenpublikation und linked data

Die Prozessketten beschreibt man mit Flux

48

Stream modules

MetamorphFlux

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 49: Bibliotheksdatenpublikation und linked data

Ein einfaches Flux-Skript kann wie folgt aussehen:

"file.name"|open-file|as-lines|decode-pica|encode-formeta(style="multiline")|write("stdout");

49

Ein String als Eingangsinput

Module sind mit dem Pipe-Character verbunden

Key-value-basierte konfiguration

Obligatorischer Parameter

Der Flow endet mit einem Semikolon

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 50: Bibliotheksdatenpublikation und linked data

Flux erlaubt auch Variablen und Kommentare

50

default in = "file.name";default out = "stdout";

in|open-file// ...|write(out);

Kommentare starten mit zwei Slashes

Definiert Defaultwerte für die Variablen in und out

Werwendet Variablen statt Direkteingabe eines Strings

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 51: Bibliotheksdatenpublikation und linked data

Es gibt auch nette Features für Strings in Flux

51

default in = FLUX_DIR + "file.name";

default haiku = "A dropped ice cream coneOne red ant, then two, then fourSuddenly – hundreds!";

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

FLUX_DIR beinhaltet immer den Pfad des übergeordneten Ordners

Strings können zusammenfefügt werden

Strings können multi-line sein

Page 52: Bibliotheksdatenpublikation und linked data

Metamorph schließlich beschreibt Datentransformationen

52

Stream modules

MetamorphFlux

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 53: Bibliotheksdatenpublikation und linked data

In Metafacture sind Metadaten eine Sequenz von Ereignissen

Pica record

003@$0 2809

033A$n Publisher$p Location

Start record 2809

Start entity 003@

Literal 0: 2809

End entity

Start entity 033A

Literal n: Publisher

Literal p: Location

End entity

End record

Sequenz von Metadaten-ereignissen

decode-pica

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201453

Page 54: Bibliotheksdatenpublikation und linked data

Metamorph hört auf Metadatenevents

54

Start record id

Start entity 021A

Literal a: The Trial

End entity

End record

Start record id

Literal Title:The Trial

End record

morph

Listen for 021A.a

Output as Title

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 55: Bibliotheksdatenpublikation und linked data

Die Transformationsregeln sind meist “data”-Ereignissen

<?xml version="1.0" encoding="UTF-8"?>

<metamorph xmlns="http://www.culturegraph.org/metamorph" xmlns:xsi="http://www.w3.org/2001/XMLSchema-

instance" version="1" entityMarker=".">

<rules><data source="021A.a"

name="Title" /></rules>

</metamorph>

55

Separator zwischen Entitäten und Namen der Literale

Name des Literals, nach dem gehorcht wird

Name des Output-Literalsof the literal that is output

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 56: Bibliotheksdatenpublikation und linked data

Man kann auch einen Präfix hinzufügen

56

...

<rules>

<data source="028A.9" name=“Creator"> <compose prefix="http://d-nb.de/gnd/" />

</data>

</rules>

...

Erst kommt http://d-nb.info/gnd/, dann der Inhalt von 028A $9

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 57: Bibliotheksdatenpublikation und linked data

Metamorph kann auch die Daten modifizieren

57

...

<rules>

<combine name="Publisher" value="${Pub}: ${Loc}"><data source="033A.n" name="Pub" /><data source="033A.p" name="Loc" />

</combine>

</rules>

...

Diese data-Statements erzeugen keinen Output, sondern Variablen

Name des generierten Literals; kann auch Variablen beinhalten

Literal, der aus zwei Variablen konstruiert wird (unten definiert)

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Page 58: Bibliotheksdatenpublikation und linked data

In Eclipse können Flux-Skripte mit “Run as” ausgeführt werden

58 | 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Wähle “Run with Flux”, um den gewählten Skript auszuführen

Wähle “Flux Help” um eine Liste der Module zu bekommen

Page 59: Bibliotheksdatenpublikation und linked data

Übung: Erstellung von LinkedData aus PICA+ mit Hilfe von Metafacture

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 201459

1. Öffnen Sie eclipse in der virtuellen Umgebung2. Navigieren Sie zu Workshop Materials / Exercises / data-

transformation 3. Verändern Sie den Skript simple-transformation.xml, um aus den

PICA+-Daten JSON zu erstellen (der flux-Skript ist schon vorkonfiguriert)

4. Führen Sie nach jeder neuen Transformationsregel den Skript mit Run-as aus

Page 60: Bibliotheksdatenpublikation und linked data

Sind Ihre Erwartungen erfüllt?

60 | 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

Foto

von

(C

C B

Y-N

C):

htt

ps:

//flic

.kr/

p/9

QE

ig7

Page 61: Bibliotheksdatenpublikation und linked data

61

Vielen Dank für’s Mitmachen!

| 61 | Bibliotheksdatenpublikation und Linked Data | 11. September 2014

http://d-nb.info/gnd/124903959

„Lars G. Svensson“

[email protected]

önb:Brain-Pool_K_04/2014

„Bibliotheksdatenpublikation und RDF / Linked Data“„

foaf:name

foaf:mboxteach:courseTitle

teach:teacherOf


Recommended