mods_display 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +16 -0
- data/.rubocop_todo.yml +60 -0
- data/.travis.yml +2 -2
- data/Rakefile +10 -2
- data/lib/mods_display.rb +42 -42
- data/lib/mods_display/configuration.rb +69 -67
- data/lib/mods_display/configuration/access_condition.rb +17 -13
- data/lib/mods_display/configuration/base.rb +27 -24
- data/lib/mods_display/configuration/format.rb +8 -4
- data/lib/mods_display/configuration/genre.rb +8 -4
- data/lib/mods_display/configuration/imprint.rb +12 -7
- data/lib/mods_display/configuration/name.rb +8 -4
- data/lib/mods_display/configuration/note.rb +8 -4
- data/lib/mods_display/configuration/related_item.rb +8 -4
- data/lib/mods_display/configuration/subject.rb +11 -9
- data/lib/mods_display/configuration/title.rb +8 -4
- data/lib/mods_display/controller_extension.rb +24 -24
- data/lib/mods_display/country_codes.rb +385 -384
- data/lib/mods_display/fields/abstract.rb +7 -6
- data/lib/mods_display/fields/access_condition.rb +55 -55
- data/lib/mods_display/fields/audience.rb +7 -6
- data/lib/mods_display/fields/cartographics.rb +15 -14
- data/lib/mods_display/fields/collection.rb +32 -17
- data/lib/mods_display/fields/contact.rb +15 -13
- data/lib/mods_display/fields/contents.rb +7 -6
- data/lib/mods_display/fields/description.rb +21 -21
- data/lib/mods_display/fields/field.rb +164 -109
- data/lib/mods_display/fields/format.rb +36 -33
- data/lib/mods_display/fields/genre.rb +12 -11
- data/lib/mods_display/fields/identifier.rb +34 -34
- data/lib/mods_display/fields/imprint.rb +258 -214
- data/lib/mods_display/fields/language.rb +18 -16
- data/lib/mods_display/fields/location.rb +27 -26
- data/lib/mods_display/fields/name.rb +113 -118
- data/lib/mods_display/fields/note.rb +33 -34
- data/lib/mods_display/fields/related_item.rb +64 -66
- data/lib/mods_display/fields/resource_type.rb +13 -11
- data/lib/mods_display/fields/sub_title.rb +6 -4
- data/lib/mods_display/fields/subject.rb +92 -90
- data/lib/mods_display/fields/title.rb +54 -49
- data/lib/mods_display/fields/values.rb +7 -8
- data/lib/mods_display/html.rb +117 -96
- data/lib/mods_display/model_extension.rb +17 -16
- data/lib/mods_display/relator_codes.rb +269 -267
- data/lib/mods_display/version.rb +1 -1
- data/mods_display.gemspec +13 -12
- data/spec/configuration/access_condition_spec.rb +5 -5
- data/spec/configuration/base_spec.rb +24 -24
- data/spec/fields/abstract_spec.rb +24 -14
- data/spec/fields/access_condition_spec.rb +80 -55
- data/spec/fields/audience_spec.rb +15 -12
- data/spec/fields/cartographics_spec.rb +17 -18
- data/spec/fields/collection_spec.rb +65 -19
- data/spec/fields/contact_spec.rb +11 -9
- data/spec/fields/contents_spec.rb +15 -12
- data/spec/fields/description_spec.rb +40 -22
- data/spec/fields/format_spec.rb +28 -18
- data/spec/fields/genre_spec.rb +18 -16
- data/spec/fields/identifier_spec.rb +46 -34
- data/spec/fields/imprint_spec.rb +151 -125
- data/spec/fields/language_spec.rb +36 -20
- data/spec/fields/location_spec.rb +43 -27
- data/spec/fields/name_spec.rb +92 -92
- data/spec/fields/note_spec.rb +53 -40
- data/spec/fields/related_item_spec.rb +42 -40
- data/spec/fields/resource_type_spec.rb +20 -14
- data/spec/fields/sub_title_spec.rb +11 -9
- data/spec/fields/subject_spec.rb +61 -56
- data/spec/fields/title_spec.rb +53 -40
- data/spec/fixtures/access_condition_fixtures.rb +50 -0
- data/spec/fixtures/cartographics_fixtures.rb +1 -1
- data/spec/fixtures/imprint_fixtures.rb +49 -1
- data/spec/fixtures/name_fixtures.rb +195 -2
- data/spec/fixtures/related_item_fixtures.rb +107 -0
- data/spec/fixtures/subjects_fixtures.rb +15 -2
- data/spec/fixtures/title_fixtures.rb +101 -0
- data/spec/integration/configuration_spec.rb +23 -20
- data/spec/integration/html_spec.rb +40 -29
- data/spec/integration/installation_spec.rb +14 -14
- data/spec/spec_helper.rb +5 -8
- metadata +25 -3
@@ -1,5 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
module ModsDisplay
|
2
|
+
class Configuration
|
3
|
+
class Format < Base
|
4
|
+
def delimiter(delimiter = '<br/>')
|
5
|
+
@delimiter ||= delimiter
|
6
|
+
end
|
7
|
+
end
|
4
8
|
end
|
5
|
-
end
|
9
|
+
end
|
@@ -1,5 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
module ModsDisplay
|
2
|
+
class Configuration
|
3
|
+
class Genre < Base
|
4
|
+
def delimiter(delimiter = '<br/>')
|
5
|
+
@delimiter ||= delimiter
|
6
|
+
end
|
7
|
+
end
|
4
8
|
end
|
5
|
-
end
|
9
|
+
end
|
@@ -1,8 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
module ModsDisplay
|
2
|
+
class Configuration
|
3
|
+
class Imprint < Base
|
4
|
+
def full_date_format(full_date_format = '%B %d, %Y')
|
5
|
+
@full_date_format ||= full_date_format
|
6
|
+
end
|
7
|
+
|
8
|
+
def short_date_format(short_date_format = '%B %Y')
|
9
|
+
@short_date_format ||= short_date_format
|
10
|
+
end
|
11
|
+
end
|
4
12
|
end
|
5
|
-
|
6
|
-
@short_date_format ||= short_date_format
|
7
|
-
end
|
8
|
-
end
|
13
|
+
end
|
@@ -1,5 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
module ModsDisplay
|
2
|
+
class Configuration
|
3
|
+
class Name < Base
|
4
|
+
def delimiter(delimiter = '<br/>')
|
5
|
+
@delimiter ||= delimiter
|
6
|
+
end
|
7
|
+
end
|
4
8
|
end
|
5
|
-
end
|
9
|
+
end
|
@@ -1,5 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
module ModsDisplay
|
2
|
+
class Configuration
|
3
|
+
class Note < Base
|
4
|
+
def delimiter(delimiter = '<br/>')
|
5
|
+
@delimiter ||= delimiter
|
6
|
+
end
|
7
|
+
end
|
4
8
|
end
|
5
|
-
end
|
9
|
+
end
|
@@ -1,5 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
module ModsDisplay
|
2
|
+
class Configuration
|
3
|
+
class RelatedItem < Base
|
4
|
+
def delimiter(delimiter = '<br/>')
|
5
|
+
@delimiter ||= delimiter
|
6
|
+
end
|
7
|
+
end
|
4
8
|
end
|
5
|
-
end
|
9
|
+
end
|
@@ -1,11 +1,13 @@
|
|
1
|
-
|
1
|
+
module ModsDisplay
|
2
|
+
class Configuration
|
3
|
+
class Subject < Base
|
4
|
+
def hierarchical_link(hierarchical_link = false)
|
5
|
+
@hierarchical_link ||= hierarchical_link
|
6
|
+
end
|
2
7
|
|
3
|
-
|
4
|
-
|
8
|
+
def delimiter(delimiter = ' > ')
|
9
|
+
@delimiter ||= delimiter
|
10
|
+
end
|
11
|
+
end
|
5
12
|
end
|
6
|
-
|
7
|
-
def delimiter delimiter=" > "
|
8
|
-
@delimiter ||= delimiter
|
9
|
-
end
|
10
|
-
|
11
|
-
end
|
13
|
+
end
|
@@ -1,5 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
module ModsDisplay
|
2
|
+
class Configuration
|
3
|
+
class Title < Base
|
4
|
+
def delimiter(delimiter = '<br/>')
|
5
|
+
@delimiter ||= delimiter
|
6
|
+
end
|
7
|
+
end
|
4
8
|
end
|
5
|
-
end
|
9
|
+
end
|
@@ -1,32 +1,32 @@
|
|
1
|
-
module ModsDisplay
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
module ModsDisplay
|
2
|
+
module ControllerExtension
|
3
|
+
def self.included(base)
|
4
|
+
base.extend ClassMethods
|
5
|
+
base.class_eval do
|
6
|
+
def mods_display_config
|
7
|
+
@mods_display_config || self.class.mods_display_config
|
8
|
+
end
|
9
|
+
if base.respond_to?(:helper_method)
|
10
|
+
helper_method :mods_display_config, :render_mods_display
|
11
|
+
end
|
11
12
|
end
|
12
13
|
end
|
13
|
-
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
def render_mods_display(model)
|
16
|
+
return '' if model.mods_display_xml.nil?
|
17
|
+
ModsDisplay::HTML.new(mods_display_config, model.mods_display_xml, self)
|
18
|
+
end
|
19
19
|
|
20
|
-
|
20
|
+
private
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
module ClassMethods
|
23
|
+
def configure_mods_display(&config)
|
24
|
+
@mods_display_config = ModsDisplay::Configuration.new(&config)
|
25
|
+
end
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
def mods_display_config
|
28
|
+
@mods_display_config || ModsDisplay::Configuration.new {}
|
29
|
+
end
|
29
30
|
end
|
30
31
|
end
|
31
|
-
|
32
|
-
end
|
32
|
+
end
|
@@ -1,386 +1,387 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
module ModsDisplay
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
2
|
+
module ModsDisplay
|
3
|
+
module CountryCodes
|
4
|
+
def country_codes
|
5
|
+
{ 'aa' => 'Albania',
|
6
|
+
'abc' => 'Alberta',
|
7
|
+
'ac' => 'Ashmore and Cartier Islands',
|
8
|
+
'aca' => 'Australian Capital Territory',
|
9
|
+
'ae' => 'Algeria',
|
10
|
+
'af' => 'Afghanistan',
|
11
|
+
'ag' => 'Argentina',
|
12
|
+
'ai' => 'Armenia (Republic)',
|
13
|
+
'air' => 'Armenian S.S.R.',
|
14
|
+
'aj' => 'Azerbaijan',
|
15
|
+
'ajr' => 'Azerbaijan S.S.R.',
|
16
|
+
'aku' => 'Alaska',
|
17
|
+
'alu' => 'Alabama',
|
18
|
+
'am' => 'Anguilla',
|
19
|
+
'an' => 'Andorra',
|
20
|
+
'ao' => 'Angola',
|
21
|
+
'aq' => 'Antigua and Barbuda',
|
22
|
+
'aru' => 'Arkansas',
|
23
|
+
'as' => 'American Samoa',
|
24
|
+
'at' => 'Australia',
|
25
|
+
'au' => 'Austria',
|
26
|
+
'aw' => 'Aruba',
|
27
|
+
'ay' => 'Antarctica',
|
28
|
+
'azu' => 'Arizona',
|
29
|
+
'ba' => 'Bahrain',
|
30
|
+
'bb' => 'Barbados',
|
31
|
+
'bcc' => 'British Columbia',
|
32
|
+
'bd' => 'Burundi',
|
33
|
+
'be' => 'Belgium',
|
34
|
+
'bf' => 'Bahamas',
|
35
|
+
'bg' => 'Bangladesh',
|
36
|
+
'bh' => 'Belize',
|
37
|
+
'bi' => 'British Indian Ocean Territory',
|
38
|
+
'bl' => 'Brazil',
|
39
|
+
'bm' => 'Bermuda Islands',
|
40
|
+
'bn' => 'Bosnia and Hercegovina',
|
41
|
+
'bo' => 'Bolivia',
|
42
|
+
'bp' => 'Solomon Islands',
|
43
|
+
'br' => 'Burma',
|
44
|
+
'bs' => 'Botswana',
|
45
|
+
'bt' => 'Bhutan',
|
46
|
+
'bu' => 'Bulgaria',
|
47
|
+
'bv' => 'Bouvet Island',
|
48
|
+
'bw' => 'Belarus',
|
49
|
+
'bwr' => 'Byelorussian S.S.R.',
|
50
|
+
'bx' => 'Brunei',
|
51
|
+
'ca' => 'Caribbean Netherlands',
|
52
|
+
'cau' => 'California',
|
53
|
+
'cb' => 'Cambodia',
|
54
|
+
'cc' => 'China',
|
55
|
+
'cd' => 'Chad',
|
56
|
+
'ce' => 'Sri Lanka',
|
57
|
+
'cf' => 'Congo (Brazzaville)',
|
58
|
+
'cg' => 'Congo (Democratic Republic)',
|
59
|
+
'ch' => 'China (Republic : 1949- )',
|
60
|
+
'ci' => 'Croatia',
|
61
|
+
'cj' => 'Cayman Islands',
|
62
|
+
'ck' => 'Colombia',
|
63
|
+
'cl' => 'Chile',
|
64
|
+
'cm' => 'Cameroon',
|
65
|
+
'cn' => 'Canada',
|
66
|
+
'co' => 'Curaçao',
|
67
|
+
'cou' => 'Colorado',
|
68
|
+
'cp' => 'Canton and Enderbury Islands',
|
69
|
+
'cq' => 'Comoros',
|
70
|
+
'cr' => 'Costa Rica',
|
71
|
+
'cs' => 'Czechoslovakia',
|
72
|
+
'ctu' => 'Connecticut',
|
73
|
+
'cu' => 'Cuba',
|
74
|
+
'cv' => 'Cape Verde',
|
75
|
+
'cw' => 'Cook Islands',
|
76
|
+
'cx' => 'Central African Republic',
|
77
|
+
'cy' => 'Cyprus',
|
78
|
+
'cz' => 'Canal Zone',
|
79
|
+
'dcu' => 'District of Columbia',
|
80
|
+
'deu' => 'Delaware',
|
81
|
+
'dk' => 'Denmark',
|
82
|
+
'dm' => 'Benin',
|
83
|
+
'dq' => 'Dominica',
|
84
|
+
'dr' => 'Dominican Republic',
|
85
|
+
'ea' => 'Eritrea',
|
86
|
+
'ec' => 'Ecuador',
|
87
|
+
'eg' => 'Equatorial Guinea',
|
88
|
+
'em' => 'Timor-Leste',
|
89
|
+
'enk' => 'England',
|
90
|
+
'er' => 'Estonia',
|
91
|
+
'err' => 'Estonia',
|
92
|
+
'es' => 'El Salvador',
|
93
|
+
'et' => 'Ethiopia',
|
94
|
+
'fa' => 'Faroe Islands',
|
95
|
+
'fg' => 'French Guiana',
|
96
|
+
'fi' => 'Finland',
|
97
|
+
'fj' => 'Fiji',
|
98
|
+
'fk' => 'Falkland Islands',
|
99
|
+
'flu' => 'Florida',
|
100
|
+
'fm' => 'Micronesia (Federated States)',
|
101
|
+
'fp' => 'French Polynesia',
|
102
|
+
'fr' => 'France',
|
103
|
+
'fs' => 'Terres australes et antarctiques françaises',
|
104
|
+
'ft' => 'Djibouti',
|
105
|
+
'gau' => 'Georgia',
|
106
|
+
'gb' => 'Kiribati',
|
107
|
+
'gd' => 'Grenada',
|
108
|
+
'ge' => 'Germany (East)',
|
109
|
+
'gh' => 'Ghana',
|
110
|
+
'gi' => 'Gibraltar',
|
111
|
+
'gl' => 'Greenland',
|
112
|
+
'gm' => 'Gambia',
|
113
|
+
'gn' => 'Gilbert and Ellice Islands',
|
114
|
+
'go' => 'Gabon',
|
115
|
+
'gp' => 'Guadeloupe',
|
116
|
+
'gr' => 'Greece',
|
117
|
+
'gs' => 'Georgia (Republic)',
|
118
|
+
'gsr' => 'Georgian S.S.R.',
|
119
|
+
'gt' => 'Guatemala',
|
120
|
+
'gu' => 'Guam',
|
121
|
+
'gv' => 'Guinea',
|
122
|
+
'gw' => 'Germany',
|
123
|
+
'gy' => 'Guyana',
|
124
|
+
'gz' => 'Gaza Strip',
|
125
|
+
'hiu' => 'Hawaii',
|
126
|
+
'hk' => 'Hong Kong',
|
127
|
+
'hm' => 'Heard and McDonald Islands',
|
128
|
+
'ho' => 'Honduras',
|
129
|
+
'ht' => 'Haiti',
|
130
|
+
'hu' => 'Hungary',
|
131
|
+
'iau' => 'Iowa',
|
132
|
+
'ic' => 'Iceland',
|
133
|
+
'idu' => 'Idaho',
|
134
|
+
'ie' => 'Ireland',
|
135
|
+
'ii' => 'India',
|
136
|
+
'ilu' => 'Illinois',
|
137
|
+
'inu' => 'Indiana',
|
138
|
+
'io' => 'Indonesia',
|
139
|
+
'iq' => 'Iraq',
|
140
|
+
'ir' => 'Iran',
|
141
|
+
'is' => 'Israel',
|
142
|
+
'it' => 'Italy',
|
143
|
+
'iu' => 'Israel-Syria Demilitarized Zones',
|
144
|
+
'iv' => "Côte d'Ivoire",
|
145
|
+
'iw' => 'Israel-Jordan Demilitarized Zones',
|
146
|
+
'iy' => 'Iraq-Saudi Arabia Neutral Zone',
|
147
|
+
'ja' => 'Japan',
|
148
|
+
'ji' => 'Johnston Atoll',
|
149
|
+
'jm' => 'Jamaica',
|
150
|
+
'jn' => 'Jan Mayen',
|
151
|
+
'jo' => 'Jordan',
|
152
|
+
'ke' => 'Kenya',
|
153
|
+
'kg' => 'Kyrgyzstan',
|
154
|
+
'kgr' => 'Kirghiz S.S.R.',
|
155
|
+
'kn' => 'Korea (North)',
|
156
|
+
'ko' => 'Korea (South)',
|
157
|
+
'ksu' => 'Kansas',
|
158
|
+
'ku' => 'Kuwait',
|
159
|
+
'kv' => 'Kosovo',
|
160
|
+
'kyu' => 'Kentucky',
|
161
|
+
'kz' => 'Kazakhstan',
|
162
|
+
'kzr' => 'Kazakh S.S.R.',
|
163
|
+
'lau' => 'Louisiana',
|
164
|
+
'lb' => 'Liberia',
|
165
|
+
'le' => 'Lebanon',
|
166
|
+
'lh' => 'Liechtenstein',
|
167
|
+
'li' => 'Lithuania',
|
168
|
+
'lir' => 'Lithuania',
|
169
|
+
'ln' => 'Central and Southern Line Islands',
|
170
|
+
'lo' => 'Lesotho',
|
171
|
+
'ls' => 'Laos',
|
172
|
+
'lu' => 'Luxembourg',
|
173
|
+
'lv' => 'Latvia',
|
174
|
+
'lvr' => 'Latvia',
|
175
|
+
'ly' => 'Libya',
|
176
|
+
'mau' => 'Massachusetts',
|
177
|
+
'mbc' => 'Manitoba',
|
178
|
+
'mc' => 'Monaco',
|
179
|
+
'mdu' => 'Maryland',
|
180
|
+
'meu' => 'Maine',
|
181
|
+
'mf' => 'Mauritius',
|
182
|
+
'mg' => 'Madagascar',
|
183
|
+
'mh' => 'Macao',
|
184
|
+
'miu' => 'Michigan',
|
185
|
+
'mj' => 'Montserrat',
|
186
|
+
'mk' => 'Oman',
|
187
|
+
'ml' => 'Mali',
|
188
|
+
'mm' => 'Malta',
|
189
|
+
'mnu' => 'Minnesota',
|
190
|
+
'mo' => 'Montenegro',
|
191
|
+
'mou' => 'Missouri',
|
192
|
+
'mp' => 'Mongolia',
|
193
|
+
'mq' => 'Martinique',
|
194
|
+
'mr' => 'Morocco',
|
195
|
+
'msu' => 'Mississippi',
|
196
|
+
'mtu' => 'Montana',
|
197
|
+
'mu' => 'Mauritania',
|
198
|
+
'mv' => 'Moldova',
|
199
|
+
'mvr' => 'Moldavian S.S.R.',
|
200
|
+
'mw' => 'Malawi',
|
201
|
+
'mx' => 'Mexico',
|
202
|
+
'my' => 'Malaysia',
|
203
|
+
'mz' => 'Mozambique',
|
204
|
+
'na' => 'Netherlands Antilles',
|
205
|
+
'nbu' => 'Nebraska',
|
206
|
+
'ncu' => 'North Carolina',
|
207
|
+
'ndu' => 'North Dakota',
|
208
|
+
'ne' => 'Netherlands',
|
209
|
+
'nfc' => 'Newfoundland and Labrador',
|
210
|
+
'ng' => 'Niger',
|
211
|
+
'nhu' => 'New Hampshire',
|
212
|
+
'nik' => 'Northern Ireland',
|
213
|
+
'nju' => 'New Jersey',
|
214
|
+
'nkc' => 'New Brunswick',
|
215
|
+
'nl' => 'New Caledonia',
|
216
|
+
'nm' => 'Northern Mariana Islands',
|
217
|
+
'nmu' => 'New Mexico',
|
218
|
+
'nn' => 'Vanuatu',
|
219
|
+
'no' => 'Norway',
|
220
|
+
'np' => 'Nepal',
|
221
|
+
'nq' => 'Nicaragua',
|
222
|
+
'nr' => 'Nigeria',
|
223
|
+
'nsc' => 'Nova Scotia',
|
224
|
+
'ntc' => 'Northwest Territories',
|
225
|
+
'nu' => 'Nauru',
|
226
|
+
'nuc' => 'Nunavut',
|
227
|
+
'nvu' => 'Nevada',
|
228
|
+
'nw' => 'Northern Mariana Islands',
|
229
|
+
'nx' => 'Norfolk Island',
|
230
|
+
'nyu' => 'New York (State)',
|
231
|
+
'nz' => 'New Zealand',
|
232
|
+
'ohu' => 'Ohio',
|
233
|
+
'oku' => 'Oklahoma',
|
234
|
+
'onc' => 'Ontario',
|
235
|
+
'oru' => 'Oregon',
|
236
|
+
'ot' => 'Mayotte',
|
237
|
+
'pau' => 'Pennsylvania',
|
238
|
+
'pc' => 'Pitcairn Island',
|
239
|
+
'pe' => 'Peru',
|
240
|
+
'pf' => 'Paracel Islands',
|
241
|
+
'pg' => 'Guinea-Bissau',
|
242
|
+
'ph' => 'Philippines',
|
243
|
+
'pic' => 'Prince Edward Island',
|
244
|
+
'pk' => 'Pakistan',
|
245
|
+
'pl' => 'Poland',
|
246
|
+
'pn' => 'Panama',
|
247
|
+
'po' => 'Portugal',
|
248
|
+
'pp' => 'Papua New Guinea',
|
249
|
+
'pr' => 'Puerto Rico',
|
250
|
+
'pt' => 'Portuguese Timor',
|
251
|
+
'pw' => 'Palau',
|
252
|
+
'py' => 'Paraguay',
|
253
|
+
'qa' => 'Qatar',
|
254
|
+
'qea' => 'Queensland',
|
255
|
+
'quc' => 'Québec (Province)',
|
256
|
+
'rb' => 'Serbia',
|
257
|
+
're' => 'Réunion',
|
258
|
+
'rh' => 'Zimbabwe',
|
259
|
+
'riu' => 'Rhode Island',
|
260
|
+
'rm' => 'Romania',
|
261
|
+
'ru' => 'Russia (Federation)',
|
262
|
+
'rur' => 'Russian S.F.S.R.',
|
263
|
+
'rw' => 'Rwanda',
|
264
|
+
'ry' => 'Ryukyu Islands, Southern',
|
265
|
+
'sa' => 'South Africa',
|
266
|
+
'sb' => 'Svalbard',
|
267
|
+
'sc' => 'Saint-Barthélemy',
|
268
|
+
'scu' => 'South Carolina',
|
269
|
+
'sd' => 'South Sudan',
|
270
|
+
'sdu' => 'South Dakota',
|
271
|
+
'se' => 'Seychelles',
|
272
|
+
'sf' => 'Sao Tome and Principe',
|
273
|
+
'sg' => 'Senegal',
|
274
|
+
'sh' => 'Spanish North Africa',
|
275
|
+
'si' => 'Singapore',
|
276
|
+
'sj' => 'Sudan',
|
277
|
+
'sk' => 'Sikkim',
|
278
|
+
'sl' => 'Sierra Leone',
|
279
|
+
'sm' => 'San Marino',
|
280
|
+
'sn' => 'Sint Maarten',
|
281
|
+
'snc' => 'Saskatchewan',
|
282
|
+
'so' => 'Somalia',
|
283
|
+
'sp' => 'Spain',
|
284
|
+
'sq' => 'Swaziland',
|
285
|
+
'sr' => 'Surinam',
|
286
|
+
'ss' => 'Western Sahara',
|
287
|
+
'st' => 'Saint-Martin',
|
288
|
+
'stk' => 'Scotland',
|
289
|
+
'su' => 'Saudi Arabia',
|
290
|
+
'sv' => 'Swan Islands',
|
291
|
+
'sw' => 'Sweden',
|
292
|
+
'sx' => 'Namibia',
|
293
|
+
'sy' => 'Syria',
|
294
|
+
'sz' => 'Switzerland',
|
295
|
+
'ta' => 'Tajikistan',
|
296
|
+
'tar' => 'Tajik S.S.R.',
|
297
|
+
'tc' => 'Turks and Caicos Islands',
|
298
|
+
'tg' => 'Togo',
|
299
|
+
'th' => 'Thailand',
|
300
|
+
'ti' => 'Tunisia',
|
301
|
+
'tk' => 'Turkmenistan',
|
302
|
+
'tkr' => ' Turkmen S.S.R.',
|
303
|
+
'tl' => 'Tokelau',
|
304
|
+
'tma' => 'Tasmania',
|
305
|
+
'tnu' => 'Tennessee',
|
306
|
+
'to' => 'Tonga',
|
307
|
+
'tr' => 'Trinidad and Tobago',
|
308
|
+
'ts' => 'United Arab Emirates',
|
309
|
+
'tt' => 'Trust Territory of the Pacific Islands',
|
310
|
+
'tu' => 'Turkey',
|
311
|
+
'tv' => 'Tuvalu',
|
312
|
+
'txu' => 'Texas',
|
313
|
+
'tz' => 'Tanzania',
|
314
|
+
'ua' => 'Egypt',
|
315
|
+
'uc' => 'United States Misc. Caribbean Islands',
|
316
|
+
'ug' => 'Uganda',
|
317
|
+
'ui' => 'United Kingdom Misc. Islands',
|
318
|
+
'uik' => 'United Kingdom Misc. Islands',
|
319
|
+
'uk' => 'United Kingdom',
|
320
|
+
'un' => 'Ukraine',
|
321
|
+
'unr' => 'Ukraine',
|
322
|
+
'up' => 'United States Misc. Pacific Islands',
|
323
|
+
'ur' => 'Soviet Union',
|
324
|
+
'us' => 'United States',
|
325
|
+
'utu' => 'Utah',
|
326
|
+
'uv' => 'Burkina Faso',
|
327
|
+
'uy' => 'Uruguay',
|
328
|
+
'uz' => 'Uzbekistan',
|
329
|
+
'uzr' => 'Uzbek S.S.R.',
|
330
|
+
'vau' => 'Virginia',
|
331
|
+
'vb' => 'British Virgin Islands',
|
332
|
+
'vc' => 'Vatican City',
|
333
|
+
've' => 'Venezuela',
|
334
|
+
'vi' => 'Virgin Islands of the United States',
|
335
|
+
'vm' => 'Vietnam',
|
336
|
+
'vn' => 'Vietnam, North',
|
337
|
+
'vp' => 'Various places',
|
338
|
+
'vra' => 'Victoria',
|
339
|
+
'vs' => 'Vietnam, South',
|
340
|
+
'vtu' => 'Vermont',
|
341
|
+
'wau' => 'Washington (State)',
|
342
|
+
'wb' => 'West Berlin',
|
343
|
+
'wea' => 'Western Australia',
|
344
|
+
'wf' => 'Wallis and Futuna',
|
345
|
+
'wiu' => 'Wisconsin',
|
346
|
+
'wj' => 'West Bank of the Jordan River',
|
347
|
+
'wk' => 'Wake Island',
|
348
|
+
'wlk' => 'Wales',
|
349
|
+
'ws' => 'Samoa',
|
350
|
+
'wvu' => 'West Virginia',
|
351
|
+
'wyu' => 'Wyoming',
|
352
|
+
'xa' => 'Christmas Island (Indian Ocean)',
|
353
|
+
'xb' => 'Cocos (Keeling) Islands',
|
354
|
+
'xc' => 'Maldives',
|
355
|
+
'xd' => 'Saint Kitts-Nevis',
|
356
|
+
'xe' => 'Marshall Islands',
|
357
|
+
'xf' => 'Midway Islands',
|
358
|
+
'xga' => 'Coral Sea Islands Territory',
|
359
|
+
'xh' => 'Niue',
|
360
|
+
'xi' => 'Saint Kitts-Nevis-Anguilla',
|
361
|
+
'xj' => 'Saint Helena',
|
362
|
+
'xk' => 'Saint Lucia',
|
363
|
+
'xl' => 'Saint Pierre and Miquelon',
|
364
|
+
'xm' => 'Saint Vincent and the Grenadines',
|
365
|
+
'xn' => 'Macedonia',
|
366
|
+
'xna' => 'New South Wales',
|
367
|
+
'xo' => 'Slovakia',
|
368
|
+
'xoa' => 'Northern Territory',
|
369
|
+
'xp' => 'Spratly Island',
|
370
|
+
'xr' => 'Czech Republic',
|
371
|
+
'xra' => 'South Australia',
|
372
|
+
'xs' => 'South Georgia and the South Sandwich Islands',
|
373
|
+
'xv' => 'Slovenia',
|
374
|
+
# Removing per METADOR-32
|
375
|
+
# "xx" => "No place, unknown, or undetermined",
|
376
|
+
'xxc' => 'Canada',
|
377
|
+
'xxk' => 'United Kingdom',
|
378
|
+
'xxr' => 'Soviet Union',
|
379
|
+
'xxu' => 'United States',
|
380
|
+
'ye' => 'Yemen',
|
381
|
+
'ykc' => 'Yukon Territory',
|
382
|
+
'ys' => "Yemen (People's Democratic Republic)",
|
383
|
+
'yu' => 'Serbia and Montenegro',
|
384
|
+
'za' => 'Zambia' }
|
385
|
+
end
|
385
386
|
end
|
386
|
-
end
|
387
|
+
end
|