Project

General

Profile

« Previous | Next » 

Revision 57629

more testing for Ariadne and 3M mappings

View differences:

modules/dnet-msro-service/branches/saxonHE-SOLR772/src/test/java/eu/dnetlib/x3m/X3MLEngineTest.java
4 4
import java.io.IOException;
5 5
import java.io.InputStream;
6 6
import java.io.PrintStream;
7
import java.net.MalformedURLException;
8
import java.net.URL;
7 9
import java.util.Arrays;
8 10
import java.util.Iterator;
9 11
import java.util.function.Function;
......
37 39
					"/eu/dnetlib/x3m/new-10304740.xml", "/eu/dnetlib/x3m/new-10304741.xml", "/eu/dnetlib/x3m/new-10304742.xml" };
38 40

  
39 41
	@Test
42
	public void testWithURLMapping() throws MalformedURLException {
43
		X3MLEngineFactory x3mEngine = X3MLEngineFactory.create()
44
				.withMappings(new URL("https://mapping.d4science.org/3MEditor/Services?id=575&output=text/xml&method=export"))
45
				.withVerboseLogging()
46
				.withGeneratorPolicy(getInputStreamFromClasspath("/eu/dnetlib/x3m/ariadne_policy.xml"))
47
				.withInput(getInputStreamFromClasspath("/eu/dnetlib/x3m/ariadneADSsample.xml"))
48
				.withOutput(System.out, OutputFormat.RDF_XML);
49
		x3mEngine.execute();
50
	}
51

  
52
	@Test
40 53
	public void testForth() throws Exception{
41 54
		X3MLEngineFactory x3mEngine = X3MLEngineFactory.create()
42 55
				.withMappings(getInputStreamFromClasspath(forthMappingPath))
modules/dnet-msro-service/branches/saxonHE-SOLR772/src/test/resources/eu/dnetlib/x3m/ariadne_policy.xml
1
<?xml version="1.0" encoding="UTF-8"?><generator_policy>
2

  
3
    <!-- The prefix is a namespace that must be declared in the X3ML definition.
4
    in the x3ml define <namespace prefix="ariadneplus" uri="http://www.ariadneplus.eu/"/> -->
5

  
6
    <generator name="CollectionURI" prefix="ariadneplus">
7
        <pattern>Collection/{term}</pattern>
8
    </generator>
9

  
10
    <generator name="DataResourceURI" prefix="ariadneplus" shorten="yes">
11
        <pattern>Resource/{term}</pattern>
12
    </generator>
13

  
14
    <generator name="ObjectURI" prefix="ariadneplus" shorten="yes">
15
        <pattern>Object/{resource}-{term}</pattern>
16
    </generator>
17

  
18
    <generator name="ObjectLabel">
19
        <pattern>Resource {resource} is about {term}</pattern>
20
    </generator>
21

  
22
    <generator name="IdentifierURI" prefix="ariadneplus">
23
        <pattern>Identifier/{term}</pattern>
24
    </generator>
25

  
26
    <generator name="EventURI" prefix="ariadneplus">
27
        <pattern>Event/{term}</pattern>
28
    </generator>
29
    <generator name="Time-SpanURI" prefix="ariadneplus">
30
        <pattern>Time-Span/{term}</pattern>
31
    </generator>
32
    <generator name="PlaceURI" prefix="ariadneplus" shorten="yes">
33
        <pattern>Place/{term}</pattern>
34
    </generator>
35
    <generator name="AgentURI" prefix="ariadneplus">
36
        <pattern>Agent/{term}</pattern>
37
    </generator>
38

  
39
    <generator name="ConceptURI" prefix="ariadneplus">
40
        <pattern>Concept/{term}</pattern>
41
    </generator>
42
    <generator name="ConceptURI-2" prefix="ariadneplus">
43
        <pattern>Concept/{scheme}/{term}</pattern>
44
    </generator>
45

  
46
    <generator name="LangURI" prefix="lexvo">
47
        <pattern>{term}</pattern>
48
    </generator>
49

  
50
    <generator name="OneLevelCustomURI" prefix="ariadneplus">
51
        <pattern>{level1}/{term}</pattern>
52
    </generator>
53
    <generator name="TwoLevelCustomURI" prefix="ariadneplus">
54
        <pattern>{level1}/{level2}/{term}</pattern>
55
    </generator>
56

  
57
    <generator name="SimpleLabel">
58
        <pattern>{label}</pattern>
59
    </generator>
60

  
61
    <generator name="CompositeLabel">
62
        <pattern>{label} {text}</pattern>
63
    </generator>
64

  
65
    <generator name="URIorUUID">
66
        <custom generatorClass="gr.forth.URIorUUID">
67
            <set-arg name="text"/>
68
        </custom>
69
    </generator>
70

  
71
    <generator name="URNfromTextualContent">
72
        <custom generatorClass="gr.forth.TextualContent">
73
            <set-arg name="text" type="xpath"/>
74
        </custom>
75
    </generator>
76

  
77
    <generator name="TypedLiteralGen">
78
        <custom generatorClass="gr.forth.TypedLiteralGenerator">
79
            <set-arg name="text"/>
80
        </custom>
81
    </generator>
82

  
83

  
84
</generator_policy>
modules/dnet-msro-service/branches/saxonHE-SOLR772/src/test/resources/eu/dnetlib/x3m/ehri_mapping.x3ml
1
<?xml version="1.0" encoding="UTF-8"?><!--Sample XML file generated by XMLSpy v2011 sp1 (http://www.altova.com)--><x3ml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" source_type="xpath" version="1.0" xsi:noNamespaceSchemaLocation="x3ml_v1.0.xsd">
2
    <info>
3
        <title>EHRI  -&gt; PE  Mapping File Official</title>
4
        <general_description>This mapping represents a mapping from the EHRI data registry to the Parthenos Entities format designed for the Parthenos project. The EHRI format is based on EAD. Each record provides metadata about itself qua metadata record and about some collection that it describes.</general_description>
5
        <source>
6
            <source_info>
7
                <source_schema type="" version=""/>
8
            </source_info>
9
            <source_collection/>
10
        </source>
11
        <target>
12
            <target_info>
13
                <target_schema schema_file="cidoc_crm_v6.0-draft-2015January.rdfs" type="rdfs" version="6.0">CIDOC-CRM</target_schema>
14
                <namespaces>
15
                    <namespace prefix="crm" uri="http://www.cidoc-crm.org/cidoc-crm/"/>
16
                </namespaces>
17
            </target_info>
18
            <target_info>
19
                <target_schema schema_file="CRMdig_v3.2.rdfs" type="rdfs" version="3.2">CRMdig</target_schema>
20
                <namespaces>
21
                    <namespace prefix="crmdig" uri="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/"/>
22
                </namespaces>
23
            </target_info>
24
            <target_info>
25
                <target_schema schema_file="CRMext4SKOSandLabel_v1.2.rdfs" type="rdfs" version="1.2">CRMext4SKOSandLabel</target_schema>
26
                <namespaces>
27
                    <namespace prefix="skos" uri="http://www.w3.org/2004/02/skos/core#"/>
28
                </namespaces>
29
            </target_info>
30
            <target_info>
31
                <target_schema schema_file="CRMpc_v1.0.rdfs" type="rdfs" version="1.0">CRMpc</target_schema>
32
                <namespaces>
33
                    <namespace prefix="crm" uri="http://www.cidoc-crm.org/cidoc-crm/"/>
34
                </namespaces>
35
            </target_info>
36
            <target_info>
37
                <target_schema schema_file="CRMpe_v1.8.1.rdfs" type="rdfs" version="1.8.1">CRMpe</target_schema>
38
                <namespaces>
39
                    <namespace prefix="crmpe" uri="http://www.ics.forth.gr/isl/CRMext/CRMpe.rdfs/"/>
40
                </namespaces>
41
            </target_info>
42
            <target_collection/>
43
        </target>
44
        <mapping_info>
45
            <mapping_created_by_org>EHRI</mapping_created_by_org>
46
            <mapping_created_by_person>Charles Riondet</mapping_created_by_person>
47
            <in_collaboration_with>George Bruseker</in_collaboration_with>
48
        </mapping_info>
49
        <example_data_info>
50
            <example_data_from>EHRI</example_data_from>
51
            <example_data_contact_person>Charles Riondet</example_data_contact_person>
52
            <example_data_source_record xml_link="New+ehri+sample___25-05-2017163732___4874.xml"/>
53
            <generator_policy_info generator_link="PARTHENOS-GeneratorPolicy___15-03-2017144440___5286.xml"/>
54
            <example_data_target_record rdf_link="EHRI___01-03-2017163035___1590.rdf"/>
55
            <thesaurus_info/>
56
        </example_data_info>
57
    </info>
58
    <namespaces>
59
        <namespace prefix="parthenos" uri="http://pathenos.d4science.org/handle/EHRI/Portal/"/>
60
        <namespace prefix="xmlns" uri="urn:isbn:1-931666-22-9"/>
61
        <namespace prefix="xlink" uri="http://www.w3.org/1999/xlink"/>
62
        <namespace prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
63
        <namespace prefix="schemaLocation" uri="urn:isbn:1-931666-22-9 http://www.loc.gov/ead/ead.xsd"/>
64
    </namespaces>
65
    <mappings>
66
        <mapping>
67
            <domain>
68
                <source_node>/ead/eadheader</source_node>
69
                <target_node>
70
                    <entity>
71
                        <type>crmpe:PE22_Persistent_Dataset</type>
72
                        <type>crm:E33_Linguistic_Object</type>
73
                        <instance_generator name="DatasetURI">
74
                            <arg name="term" type="xpath">eadid/text()</arg>
75
                        </instance_generator>
76
                        <label_generator name="SimpleLabel">
77
                            <arg name="label" type="xpath">eadid/text()</arg>
78
                        </label_generator>
79
                        <additional>
80
                            <relationship>crm:P2_has_type</relationship>
81
                            <entity>
82
                                <type>crm:E55_Type</type>
83
                                <instance_info>
84
                                    <constant>metadata</constant>
85
                                </instance_info>
86
                                <instance_generator name="ConceptURI">
87
                                    <arg name="term" type="constant">Metadata</arg>
88
                                </instance_generator>
89
                                <label_generator name="Constant">
90
                                    <arg name="text" type="constant">Metadata</arg>
91
                                </label_generator>
92
                            </entity>
93
                        </additional>
94
                    </entity>
95
                </target_node>
96
            </domain>
97
            <link>
98
                <path>
99
                    <source_relation>
100
                        <relation>filedesc/titlestmt/titleproper</relation>
101
                    </source_relation>
102
                    <target_relation>
103
                        <relationship>crm:P102_has_title</relationship>
104
                    </target_relation>
105
                </path>
106
                <range>
107
                    <source_node>filedesc/titlestmt/titleproper</source_node>
108
                    <target_node>
109
                        <entity>
110
                            <type>crm:E35_Title</type>
111
                            <instance_generator name="DatasetAppellationURI">
112
                                <arg name="term" type="xpath">../../../eadid/text()</arg>
113
                            </instance_generator>
114
                            <label_generator name="SimpleLabel">
115
                                <arg name="label" type="xpath">text()</arg>
116
                            </label_generator>
117
                        </entity>
118
                    </target_node>
119
                </range>
120
            </link>
121
            <link>
122
                <path>
123
                    <source_relation>
124
                        <relation>../archdesc</relation>
125
                    </source_relation>
126
                    <target_relation>
127
                        <relationship>crm:P129_is_about</relationship>
128
                    </target_relation>
129
                </path>
130
                <range>
131
                    <source_node>../archdesc</source_node>
132
                    <target_node>
133
                        <entity>
134
                            <type>crm:E78_Collection</type>
135
                            <instance_generator name="ThingURI">
136
                                <arg name="term" type="xpath">did/unitid/text()</arg>
137
                            </instance_generator>
138
                        </entity>
139
                    </target_node>
140
                </range>
141
            </link>
142
            <link>
143
                <path>
144
                    <source_relation>
145
                        <relation>profiledesc/langusage/language</relation>
146
                    </source_relation>
147
                    <target_relation>
148
                        <relationship>crm:P72_has_language</relationship>
149
                    </target_relation>
150
                    <comments>
151
                        <comment type="">
152
                            <rationale/>
153
                            <alternatives>if this is the language of the metadata or dataset and all cases potentially have a language, then you can double instantiate the eadheader also as E33 Linguistic Object and then use the property p72 has language</alternatives>
154
                            <typical_mistakes/>
155
                            <local_habits/>
156
                            <link_to_cook_book/>
157
                            <example>
158
                                <example_source/>
159
                                <example_target/>
160
                            </example>
161
                            <comments_last_update date="" person=""/>
162
                        </comment>
163
                    </comments>
164
                </path>
165
                <range>
166
                    <source_node>profiledesc/langusage/language</source_node>
167
                    <target_node>
168
                        <entity>
169
                            <type>crm:E56_Language</type>
170
                            <instance_generator name="ConceptURI">
171
                                <arg name="term" type="xpath">text()</arg>
172
                            </instance_generator>
173
                            <label_generator name="SimpleLabel">
174
                                <arg name="label" type="xpath">text()</arg>
175
                            </label_generator>
176
                        </entity>
177
                    </target_node>
178
                </range>
179
            </link>
180
            <link>
181
                <path>
182
                    <source_relation>
183
                        <relation>filedesc/publicationstmt</relation>
184
                    </source_relation>
185
                    <target_relation>
186
                        <relationship>crm:P94i_was_created_by</relationship>
187
                        <entity variable="create">
188
                            <type>crmdig:D7_Digital_Machine_Event</type>
189
                            <instance_generator name="UUID"/>
190
                            <label_generator name="CompositeLabel">
191
                                <arg name="label" type="constant">Initial Creation of</arg>
192
                                <arg name="text" type="xpath">../../eadid/text()</arg>
193
                            </label_generator>
194
                            <additional>
195
                                <relationship>crm:P2_has_type</relationship>
196
                                <entity>
197
                                    <type>crm:E55_Type</type>
198
                                    <instance_info>
199
                                        <constant>Initial Creation</constant>
200
                                    </instance_info>
201
                                    <instance_generator name="ConceptURI">
202
                                        <arg name="term" type="constant">Initial Creation</arg>
203
                                    </instance_generator>
204
                                    <label_generator name="Constant">
205
                                        <arg name="text" type="constant">Initial Creation</arg>
206
                                    </label_generator>
207
                                </entity>
208
                            </additional>
209
                        </entity>
210
                        <relationship>crm:P14_carried_out_by</relationship>
211
                    </target_relation>
212
                    <comments>
213
                        <comment type="">
214
                            <rationale/>
215
                            <alternatives>is this the creation that is further described in the next map? If so, you should stop with this creation node and put the carried out by the created by in the next map. Looking at your paths though it does not seem clear to me that they are the same creation. Are they?</alternatives>
216
                            <typical_mistakes/>
217
                            <local_habits/>
218
                            <link_to_cook_book/>
219
                            <example>
220
                                <example_source/>
221
                                <example_target/>
222
                            </example>
223
                            <comments_last_update date="" person=""/>
224
                        </comment>
225
                    </comments>
226
                </path>
227
                <range>
228
                    <source_node>filedesc/publicationstmt</source_node>
229
                    <target_node>
230
                        <entity>
231
                            <type>crm:E39_Actor</type>
232
                            <instance_generator name="ActorURI">
233
                                <arg name="term" type="xpath">publisher/text()</arg>
234
                            </instance_generator>
235
                            <label_generator name="SimpleLabel">
236
                                <arg name="label" type="xpath">publisher/text()</arg>
237
                            </label_generator>
238
                        </entity>
239
                    </target_node>
240
                </range>
241
            </link>
242
            <link>
243
                <path>
244
                    <source_relation>
245
                        <relation>profiledesc/creation/date</relation>
246
                    </source_relation>
247
                    <target_relation>
248
                        <relationship>crm:P94i_was_created_by</relationship>
249
                        <entity variable="create">
250
                            <type>crmdig:D7_Digital_Machine_Event</type>
251
                            <instance_generator name="UUID"/>
252
                        </entity>
253
                        <relationship>crm:P4_has_time-span</relationship>
254
                        <entity>
255
                            <type>crm:E52_Time-Span</type>
256
                            <instance_generator name="UUID"/>
257
                            <label_generator name="CompositeLabel">
258
                                <arg name="label" type="constant">Time-Span of Initial Creation of </arg>
259
                                <arg name="text" type="xpath">../../../eadid/text()</arg>
260
                            </label_generator>
261
                        </entity>
262
                        <relationship>crm:P81_ongoing_throughout</relationship>
263
                    </target_relation>
264
                </path>
265
                <range>
266
                    <source_node>profiledesc/creation/date</source_node>
267
                    <target_node>
268
                        <entity>
269
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
270
                            <instance_generator name="Literal">
271
                                <arg name="text" type="xpath">text()</arg>
272
                            </instance_generator>
273
                        </entity>
274
                    </target_node>
275
                </range>
276
            </link>
277
            <link>
278
                <path>
279
                    <source_relation>
280
                        <relation>revisiondesc/change</relation>
281
                    </source_relation>
282
                    <target_relation>
283
                        <relationship>crmdig:L11i_was_output_of</relationship>
284
                    </target_relation>
285
                </path>
286
                <range>
287
                    <source_node>revisiondesc/change</source_node>
288
                    <target_node>
289
                        <entity>
290
                            <type>crmdig:D7_Digital_Machine_Event</type>
291
                            <instance_generator name="UUID"/>
292
                            <label_generator name="CompositeLabel">
293
                                <arg name="label" type="constant">Update Event for </arg>
294
                                <arg name="text" type="xpath">../../eadid/text()</arg>
295
                            </label_generator>
296
                            <additional>
297
                                <relationship>crm:P2_has_type</relationship>
298
                                <entity>
299
                                    <type>crm:E55_Type</type>
300
                                    <instance_info>
301
                                        <constant>Update</constant>
302
                                    </instance_info>
303
                                    <instance_generator name="ConceptURI">
304
                                        <arg name="term" type="constant">Update</arg>
305
                                    </instance_generator>
306
                                    <label_generator name="Constant">
307
                                        <arg name="text" type="constant">Update</arg>
308
                                    </label_generator>
309
                                </entity>
310
                            </additional>
311
                        </entity>
312
                    </target_node>
313
                </range>
314
            </link>
315
        </mapping>
316
        <mapping>
317
            <domain>
318
                <source_node>/ead/eadheader/revisiondesc/change</source_node>
319
                <target_node>
320
                    <entity>
321
                        <type>crmdig:D7_Digital_Machine_Event</type>
322
                        <instance_generator name="UUID"/>
323
                    </entity>
324
                </target_node>
325
            </domain>
326
            <link>
327
                <path>
328
                    <source_relation>
329
                        <relation>item</relation>
330
                    </source_relation>
331
                    <target_relation>
332
                        <relationship>crm:P3_has_note</relationship>
333
                    </target_relation>
334
                </path>
335
                <range>
336
                    <source_node>item</source_node>
337
                    <target_node>
338
                        <entity>
339
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
340
                            <instance_generator name="Literal">
341
                                <arg name="text" type="xpath">text()</arg>
342
                            </instance_generator>
343
                        </entity>
344
                    </target_node>
345
                </range>
346
            </link>
347
            <link>
348
                <path>
349
                    <source_relation>
350
                        <relation>date</relation>
351
                    </source_relation>
352
                    <target_relation>
353
                        <relationship>crm:P4_has_time-span</relationship>
354
                        <entity>
355
                            <type>crm:E52_Time-Span</type>
356
                            <instance_generator name="UUID"/>
357
                            <label_generator name="CompositeLabel">
358
                                <arg name="label" type="constant">Time Span of Update Event for </arg>
359
                                <arg name="text" type="xpath">../../../eadid/text()</arg>
360
                            </label_generator>
361
                        </entity>
362
                        <relationship>crm:P81_ongoing_throughout</relationship>
363
                    </target_relation>
364
                </path>
365
                <range>
366
                    <source_node>date</source_node>
367
                    <target_node>
368
                        <entity>
369
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
370
                            <instance_generator name="Literal">
371
                                <arg name="text" type="xpath">text()</arg>
372
                            </instance_generator>
373
                        </entity>
374
                    </target_node>
375
                </range>
376
            </link>
377
        </mapping>
378
        <mapping>
379
            <domain>
380
                <source_node>/ead/archdesc</source_node>
381
                <target_node>
382
                    <entity>
383
                        <type>crm:E78_Collection</type>
384
                        <type>crm:E33_Linguistic_Object</type>
385
                        <instance_generator name="UUID"/>
386
                        <label_generator name="SimpleLabel">
387
                            <arg name="label" type="xpath">did/unitid/text()</arg>
388
                        </label_generator>
389
                    </entity>
390
                </target_node>
391
                <comments>
392
                    <comment type="">
393
                        <rationale/>
394
                        <alternatives>So is each archive actually a dataset in the sense of a digital object or are they physical archives as well? If they are physical as well, persistent dataset won't work.</alternatives>
395
                        <typical_mistakes/>
396
                        <local_habits/>
397
                        <link_to_cook_book/>
398
                        <example>
399
                            <example_source/>
400
                            <example_target/>
401
                        </example>
402
                        <comments_last_update date="" person=""/>
403
                    </comment>
404
                </comments>
405
            </domain>
406
            <link>
407
                <path>
408
                    <source_relation>
409
                        <relation>dsc/controlaccess/subject</relation>
410
                    </source_relation>
411
                    <target_relation>
412
                        <relationship>crm:P129_is_about</relationship>
413
                    </target_relation>
414
                </path>
415
                <range>
416
                    <source_node>dsc/controlaccess/subject</source_node>
417
                    <target_node>
418
                        <entity>
419
                            <type>crm:E55_Type</type>
420
                            <instance_generator name="ConceptURI">
421
                                <arg name="term" type="xpath">text()</arg>
422
                            </instance_generator>
423
                            <label_generator name="Constant">
424
                                <arg name="text" type="xpath">text()</arg>
425
                            </label_generator>
426
                        </entity>
427
                    </target_node>
428
                    <comments>
429
                        <comment type="">
430
                            <rationale/>
431
                            <alternatives>Is control access about authorization to use? Might need to create a new relation for this if so.</alternatives>
432
                            <typical_mistakes/>
433
                            <local_habits/>
434
                            <link_to_cook_book/>
435
                            <example>
436
                                <example_source/>
437
                                <example_target/>
438
                            </example>
439
                            <comments_last_update date="" person=""/>
440
                        </comment>
441
                    </comments>
442
                </range>
443
            </link>
444
            <link>
445
                <path>
446
                    <source_relation>
447
                        <relation>did/unittitle</relation>
448
                    </source_relation>
449
                    <target_relation>
450
                        <relationship>crm:P102_has_title</relationship>
451
                    </target_relation>
452
                </path>
453
                <range>
454
                    <source_node>did/unittitle</source_node>
455
                    <target_node>
456
                        <entity>
457
                            <type>crm:E35_Title</type>
458
                            <instance_generator name="ThingAppellationURI">
459
                                <arg name="term" type="xpath">../unitid/text()</arg>
460
                            </instance_generator>
461
                            <label_generator name="SimpleLabel">
462
                                <arg name="label" type="xpath">text()</arg>
463
                            </label_generator>
464
                        </entity>
465
                    </target_node>
466
                </range>
467
            </link>
468
            <link>
469
                <path>
470
                    <source_relation>
471
                        <relation>bioghist/p</relation>
472
                    </source_relation>
473
                    <target_relation>
474
                        <relationship>crm:P108i_was_produced_by</relationship>
475
                        <entity variable="col_start">
476
                            <type>crm:E12_Production</type>
477
                            <instance_generator name="UUID"/>
478
                            <label_generator name="CompositeLabel">
479
                                <arg name="label" type="constant">Collection Event for </arg>
480
                                <arg name="text" type="xpath">../../did/unittitle/text()</arg>
481
                            </label_generator>
482
                        </entity>
483
                        <relationship>crm:P14_carried_out_by</relationship>
484
                        <entity variable="actor1">
485
                            <type>crm:E39_Actor</type>
486
                            <instance_generator name="UUID"/>
487
                        </entity>
488
                        <relationship>crm:P3_has_note</relationship>
489
                    </target_relation>
490
                </path>
491
                <range>
492
                    <source_node>bioghist/p</source_node>
493
                    <target_node>
494
                        <entity>
495
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
496
                            <instance_generator name="Literal">
497
                                <arg name="text" type="xpath">text()</arg>
498
                            </instance_generator>
499
                        </entity>
500
                    </target_node>
501
                    <comments>
502
                        <comment type="">
503
                            <rationale/>
504
                            <alternatives>why has note here, what is source?</alternatives>
505
                            <typical_mistakes/>
506
                            <local_habits/>
507
                            <link_to_cook_book/>
508
                            <example>
509
                                <example_source/>
510
                                <example_target/>
511
                            </example>
512
                            <comments_last_update date="" person=""/>
513
                        </comment>
514
                    </comments>
515
                </range>
516
            </link>
517
            <link>
518
                <path>
519
                    <source_relation>
520
                        <relation>scopecontent/p</relation>
521
                    </source_relation>
522
                    <target_relation>
523
                        <relationship>crm:P3_has_note</relationship>
524
                    </target_relation>
525
                    <comments>
526
                        <comment type="">
527
                            <rationale/>
528
                            <alternatives/>
529
                            <typical_mistakes/>
530
                            <local_habits/>
531
                            <link_to_cook_book/>
532
                            <example>
533
                                <example_source/>
534
                                <example_target/>
535
                            </example>
536
                            <comments_last_update date="" person=""/>
537
                        </comment>
538
                    </comments>
539
                </path>
540
                <range>
541
                    <source_node>scopecontent/p</source_node>
542
                    <target_node>
543
                        <entity>
544
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
545
                            <instance_generator name="CompositeLabel">
546
                                <arg name="label" type="constant">Scopecontent: </arg>
547
                                <arg name="text" type="xpath">text()</arg>
548
                            </instance_generator>
549
                        </entity>
550
                    </target_node>
551
                </range>
552
            </link>
553
            <link>
554
                <path>
555
                    <source_relation>
556
                        <relation>arrangement/p</relation>
557
                    </source_relation>
558
                    <target_relation>
559
                        <relationship>crm:P147i_was_curated_by</relationship>
560
                        <entity>
561
                            <type>crm:E87_Curation_Activity</type>
562
                            <instance_generator name="UUID"/>
563
                            <label_generator name="CompositeLabel">
564
                                <arg name="label" type="constant">Curation Activity for</arg>
565
                                <arg name="text" type="xpath">../../did/unittitle/text()</arg>
566
                            </label_generator>
567
                        </entity>
568
                        <relationship>crm:P33_used_specific_technique</relationship>
569
                        <entity>
570
                            <type>crm:E29_Design_or_Procedure</type>
571
                            <instance_generator name="UUID"/>
572
                            <label_generator name="CompositeLabel">
573
                                <arg name="label" type="constant">Curation Plan for </arg>
574
                                <arg name="text" type="xpath">../../did/unittitle/text()</arg>
575
                            </label_generator>
576
                        </entity>
577
                        <relationship>crm:P3_has_note</relationship>
578
                    </target_relation>
579
                </path>
580
                <range>
581
                    <source_node>arrangement/p</source_node>
582
                    <target_node>
583
                        <entity>
584
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
585
                            <instance_generator name="Literal">
586
                                <arg name="text" type="xpath">text()</arg>
587
                            </instance_generator>
588
                        </entity>
589
                    </target_node>
590
                </range>
591
            </link>
592
            <link>
593
                <path>
594
                    <source_relation>
595
                        <relation>did/origination</relation>
596
                    </source_relation>
597
                    <target_relation>
598
                        <relationship>crm:P108i_was_produced_by</relationship>
599
                        <entity variable="col_start">
600
                            <type>crm:E12_Production</type>
601
                            <instance_generator name="UUID"/>
602
                            <label_generator name="CompositeLabel">
603
                                <arg name="label" type="constant">Production Activity for</arg>
604
                                <arg name="text" type="xpath">../unittitle/text()</arg>
605
                            </label_generator>
606
                        </entity>
607
                        <relationship>crm:P14_carried_out_by</relationship>
608
                    </target_relation>
609
                </path>
610
                <range>
611
                    <source_node>did/origination</source_node>
612
                    <target_node>
613
                        <entity variable="actor1">
614
                            <type>crm:E39_Actor</type>
615
                            <instance_generator name="UUID"/>
616
                        </entity>
617
                    </target_node>
618
                </range>
619
            </link>
620
            <link>
621
                <path>
622
                    <source_relation>
623
                        <relation>did/physdesc</relation>
624
                    </source_relation>
625
                    <target_relation>
626
                        <relationship>crm:P43_has_dimension</relationship>
627
                        <entity>
628
                            <type>crm:E54_Dimension</type>
629
                            <instance_generator name="UUID"/>
630
                            <label_generator name="CompositeLabel">
631
                                <arg name="label" type="constant">Dimension of</arg>
632
                                <arg name="text" type="xpath">../unittitle/text()</arg>
633
                            </label_generator>
634
                        </entity>
635
                        <relationship>crm:P3_has_note</relationship>
636
                    </target_relation>
637
                </path>
638
                <range>
639
                    <source_node>did/physdesc</source_node>
640
                    <target_node>
641
                        <entity>
642
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
643
                            <instance_generator name="Literal">
644
                                <arg name="text" type="xpath">text()</arg>
645
                            </instance_generator>
646
                        </entity>
647
                    </target_node>
648
                </range>
649
            </link>
650
            <link>
651
                <path>
652
                    <source_relation>
653
                        <relation>did/repository/corpname</relation>
654
                    </source_relation>
655
                    <target_relation>
656
                        <relationship>crmpe:PP4i_is_object_hosted_by</relationship>
657
                        <entity>
658
                            <type>crmpe:PE2_Hosting_Service</type>
659
                            <instance_generator name="ServiceURI">
660
                                <arg name="term" type="xpath">text()</arg>
661
                            </instance_generator>
662
                            <label_generator name="SimpleLabel">
663
                                <arg name="label" type="xpath">text()</arg>
664
                            </label_generator>
665
                        </entity>
666
                        <relationship>crmpe:PP2_provided_by</relationship>
667
                    </target_relation>
668
                </path>
669
                <range>
670
                    <source_node>did/repository/corpname</source_node>
671
                    <target_node>
672
                        <entity>
673
                            <type>crm:E39_Actor</type>
674
                            <instance_generator name="ActorURI">
675
                                <arg name="term" type="xpath">text()</arg>
676
                            </instance_generator>
677
                            <label_generator name="SimpleLabel">
678
                                <arg name="label" type="xpath">text()</arg>
679
                            </label_generator>
680
                        </entity>
681
                    </target_node>
682
                    <comments>
683
                        <comment type="">
684
                            <rationale>Here, the Data Hosting services are the institutions holding the original materials.</rationale>
685
                            <alternatives>then you should just go all the way to actor and just use the data hosting service as an intermediate node.</alternatives>
686
                            <typical_mistakes/>
687
                            <local_habits/>
688
                            <link_to_cook_book/>
689
                            <example>
690
                                <example_source/>
691
                                <example_target/>
692
                            </example>
693
                            <comments_last_update date="" person=""/>
694
                        </comment>
695
                    </comments>
696
                </range>
697
            </link>
698
            <link>
699
                <path>
700
                    <source_relation>
701
                        <relation>did/unitdate</relation>
702
                    </source_relation>
703
                    <target_relation>
704
                        <relationship>crm:P108i_was_produced_by</relationship>
705
                        <entity variable="col_start">
706
                            <type>crm:E12_Production</type>
707
                            <instance_generator name="UUID"/>
708
                        </entity>
709
                        <relationship>crm:P4_has_time-span</relationship>
710
                        <entity>
711
                            <type>crm:E52_Time-Span</type>
712
                            <instance_generator name="UUID"/>
713
                            <label_generator name="CompositeLabel">
714
                                <arg name="label" type="constant">Time span of Collection Event for</arg>
715
                                <arg name="text" type="xpath">../unittitle/text()</arg>
716
                            </label_generator>
717
                        </entity>
718
                        <relationship>crm:P3_has_note</relationship>
719
                    </target_relation>
720
                </path>
721
                <range>
722
                    <source_node>did/unitdate</source_node>
723
                    <target_node>
724
                        <entity>
725
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
726
                            <instance_generator name="Literal">
727
                                <arg name="text" type="xpath">text()</arg>
728
                            </instance_generator>
729
                        </entity>
730
                    </target_node>
731
                </range>
732
            </link>
733
            <link>
734
                <path>
735
                    <source_relation>
736
                        <relation>did/langmaterial/language</relation>
737
                    </source_relation>
738
                    <target_relation>
739
                        <relationship>crm:P72_has_language</relationship>
740
                        <entity>
741
                            <type>crm:E56_Language</type>
742
                            <instance_generator name="UUID"/>
743
                        </entity>
744
                        <relationship>crm:P3_has_note</relationship>
745
                    </target_relation>
746
                    <comments>
747
                        <comment type="">
748
                            <rationale/>
749
                            <alternatives>Is this because you want to indicate language of the archival object. in Which case you can double instantiate as Linguistic Object.</alternatives>
750
                            <typical_mistakes/>
751
                            <local_habits/>
752
                            <link_to_cook_book/>
753
                            <example>
754
                                <example_source/>
755
                                <example_target/>
756
                            </example>
757
                            <comments_last_update date="" person=""/>
758
                        </comment>
759
                    </comments>
760
                </path>
761
                <range>
762
                    <source_node>did/langmaterial/language</source_node>
763
                    <target_node>
764
                        <entity>
765
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
766
                            <instance_generator name="Literal">
767
                                <arg name="text" type="xpath">text()</arg>
768
                            </instance_generator>
769
                        </entity>
770
                    </target_node>
771
                </range>
772
            </link>
773
            <link>
774
                <path>
775
                    <source_relation>
776
                        <relation>originalsloc/p</relation>
777
                    </source_relation>
778
                    <target_relation>
779
                        <relationship>crm:P130_shows_features_of</relationship>
780
                        <entity>
781
                            <type>crm:E78_Collection</type>
782
                            <instance_generator name="UUID"/>
783
                            <label_generator name="CompositeLabel">
784
                                <arg name="label" type="constant">Collection Containing Original Material of </arg>
785
                                <arg name="text" type="xpath">../../did/unittitle/text()</arg>
786
                            </label_generator>
787
                        </entity>
788
                        <relationship>crm:P3_has_note</relationship>
789
                    </target_relation>
790
                </path>
791
                <range>
792
                    <source_node>originalsloc/p</source_node>
793
                    <target_node>
794
                        <entity>
795
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
796
                            <instance_generator name="Literal">
797
                                <arg name="text" type="xpath">text()</arg>
798
                            </instance_generator>
799
                        </entity>
800
                    </target_node>
801
                </range>
802
            </link>
803
            <link>
804
                <path>
805
                    <source_relation>
806
                        <relation>altformavail/p</relation>
807
                    </source_relation>
808
                    <target_relation>
809
                        <relationship>crm:P130i_features_are_also_found_on</relationship>
810
                        <entity>
811
                            <type>crm:E78_Collection</type>
812
                            <instance_generator name="UUID"/>
813
                            <label_generator name="CompositeLabel">
814
                                <arg name="label" type="constant">Collection Containing Similar Material as</arg>
815
                                <arg name="text" type="xpath">../../did/unittitle/text()</arg>
816
                            </label_generator>
817
                        </entity>
818
                        <relationship>crm:P3_has_note</relationship>
819
                    </target_relation>
820
                </path>
821
                <range>
822
                    <source_node>altformavail/p</source_node>
823
                    <target_node>
824
                        <entity>
825
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
826
                            <instance_generator name="Literal">
827
                                <arg name="text" type="xpath">text()</arg>
828
                            </instance_generator>
829
                        </entity>
830
                    </target_node>
831
                </range>
832
            </link>
833
            <link>
834
                <path>
835
                    <source_relation>
836
                        <relation>otherfindaid/p</relation>
837
                    </source_relation>
838
                    <target_relation>
839
                        <relationship>crm:P129i_is_subject_of</relationship>
840
                        <entity>
841
                            <type>crmpe:PE22_Persistent_Dataset</type>
842
                            <instance_generator name="UUID"/>
843
                            <additional>
844
                                <relationship>crm:P2_has_type</relationship>
845
                                <entity>
846
                                    <type>crm:E55_Type</type>
847
                                    <instance_info>
848
                                        <constant>metadata</constant>
849
                                    </instance_info>
850
                                    <instance_generator name="ConceptURI">
851
                                        <arg name="term" type="constant">metadata (otherfindaid)</arg>
852
                                    </instance_generator>
853
                                    <label_generator name="SimpleLabel">
854
                                        <arg name="label" type="constant">metadata (otherfindaid)</arg>
855
                                    </label_generator>
856
                                </entity>
857
                            </additional>
858
                        </entity>
859
                        <relationship>crm:P3_has_note</relationship>
860
                    </target_relation>
861
                </path>
862
                <range>
863
                    <source_node>otherfindaid/p</source_node>
864
                    <target_node>
865
                        <entity>
866
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
867
                            <instance_generator name="Literal">
868
                                <arg name="text" type="xpath">text()</arg>
869
                            </instance_generator>
870
                        </entity>
871
                    </target_node>
872
                    <comments>
873
                        <comment type="">
874
                            <rationale>This must not be confused with the eadheader, which is the primary metadata of this dataset.</rationale>
875
                            <alternatives/>
876
                            <typical_mistakes/>
877
                            <local_habits/>
878
                            <link_to_cook_book/>
879
                            <example>
880
                                <example_source/>
881
                                <example_target/>
882
                            </example>
883
                            <comments_last_update date="" person=""/>
884
                        </comment>
885
                    </comments>
886
                </range>
887
            </link>
888
            <link>
889
                <path>
890
                    <source_relation>
891
                        <relation>userestrict/p</relation>
892
                    </source_relation>
893
                    <target_relation>
894
                        <relationship>crm:P129i_is_subject_of</relationship>
895
                        <entity>
896
                            <type>crm:E30_Right</type>
897
                            <instance_generator name="UUID"/>
898
                            <additional>
899
                                <relationship>crm:P2_has_type</relationship>
900
                                <entity>
901
                                    <type>crm:E55_Type</type>
902
                                    <instance_info>
903
                                        <constant>Use Restriction</constant>
904
                                    </instance_info>
905
                                    <instance_generator name="UUID"/>
906
                                </entity>
907
                            </additional>
908
                        </entity>
909
                        <relationship>crm:P3_has_note</relationship>
910
                    </target_relation>
911
                </path>
912
                <range>
913
                    <source_node>userestrict/p</source_node>
914
                    <target_node>
915
                        <entity>
916
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
917
                            <instance_generator name="Literal">
918
                                <arg name="text" type="xpath">text()</arg>
919
                            </instance_generator>
920
                        </entity>
921
                    </target_node>
922
                    <comments>
923
                        <comment type="">
924
                            <rationale>Not precise enough</rationale>
925
                            <alternatives/>
926
                            <typical_mistakes/>
927
                            <local_habits/>
928
                            <link_to_cook_book/>
929
                            <example>
930
                                <example_source/>
931
                                <example_target/>
932
                            </example>
933
                            <comments_last_update date="" person=""/>
934
                        </comment>
935
                    </comments>
936
                </range>
937
            </link>
938
            <link>
939
                <path>
940
                    <source_relation>
941
                        <relation>acqinfo/p</relation>
942
                    </source_relation>
943
                    <target_relation>
944
                        <relationship>crm:P24i_changed_ownership_through</relationship>
945
                        <entity>
946
                            <type>crm:E8_Acquisition</type>
947
                            <instance_generator name="UUID"/>
948
                            <additional>
949
                                <relationship>crm:P2_has_type</relationship>
950
                                <entity>
951
                                    <type>crm:E55_Type</type>
952
                                    <instance_info>
953
                                        <constant>AcquisitionEvent</constant>
954
                                    </instance_info>
955
                                    <instance_generator name="ConceptURI">
956
                                        <arg name="term" type="constant">Use Restriction</arg>
957
                                    </instance_generator>
958
                                    <label_generator name="SimpleLabel">
959
                                        <arg name="label" type="constant">Use Restriction</arg>
960
                                    </label_generator>
961
                                </entity>
962
                            </additional>
963
                        </entity>
964
                        <relationship>crm:P3_has_note</relationship>
965
                    </target_relation>
966
                </path>
967
                <range>
968
                    <source_node>acqinfo/p</source_node>
969
                    <target_node>
970
                        <entity>
971
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
972
                            <instance_generator name="Literal">
973
                                <arg name="text" type="xpath">text()</arg>
974
                            </instance_generator>
975
                        </entity>
976
                    </target_node>
977
                </range>
978
            </link>
979
            <link>
980
                <path>
981
                    <source_relation>
982
                        <relation>custodhist/p</relation>
983
                    </source_relation>
984
                    <target_relation>
985
                        <relationship>crm:P24i_changed_ownership_through</relationship>
986
                        <entity>
987
                            <type>crm:E8_Acquisition</type>
988
                            <instance_generator name="UUID"/>
989
                            <label_generator name="CompositeLabel">
990
                                <arg name="label" type="constant">Acquisition Event of </arg>
991
                                <arg name="text" type="xpath">../../did/unittitle/text()</arg>
992
                            </label_generator>
993
                            <additional>
994
                                <relationship>crm:P2_has_type</relationship>
995
                                <entity>
996
                                    <type>crm:E55_Type</type>
997
                                    <instance_info>
998
                                        <constant>CustodialHistory</constant>
999
                                    </instance_info>
1000
                                    <instance_generator name="UUID"/>
1001
                                </entity>
1002
                            </additional>
1003
                        </entity>
1004
                        <relationship>crm:P3_has_note</relationship>
1005
                    </target_relation>
1006
                </path>
1007
                <range>
1008
                    <source_node>custodhist/p</source_node>
1009
                    <target_node>
1010
                        <entity>
1011
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
1012
                            <instance_generator name="Literal">
1013
                                <arg name="text" type="xpath">text()</arg>
1014
                            </instance_generator>
1015
                        </entity>
1016
                    </target_node>
1017
                </range>
1018
            </link>
1019
            <link>
1020
                <path>
1021
                    <source_relation>
1022
                        <relation>dsc/controlaccess/genreform</relation>
1023
                    </source_relation>
1024
                    <target_relation>
1025
                        <relationship>crm:P2_has_type</relationship>
1026
                    </target_relation>
1027
                </path>
1028
                <range>
1029
                    <source_node>dsc/controlaccess/genreform</source_node>
1030
                    <target_node>
1031
                        <entity>
1032
                            <type>crm:E55_Type</type>
1033
                            <instance_generator name="ConceptURI">
1034
                                <arg name="term" type="xpath">text()</arg>
1035
                            </instance_generator>
1036
                            <label_generator name="SimpleLabel">
1037
                                <arg name="label" type="xpath">text()</arg>
1038
                            </label_generator>
1039
                        </entity>
1040
                    </target_node>
1041
                </range>
1042
            </link>
1043
            <link>
1044
                <path>
1045
                    <source_relation>
1046
                        <relation>dsc/controlaccess/geogname</relation>
1047
                    </source_relation>
1048
                    <target_relation>
1049
                        <relationship>crm:P129_is_about</relationship>
1050
                    </target_relation>
1051
                </path>
1052
                <range>
1053
                    <source_node>dsc/controlaccess/geogname</source_node>
1054
                    <target_node>
1055
                        <entity>
1056
                            <type>crm:E53_Place</type>
1057
                            <instance_generator name="PlaceURI">
1058
                                <arg name="term" type="xpath">text()</arg>
1059
                            </instance_generator>
1060
                            <label_generator name="SimpleLabel">
1061
                                <arg name="label" type="xpath">text()</arg>
1062
                            </label_generator>
1063
                        </entity>
1064
                    </target_node>
1065
                </range>
1066
            </link>
1067
        </mapping>
1068
        <mapping>
1069
            <domain>
1070
                <source_node>/ead/eadheader/filedesc/publicationstmt</source_node>
1071
                <target_node>
1072
                    <entity>
1073
                        <type>crm:E39_Actor</type>
1074
                        <instance_generator name="UUID"/>
1075
                    </entity>
1076
                </target_node>
1077
            </domain>
1078
            <link>
1079
                <path>
1080
                    <source_relation>
1081
                        <relation>address/addressline</relation>
1082
                    </source_relation>
1083
                    <target_relation>
1084
                        <relationship>crm:P74_has_current_or_former_residence</relationship>
1085
                        <entity variable="p1">
1086
                            <type>crm:E53_Place</type>
1087
                            <instance_generator name="UUID"/>
1088
                            <label_generator name="CompositeLabel">
1089
                                <arg name="label" type="constant">Location of </arg>
1090
                                <arg name="text" type="xpath">../../publisher/text()</arg>
1091
                            </label_generator>
1092
                        </entity>
1093
                        <relationship>crm:P1_is_identified_by</relationship>
1094
                        <entity variable="a1">
1095
                            <type>crm:E45_Address</type>
1096
                            <instance_generator name="UUID"/>
1097
                            <label_generator name="CompositeLabel">
1098
                                <arg name="label" type="constant">Address for Location of</arg>
1099
                                <arg name="text" type="xpath">../../publisher/text()</arg>
1100
                            </label_generator>
1101
                        </entity>
1102
                        <relationship>crm:P3_has_note</relationship>
1103
                    </target_relation>
1104
                    <comments>
1105
                        <comment type="">
1106
                            <rationale>check with Nikos for new generator that concatenates the fields</rationale>
1107
                            <alternatives/>
1108
                            <typical_mistakes/>
1109
                            <local_habits/>
1110
                            <link_to_cook_book/>
1111
                            <example>
1112
                                <example_source/>
1113
                                <example_target/>
1114
                            </example>
1115
                            <comments_last_update date="" person=""/>
1116
                        </comment>
1117
                    </comments>
1118
                </path>
1119
                <range>
1120
                    <source_node>address/addressline</source_node>
1121
                    <target_node>
1122
                        <entity>
1123
                            <type>http://www.w3.org/2000/01/rdf-schema#Literal</type>
1124
                            <instance_generator name="Literal">
1125
                                <arg name="text" type="xpath">text()</arg>
1126
                            </instance_generator>
1127
                        </entity>
1128
                    </target_node>
1129
                </range>
1130
            </link>
1131
            <link>
1132
                <path>
1133
                    <source_relation>
1134
                        <relation>publisher</relation>
1135
                    </source_relation>
1136
                    <target_relation>
1137
                        <relationship>crm:P1_is_identified_by</relationship>
1138
                    </target_relation>
1139
                </path>
1140
                <range>
1141
                    <source_node>publisher</source_node>
1142
                    <target_node>
1143
                        <entity>
1144
                            <type>crm:E41_Appellation</type>
1145
                            <instance_generator name="ActorAppellationURI">
1146
                                <arg name="term" type="xpath">text()</arg>
1147
                            </instance_generator>
1148
                            <label_generator name="SimpleLabel">
1149
                                <arg name="label" type="xpath">text()</arg>
1150
                            </label_generator>
1151
                        </entity>
1152
                    </target_node>
1153
                </range>
1154
            </link>
1155
        </mapping>
1156
    </mappings>
1157

  
1158
</x3ml>
modules/dnet-msro-service/branches/saxonHE-SOLR772/src/test/resources/eu/dnetlib/x3m/maria-policy.xml
1
<generator_policy>
2
	<generator name="SimpleLabel">
3
		<pattern>{label}</pattern>
4
	</generator>
5
	<generator name="CompositeLabel">
6
		<pattern>{label} {text}</pattern>
7
	</generator>
8
	<generator name="LocalTermURI" prefix="acdm">
9
		<pattern>{hierarchy}/{term}</pattern>
10
	</generator>
11
	<generator name="GermanDateTime">
12
		<custom generatorClass="gr.forth.GermanDate">
13
			<set-arg name="bound" type="constant"/>
14
			<set-arg name="text"/>
15
		</custom>
16
	</generator>
17
	<generator name="URIorUUID">
18
		<custom generatorClass="gr.forth.URIorUUID">
19
			<set-arg name="text"/>
20
		</custom>
21
	</generator>
22
</generator_policy>
0 23

  
modules/dnet-msro-service/branches/saxonHE-SOLR772/src/test/resources/eu/dnetlib/x3m/clarin_service_mapping.x3ml
1
<x3ml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" source_type="xpath" version="1.0" xsi:noNamespaceSchemaLocation="x3ml_v1.0.xsd">
2
    <info>
3
        <title>Clarin CMDI: Service  -&gt; PE  Mapping File Official</title>
4
        <general_description/>
5
        <source>
6
            <source_info>
7
                <source_schema schema_file="service___03-11-2016183228___3958.xml" type="" version=""/>
8
            </source_info>
9
            <source_collection/>
10
        </source>
11
        <target>
12
            <target_info>
13
                <target_schema schema_file="cidoc_crm_v6.0-draft-2015January.rdfs" type="rdfs" version="6.0">CIDOC-CRM</target_schema>
14
                <namespaces>
15
                    <namespace prefix="crm" uri="http://www.cidoc-crm.org/cidoc-crm/"/>
16
                </namespaces>
17
            </target_info>
18
            <target_info>
19
                <target_schema schema_file="CRMdig_v3.2.rdfs" type="rdfs" version="3.2">CRMdig</target_schema>
20
                <namespaces>
21
                    <namespace prefix="crmdig" uri="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/"/>
22
                </namespaces>
23
            </target_info>
24
            <target_info>
25
                <target_schema schema_file="crmpe1.11___30-03-2017104444___6320.rdfs" type="rdfs" version="1.11">CRMpe</target_schema>
26
                <namespaces>
27
                    <namespace prefix="crmpe" uri="http://www.ics.forth.gr/isl/CRMext/CRMpe.rdfs/"/>
28
                </namespaces>
29
            </target_info>
30
            <target_info>
31
                <target_schema schema_file="CRMpc_v1.0.rdfs" type="rdfs" version="1.0">CRMpc</target_schema>
32
                <namespaces>
33
                    <namespace prefix="crm" uri="http://www.cidoc-crm.org/cidoc-crm/"/>
34
                </namespaces>
35
            </target_info>
36
            <target_collection/>
37
        </target>
38
        <mapping_info>
39
            <mapping_created_by_org>Clarin</mapping_created_by_org>
40
            <mapping_created_by_person>Matteo Lorenzini</mapping_created_by_person>
41
            <in_collaboration_with>George Bruseker</in_collaboration_with>
42
        </mapping_info>
43
        <example_data_info>
44
            <example_data_from>Clarin</example_data_from>
45
            <example_data_contact_person>Matteo Lorenzini</example_data_contact_person>
46
            <example_data_source_record xml_link="service___03-11-2016183228___3958.xml"/>
47
            <generator_policy_info generator_link="PARTHENOS-GeneratorPolicy_v1.0.1___27-03-2017121458___6731.xml"/>
48
            <example_data_target_record/>
49
            <thesaurus_info/>
50
        </example_data_info>
51
    </info>
52
    <namespaces>
53
        <namespace prefix="cmd" uri="http://www.clarin.eu/cmd/1"/>
54
        <namespace prefix="parthenos" uri="http://parthenos-project.eu/Clarin/VLO/"/>
55
        <namespace prefix="cmdp" uri="http://www.clarin.eu/cmd/1/profiles/clarin.eu:cr1:p_1288172614026"/>
56
    </namespaces>
57
    <mappings>
58
        <mapping>
59
            <domain>
60
                <source_node>/cmd:CMD</source_node>
61
                <target_node>
62
                    <entity>
63
                        <type>crmpe:PE22_Persistent_Dataset</type>
64
                        <instance_generator name="URIorUUID">
65
                            <arg name="text" type="xpath">cmd:Header/cmd:MdSelfLink/text()</arg>
66
                        </instance_generator>
67
                        <label_generator name="SimpleLabel">
68
                            <arg name="label" type="xpath">cmd:Header/cmd:MdSelfLink/text()</arg>
69
                        </label_generator>
70
                        <additional>
71
                            <relationship>crm:P2_has_type</relationship>
72
                            <entity>
73
                                <type>crm:E55_Type</type>
74
                                <instance_info>
75
                                    <constant>metadata</constant>
76
                                </instance_info>
77
                                <instance_generator name="ConceptURI">
78
                                    <arg name="term" type="constant">Metadata</arg>
79
                                </instance_generator>
80
                                <label_generator name="Constant">
81
                                    <arg name="text" type="constant">metadata</arg>
82
                                </label_generator>
83
                            </entity>
84
                        </additional>
85
                    </entity>
86
                </target_node>
87
                <comments>
88
                    <comment type="">
89
                        <rationale>Metadata record</rationale>
90
                        <alternatives/>
91
                        <typical_mistakes/>
92
                        <local_habits/>
93
                        <link_to_cook_book/>
94
                        <example>
95
                            <example_source/>
96
                            <example_target/>
97
                        </example>
98
                        <comments_last_update date="" person="Could indicate that this is a metadata record through typing"/>
99
                    </comment>
100
                </comments>
101
            </domain>
102
            <link>
103
                <path>
104
                    <source_relation>
105
                        <relation>cmd:Header</relation>
106
                    </source_relation>
107
                    <target_relation>
108
                        <relationship>crmdig:L11i_was_output_of</relationship>
109
                    </target_relation>
110
                </path>
111
                <range>
112
                    <source_node>cmd:Header</source_node>
113
                    <target_node>
114
                        <entity>
115
                            <type>crmdig:D7_Digital_Machine_Event</type>
116
                            <instance_generator name="UUID"/>
117
                            <label_generator name="CompositeLabel">
118
                                <arg name="label" type="constant">Creation of CDMI record </arg>
119
                                <arg name="text" type="xpath">cmd:MdSelfLink/text()</arg>
120
                            </label_generator>
121
                        </entity>
122
                    </target_node>
123
                </range>
124
            </link>
125
            <link>
126
                <path>
127
                    <source_relation>
128
                        <relation>cmd:Components/cmdp:OLAC-DcmiTerms</relation>
129
                    </source_relation>
130
                    <target_relation>
131
                        <relationship>crm:P129_is_about</relationship>
132
                    </target_relation>
133
                </path>
134
                <range>
135
                    <source_node>cmd:Components/cmdp:OLAC-DcmiTerms</source_node>
136
                    <target_node>
137
                        <entity>
138
                            <type>crmpe:PE8_E-Service</type>
139
                            <instance_generator name="ServiceURI">
140
                                <arg name="term" type="xpath">/cmd:CMD/cmd:Resources/cmd:ResourceProxyList/cmd:ResourceProxy/cmd:ResourceRef/text()</arg>
141
                            </instance_generator>
142
                            <label_generator name="SimpleLabel">
143
                                <arg name="label" type="xpath">/cmd:CMD/cmd:Resources/cmd:ResourceProxyList/cmd:ResourceProxy/cmd:ResourceRef/text()</arg>
144
                            </label_generator>
145
                        </entity>
146
                    </target_node>
147
                </range>
148
            </link>
149
        </mapping>
150
        <mapping>
151
            <domain>
152
                <source_node>/cmd:CMD/cmd:Header</source_node>
153
                <target_node>
154
                    <entity>
155
                        <type>crmdig:D7_Digital_Machine_Event</type>
156
                        <instance_generator name="UUID"/>
157
                    </entity>
158
                </target_node>
159
            </domain>
160
            <link>
161
                <path>
162
                    <source_relation>
163
                        <relation>cmd:MdCreationDate</relation>
164
                    </source_relation>
165
                    <target_relation>
166
                        <relationship>crm:P4_has_time-span</relationship>
167
                        <entity>
168
                            <type>crm:E52_Time-Span</type>
169
                            <instance_generator name="UUID"/>
170
                        </entity>
171
                        <relationship>crm:P82_at_some_time_within</relationship>
172
                    </target_relation>
173
                    <comments>
174
                        <comment type="">
175
                            <rationale/>
176
                            <alternatives/>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff