dor-services 4.25.1 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/dor-indexer +20 -19
- data/bin/dor-indexerd +3 -2
- data/config/certs/robots-dor-dev.crt +29 -0
- data/config/certs/robots-dor-dev.key +27 -0
- data/config/config_defaults.yml +0 -6
- data/config/dev_console_env.rb +65 -0
- data/config/environments/development.rb +84 -0
- data/config/environments/development.rb.old +84 -0
- data/config/environments/test.rb +84 -0
- data/lib/dor-services.rb +8 -18
- data/lib/dor/config.rb +18 -24
- data/lib/dor/datastreams/administrative_metadata_ds.rb +8 -7
- data/lib/dor/datastreams/content_metadata_ds.rb +200 -278
- data/lib/dor/datastreams/datastream_spec_solrizer.rb +1 -1
- data/lib/dor/datastreams/default_object_rights_ds.rb +10 -8
- data/lib/dor/datastreams/desc_metadata_ds.rb +30 -34
- data/lib/dor/datastreams/embargo_metadata_ds.rb +17 -13
- data/lib/dor/datastreams/events_ds.rb +12 -12
- data/lib/dor/datastreams/geo_metadata_ds.rb +3 -244
- data/lib/dor/datastreams/identity_metadata_ds.rb +34 -30
- data/lib/dor/datastreams/role_metadata_ds.rb +6 -6
- data/lib/dor/datastreams/simple_dublin_core_ds.rb +12 -9
- data/lib/dor/datastreams/version_metadata_ds.rb +14 -33
- data/lib/dor/datastreams/workflow_definition_ds.rb +18 -18
- data/lib/dor/datastreams/workflow_ds.rb +74 -65
- data/lib/dor/migrations/identifiable/assert_adminPolicy.rb +1 -1
- data/lib/dor/migrations/identifiable/fix_model_assertions.rb +1 -1
- data/lib/dor/migrations/identifiable/record_remediation.rb +2 -2
- data/lib/dor/migrations/identifiable/uriify_augmented_contentlocation_refs.rb +1 -1
- data/lib/dor/migrations/identifiable/uriify_contentlocation_refs.rb +1 -1
- data/lib/dor/migrations/processable/unify_workflows.rb +4 -4
- data/lib/dor/migrations/versionable/add_missing_version_md.rb +1 -1
- data/lib/dor/models/admin_policy_object.rb +1 -1
- data/lib/dor/models/assembleable.rb +3 -4
- data/lib/dor/models/collection.rb +0 -2
- data/lib/dor/models/contentable.rb +34 -35
- data/lib/dor/models/describable.rb +80 -122
- data/lib/dor/models/editable.rb +57 -73
- data/lib/dor/models/embargoable.rb +13 -15
- data/lib/dor/models/eventable.rb +3 -3
- data/lib/dor/models/geoable.rb +8 -9
- data/lib/dor/models/governable.rb +36 -54
- data/lib/dor/models/identifiable.rb +119 -115
- data/lib/dor/models/item.rb +4 -4
- data/lib/dor/models/itemizable.rb +9 -9
- data/lib/dor/models/presentable.rb +133 -0
- data/lib/dor/models/preservable.rb +4 -4
- data/lib/dor/models/processable.rb +29 -28
- data/lib/dor/models/publishable.rb +36 -30
- data/lib/dor/models/releasable.rb +310 -0
- data/lib/dor/models/shelvable.rb +14 -14
- data/lib/dor/models/upgradable.rb +13 -13
- data/lib/dor/models/versionable.rb +4 -7
- data/lib/dor/models/workflow_object.rb +16 -36
- data/lib/dor/services/cleanup_reset_service.rb +28 -34
- data/lib/dor/services/cleanup_service.rb +4 -4
- data/lib/dor/services/digital_stacks_service.rb +10 -10
- data/lib/dor/services/merge_service.rb +1 -1
- data/lib/dor/services/metadata_handlers/mdtoolkit_handler.rb +2 -2
- data/lib/dor/services/metadata_service.rb +20 -20
- data/lib/dor/services/registration_service.rb +26 -27
- data/lib/dor/services/reset_workspace_service.rb +15 -15
- data/lib/dor/services/sdr_ingest_service.rb +4 -4
- data/lib/dor/services/search_service.rb +4 -9
- data/lib/dor/services/suri_service.rb +5 -5
- data/lib/dor/services/technical_metadata_service.rb +3 -2
- data/lib/dor/utils/ng_tidy.rb +9 -9
- data/lib/dor/utils/predicate_patch.rb +1 -1
- data/lib/dor/utils/solr_doc_helper.rb +13 -5
- data/lib/dor/version.rb +1 -1
- data/lib/dor/workflow/document.rb +28 -30
- data/lib/dor/workflow/graph.rb +36 -36
- data/lib/dor/workflow/process.rb +12 -12
- data/lib/tasks/dor.rake +1 -1
- data/lib/tasks/rdoc.rake +3 -3
- metadata +67 -76
- data/lib/dor/datastreams/geo2mods.xsl +0 -867
- data/lib/dor/models/discoverable.rb +0 -64
- data/lib/dor/models/releaseable.rb +0 -357
- data/lib/dor/services/indexing_service.rb +0 -64
- data/lib/dor/utils/sdr_client.rb +0 -23
- data/lib/dor/utils/utc_date_field_mapper.rb +0 -7
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Klein
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2015-02-21 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: active-fedora
|
@@ -20,21 +20,18 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - "~>"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
23
|
+
version: '6.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
30
|
+
version: '6.0'
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: activesupport
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
34
34
|
requirements:
|
35
|
-
- - "~>"
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '3.2'
|
38
35
|
- - ">="
|
39
36
|
- !ruby/object:Gem::Version
|
40
37
|
version: 3.2.18
|
@@ -42,9 +39,6 @@ dependencies:
|
|
42
39
|
prerelease: false
|
43
40
|
version_requirements: !ruby/object:Gem::Requirement
|
44
41
|
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '3.2'
|
48
42
|
- - ">="
|
49
43
|
- !ruby/object:Gem::Version
|
50
44
|
version: 3.2.18
|
@@ -67,9 +61,6 @@ dependencies:
|
|
67
61
|
requirement: !ruby/object:Gem::Requirement
|
68
62
|
requirements:
|
69
63
|
- - "~>"
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version: '0.5'
|
72
|
-
- - ">="
|
73
64
|
- !ruby/object:Gem::Version
|
74
65
|
version: 0.5.1
|
75
66
|
type: :runtime
|
@@ -77,9 +68,6 @@ dependencies:
|
|
77
68
|
version_requirements: !ruby/object:Gem::Requirement
|
78
69
|
requirements:
|
79
70
|
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0.5'
|
82
|
-
- - ">="
|
83
71
|
- !ruby/object:Gem::Version
|
84
72
|
version: 0.5.1
|
85
73
|
- !ruby/object:Gem::Dependency
|
@@ -130,28 +118,28 @@ dependencies:
|
|
130
118
|
requirements:
|
131
119
|
- - "~>"
|
132
120
|
- !ruby/object:Gem::Version
|
133
|
-
version:
|
121
|
+
version: 1.6.0
|
134
122
|
type: :runtime
|
135
123
|
prerelease: false
|
136
124
|
version_requirements: !ruby/object:Gem::Requirement
|
137
125
|
requirements:
|
138
126
|
- - "~>"
|
139
127
|
- !ruby/object:Gem::Version
|
140
|
-
version:
|
128
|
+
version: 1.6.0
|
141
129
|
- !ruby/object:Gem::Dependency
|
142
130
|
name: om
|
143
131
|
requirement: !ruby/object:Gem::Requirement
|
144
132
|
requirements:
|
145
133
|
- - "~>"
|
146
134
|
- !ruby/object:Gem::Version
|
147
|
-
version:
|
135
|
+
version: '3.0'
|
148
136
|
type: :runtime
|
149
137
|
prerelease: false
|
150
138
|
version_requirements: !ruby/object:Gem::Requirement
|
151
139
|
requirements:
|
152
140
|
- - "~>"
|
153
141
|
- !ruby/object:Gem::Version
|
154
|
-
version:
|
142
|
+
version: '3.0'
|
155
143
|
- !ruby/object:Gem::Dependency
|
156
144
|
name: progressbar
|
157
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,28 +160,28 @@ dependencies:
|
|
172
160
|
requirements:
|
173
161
|
- - "~>"
|
174
162
|
- !ruby/object:Gem::Version
|
175
|
-
version: 1.
|
163
|
+
version: 1.1.7
|
176
164
|
type: :runtime
|
177
165
|
prerelease: false
|
178
166
|
version_requirements: !ruby/object:Gem::Requirement
|
179
167
|
requirements:
|
180
168
|
- - "~>"
|
181
169
|
- !ruby/object:Gem::Version
|
182
|
-
version: 1.
|
170
|
+
version: 1.1.7
|
183
171
|
- !ruby/object:Gem::Dependency
|
184
172
|
name: rest-client
|
185
173
|
requirement: !ruby/object:Gem::Requirement
|
186
174
|
requirements:
|
187
175
|
- - "~>"
|
188
176
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
177
|
+
version: 1.6.7
|
190
178
|
type: :runtime
|
191
179
|
prerelease: false
|
192
180
|
version_requirements: !ruby/object:Gem::Requirement
|
193
181
|
requirements:
|
194
182
|
- - "~>"
|
195
183
|
- !ruby/object:Gem::Version
|
196
|
-
version:
|
184
|
+
version: 1.6.7
|
197
185
|
- !ruby/object:Gem::Dependency
|
198
186
|
name: rsolr-ext
|
199
187
|
requirement: !ruby/object:Gem::Requirement
|
@@ -256,14 +244,14 @@ dependencies:
|
|
256
244
|
requirements:
|
257
245
|
- - "~>"
|
258
246
|
- !ruby/object:Gem::Version
|
259
|
-
version: '
|
247
|
+
version: '3.0'
|
260
248
|
type: :runtime
|
261
249
|
prerelease: false
|
262
250
|
version_requirements: !ruby/object:Gem::Requirement
|
263
251
|
requirements:
|
264
252
|
- - "~>"
|
265
253
|
- !ruby/object:Gem::Version
|
266
|
-
version: '
|
254
|
+
version: '3.0'
|
267
255
|
- !ruby/object:Gem::Dependency
|
268
256
|
name: systemu
|
269
257
|
requirement: !ruby/object:Gem::Requirement
|
@@ -324,64 +312,50 @@ dependencies:
|
|
324
312
|
name: addressable
|
325
313
|
requirement: !ruby/object:Gem::Requirement
|
326
314
|
requirements:
|
327
|
-
- -
|
315
|
+
- - '='
|
328
316
|
- !ruby/object:Gem::Version
|
329
|
-
version:
|
317
|
+
version: 2.3.5
|
330
318
|
type: :runtime
|
331
319
|
prerelease: false
|
332
320
|
version_requirements: !ruby/object:Gem::Requirement
|
333
321
|
requirements:
|
334
|
-
- -
|
322
|
+
- - '='
|
335
323
|
- !ruby/object:Gem::Version
|
336
|
-
version:
|
337
|
-
- !ruby/object:Gem::Dependency
|
338
|
-
name: retries
|
339
|
-
requirement: !ruby/object:Gem::Requirement
|
340
|
-
requirements:
|
341
|
-
- - ">="
|
342
|
-
- !ruby/object:Gem::Version
|
343
|
-
version: '0'
|
344
|
-
type: :runtime
|
345
|
-
prerelease: false
|
346
|
-
version_requirements: !ruby/object:Gem::Requirement
|
347
|
-
requirements:
|
348
|
-
- - ">="
|
349
|
-
- !ruby/object:Gem::Version
|
350
|
-
version: '0'
|
324
|
+
version: 2.3.5
|
351
325
|
- !ruby/object:Gem::Dependency
|
352
326
|
name: dor-workflow-service
|
353
327
|
requirement: !ruby/object:Gem::Requirement
|
354
328
|
requirements:
|
355
329
|
- - "~>"
|
356
330
|
- !ruby/object:Gem::Version
|
357
|
-
version: 1.7
|
331
|
+
version: '1.7'
|
332
|
+
- - ">="
|
333
|
+
- !ruby/object:Gem::Version
|
334
|
+
version: 1.7.1
|
358
335
|
type: :runtime
|
359
336
|
prerelease: false
|
360
337
|
version_requirements: !ruby/object:Gem::Requirement
|
361
338
|
requirements:
|
362
339
|
- - "~>"
|
363
340
|
- !ruby/object:Gem::Version
|
364
|
-
version: 1.7
|
341
|
+
version: '1.7'
|
342
|
+
- - ">="
|
343
|
+
- !ruby/object:Gem::Version
|
344
|
+
version: 1.7.1
|
365
345
|
- !ruby/object:Gem::Dependency
|
366
346
|
name: druid-tools
|
367
347
|
requirement: !ruby/object:Gem::Requirement
|
368
348
|
requirements:
|
369
349
|
- - "~>"
|
370
350
|
- !ruby/object:Gem::Version
|
371
|
-
version: '0.
|
372
|
-
- - ">="
|
373
|
-
- !ruby/object:Gem::Version
|
374
|
-
version: 0.4.1
|
351
|
+
version: '0.3'
|
375
352
|
type: :runtime
|
376
353
|
prerelease: false
|
377
354
|
version_requirements: !ruby/object:Gem::Requirement
|
378
355
|
requirements:
|
379
356
|
- - "~>"
|
380
357
|
- !ruby/object:Gem::Version
|
381
|
-
version: '0.
|
382
|
-
- - ">="
|
383
|
-
- !ruby/object:Gem::Version
|
384
|
-
version: 0.4.1
|
358
|
+
version: '0.3'
|
385
359
|
- !ruby/object:Gem::Dependency
|
386
360
|
name: lyber-utils
|
387
361
|
requirement: !ruby/object:Gem::Requirement
|
@@ -402,28 +376,28 @@ dependencies:
|
|
402
376
|
requirements:
|
403
377
|
- - "~>"
|
404
378
|
- !ruby/object:Gem::Version
|
405
|
-
version:
|
379
|
+
version: 1.4.4
|
406
380
|
type: :runtime
|
407
381
|
prerelease: false
|
408
382
|
version_requirements: !ruby/object:Gem::Requirement
|
409
383
|
requirements:
|
410
384
|
- - "~>"
|
411
385
|
- !ruby/object:Gem::Version
|
412
|
-
version:
|
386
|
+
version: 1.4.4
|
413
387
|
- !ruby/object:Gem::Dependency
|
414
|
-
name:
|
388
|
+
name: awesome_print
|
415
389
|
requirement: !ruby/object:Gem::Requirement
|
416
390
|
requirements:
|
417
|
-
- - "
|
391
|
+
- - ">="
|
418
392
|
- !ruby/object:Gem::Version
|
419
|
-
version: 0
|
420
|
-
type: :
|
393
|
+
version: '0'
|
394
|
+
type: :development
|
421
395
|
prerelease: false
|
422
396
|
version_requirements: !ruby/object:Gem::Requirement
|
423
397
|
requirements:
|
424
|
-
- - "
|
398
|
+
- - ">="
|
425
399
|
- !ruby/object:Gem::Version
|
426
|
-
version: 0
|
400
|
+
version: '0'
|
427
401
|
- !ruby/object:Gem::Dependency
|
428
402
|
name: fakeweb
|
429
403
|
requirement: !ruby/object:Gem::Requirement
|
@@ -467,7 +441,7 @@ dependencies:
|
|
467
441
|
- !ruby/object:Gem::Version
|
468
442
|
version: 1.0.1
|
469
443
|
- !ruby/object:Gem::Dependency
|
470
|
-
name:
|
444
|
+
name: pry
|
471
445
|
requirement: !ruby/object:Gem::Requirement
|
472
446
|
requirements:
|
473
447
|
- - ">="
|
@@ -480,48 +454,62 @@ dependencies:
|
|
480
454
|
- - ">="
|
481
455
|
- !ruby/object:Gem::Version
|
482
456
|
version: '0'
|
457
|
+
- !ruby/object:Gem::Dependency
|
458
|
+
name: rake
|
459
|
+
requirement: !ruby/object:Gem::Requirement
|
460
|
+
requirements:
|
461
|
+
- - "~>"
|
462
|
+
- !ruby/object:Gem::Version
|
463
|
+
version: '10.0'
|
464
|
+
type: :development
|
465
|
+
prerelease: false
|
466
|
+
version_requirements: !ruby/object:Gem::Requirement
|
467
|
+
requirements:
|
468
|
+
- - "~>"
|
469
|
+
- !ruby/object:Gem::Version
|
470
|
+
version: '10.0'
|
483
471
|
- !ruby/object:Gem::Dependency
|
484
472
|
name: rdoc
|
485
473
|
requirement: !ruby/object:Gem::Requirement
|
486
474
|
requirements:
|
487
475
|
- - "~>"
|
488
476
|
- !ruby/object:Gem::Version
|
489
|
-
version:
|
477
|
+
version: 4.0.1
|
490
478
|
type: :development
|
491
479
|
prerelease: false
|
492
480
|
version_requirements: !ruby/object:Gem::Requirement
|
493
481
|
requirements:
|
494
482
|
- - "~>"
|
495
483
|
- !ruby/object:Gem::Version
|
496
|
-
version:
|
484
|
+
version: 4.0.1
|
497
485
|
- !ruby/object:Gem::Dependency
|
498
486
|
name: rspec
|
499
487
|
requirement: !ruby/object:Gem::Requirement
|
500
488
|
requirements:
|
501
489
|
- - "~>"
|
502
490
|
- !ruby/object:Gem::Version
|
503
|
-
version: '3.
|
491
|
+
version: '3.1'
|
504
492
|
type: :development
|
505
493
|
prerelease: false
|
506
494
|
version_requirements: !ruby/object:Gem::Requirement
|
507
495
|
requirements:
|
508
496
|
- - "~>"
|
509
497
|
- !ruby/object:Gem::Version
|
510
|
-
version: '3.
|
498
|
+
version: '3.1'
|
511
499
|
- !ruby/object:Gem::Dependency
|
512
500
|
name: yard
|
513
501
|
requirement: !ruby/object:Gem::Requirement
|
514
502
|
requirements:
|
515
503
|
- - "~>"
|
516
504
|
- !ruby/object:Gem::Version
|
517
|
-
version:
|
505
|
+
version: 0.8.7
|
518
506
|
type: :development
|
519
507
|
prerelease: false
|
520
508
|
version_requirements: !ruby/object:Gem::Requirement
|
521
509
|
requirements:
|
522
510
|
- - "~>"
|
523
511
|
- !ruby/object:Gem::Version
|
524
|
-
version:
|
512
|
+
version: 0.8.7
|
525
513
|
description: Contains classes to register objects and initialize workflows
|
526
514
|
email:
|
527
515
|
- mbklein@stanford.edu
|
@@ -534,8 +522,14 @@ files:
|
|
534
522
|
- bin/dor-indexer
|
535
523
|
- bin/dor-indexerd
|
536
524
|
- config/certs/README
|
525
|
+
- config/certs/robots-dor-dev.crt
|
526
|
+
- config/certs/robots-dor-dev.key
|
537
527
|
- config/config_defaults.yml
|
528
|
+
- config/dev_console_env.rb
|
538
529
|
- config/dev_console_env.rb.example
|
530
|
+
- config/environments/development.rb
|
531
|
+
- config/environments/development.rb.old
|
532
|
+
- config/environments/test.rb
|
539
533
|
- config/predicate_mappings.yml
|
540
534
|
- lib/dor-services.rb
|
541
535
|
- lib/dor/config.rb
|
@@ -546,7 +540,6 @@ files:
|
|
546
540
|
- lib/dor/datastreams/desc_metadata_ds.rb
|
547
541
|
- lib/dor/datastreams/embargo_metadata_ds.rb
|
548
542
|
- lib/dor/datastreams/events_ds.rb
|
549
|
-
- lib/dor/datastreams/geo2mods.xsl
|
550
543
|
- lib/dor/datastreams/geo_metadata_ds.rb
|
551
544
|
- lib/dor/datastreams/identity.xsl
|
552
545
|
- lib/dor/datastreams/identity_metadata_ds.rb
|
@@ -569,7 +562,6 @@ files:
|
|
569
562
|
- lib/dor/models/collection.rb
|
570
563
|
- lib/dor/models/contentable.rb
|
571
564
|
- lib/dor/models/describable.rb
|
572
|
-
- lib/dor/models/discoverable.rb
|
573
565
|
- lib/dor/models/editable.rb
|
574
566
|
- lib/dor/models/embargoable.rb
|
575
567
|
- lib/dor/models/eventable.rb
|
@@ -579,10 +571,11 @@ files:
|
|
579
571
|
- lib/dor/models/item.rb
|
580
572
|
- lib/dor/models/itemizable.rb
|
581
573
|
- lib/dor/models/mods2dc.xslt
|
574
|
+
- lib/dor/models/presentable.rb
|
582
575
|
- lib/dor/models/preservable.rb
|
583
576
|
- lib/dor/models/processable.rb
|
584
577
|
- lib/dor/models/publishable.rb
|
585
|
-
- lib/dor/models/
|
578
|
+
- lib/dor/models/releasable.rb
|
586
579
|
- lib/dor/models/set.rb
|
587
580
|
- lib/dor/models/shelvable.rb
|
588
581
|
- lib/dor/models/upgradable.rb
|
@@ -591,7 +584,6 @@ files:
|
|
591
584
|
- lib/dor/services/cleanup_reset_service.rb
|
592
585
|
- lib/dor/services/cleanup_service.rb
|
593
586
|
- lib/dor/services/digital_stacks_service.rb
|
594
|
-
- lib/dor/services/indexing_service.rb
|
595
587
|
- lib/dor/services/merge_service.rb
|
596
588
|
- lib/dor/services/metadata_handlers/catalog_handler.rb
|
597
589
|
- lib/dor/services/metadata_handlers/mdtoolkit_handler.rb
|
@@ -605,9 +597,7 @@ files:
|
|
605
597
|
- lib/dor/services/tei2dc.xslt
|
606
598
|
- lib/dor/utils/ng_tidy.rb
|
607
599
|
- lib/dor/utils/predicate_patch.rb
|
608
|
-
- lib/dor/utils/sdr_client.rb
|
609
600
|
- lib/dor/utils/solr_doc_helper.rb
|
610
|
-
- lib/dor/utils/utc_date_field_mapper.rb
|
611
601
|
- lib/dor/version.rb
|
612
602
|
- lib/dor/workflow/document.rb
|
613
603
|
- lib/dor/workflow/graph.rb
|
@@ -637,8 +627,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
637
627
|
version: 1.3.6
|
638
628
|
requirements: []
|
639
629
|
rubyforge_project:
|
640
|
-
rubygems_version: 2.
|
630
|
+
rubygems_version: 2.4.2
|
641
631
|
signing_key:
|
642
632
|
specification_version: 4
|
643
633
|
summary: Ruby implmentation of DOR services used by the SULAIR Digital Library
|
644
634
|
test_files: []
|
635
|
+
has_rdoc:
|
@@ -1,867 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!--
|
3
|
-
geo2mods.xsl - Transformation from ISO 19139 XML into MODS v3
|
4
|
-
|
5
|
-
|
6
|
-
Copyright 2013-2014, The Board of Trustees of the Leland Stanford Junior University
|
7
|
-
|
8
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
-
you may not use this file except in compliance with the License.
|
10
|
-
You may obtain a copy of the License at
|
11
|
-
|
12
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
13
|
-
|
14
|
-
Unless required by applicable law or agreed to in writing, software
|
15
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
-
See the License for the specific language governing permissions and
|
18
|
-
limitations under the License.
|
19
|
-
|
20
|
-
|
21
|
-
Created by Kim Durante and Darren Hardy, Stanford University Libraries
|
22
|
-
|
23
|
-
Requires parameters:
|
24
|
-
* geometryType: One of Point, LineString, Polygon, Curve, or Grid (Raster).
|
25
|
-
see
|
26
|
-
http://www.schemacentral.com/sc/niem21/t-gml32_GeometryPropertyType.html
|
27
|
-
* purl - e.g., http://purl.stanford.edu/aa111bb2222
|
28
|
-
* zipName - e.g., data.zip
|
29
|
-
|
30
|
-
TODO:
|
31
|
-
* Series statements may need work?
|
32
|
-
-->
|
33
|
-
<xsl:stylesheet
|
34
|
-
xmlns="http://www.loc.gov/mods/v3"
|
35
|
-
xmlns:gco="http://www.isotc211.org/2005/gco"
|
36
|
-
xmlns:gmi="http://www.isotc211.org/2005/gmi"
|
37
|
-
xmlns:gmd="http://www.isotc211.org/2005/gmd"
|
38
|
-
xmlns:gml="http://www.opengis.net/gml"
|
39
|
-
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
40
|
-
version="1.0" exclude-result-prefixes="gml gmd gco gmi xsl">
|
41
|
-
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
|
42
|
-
<xsl:strip-space elements="*"/>
|
43
|
-
<xsl:param name="geometryType"/>
|
44
|
-
<xsl:param name="purl"/>
|
45
|
-
<xsl:param name="zipName" select="'data.zip'"/>
|
46
|
-
<!-- The coordinates value for MODS v3 is quite vague,
|
47
|
-
so we have a variety of formats:
|
48
|
-
GMD, WKT, WMS, GML, GeoRSS, MARC034, MARC255 (default)
|
49
|
-
-->
|
50
|
-
<xsl:param name="geoformat" select="'MARC255'"/>
|
51
|
-
<xsl:param name="fileIdentifier" select="''"/>
|
52
|
-
<xsl:variable name="format">
|
53
|
-
<xsl:choose>
|
54
|
-
<xsl:when test="contains(gmd:MD_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:distributionFormat/gmd:MD_Format/gmd:name, 'Raster Dataset')">
|
55
|
-
<xsl:text>image/tiff</xsl:text>
|
56
|
-
</xsl:when>
|
57
|
-
<xsl:when test="contains(gmd:MD_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:distributionFormat/gmd:MD_Format/gmd:name, 'GeoTIFF')">
|
58
|
-
<xsl:text>image/tiff</xsl:text>
|
59
|
-
</xsl:when>
|
60
|
-
<xsl:when test="contains(gmd:MD_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:distributionFormat/gmd:MD_Format/gmd:name, 'Shapefile')">
|
61
|
-
<xsl:text>application/x-esri-shapefile</xsl:text>
|
62
|
-
</xsl:when>
|
63
|
-
</xsl:choose>
|
64
|
-
</xsl:variable>
|
65
|
-
<xsl:template match="/">
|
66
|
-
<mods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" version="3.4" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd">
|
67
|
-
<xsl:for-each select="/gmi:MI_Metadata|/gmd:MD_Metadata|//gmd:MD_Metadata">
|
68
|
-
<xsl:if test="gmd:fileIdentifier/gco:CharacterString/text()">
|
69
|
-
<xsl:variable name="fileIdentifier" select="."/>
|
70
|
-
</xsl:if>
|
71
|
-
<xsl:variable name="purl" select="gmd:dataSetURI"/>
|
72
|
-
|
73
|
-
<titleInfo>
|
74
|
-
<title>
|
75
|
-
<xsl:apply-templates select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title"/>
|
76
|
-
</title>
|
77
|
-
</titleInfo>
|
78
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:alternateTitle">
|
79
|
-
<titleInfo>
|
80
|
-
<title type="alternative">
|
81
|
-
<xsl:value-of select="."/>
|
82
|
-
</title>
|
83
|
-
</titleInfo>
|
84
|
-
</xsl:for-each>
|
85
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:alternateTitle">
|
86
|
-
<titleInfo>
|
87
|
-
<title displayLabel="Alternative title">
|
88
|
-
<xsl:value-of select="."/>
|
89
|
-
</title>
|
90
|
-
</titleInfo>
|
91
|
-
</xsl:for-each>
|
92
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode[@codeListValue='originator']">
|
93
|
-
<xsl:choose>
|
94
|
-
<xsl:when test="ancestor-or-self::*/gmd:individualName">
|
95
|
-
<name type="personal">
|
96
|
-
<namePart>
|
97
|
-
<xsl:value-of select="ancestor-or-self::*/gmd:individualName"/>
|
98
|
-
</namePart>
|
99
|
-
<role>
|
100
|
-
<!-- personal author -->
|
101
|
-
<roleTerm type="text" authority="marcrelator">creator</roleTerm>
|
102
|
-
</role>
|
103
|
-
</name>
|
104
|
-
</xsl:when>
|
105
|
-
<xsl:when test="ancestor-or-self::*/gmd:organisationName">
|
106
|
-
<name type="corporate">
|
107
|
-
<namePart>
|
108
|
-
<xsl:value-of select="ancestor-or-self::*/gmd:organisationName"/>
|
109
|
-
</namePart>
|
110
|
-
<role>
|
111
|
-
<!-- corporate author -->
|
112
|
-
<roleTerm type="text" authority="marcrelator">creator</roleTerm>
|
113
|
-
</role>
|
114
|
-
</name>
|
115
|
-
</xsl:when>
|
116
|
-
</xsl:choose>
|
117
|
-
</xsl:for-each>
|
118
|
-
|
119
|
-
<!-- typeOfResource for SW - see http://www.loc.gov/standards/mods/v3/mods-userguide-elements.html -->
|
120
|
-
<typeOfResource>cartographic</typeOfResource>
|
121
|
-
<typeOfResource>software, multimedia</typeOfResource>
|
122
|
-
<genre>
|
123
|
-
<xsl:attribute name="authority">lcgft</xsl:attribute>
|
124
|
-
<xsl:attribute name="valueURI">http://id.loc.gov/authorities/genreForms/gf2011026297</xsl:attribute>
|
125
|
-
<xsl:text>Geospatial data</xsl:text>
|
126
|
-
</genre>
|
127
|
-
<genre>
|
128
|
-
<xsl:attribute name="authority">rdacontent</xsl:attribute>
|
129
|
-
<xsl:attribute name="valueURI">http://rdvocab.info/termList/RDAContentType/1001</xsl:attribute>
|
130
|
-
<xsl:text>cartographic dataset</xsl:text>
|
131
|
-
</genre>
|
132
|
-
<originInfo>
|
133
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode[@codeListValue='publisher']">
|
134
|
-
<publisher>
|
135
|
-
<xsl:choose>
|
136
|
-
<xsl:when test="ancestor-or-self::*/gmd:organisationName">
|
137
|
-
<xsl:value-of select="ancestor-or-self::*/gmd:organisationName"/>
|
138
|
-
</xsl:when>
|
139
|
-
<xsl:when test="ancestor-or-self::*/gmd:individualName">
|
140
|
-
<xsl:value-of select="ancestor-or-self::*/gmd:individualName"/>
|
141
|
-
</xsl:when>
|
142
|
-
</xsl:choose>
|
143
|
-
</publisher>
|
144
|
-
<xsl:for-each select="ancestor-or-self::*/gmd:contactInfo">
|
145
|
-
<place>
|
146
|
-
<placeTerm type="text">
|
147
|
-
<xsl:value-of select="ancestor-or-self::*/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:city"/>
|
148
|
-
<xsl:if test="ancestor-or-self::*/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:city">, </xsl:if>
|
149
|
-
<xsl:value-of select="ancestor-or-self::*/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:administrativeArea"/>
|
150
|
-
<xsl:if test="ancestor-or-self::*/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:administrativeArea">, </xsl:if>
|
151
|
-
<xsl:value-of select="ancestor-or-self::*/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:country"/>
|
152
|
-
</placeTerm>
|
153
|
-
</place>
|
154
|
-
</xsl:for-each>
|
155
|
-
</xsl:for-each>
|
156
|
-
<dateIssued encoding="w3cdtf" keyDate="yes">
|
157
|
-
<!-- strip MM-DD, oupput YYYY -->
|
158
|
-
<xsl:choose>
|
159
|
-
<xsl:when test="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date">
|
160
|
-
<xsl:value-of select="substring(gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date,1,4)"/>
|
161
|
-
</xsl:when>
|
162
|
-
<xsl:otherwise>unknown</xsl:otherwise>
|
163
|
-
</xsl:choose>
|
164
|
-
</dateIssued>
|
165
|
-
|
166
|
-
|
167
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords">
|
168
|
-
<xsl:if test="gmd:type/gmd:MD_KeywordTypeCode[@codeListValue='temporal']">
|
169
|
-
<xsl:for-each select="gmd:keyword">
|
170
|
-
|
171
|
-
<xsl:choose>
|
172
|
-
|
173
|
-
<!-- 4 digit year -->
|
174
|
-
<xsl:when test="string-length()=4">
|
175
|
-
<dateValid>
|
176
|
-
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
177
|
-
<xsl:value-of select="."/>
|
178
|
-
</dateValid>
|
179
|
-
</xsl:when>
|
180
|
-
|
181
|
-
<!-- range of dates in YYYY-YYYY format -->
|
182
|
-
|
183
|
-
<xsl:when test="contains(./*,'-')">
|
184
|
-
<dateValid>
|
185
|
-
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
186
|
-
<xsl:attribute name="point">start</xsl:attribute>
|
187
|
-
<xsl:value-of select="substring-before(*,'-')"/>
|
188
|
-
</dateValid>
|
189
|
-
<dateValid>
|
190
|
-
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
191
|
-
<xsl:attribute name="point">end</xsl:attribute>
|
192
|
-
<xsl:value-of select="substring-after(*,'-')"/>
|
193
|
-
</dateValid>
|
194
|
-
</xsl:when>
|
195
|
-
|
196
|
-
<!-- other -->
|
197
|
-
|
198
|
-
<xsl:otherwise>
|
199
|
-
<dateValid>
|
200
|
-
<xsl:value-of select="."/>
|
201
|
-
</dateValid>
|
202
|
-
</xsl:otherwise>
|
203
|
-
</xsl:choose>
|
204
|
-
</xsl:for-each>
|
205
|
-
</xsl:if>
|
206
|
-
</xsl:for-each>
|
207
|
-
|
208
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:edition">
|
209
|
-
<edition>
|
210
|
-
<xsl:value-of select="."/>
|
211
|
-
</edition>
|
212
|
-
</xsl:for-each>
|
213
|
-
</originInfo>
|
214
|
-
<language>
|
215
|
-
<languageTerm authority="iso639-2b">
|
216
|
-
<xsl:value-of select="gmd:language/gmd:LanguageCode/@codeListValue"/>
|
217
|
-
</languageTerm>
|
218
|
-
</language>
|
219
|
-
<physicalDescription>
|
220
|
-
<form>
|
221
|
-
<xsl:apply-templates select="gmd:distributionInfo/gmd:MD_Distribution/gmd:distributionFormat/gmd:MD_Format/gmd:name"/>
|
222
|
-
</form>
|
223
|
-
<xsl:for-each select="gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:transferSize">
|
224
|
-
<extent>
|
225
|
-
<xsl:value-of select="gco:Real"/>
|
226
|
-
<xsl:if test="ancestor-or-self::*/gmd:MD_DigitalTransferOptions/gmd:unitsOfDistribution">
|
227
|
-
<xsl:text> </xsl:text>
|
228
|
-
<xsl:value-of select="ancestor-or-self::*/gmd:MD_DigitalTransferOptions/gmd:unitsOfDistribution"/>
|
229
|
-
</xsl:if>
|
230
|
-
</extent>
|
231
|
-
|
232
|
-
<!-- The digitalOrigin is coded here:
|
233
|
-
http://www.loc.gov/standards/mods/v3/mods-userguide-elements.html#digitalorigin
|
234
|
-
-->
|
235
|
-
</xsl:for-each>
|
236
|
-
<digitalOrigin>born digital</digitalOrigin>
|
237
|
-
</physicalDescription>
|
238
|
-
<subject>
|
239
|
-
<cartographics>
|
240
|
-
<xsl:choose>
|
241
|
-
<xsl:when test="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution">
|
242
|
-
<scale>
|
243
|
-
<xsl:text>1:</xsl:text>
|
244
|
-
<xsl:value-of select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer"/>
|
245
|
-
</scale>
|
246
|
-
</xsl:when>
|
247
|
-
<xsl:otherwise>
|
248
|
-
<scale>
|
249
|
-
<xsl:text>Scale not given.</xsl:text>
|
250
|
-
</scale>
|
251
|
-
</xsl:otherwise>
|
252
|
-
</xsl:choose>
|
253
|
-
<projection>
|
254
|
-
<!-- Use '::' since the spec requires a version here (e.g., :7.4:) but it's generally left blank -->
|
255
|
-
<xsl:value-of select="gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:codeSpace/gco:CharacterString"/>
|
256
|
-
<xsl:text>::</xsl:text>
|
257
|
-
<xsl:value-of select="gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString"/>
|
258
|
-
</projection>
|
259
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox">
|
260
|
-
<coordinates>
|
261
|
-
<xsl:choose>
|
262
|
-
<xsl:when test="$geoformat = 'GMD'">
|
263
|
-
<gmd:EX_GeographicBoundingBox xmlns:gmd="http://www.isotc211.org/2005/gmd">
|
264
|
-
<gmd:westBoundLongitude>
|
265
|
-
<gco:Decimal>
|
266
|
-
<xsl:value-of select="gmd:westBoundLongitude/gco:Decimal"/>
|
267
|
-
</gco:Decimal>
|
268
|
-
</gmd:westBoundLongitude>
|
269
|
-
<gmd:eastBoundLongitude>
|
270
|
-
<gco:Decimal>
|
271
|
-
<xsl:value-of select="gmd:eastBoundLongitude/gco:Decimal"/>
|
272
|
-
</gco:Decimal>
|
273
|
-
</gmd:eastBoundLongitude>
|
274
|
-
<gmd:southBoundLatitude>
|
275
|
-
<gco:Decimal>
|
276
|
-
<xsl:value-of select="gmd:southBoundLatitude/gco:Decimal"/>
|
277
|
-
</gco:Decimal>
|
278
|
-
</gmd:southBoundLatitude>
|
279
|
-
<gmd:northBoundLatitude>
|
280
|
-
<gco:Decimal>
|
281
|
-
<xsl:value-of select="gmd:northBoundLatitude/gco:Decimal"/>
|
282
|
-
</gco:Decimal>
|
283
|
-
</gmd:northBoundLatitude>
|
284
|
-
</gmd:EX_GeographicBoundingBox>
|
285
|
-
</xsl:when>
|
286
|
-
<!-- WKT is x y, x y
|
287
|
-
|
288
|
-
POLYGON((sw, nw, ne, se, sw))
|
289
|
-
-->
|
290
|
-
<xsl:when test="$geoformat = 'WKT'">
|
291
|
-
<xsl:text>POLYGON((</xsl:text>
|
292
|
-
<xsl:value-of select="gmd:westBoundLongitude/gco:Decimal"/>
|
293
|
-
<xsl:text> </xsl:text>
|
294
|
-
<xsl:value-of select="gmd:southBoundLatitude/gco:Decimal"/>
|
295
|
-
<xsl:text>, </xsl:text>
|
296
|
-
<xsl:value-of select="gmd:westBoundLongitude/gco:Decimal"/>
|
297
|
-
<xsl:text> </xsl:text>
|
298
|
-
<xsl:value-of select="gmd:northBoundLatitude/gco:Decimal"/>
|
299
|
-
<xsl:text>, </xsl:text>
|
300
|
-
<xsl:value-of select="gmd:eastBoundLongitude/gco:Decimal"/>
|
301
|
-
<xsl:text> </xsl:text>
|
302
|
-
<xsl:value-of select="gmd:northBoundLatitude/gco:Decimal"/>
|
303
|
-
<xsl:text>, </xsl:text>
|
304
|
-
<xsl:value-of select="gmd:eastBoundLongitude/gco:Decimal"/>
|
305
|
-
<xsl:text> </xsl:text>
|
306
|
-
<xsl:value-of select="gmd:southBoundLatitude/gco:Decimal"/>
|
307
|
-
<xsl:text>, </xsl:text>
|
308
|
-
<xsl:value-of select="gmd:westBoundLongitude/gco:Decimal"/>
|
309
|
-
<xsl:text> </xsl:text>
|
310
|
-
<xsl:value-of select="gmd:southBoundLatitude/gco:Decimal"/>
|
311
|
-
<xsl:text>))</xsl:text>
|
312
|
-
</xsl:when>
|
313
|
-
<xsl:when test="$geoformat = 'WMS'">
|
314
|
-
<!-- WMS
|
315
|
-
Uses min/max as attributes
|
316
|
-
|
317
|
-
Example:
|
318
|
-
|
319
|
-
<wms:BoundingBox xmlns:wms="http://www.opengis.net/wms"
|
320
|
-
CRS="EPSG:4326"
|
321
|
-
minx="-97.119945" miny="25.467075"
|
322
|
-
maxx="-82.307619" maxy="30.665492"/>
|
323
|
-
-->
|
324
|
-
<wms:BoundingBox xmlns:wms="http://www.opengis.net/wms">
|
325
|
-
<xsl:attribute name="CRS">EPSG:4326</xsl:attribute>
|
326
|
-
<xsl:attribute name="minx">
|
327
|
-
<xsl:value-of select="gmd:westBoundLongitude/gco:Decimal"/>
|
328
|
-
</xsl:attribute>
|
329
|
-
<xsl:attribute name="miny">
|
330
|
-
<xsl:value-of select="gmd:southBoundLatitude/gco:Decimal"/>
|
331
|
-
</xsl:attribute>
|
332
|
-
<xsl:attribute name="maxx">
|
333
|
-
<xsl:value-of select="gmd:eastBoundLongitude/gco:Decimal"/>
|
334
|
-
</xsl:attribute>
|
335
|
-
<xsl:attribute name="maxy">
|
336
|
-
<xsl:value-of select="gmd:northBoundLatitude/gco:Decimal"/>
|
337
|
-
</xsl:attribute>
|
338
|
-
</wms:BoundingBox>
|
339
|
-
</xsl:when>
|
340
|
-
<xsl:when test="$geoformat = 'GML'">
|
341
|
-
<!-- GML
|
342
|
-
Using SW and NE corners in (x, y) coordinates
|
343
|
-
|
344
|
-
Example:
|
345
|
-
|
346
|
-
<gml:Envelope xmlns:gml="http://www.opengis.net/gml/3.2" srsName="EPSG:4326">
|
347
|
-
<gml:lowerCorner>-97.119945 25.467075</gml:lowerCorner>
|
348
|
-
<gml:upperCorner>-82.307619 30.665492</gml:upperCorner>
|
349
|
-
</gml:Envelope>
|
350
|
-
-->
|
351
|
-
<gml:Envelope xmlns:gml="http://www.opengis.net/gml/3.2">
|
352
|
-
<xsl:attribute name="srsName">
|
353
|
-
<xsl:value-of select="//gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:codeSpace/gco:CharacterString"/>
|
354
|
-
<xsl:text>:</xsl:text>
|
355
|
-
<xsl:value-of select="//gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString"/>
|
356
|
-
</xsl:attribute>
|
357
|
-
<gml:lowerCorner>
|
358
|
-
<xsl:value-of select="gmd:westBoundLongitude/gco:Decimal"/>
|
359
|
-
<xsl:text> </xsl:text>
|
360
|
-
<xsl:value-of select="gmd:southBoundLatitude/gco:Decimal"/>
|
361
|
-
</gml:lowerCorner>
|
362
|
-
<gml:upperCorner>
|
363
|
-
<xsl:value-of select="gmd:eastBoundLongitude/gco:Decimal"/>
|
364
|
-
<xsl:text> </xsl:text>
|
365
|
-
<xsl:value-of select="gmd:northBoundLatitude/gco:Decimal"/>
|
366
|
-
</gml:upperCorner>
|
367
|
-
</gml:Envelope>
|
368
|
-
</xsl:when>
|
369
|
-
<xsl:when test="$geoformat = 'GeoRSS'">
|
370
|
-
<!-- GeoRSS:
|
371
|
-
Rectangular envelope property element containing two pairs of coordinates
|
372
|
-
(lower left envelope corner, upper right envelope corner) representing
|
373
|
-
latitude then longitude in the WGS84 coordinate reference system.
|
374
|
-
|
375
|
-
Example:
|
376
|
-
|
377
|
-
<georss:box>42.943 -71.032 43.039 -69.856</georss:box>
|
378
|
-
-->
|
379
|
-
<georss:box xmlns:georss="http://www.georss.org/georss">
|
380
|
-
<xsl:value-of select="gmd:southBoundLatitude/gco:Decimal"/>
|
381
|
-
<xsl:text> </xsl:text>
|
382
|
-
<xsl:value-of select="gmd:westBoundLongitude/gco:Decimal"/>
|
383
|
-
<xsl:text> </xsl:text>
|
384
|
-
<xsl:value-of select="gmd:northBoundLatitude/gco:Decimal"/>
|
385
|
-
<xsl:text> </xsl:text>
|
386
|
-
<xsl:value-of select="gmd:eastBoundLongitude/gco:Decimal"/>
|
387
|
-
</georss:box>
|
388
|
-
</xsl:when>
|
389
|
-
<xsl:when test="$geoformat = 'MARC034'">
|
390
|
-
<!-- MARC 034
|
391
|
-
Subfields $d, $e, $f, and $g always appear together. The coordinates
|
392
|
-
may be recorded in the form hdddmmss (hemisphere-degrees-minutes-seconds),
|
393
|
-
however, other forms are also allowed, such as decimal degrees.
|
394
|
-
The subelements are each right justified and unused positions contain zeros.
|
395
|
-
|
396
|
-
$d - Coordinates - westernmost longitude (NR)
|
397
|
-
$e - Coordinates - easternmost longitude (NR)
|
398
|
-
$f - Coordinates - northernmost latitude (NR)
|
399
|
-
$g - Coordinates - southernmost latitude (NR)
|
400
|
-
|
401
|
-
Example:
|
402
|
-
|
403
|
-
$d-097.119945$e-082.307619$f+30.665492$g+25.467075
|
404
|
-
|
405
|
-
See http://www.w3.org/TR/1999/REC-xslt-19991116#format-number
|
406
|
-
-->
|
407
|
-
<xsl:text>$d</xsl:text>
|
408
|
-
<xsl:value-of select="format-number(gmd:westBoundLongitude/gco:Decimal, '+000.000000;-000.000000')"/>
|
409
|
-
<xsl:text>$e</xsl:text>
|
410
|
-
<xsl:value-of select="format-number(gmd:eastBoundLongitude/gco:Decimal, '+000.000000;-000.000000')"/>
|
411
|
-
<xsl:text>$f</xsl:text>
|
412
|
-
<xsl:value-of select="format-number(gmd:northBoundLatitude/gco:Decimal, '+00.000000;-00.000000')"/>
|
413
|
-
<xsl:text>$g</xsl:text>
|
414
|
-
<xsl:value-of select="format-number(gmd:southBoundLatitude/gco:Decimal, '+00.000000;-00.000000')"/>
|
415
|
-
</xsl:when>
|
416
|
-
<xsl:otherwise>
|
417
|
-
<!-- MARC 255 $c:
|
418
|
-
Coordinates are recorded in the order of
|
419
|
-
westernmost longitude, easternmost longitude,
|
420
|
-
northernmost latitude, and southernmost latitude,
|
421
|
-
and separated with double-hyphen and / characters.
|
422
|
-
|
423
|
-
XXX: Note that this leaves the coordinates in decimal
|
424
|
-
degrees whereas 255c suggests deg-min-sec.
|
425
|
-
|
426
|
-
Example:
|
427
|
-
|
428
|
-
-97.119945 -- -82.307619/30.665492 -- 25.467075
|
429
|
-
|
430
|
-
See http://www.loc.gov/marc/bibliographic/bd255.html $c
|
431
|
-
-->
|
432
|
-
<xsl:value-of select="gmd:westBoundLongitude/gco:Decimal"/>
|
433
|
-
<xsl:text> -- </xsl:text>
|
434
|
-
<xsl:value-of select="gmd:eastBoundLongitude/gco:Decimal"/>
|
435
|
-
<xsl:text>/</xsl:text>
|
436
|
-
<xsl:value-of select="gmd:northBoundLatitude/gco:Decimal"/>
|
437
|
-
<xsl:text> -- </xsl:text>
|
438
|
-
<xsl:value-of select="gmd:southBoundLatitude/gco:Decimal"/>
|
439
|
-
</xsl:otherwise>
|
440
|
-
</xsl:choose>
|
441
|
-
</coordinates>
|
442
|
-
</xsl:for-each>
|
443
|
-
</cartographics>
|
444
|
-
</subject>
|
445
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract">
|
446
|
-
<abstract displayLabel="Abstract">
|
447
|
-
<xsl:attribute name="lang">eng</xsl:attribute>
|
448
|
-
<xsl:value-of select="gco:CharacterString"/>
|
449
|
-
</abstract>
|
450
|
-
</xsl:for-each>
|
451
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:purpose">
|
452
|
-
<abstract displayLabel="Purpose">
|
453
|
-
<xsl:attribute name="lang">eng</xsl:attribute>
|
454
|
-
<xsl:value-of select="gco:CharacterString"/>
|
455
|
-
</abstract>
|
456
|
-
</xsl:for-each>
|
457
|
-
<!-- Reports, citation, other info, etc. -->
|
458
|
-
<xsl:for-each select="gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:report/gmd:DQ_ConceptualConsistency/gmd:evaluationMethodDescription">
|
459
|
-
<note displayLabel="Conceptual consistency report">
|
460
|
-
<xsl:attribute name="lang">eng</xsl:attribute>
|
461
|
-
<xsl:value-of select="gco:CharacterString"/>
|
462
|
-
</note>
|
463
|
-
</xsl:for-each>
|
464
|
-
<xsl:for-each select="gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:report/gmd:DQ_AbsoluteExternalPositionalAccuracy/gmd:evaluationMethodDescription">
|
465
|
-
<note displayLabel="Attribute accuracy report">
|
466
|
-
<xsl:attribute name="lang">eng</xsl:attribute>
|
467
|
-
<xsl:value-of select="gco:CharacterString"/>
|
468
|
-
</note>
|
469
|
-
</xsl:for-each>
|
470
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:credit">
|
471
|
-
<note displayLabel="Preferred citation">
|
472
|
-
<xsl:attribute name="lang">eng</xsl:attribute>
|
473
|
-
<xsl:value-of select="gco:CharacterString"/>
|
474
|
-
</note>
|
475
|
-
</xsl:for-each>
|
476
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:supplementalInformation">
|
477
|
-
<note displayLabel="Supplemental information">
|
478
|
-
<xsl:value-of select="gco:CharacterString"/>
|
479
|
-
</note>
|
480
|
-
</xsl:for-each>
|
481
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints/gmd:MD_Constraints">
|
482
|
-
<xsl:for-each select="gmd:useLimitation">
|
483
|
-
<note displayLabel="Use limitation">
|
484
|
-
<xsl:value-of select="gco:CharacterString"/>
|
485
|
-
</note>
|
486
|
-
</xsl:for-each>
|
487
|
-
</xsl:for-each>
|
488
|
-
<!-- MODS relatedItem type='host'-->
|
489
|
-
<xsl:choose>
|
490
|
-
<xsl:when test="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:aggregationInfo/gmd:MD_AggregateInformation">
|
491
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:aggregationInfo/gmd:MD_AggregateInformation">
|
492
|
-
<xsl:if test="gmd:associationType/gmd:DS_AssociationTypeCode[@codeListValue='largerWorkCitation']">
|
493
|
-
<relatedItem>
|
494
|
-
<xsl:attribute name="type">host</xsl:attribute>
|
495
|
-
<titleInfo>
|
496
|
-
<title>
|
497
|
-
<xsl:value-of select="gmd:aggregateDataSetName/gmd:CI_Citation/gmd:title"/>
|
498
|
-
</title>
|
499
|
-
</titleInfo>
|
500
|
-
<typeOfResource collection="yes"/>
|
501
|
-
<xsl:if test="gmd:aggregateDataSetName/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code">
|
502
|
-
<location>
|
503
|
-
<url>
|
504
|
-
<xsl:value-of select="gmd:aggregateDataSetName/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code"/>
|
505
|
-
</url>
|
506
|
-
</location>
|
507
|
-
</xsl:if>
|
508
|
-
<xsl:for-each select="gmd:aggregateDataSetName/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:organisationName">
|
509
|
-
<xsl:if test="ancestor-or-self::gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode[@codeListValue='originator']">
|
510
|
-
<name type="corporate">
|
511
|
-
<namePart>
|
512
|
-
<xsl:value-of select="."/>
|
513
|
-
</namePart>
|
514
|
-
</name>
|
515
|
-
</xsl:if>
|
516
|
-
</xsl:for-each>
|
517
|
-
<xsl:for-each select="gmd:aggregateDataSetName/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:personalName">
|
518
|
-
<xsl:if test="ancestor-or-self::gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode[@codeListValue='originator']">
|
519
|
-
<name type="personal">
|
520
|
-
<namePart>
|
521
|
-
<xsl:value-of select="."/>
|
522
|
-
</namePart>
|
523
|
-
</name>
|
524
|
-
</xsl:if>
|
525
|
-
</xsl:for-each>
|
526
|
-
<originInfo>
|
527
|
-
<xsl:for-each select="gmd:aggregateDataSetName/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:organisationName">
|
528
|
-
<xsl:if test="ancestor-or-self::gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode[@codeListValue='publisher']">
|
529
|
-
<publisher>
|
530
|
-
<xsl:value-of select="."/>
|
531
|
-
</publisher>
|
532
|
-
</xsl:if>
|
533
|
-
</xsl:for-each>
|
534
|
-
<dateIssued encoding="w3cdtf">
|
535
|
-
<!-- strip MM-DD, oupput YYYY -->
|
536
|
-
<xsl:choose>
|
537
|
-
<xsl:when test="gmd:aggregateDataSetName/gmd:CI_Citation/gmd:date">
|
538
|
-
<xsl:value-of select="substring(gmd:aggregateDataSetName/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date,1,4)"/>
|
539
|
-
</xsl:when>
|
540
|
-
<xsl:otherwise>unknown</xsl:otherwise>
|
541
|
-
</xsl:choose>
|
542
|
-
</dateIssued>
|
543
|
-
<xsl:for-each select="gmd:aggregateDataSetName/gmd:CI_Citation/gmd:edition">
|
544
|
-
<edition>
|
545
|
-
<xsl:value-of select="."/>
|
546
|
-
</edition>
|
547
|
-
</xsl:for-each>
|
548
|
-
</originInfo>
|
549
|
-
|
550
|
-
<!-- series titles / not in use -->
|
551
|
-
<!-- <xsl:for-each select="gmd:aggregateDataSetName/gmd:CI_Citation/gmd:series/gmd:CI_Series">
|
552
|
-
<relatedItem>
|
553
|
-
<xsl:attribute name="type">host</xsl:attribute>
|
554
|
-
<titleInfo>
|
555
|
-
<title>
|
556
|
-
<xsl:value-of select="gmd:name"/>
|
557
|
-
</title>
|
558
|
-
</titleInfo>
|
559
|
-
<originInfo>
|
560
|
-
<dateIssued>
|
561
|
-
<xsl:value-of select="gmd:issueIdentification"/>
|
562
|
-
</dateIssued>
|
563
|
-
<issuance>continuing</issuance>
|
564
|
-
</originInfo>
|
565
|
-
</relatedItem>
|
566
|
-
</xsl:for-each> -->
|
567
|
-
</relatedItem>
|
568
|
-
</xsl:if>
|
569
|
-
</xsl:for-each>
|
570
|
-
</xsl:when>
|
571
|
-
<xsl:when test="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:series/gmd:CI_Series">
|
572
|
-
<relatedItem>
|
573
|
-
<xsl:attribute name="type">host</xsl:attribute>
|
574
|
-
<titleInfo>
|
575
|
-
<title>
|
576
|
-
<xsl:value-of select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:series/gmd:CI_Series/gmd:name"/>
|
577
|
-
</title>
|
578
|
-
</titleInfo>
|
579
|
-
<originInfo>
|
580
|
-
<dateIssued>
|
581
|
-
<xsl:value-of select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:series/gmd:CI_Series/gmd:issueIdentification"/>
|
582
|
-
</dateIssued>
|
583
|
-
<issuance>continuing</issuance>
|
584
|
-
</originInfo>
|
585
|
-
</relatedItem>
|
586
|
-
</xsl:when>
|
587
|
-
</xsl:choose>
|
588
|
-
<!-- subjects: topic, geographic, temporal, ISO19115TopicCategory -->
|
589
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords">
|
590
|
-
<xsl:if test="gmd:type/gmd:MD_KeywordTypeCode[@codeListValue='theme']">
|
591
|
-
<xsl:for-each select="gmd:keyword">
|
592
|
-
<subject>
|
593
|
-
<topic>
|
594
|
-
<xsl:if test="ancestor-or-self::*/gmd:thesaurusName/gmd:CI_Citation/gmd:title">
|
595
|
-
<xsl:attribute name="authority">
|
596
|
-
<!-- TODO: Should be case-insenstive compare -->
|
597
|
-
<xsl:choose>
|
598
|
-
<xsl:when test="ancestor-or-self::*/gmd:thesaurusName/gmd:CI_Citation/gmd:title='Library of Congress Subject Headings (LCSH)'">
|
599
|
-
<xsl:text>lcsh</xsl:text>
|
600
|
-
</xsl:when>
|
601
|
-
<xsl:otherwise>
|
602
|
-
<xsl:value-of select="ancestor-or-self::*/gmd:thesaurusName/gmd:CI_Citation/gmd:title"/>
|
603
|
-
</xsl:otherwise>
|
604
|
-
</xsl:choose>
|
605
|
-
</xsl:attribute>
|
606
|
-
</xsl:if>
|
607
|
-
<xsl:if test="ancestor-or-self::*/gmd:thesaurusName/gmd:CI_Citation/gmd:identifier">
|
608
|
-
<xsl:attribute name="authorityURI">
|
609
|
-
<xsl:value-of select="ancestor-or-self::*/gmd:thesaurusName/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code"/>
|
610
|
-
</xsl:attribute>
|
611
|
-
</xsl:if>
|
612
|
-
<xsl:attribute name="lang">
|
613
|
-
<xsl:value-of select="../../../../../gmd:language/gmd:LanguageCode"/>
|
614
|
-
</xsl:attribute>
|
615
|
-
<xsl:value-of select="."/>
|
616
|
-
</topic>
|
617
|
-
</subject>
|
618
|
-
</xsl:for-each>
|
619
|
-
</xsl:if>
|
620
|
-
</xsl:for-each>
|
621
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords">
|
622
|
-
<xsl:if test="gmd:type/gmd:MD_KeywordTypeCode[@codeListValue='place']">
|
623
|
-
<xsl:for-each select="gmd:keyword">
|
624
|
-
<subject>
|
625
|
-
<geographic>
|
626
|
-
<!-- adds geonames info through external process -->
|
627
|
-
<xsl:attribute name="lang">
|
628
|
-
<xsl:value-of select="../../../../../gmd:language/gmd:LanguageCode"/>
|
629
|
-
</xsl:attribute>
|
630
|
-
<xsl:value-of select="."/>
|
631
|
-
</geographic>
|
632
|
-
</subject>
|
633
|
-
</xsl:for-each>
|
634
|
-
</xsl:if>
|
635
|
-
</xsl:for-each>
|
636
|
-
|
637
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords">
|
638
|
-
<xsl:if test="gmd:type/gmd:MD_KeywordTypeCode[@codeListValue='temporal']">
|
639
|
-
<xsl:for-each select="gmd:keyword">
|
640
|
-
|
641
|
-
<xsl:choose>
|
642
|
-
|
643
|
-
<!-- 4 digit year -->
|
644
|
-
<xsl:when test="string-length()=4">
|
645
|
-
<subject>
|
646
|
-
<temporal>
|
647
|
-
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
648
|
-
<xsl:value-of select="."/>
|
649
|
-
</temporal>
|
650
|
-
</subject>
|
651
|
-
</xsl:when>
|
652
|
-
|
653
|
-
<!-- range of dates in YYYY-YYYY format -->
|
654
|
-
|
655
|
-
<xsl:when test="contains(./*,'-')">
|
656
|
-
<subject>
|
657
|
-
<temporal>
|
658
|
-
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
659
|
-
<xsl:attribute name="point">start</xsl:attribute>
|
660
|
-
<xsl:value-of select="substring-before(*,'-')"/>
|
661
|
-
</temporal>
|
662
|
-
<temporal>
|
663
|
-
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
664
|
-
<xsl:attribute name="point">end</xsl:attribute>
|
665
|
-
<xsl:value-of select="substring-after(*,'-')"/>
|
666
|
-
</temporal>
|
667
|
-
</subject>
|
668
|
-
</xsl:when>
|
669
|
-
|
670
|
-
<!-- other -->
|
671
|
-
|
672
|
-
<xsl:otherwise>
|
673
|
-
<subject>
|
674
|
-
<temporal>
|
675
|
-
<xsl:value-of select="."/>
|
676
|
-
</temporal>
|
677
|
-
</subject>
|
678
|
-
</xsl:otherwise>
|
679
|
-
|
680
|
-
</xsl:choose>
|
681
|
-
</xsl:for-each>
|
682
|
-
</xsl:if>
|
683
|
-
</xsl:for-each>
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory/gmd:MD_TopicCategoryCode">
|
688
|
-
<subject>
|
689
|
-
<topic>
|
690
|
-
<xsl:attribute name="authority">ISO19115TopicCategory</xsl:attribute>
|
691
|
-
|
692
|
-
<!-- kd: do we need authorityURI? -->
|
693
|
-
<xsl:attribute name="authorityURI">
|
694
|
-
<xsl:text>http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_TopicCategoryCode</xsl:text>
|
695
|
-
</xsl:attribute>
|
696
|
-
<xsl:choose>
|
697
|
-
<xsl:when test="contains(.,'farming')">
|
698
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
699
|
-
<xsl:text>Farming</xsl:text>
|
700
|
-
</xsl:when>
|
701
|
-
<xsl:when test="contains(.,'biota')">
|
702
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
703
|
-
<xsl:text>Biology and Ecology</xsl:text>
|
704
|
-
</xsl:when>
|
705
|
-
<xsl:when test="contains(.,'climatologyMeteorologyAtmosphere')">\
|
706
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
707
|
-
<xsl:text>Climatology, Meteorology and Atmosphere</xsl:text>
|
708
|
-
</xsl:when>
|
709
|
-
<xsl:when test="contains(.,'boundaries')">
|
710
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
711
|
-
<xsl:text>Boundaries</xsl:text>
|
712
|
-
</xsl:when>
|
713
|
-
<xsl:when test="contains(.,'elevation')">
|
714
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
715
|
-
<xsl:text>Elevation</xsl:text>
|
716
|
-
</xsl:when>
|
717
|
-
<xsl:when test="contains(.,'environment')">
|
718
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
719
|
-
<xsl:text>Environment</xsl:text>
|
720
|
-
</xsl:when>
|
721
|
-
<xsl:when test="contains(.,'geoscientificInformation')">
|
722
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
723
|
-
<xsl:text>Geoscientific Information</xsl:text>
|
724
|
-
</xsl:when>
|
725
|
-
<xsl:when test="contains(.,'health')">
|
726
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
727
|
-
<xsl:text>Health</xsl:text>
|
728
|
-
</xsl:when>
|
729
|
-
<xsl:when test="contains(.,'imageryBaseMapsEarthCover')">
|
730
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
731
|
-
<xsl:text>Imagery and Base Maps</xsl:text>
|
732
|
-
</xsl:when>
|
733
|
-
<xsl:when test="contains(.,'intelligenceMilitary')">
|
734
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
735
|
-
<xsl:text>Military</xsl:text>
|
736
|
-
</xsl:when>
|
737
|
-
<xsl:when test="contains(.,'inlandWaters')">
|
738
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
739
|
-
<xsl:text>Inland Waters</xsl:text>
|
740
|
-
</xsl:when>
|
741
|
-
<xsl:when test="contains(.,'location')">
|
742
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
743
|
-
<xsl:text>Location</xsl:text>
|
744
|
-
</xsl:when>
|
745
|
-
<xsl:when test="contains(.,'oceans')">
|
746
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
747
|
-
<xsl:text>Oceans</xsl:text>
|
748
|
-
</xsl:when>
|
749
|
-
<xsl:when test="contains(.,'planningCadastre')">
|
750
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
751
|
-
<xsl:text>Planning and Cadastral</xsl:text>
|
752
|
-
</xsl:when>
|
753
|
-
<xsl:when test="contains(.,'structure')">
|
754
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
755
|
-
<xsl:text>Structure</xsl:text>
|
756
|
-
</xsl:when>
|
757
|
-
<xsl:when test="contains(.,'transportation')">
|
758
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
759
|
-
<xsl:text>Transportation</xsl:text>
|
760
|
-
</xsl:when>
|
761
|
-
<xsl:when test="contains(.,'utilitiesCommunication')">
|
762
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
763
|
-
<xsl:text>Utilities and Communication</xsl:text>
|
764
|
-
</xsl:when>
|
765
|
-
<xsl:when test="contains(.,'society')">
|
766
|
-
<xsl:attribute name="valueURI"><xsl:value-of select="."/></xsl:attribute>
|
767
|
-
<xsl:text>Society</xsl:text>
|
768
|
-
</xsl:when>
|
769
|
-
</xsl:choose>
|
770
|
-
</topic>
|
771
|
-
</subject>
|
772
|
-
</xsl:for-each>
|
773
|
-
|
774
|
-
|
775
|
-
<location>
|
776
|
-
<url>
|
777
|
-
<xsl:value-of select="$purl"/>
|
778
|
-
</url>
|
779
|
-
</location>
|
780
|
-
|
781
|
-
<!-- access rights to be mapped from restrictionCode/otherRestrictions/APO -->
|
782
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:otherConstraints">
|
783
|
-
<accessCondition type="useAndReproduction">
|
784
|
-
<xsl:value-of select=". "/>
|
785
|
-
</accessCondition>
|
786
|
-
</xsl:for-each>
|
787
|
-
|
788
|
-
<!-- recordInfo -->
|
789
|
-
|
790
|
-
|
791
|
-
<recordInfo>
|
792
|
-
<recordContentSource>
|
793
|
-
<xsl:text>Stanford</xsl:text>
|
794
|
-
</recordContentSource>
|
795
|
-
<recordIdentifier>
|
796
|
-
<xsl:value-of select="gmd:fileIdentifier"/>
|
797
|
-
</recordIdentifier>
|
798
|
-
<recordOrigin>This record was translated from ISO 19139 to MODS v.3 using an xsl transformation.</recordOrigin>
|
799
|
-
<languageOfCataloging>
|
800
|
-
<languageTerm authority="iso639-2b" type="code">eng</languageTerm>
|
801
|
-
</languageOfCataloging>
|
802
|
-
</recordInfo>
|
803
|
-
|
804
|
-
|
805
|
-
<!-- Output geo extension to MODS -->
|
806
|
-
<xsl:if test="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox">
|
807
|
-
<extension displayLabel="geo" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
808
|
-
<rdf:RDF xmlns:gml="http://www.opengis.net/gml/3.2/" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
809
|
-
<rdf:Description>
|
810
|
-
<xsl:attribute name="rdf:about">
|
811
|
-
<xsl:value-of select="$purl"/>
|
812
|
-
</xsl:attribute>
|
813
|
-
<!-- Output MIME type -->
|
814
|
-
<dc:format>
|
815
|
-
<xsl:value-of select="$format"/>
|
816
|
-
</dc:format>
|
817
|
-
<!-- Output Dataset# point, linestring, polygon, raster, etc. -->
|
818
|
-
<dc:type>
|
819
|
-
<xsl:text>Dataset#</xsl:text>
|
820
|
-
<xsl:value-of select="$geometryType"/>
|
821
|
-
</dc:type>
|
822
|
-
<!-- Output bounding box -->
|
823
|
-
<gml:boundedBy>
|
824
|
-
<gml:Envelope>
|
825
|
-
<xsl:attribute name="gml:srsName">
|
826
|
-
<xsl:value-of select="gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:codeSpace/gco:CharacterString"/>
|
827
|
-
<xsl:text>:</xsl:text>
|
828
|
-
<xsl:value-of select="gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString"/>
|
829
|
-
</xsl:attribute>
|
830
|
-
<gml:lowerCorner>
|
831
|
-
<xsl:value-of select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal"/>
|
832
|
-
<xsl:text> </xsl:text>
|
833
|
-
<xsl:value-of select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal"/>
|
834
|
-
</gml:lowerCorner>
|
835
|
-
<gml:upperCorner>
|
836
|
-
<xsl:value-of select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal"/>
|
837
|
-
<xsl:text> </xsl:text>
|
838
|
-
<xsl:value-of select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal"/>
|
839
|
-
</gml:upperCorner>
|
840
|
-
</gml:Envelope>
|
841
|
-
</gml:boundedBy>
|
842
|
-
<!-- Output linked data to GeoNames: An external process will clean these up -->
|
843
|
-
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords">
|
844
|
-
<xsl:if test="gmd:type/gmd:MD_KeywordTypeCode[@codeListValue='place']">
|
845
|
-
<xsl:for-each select="gmd:keyword">
|
846
|
-
<dc:coverage>
|
847
|
-
<xsl:attribute name="rdf:resource">
|
848
|
-
<xsl:value-of select="../../@xlink:href"/>
|
849
|
-
</xsl:attribute>
|
850
|
-
<xsl:attribute name="dc:language">
|
851
|
-
<xsl:value-of select="../../../../../gmd:language/gmd:LanguageCode"/>
|
852
|
-
</xsl:attribute>
|
853
|
-
<xsl:attribute name="dc:title">
|
854
|
-
<xsl:value-of select="."/>
|
855
|
-
</xsl:attribute>
|
856
|
-
</dc:coverage>
|
857
|
-
</xsl:for-each>
|
858
|
-
</xsl:if>
|
859
|
-
</xsl:for-each>
|
860
|
-
</rdf:Description>
|
861
|
-
</rdf:RDF>
|
862
|
-
</extension>
|
863
|
-
</xsl:if>
|
864
|
-
</xsl:for-each>
|
865
|
-
</mods>
|
866
|
-
</xsl:template>
|
867
|
-
</xsl:stylesheet>
|