Skip to content

Commit fdcc304

Browse files
author
mgeipel
committed
EDM mapping updated
1 parent 1ceb2e0 commit fdcc304

File tree

3 files changed

+1636
-1356
lines changed

3 files changed

+1636
-1356
lines changed

examples/marc21-to-edm/MARC21-EDM.flux

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
default out = "stdout";
22
default file = FLUX_DIR + "Test_DNB_Mono.xml";
33
default id = "1025374754";
4-
//file|
5-
//open-file|
4+
file|
5+
open-file|
66
//"1025374754"|
7-
id|
8-
template("https://portal.dnb.de/opac.htm?method=requestMarcXml&idn=${o}")|
9-
open-http|
7+
//id|
8+
//template("https://portal.dnb.de/opac.htm?method=requestMarcXml&idn=${o}")|
9+
//open-http|
1010
decode-xml|
1111
handle-marcxml|
1212
morph(FLUX_DIR + "MARC21-EDM.xml", *)|

examples/marc21-to-edm/MARC21-EDM.xml

Lines changed: 74 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
<vars>
99
<var name="dnb_subject" value="" />
10-
<var name="media_type" value="" />
11-
<var name="sector" value="" />
10+
<!-- <var name="media_type" value="" /> -->
11+
<!-- <var name="sector" value="" /> -->
1212
<var name="language" value="" />
1313
</vars>
1414

@@ -25,7 +25,7 @@
2525

2626
<data source="_id" name="@lang">
2727
<constant value="$[language]" />
28-
<not-equals string=""/>
28+
<not-equals string="" />
2929
</data>
3030

3131
<!-- <data source="041??.a" name="@lang" /> -->
@@ -98,9 +98,8 @@
9898
; value für DNB-Objekte mit "Der Zugriff auf das Objekt ist unbeschränkt
9999
möglich." = zunächst http://www.europeana.eu/portal/rr-f.html gewählt, zu
100100
prüfen, ob ok! -->
101-
<data name="*edm:rights" source="@isil">
102-
<lookup in="rights" />
103-
</data>
101+
102+
104103
<data
105104
source="650?7.0|60017.0|61017.0|61017.0|630??.0|655?7.0|651?7.0|648??.0"
106105
name="@conceptID">
@@ -125,16 +124,29 @@
125124
<data name="@orgID" source="@isil">
126125
<compose prefix="http://ld.zdb-services.de/data/organisations/" />
127126
</data>
127+
128+
<data source="_id" name="@sectorID">
129+
<constant value="$[sector]" />
130+
<not-equals string="" />
131+
<replace pattern="sec_" with="" />
132+
<compose prefix="http://ddb.vocnet.org/sparte/sparte" />
133+
</data>
134+
128135
<entity name="edm:Agent">
129-
<data source="_id" name="dc:type">
130-
<constant value="$[sector]" />
131-
<not-equals string=""/>
132-
</data>
136+
<data source="@sectorID" name="*rdf:type" />
133137
<data source="@orgID" name="~rdf:about" />
134-
<data name="skos:prefLabel$de" source="@isil">
135-
<lookup in="isils" />
138+
<!-- <data name="skos:prefLabel$de" source="@isil"> -->
139+
<!-- <lookup in="isils" /> -->
140+
<!-- </data> -->
141+
</entity>
142+
143+
<entity name="skos:Concept">
144+
<data source="@sectorID" name="~rdf:about" />
145+
<data source="_id" name="skos:notation">
146+
<constant value="$[sector]" />
136147
</data>
137148
</entity>
149+
138150
<entity name="edm:Agent">
139151
<data source="@publisherID" name="~rdf:about" />
140152
<data name="skos:prefLabel$de" source="2603 .b">
@@ -165,16 +177,19 @@
165177
<entity name="edm:Event" flushWith="record">
166178
<data name="~rdf:about" source="@cEventID" />
167179
<data name="edm:hasType" source="_id">
168-
<constant value="creation" />
180+
<constant value="http://terminology.lido-schema.org/lido00012" />
169181
</data>
170182
<data name="*crm:P11_had_participant" source="1001 .0|1101 .0|7001 .0|7101 .0">
171183
<regexp match="^\(DE-588\)(.*)" format="http://d-nb.info/gnd/${1}" />
172184
</data>
173185
</entity>
174186
<entity name="edm:Event" flushWith="record">
175187
<data name="~rdf:about" source="@pEventID" />
188+
<!-- <data name="*edm:hasType" source="_id"> -->
189+
<!-- <constant value="http://terminology.lido-schema.org/lido00228" /> -->
190+
<!-- </data> -->
176191
<data name="edm:hasType" source="_id">
177-
<constant value="publication" />
192+
<constant value="http://terminology.lido-schema.org/lido00228" />
178193
</data>
179194
<data name="*crm:P11_had_participant" source="@publisherID" />
180195
<data name="*edm:occuredAt" source="@timeID" />
@@ -206,7 +221,7 @@
206221
</combine>
207222
<entity name="edm:TimeSpan">
208223
<data name="~rdf:about" source="@timeID" />
209-
<data name="skos:prefLabel" source="260 .c|2603 .c" />
224+
<data name="skos:notation" source="260 .c|2603 .c" />
210225
</entity>
211226
<!-- mandatory ELIB -->
212227
<combine name="@recordID" value="${url}${id}">
@@ -218,6 +233,24 @@
218233
<lookup in="suffix" />
219234
</data>
220235
</combine>
236+
237+
<data source="_id" name="@mediatypeID">
238+
<constant value="$[media_type]" />
239+
<lookup in="mediatype" />
240+
<compose prefix="http://ddb.vocnet.org/medientyp/" />
241+
</data>
242+
243+
<entity name="skos:Concept">
244+
<data name="~rdf:about" source="@mediatypeID" />
245+
<data source="_id" name="skos:notation">
246+
<constant value="$[media_type]" />
247+
<not-equals string="" />
248+
</data>
249+
</entity>
250+
251+
252+
253+
221254
<entity name="edm:ProvidedCHO" flushWith="record">
222255
<data source="@recordID" name="~rdf:about" />
223256
<data name="*edm:wasPresent" source="@pEventID|@cEventID" />
@@ -245,24 +278,13 @@
245278
<data name="dc:subject"
246279
source="650?7.a|60017.a|61017.a|61117.a|630??.a|655?7.a|651?7.a|648??.a" />
247280
<data name="*dc:subject" source="@conceptID" />
248-
<!-- hierarchy:global parent -->
249-
<!-- <data name="dcterms:isPartOf" source="830??.w|800??.w|810??.w|811??.w"> -->
250-
<!-- <regexp match="^\(DE-101\)((.*))" format="${1}" /> -->
251-
<!-- <compose prefix="http://d-nb.info/" /> -->
252-
<!-- <compose prefix="global:" /> -->
253-
<!-- <occurrence only="1" /> -->
254-
<!-- </data> -->
281+
255282
<data name="*dcterms:isPartOf" source="830??.w|800??.w|810??.w|811??.w">
256283
<regexp match="^\(DE-101\)((.*))" format="${1}" />
257284
<compose prefix="http://d-nb.info/" />
258285
<occurrence only="1" />
259286
</data>
260-
<!-- <combine name="dcterms:isPartOf" value="${a}: ${t}" -->
261-
<!-- sameEntity="true"> -->
262-
<!-- <data source="810??.a" name="a" /> -->
263-
<!-- <data source="810??.t" name="t" /> -->
264-
<!-- </combine> -->
265-
<!-- hierarchy: position -->
287+
266288

267289
<!-- hierarchy: aggregation entity status -->
268290
<concat delimiter="; " name="ddb:techinfo">
@@ -296,7 +318,7 @@
296318

297319
<data name="*dc:subject" source="_id">
298320
<constant value="$[dnb_subject]" />
299-
<not-equals string=""/>
321+
<not-equals string="" />
300322
</data>
301323

302324
</entity>
@@ -313,10 +335,10 @@
313335

314336

315337
<!-- TODO: concordance-call or lookup for 084 ?.a -->
316-
<!-- <entity name="skos:Concept"> -->
317-
<!-- <data source="@dnbSubjectID" name="~rdf:about" /> -->
318-
<!-- <data source="normed_value" name="skos:prefLabel$de" /> -->
319-
<!-- </entity> -->
338+
<!-- <entity name="skos:Concept"> -->
339+
<!-- <data source="@dnbSubjectID" name="~rdf:about" /> -->
340+
<!-- <data source="normed_value" name="skos:prefLabel$de" /> -->
341+
<!-- </entity> -->
320342

321343
<choose name="@urn">
322344
<combine name="~rdf:about" value="${urn}">
@@ -350,16 +372,21 @@
350372
</combine>
351373
</choose>
352374

353-
<data source="_id" name="dc:type">
354-
<constant value="$[media_type]" />
355-
<not-equals string=""/>
356-
</data>
375+
<data source="@mediatypeID" name="dc:type" />
357376

358-
<data name="*edm:rights" source="@isil">
377+
<data name="edm:rights" source="@isil">
359378
<lookup in="rights" />
360379
</data>
380+
381+
<data name="dcterms:rights" source="_id">
382+
<constant
383+
value="http://www.deutsche-digitale-bibliothek.de/lizenzen/rv-fz/" />
384+
</data>
361385
<!-- TODO: mediatype -->
362386
</entity>
387+
388+
389+
363390
</rules>
364391
<maps>
365392
<map name="rights">
@@ -374,5 +401,14 @@
374401
<map name="suffix" default="">
375402

376403
</map>
404+
405+
<map name="mediatype" default="unknown">
406+
<entry name="mediatype_003" value="Text" />
407+
</map>
408+
409+
410+
411+
<filemap name="timevoc" files="$[FLUX_DIR]timevoc.txt"
412+
separator="\t" />
377413
</maps>
378414
</metamorph>

0 commit comments

Comments
 (0)