stanford-mods 2.6.4 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/lib/stanford-mods/{geo_spatial.rb → concerns/geo_spatial.rb} +3 -5
- data/lib/stanford-mods/concerns/name.rb +57 -0
- data/lib/stanford-mods/concerns/origin_info.rb +113 -0
- data/lib/stanford-mods/{physical_location.rb → concerns/physical_location.rb} +2 -2
- data/lib/stanford-mods/concerns/searchworks.rb +125 -0
- data/lib/stanford-mods/concerns/searchworks_subjects.rb +126 -0
- data/lib/stanford-mods/concerns/title.rb +87 -0
- data/lib/stanford-mods/coordinate.rb +24 -3
- data/lib/stanford-mods/date_parsing.rb +32 -289
- data/lib/stanford-mods/imprint.rb +170 -322
- data/lib/stanford-mods/record.rb +20 -0
- data/lib/stanford-mods/version.rb +1 -1
- data/lib/stanford-mods/{searchworks_languages.rb → vocabularies/searchworks_languages.rb} +0 -0
- data/lib/stanford-mods.rb +12 -11
- data/spec/fixtures/searchworks_imprint_data.rb +38 -39
- data/spec/fixtures/searchworks_pub_date_data.rb +7 -7
- data/spec/fixtures/spotlight_pub_date_data.rb +7 -7
- data/spec/geo_spatial_spec.rb +1 -6
- data/spec/imprint_spec.rb +263 -207
- data/spec/lib/stanford-mods/coordinate_spec.rb +3 -5
- data/spec/name_spec.rb +26 -230
- data/spec/origin_info_spec.rb +34 -300
- data/spec/searchworks_basic_spec.rb +1 -3
- data/spec/searchworks_pub_dates_spec.rb +0 -215
- data/spec/searchworks_spec.rb +0 -21
- data/spec/searchworks_subject_raw_spec.rb +106 -105
- data/spec/searchworks_subject_spec.rb +19 -55
- data/spec/searchworks_title_spec.rb +5 -5
- data/stanford-mods.gemspec +1 -1
- metadata +19 -15
- data/lib/marc_countries.rb +0 -387
- data/lib/stanford-mods/geo_utils.rb +0 -28
- data/lib/stanford-mods/name.rb +0 -80
- data/lib/stanford-mods/origin_info.rb +0 -489
- data/lib/stanford-mods/searchworks.rb +0 -333
- data/lib/stanford-mods/searchworks_subjects.rb +0 -196
- data/spec/date_parsing_spec.rb +0 -905
data/lib/stanford-mods.rb
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
require 'active_support'
|
2
|
+
require 'active_support/core_ext/integer/inflections'
|
2
3
|
require 'mods'
|
3
4
|
require 'stanford-mods/date_parsing'
|
4
5
|
require 'stanford-mods/coordinate'
|
5
|
-
require 'stanford-mods/geo_spatial'
|
6
|
-
require 'stanford-mods/geo_utils'
|
7
6
|
require 'stanford-mods/imprint'
|
8
|
-
require 'stanford-mods/
|
9
|
-
require 'stanford-mods/
|
10
|
-
require 'stanford-mods/
|
11
|
-
require 'stanford-mods/
|
7
|
+
require 'stanford-mods/vocabularies/searchworks_languages'
|
8
|
+
require 'stanford-mods/concerns/geo_spatial'
|
9
|
+
require 'stanford-mods/concerns/name'
|
10
|
+
require 'stanford-mods/concerns/origin_info'
|
11
|
+
require 'stanford-mods/concerns/physical_location'
|
12
|
+
require 'stanford-mods/concerns/searchworks'
|
13
|
+
require 'stanford-mods/concerns/searchworks_subjects'
|
14
|
+
require 'stanford-mods/concerns/title'
|
15
|
+
require 'stanford-mods/record'
|
12
16
|
require 'stanford-mods/version'
|
13
17
|
|
14
|
-
# Stanford specific wranglings of MODS metadata as an extension of the Mods::Record object
|
15
18
|
module Stanford
|
16
19
|
module Mods
|
17
|
-
|
18
|
-
|
19
|
-
end # Mods module
|
20
|
-
end # Stanford module
|
20
|
+
end
|
21
|
+
end
|
@@ -64,7 +64,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
64
64
|
<dateIssued encoding="marc" point="start" qualifier="questionable">1670</dateIssued>
|
65
65
|
<dateIssued encoding="marc" point="end" qualifier="questionable">1680</dateIssued>
|
66
66
|
<issuance>monographic</issuance>' +
|
67
|
-
mods_origin_info_end_str => 'Amstelodami : [s.n.
|
67
|
+
mods_origin_info_end_str => 'Amstelodami : [s.n. 167-?]',
|
68
68
|
# ct011mf9794
|
69
69
|
mods_origin_info_start_str +
|
70
70
|
'<place>
|
@@ -77,7 +77,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
77
77
|
<dateIssued>17--]</dateIssued>
|
78
78
|
<dateIssued encoding="marc">17uu</dateIssued>
|
79
79
|
<issuance>monographic</issuance>' +
|
80
|
-
mods_origin_info_end_str => '[Paris : s.n.
|
80
|
+
mods_origin_info_end_str => '[Paris : s.n. 17--]',
|
81
81
|
# mm076bz8960
|
82
82
|
mods_origin_info_start_str +
|
83
83
|
'<place>
|
@@ -90,7 +90,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
90
90
|
<dateIssued>[ca. 1850?]</dateIssued>
|
91
91
|
<dateIssued encoding="marc">185u</dateIssued>
|
92
92
|
<issuance>monographic</issuance>' +
|
93
|
-
mods_origin_info_end_str => 'London : Orr and Compy, [ca. 1850?]
|
93
|
+
mods_origin_info_end_str => 'London : Orr and Compy, [ca. 1850?]',
|
94
94
|
# vs807zh4960
|
95
95
|
mods_origin_info_start_str +
|
96
96
|
'<place>
|
@@ -116,7 +116,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
116
116
|
<dateIssued encoding="marc" point="start">1740</dateIssued>
|
117
117
|
<dateIssued encoding="marc" point="end">1800</dateIssued>
|
118
118
|
<issuance>monographic</issuance>' +
|
119
|
-
mods_origin_info_end_str => '[S.l : s.n. ca. 1740-1800]
|
119
|
+
mods_origin_info_end_str => '[S.l : s.n. ca. 1740-1800]',
|
120
120
|
# gy889yj2171
|
121
121
|
mods_origin_info_start_str +
|
122
122
|
'<place>
|
@@ -130,7 +130,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
130
130
|
<dateIssued encoding="marc" point="start" qualifier="questionable">1758</dateIssued>
|
131
131
|
<dateIssued encoding="marc" point="end" qualifier="questionable">uuuu</dateIssued>
|
132
132
|
<issuance>monographic</issuance>' +
|
133
|
-
mods_origin_info_end_str => '[S.l : s.n. 1758]
|
133
|
+
mods_origin_info_end_str => '[S.l : s.n. 1758]'
|
134
134
|
},
|
135
135
|
# afro_am_music
|
136
136
|
# ai
|
@@ -166,7 +166,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
166
166
|
# ps072wf8793
|
167
167
|
mods_origin_info_start_str +
|
168
168
|
'<dateIssued encoding="w3cdtf">1851-07-01</dateIssued>' +
|
169
|
-
mods_origin_info_end_str => 'July
|
169
|
+
mods_origin_info_end_str => 'July 1, 1851',
|
170
170
|
# bh059ts1689
|
171
171
|
mods_origin_info_start_str +
|
172
172
|
'<dateIssued>early 1890s</dateIssued>' +
|
@@ -293,19 +293,19 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
293
293
|
'gis' =>
|
294
294
|
{ # key is mods_xml; value is expected value for imprint_display
|
295
295
|
# coll rec sv325bx4406
|
296
|
-
mods_origin_info_start_str +
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
296
|
+
# mods_origin_info_start_str +
|
297
|
+
# '<place>
|
298
|
+
# <placeTerm type="code" authority="marccountry">cau</placeTerm>
|
299
|
+
# </place>
|
300
|
+
# <place>
|
301
|
+
# <placeTerm type="text">San Diego, CA</placeTerm>
|
302
|
+
# </place>
|
303
|
+
# <publisher>Hart Energy Publishing</publisher>
|
304
|
+
# <dateIssued>2011</dateIssued>
|
305
|
+
# <dateIssued encoding="marc" point="start">2012</dateIssued>
|
306
|
+
# <dateIssued encoding="marc" point="end">9999</dateIssued>
|
307
|
+
# <issuance>monographic</issuance>' +
|
308
|
+
# mods_origin_info_end_str => 'San Diego, CA : Hart Energy Publishing, 2011 2012-',
|
309
309
|
# rt625ws6022
|
310
310
|
mods_origin_info_start_str +
|
311
311
|
'<publisher>Hart Energy Publishing</publisher>
|
@@ -344,7 +344,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
344
344
|
<dateIssued encoding="marc" keyDate="yes" point="start">1599</dateIssued>
|
345
345
|
<dateIssued encoding="marc" point="end">1601</dateIssued>
|
346
346
|
<issuance>monographic</issuance>' +
|
347
|
-
mods_origin_info_end_str => 'Francofurti : impressa typis Ioannis Saurii, impensis Petri Kopffi, 1599-1601
|
347
|
+
mods_origin_info_end_str => 'Francofurti : impressa typis Ioannis Saurii, impensis Petri Kopffi, 1599-1601',
|
348
348
|
# mt060jf5269
|
349
349
|
mods_origin_info_start_str +
|
350
350
|
'<place>
|
@@ -359,7 +359,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
359
359
|
<edition>Opera noua,</edition>
|
360
360
|
<edition>& piena di dotta curiosità.</edition>
|
361
361
|
<issuance>monographic</issuance>' +
|
362
|
-
mods_origin_info_end_str => "Opera noua, & piena di dotta curiosità. - In Padoua : per Pietro Paolo Tozzi. 1616: Con licenza de'svperiori
|
362
|
+
mods_origin_info_end_str => "Opera noua, & piena di dotta curiosità. - In Padoua : per Pietro Paolo Tozzi. 1616: Con licenza de'svperiori",
|
363
363
|
# nh718gy4718
|
364
364
|
mods_origin_info_start_str +
|
365
365
|
'<place>
|
@@ -372,7 +372,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
372
372
|
'<dateIssued>1743-53</dateIssued>' +
|
373
373
|
'<dateIssued encoding="marc" keyDate="yes" point="start">1743</dateIssued>' +
|
374
374
|
'<dateIssued encoding="marc" point="end">1753</dateIssued>' +
|
375
|
-
mods_origin_info_end_str => 'La Haye : Chez Jean Neaulme, 1743-53
|
375
|
+
mods_origin_info_end_str => 'La Haye : Chez Jean Neaulme, 1743-53',
|
376
376
|
# nh857kn6175
|
377
377
|
mods_origin_info_start_str +
|
378
378
|
'<place>
|
@@ -384,7 +384,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
384
384
|
<publisher>s.n.</publisher>
|
385
385
|
<dateIssued>18--]</dateIssued>
|
386
386
|
<issuance>monographic</issuance>' +
|
387
|
-
mods_origin_info_end_str => '[Bonn : s.n.
|
387
|
+
mods_origin_info_end_str => '[Bonn : s.n. 18--]',
|
388
388
|
# zp382js2355
|
389
389
|
mods_origin_info_start_str +
|
390
390
|
'<place>
|
@@ -397,7 +397,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
397
397
|
<dateIssued>[184-]</dateIssued>
|
398
398
|
<dateIssued encoding="marc" keyDate="yes">184u</dateIssued>
|
399
399
|
<issuance>monographic</issuance>' +
|
400
|
-
mods_origin_info_end_str => 'London : [s.n.], [
|
400
|
+
mods_origin_info_end_str => 'London : [s.n.], [184-]',
|
401
401
|
# qg377px6180
|
402
402
|
mods_origin_info_start_str +
|
403
403
|
'<place>
|
@@ -427,7 +427,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
427
427
|
<edition>3d ed.,</edition>
|
428
428
|
<edition>with the author\'s latest corrections ...</edition>
|
429
429
|
<issuance>monographic</issuance>' +
|
430
|
-
mods_origin_info_end_str => "3d ed., with the author's latest corrections ... - London : M.A. Nattali, [etc",
|
430
|
+
mods_origin_info_end_str => "3d ed., with the author's latest corrections ... - London : M.A. Nattali, [etc 1840]",
|
431
431
|
# yp117pm9679
|
432
432
|
mods_origin_info_start_str +
|
433
433
|
'<place>
|
@@ -544,7 +544,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
544
544
|
<dateIssued encoding="marc" point="start">1948</dateIssued>
|
545
545
|
<dateIssued encoding="marc" point="end">9999</dateIssued>
|
546
546
|
<issuance>serial</issuance>' +
|
547
|
-
mods_origin_info_end_str => 'United States, 1948-',
|
547
|
+
mods_origin_info_end_str => 'United States, 1948 -',
|
548
548
|
# vh590xb4582
|
549
549
|
mods_origin_info_start_str +
|
550
550
|
'<place>
|
@@ -605,7 +605,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
605
605
|
<dateIssued encoding="marc" point="start" qualifier="questionable">1640</dateIssued>
|
606
606
|
<dateIssued encoding="marc" point="end" qualifier="questionable">1665</dateIssued>
|
607
607
|
<issuance>monographic</issuance>' +
|
608
|
-
mods_origin_info_end_str => '[Amsterdam : Hugo Allard, 1640-1665?]
|
608
|
+
mods_origin_info_end_str => '[Amsterdam : Hugo Allard, 1640-1665?]',
|
609
609
|
# mk758ps0914
|
610
610
|
mods_origin_info_start_str +
|
611
611
|
'<place>
|
@@ -631,7 +631,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
631
631
|
<dateIssued>168-?]</dateIssued>
|
632
632
|
<dateIssued encoding="marc">168u</dateIssued>
|
633
633
|
<issuance>monographic</issuance>' +
|
634
|
-
mods_origin_info_end_str => '[Italy? : s.n.
|
634
|
+
mods_origin_info_end_str => '[Italy? : s.n. 168-?]',
|
635
635
|
# cm303hd3051
|
636
636
|
mods_origin_info_start_str +
|
637
637
|
'<place>
|
@@ -644,7 +644,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
644
644
|
<dateIssued>17--?]</dateIssued>
|
645
645
|
<dateIssued encoding="marc">17uu</dateIssued>
|
646
646
|
<issuance>monographic</issuance>' +
|
647
|
-
mods_origin_info_end_str => '[Germany : s.n.
|
647
|
+
mods_origin_info_end_str => '[Germany : s.n. 17--?]',
|
648
648
|
# dv052xw4248
|
649
649
|
mods_origin_info_start_str +
|
650
650
|
'<place>
|
@@ -670,7 +670,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
670
670
|
<dateIssued encoding="marc" point="start" qualifier="questionable">1764</dateIssued>
|
671
671
|
<dateIssued encoding="marc" point="end" qualifier="questionable">1782</dateIssued>
|
672
672
|
<issuance>monographic</issuance>' +
|
673
|
-
mods_origin_info_end_str => 'London : Printed & sold by R. Marshall, No. 4 Aldermay Church Yard, [1764-1782]
|
673
|
+
mods_origin_info_end_str => 'London : Printed & sold by R. Marshall, No. 4 Aldermay Church Yard, [1764-1782]',
|
674
674
|
# px053ft5911
|
675
675
|
mods_origin_info_start_str +
|
676
676
|
'<dateCreated encoding="w3cdtf" keyDate="yes">1732</dateCreated>
|
@@ -686,7 +686,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
686
686
|
<placeTerm>[Seoul]</placeTerm>
|
687
687
|
</place>
|
688
688
|
<dateCreated keyDate="yes" point="" qualifier="approximate">1930</dateCreated>' +
|
689
|
-
mods_origin_info_end_str => '[Seoul], [ca. 1939] [ca. 1930]'
|
689
|
+
mods_origin_info_end_str => '[Seoul], - [ca. 1939] [ca. 1930]'
|
690
690
|
},
|
691
691
|
# mclaughlin_malta
|
692
692
|
# medieval / mss
|
@@ -897,7 +897,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
897
897
|
<dateIssued>A1566</dateIssued>
|
898
898
|
<dateIssued encoding="marc">1566</dateIssued>
|
899
899
|
<issuance>monographic</issuance>' +
|
900
|
-
mods_origin_info_end_str => 'Venice : [s.n.], A1566
|
900
|
+
mods_origin_info_end_str => 'Venice : [s.n.], A1566',
|
901
901
|
# ym307qw6924
|
902
902
|
mods_origin_info_start_str +
|
903
903
|
' <place>
|
@@ -1002,7 +1002,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
1002
1002
|
<dateIssued>MDLXXXIIII [1584]</dateIssued>
|
1003
1003
|
<dateIssued encoding="marc">1584</dateIssued>
|
1004
1004
|
<issuance>monographic</issuance>' +
|
1005
|
-
mods_origin_info_end_str => 'Romae [Rome] : [haeredes Claudii Duchetti], MDLXXXIIII [1584]
|
1005
|
+
mods_origin_info_end_str => 'Romae [Rome] : [haeredes Claudii Duchetti], MDLXXXIIII [1584]',
|
1006
1006
|
# kj619sr3867
|
1007
1007
|
mods_origin_info_start_str +
|
1008
1008
|
'<place>
|
@@ -1162,7 +1162,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
1162
1162
|
</place>
|
1163
1163
|
<publisher>Stanford University Archives</publisher>
|
1164
1164
|
<dateCreated encoding="w3cdtf" keyDate="yes" qualifier=" ">1869-00-00</dateCreated>' +
|
1165
|
-
mods_origin_info_end_str => 'Stanford, CA : Stanford University Archives, 1869
|
1165
|
+
mods_origin_info_end_str => 'Stanford, CA : Stanford University Archives, 1869',
|
1166
1166
|
# fp085hf5015
|
1167
1167
|
mods_origin_info_start_str +
|
1168
1168
|
'<dateOther encoding="w3cdtf" keyDate="no" qualifier="">1963-10-11</dateOther>
|
@@ -1171,7 +1171,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
1171
1171
|
</place>
|
1172
1172
|
<publisher>Stanford University Archives</publisher>
|
1173
1173
|
<dateCreated encoding="w3cdtf" keyDate="yes" qualifier=" ">1903-00-00</dateCreated>' +
|
1174
|
-
mods_origin_info_end_str => 'Stanford, CA : Stanford University Archives, 1903
|
1174
|
+
mods_origin_info_end_str => 'Stanford, CA : Stanford University Archives, 1903',
|
1175
1175
|
# ns466nn0465
|
1176
1176
|
mods_origin_info_start_str +
|
1177
1177
|
'<dateCreated encoding="w3cdtf" keyDate="no" qualifier="">1918-00-00</dateCreated>
|
@@ -1180,7 +1180,7 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
1180
1180
|
<placeTerm type="text">Stanford, CA</placeTerm>
|
1181
1181
|
</place>
|
1182
1182
|
<publisher>Stanford University Archives</publisher>' +
|
1183
|
-
mods_origin_info_end_str => 'Stanford, CA : Stanford University Archives, 1918
|
1183
|
+
mods_origin_info_end_str => 'Stanford, CA : Stanford University Archives, 1918'
|
1184
1184
|
},
|
1185
1185
|
# social_research_tech_reports ?
|
1186
1186
|
# sounds?
|
@@ -1233,10 +1233,9 @@ SEARCHWORKS_IMPRINT_DATA = {
|
|
1233
1233
|
# coll rec ww121ss5000
|
1234
1234
|
mods_origin_info_start_str +
|
1235
1235
|
'<dateIssued encoding="marc" point="start">800</dateIssued>
|
1236
|
-
<dateIssued encoding="marc" point="
|
1236
|
+
<dateIssued encoding="marc" point="end">1899</dateIssued>
|
1237
1237
|
<issuance>monographic</issuance>' +
|
1238
|
-
|
1239
|
-
mods_origin_info_end_str => '800 A.D.- 1899',
|
1238
|
+
mods_origin_info_end_str => '800 A.D. - 1899',
|
1240
1239
|
# dc882bs3541
|
1241
1240
|
mods_origin_info_start_str +
|
1242
1241
|
'<place>
|
@@ -80,7 +80,7 @@ SEARCHWORKS_PUB_DATE_DATA = {
|
|
80
80
|
mods_origin_info_start_str +
|
81
81
|
'<dateIssued>1860?]</dateIssued>' +
|
82
82
|
'<dateIssued encoding="marc">186?</dateIssued>' +
|
83
|
-
mods_origin_info_end_str => [1860, '
|
83
|
+
mods_origin_info_end_str => [1860, '1860'],
|
84
84
|
# cw097mp1488
|
85
85
|
mods_origin_info_start_str +
|
86
86
|
'<dateIssued>1877?</dateIssued>' +
|
@@ -720,14 +720,14 @@ SEARCHWORKS_PUB_DATE_DATA = {
|
|
720
720
|
# coll rec jr022nf7673 has no dates
|
721
721
|
# jx555jt0710
|
722
722
|
mods_origin_info_start_str +
|
723
|
-
'<dateCreated
|
724
|
-
'<dateCreated
|
725
|
-
mods_origin_info_end_str => [-
|
723
|
+
'<dateCreated keyDate="yes" point="start" qualifier="approximate">199 B.C.</dateCreated>' +
|
724
|
+
'<dateCreated keyDate="yes" point="end" qualifier="approximate">100 B.C.</dateCreated>' +
|
725
|
+
mods_origin_info_end_str => [-198, '199 B.C. - 100 B.C.'],
|
726
726
|
# ww728rz0477
|
727
727
|
mods_origin_info_start_str +
|
728
|
-
'<dateCreated
|
729
|
-
'<dateCreated
|
730
|
-
mods_origin_info_end_str => [-
|
728
|
+
'<dateCreated keyDate="yes" point="start" qualifier="approximate">211 B.C.</dateCreated>' +
|
729
|
+
'<dateCreated keyDate="yes" point="end" qualifier="approximate">150 B.C.</dateCreated>' +
|
730
|
+
mods_origin_info_end_str => [-210, '211 B.C. - 150 B.C.']
|
731
731
|
},
|
732
732
|
# pcc
|
733
733
|
# peace
|
@@ -51,7 +51,7 @@ SPOTLIGHT_PUB_DATE_DATA = {
|
|
51
51
|
mods_origin_info_end_str => ['2001', '2001'],
|
52
52
|
# yt809jk3834, qb375hy6817
|
53
53
|
mods_origin_info_start_str +
|
54
|
-
'<dateCreated encoding="w3cdtf" keyDate="yes">
|
54
|
+
'<dateCreated encoding="w3cdtf" keyDate="yes">1998-03-25</dateCreated>' +
|
55
55
|
mods_origin_info_end_str => ['1998', '1998'],
|
56
56
|
# mg505sz9327, mx006md9511, sy619vt7106
|
57
57
|
mods_origin_info_start_str +
|
@@ -234,14 +234,14 @@ SPOTLIGHT_PUB_DATE_DATA = {
|
|
234
234
|
{ # key is mods_xml; values = [pub date sortable facet value, pub date single string facet value]
|
235
235
|
# hd778hw9236
|
236
236
|
mods_origin_info_start_str +
|
237
|
-
'<dateCreated
|
238
|
-
'<dateCreated
|
239
|
-
mods_origin_info_end_str => ['-
|
237
|
+
'<dateCreated keyDate="yes" point="start" qualifier="approximate">200 B.C.</dateCreated>' +
|
238
|
+
'<dateCreated keyDate="yes" point="end" qualifier="approximate">180 B.C.</dateCreated>' +
|
239
|
+
mods_origin_info_end_str => ['-801', '200 B.C.'],
|
240
240
|
# ww728rz0477
|
241
241
|
mods_origin_info_start_str +
|
242
|
-
'<dateCreated
|
243
|
-
'<dateCreated
|
244
|
-
mods_origin_info_end_str => ['-
|
242
|
+
'<dateCreated keyDate="yes" point="start" qualifier="approximate">211 B.C.</dateCreated>' +
|
243
|
+
'<dateCreated keyDate="yes" point="end" qualifier="approximate">150 B.C.</dateCreated>' +
|
244
|
+
mods_origin_info_end_str => ['-790', '211 B.C.']
|
245
245
|
},
|
246
246
|
'renaissance' =>
|
247
247
|
{ # key is mods_xml; values = [pub date sortable facet value, pub date single string facet value]
|
data/spec/geo_spatial_spec.rb
CHANGED
@@ -38,10 +38,6 @@ describe "Cartographic coordinates" do
|
|
38
38
|
EOF
|
39
39
|
end
|
40
40
|
|
41
|
-
it 'has access to logger' do
|
42
|
-
expect(smods_rec.logger).to be_a Logger
|
43
|
-
end
|
44
|
-
|
45
41
|
context "coordinates" do
|
46
42
|
it "returns empty array if no coordinates in the mods" do
|
47
43
|
smods_rec.from_str(no_coord)
|
@@ -118,9 +114,8 @@ describe '#geo_extension_as_envelope' do
|
|
118
114
|
EOF
|
119
115
|
end
|
120
116
|
|
121
|
-
it '
|
117
|
+
it 'returns an empty array' do
|
122
118
|
allow(mods.mods_ng_xml).to receive(:extension).and_raise(RuntimeError)
|
123
|
-
expect(mods.logger).to receive(:warn).with(/failure parsing.*RuntimeError/)
|
124
119
|
expect(mods.geo_extensions_as_envelope).to eq []
|
125
120
|
end
|
126
121
|
|