geo_combine 0.4.0 → 0.6.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.
Files changed (61) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ruby.yml +53 -0
  3. data/.gitignore +2 -0
  4. data/.rubocop.yml +20 -0
  5. data/.rubocop_todo.yml +165 -0
  6. data/Gemfile +3 -1
  7. data/README.md +80 -1
  8. data/Rakefile +4 -2
  9. data/bin/geocombine +1 -0
  10. data/geo_combine.gemspec +5 -0
  11. data/lib/geo_combine/bounding_box.rb +7 -1
  12. data/lib/geo_combine/ckan_metadata.rb +10 -8
  13. data/lib/geo_combine/cli.rb +3 -1
  14. data/lib/geo_combine/esri_open_data.rb +2 -0
  15. data/lib/geo_combine/exceptions.rb +3 -0
  16. data/lib/geo_combine/fgdc.rb +2 -2
  17. data/lib/geo_combine/formats.rb +2 -0
  18. data/lib/geo_combine/formatting.rb +3 -1
  19. data/lib/geo_combine/geo_blacklight_harvester.rb +211 -0
  20. data/lib/geo_combine/geoblacklight.rb +20 -6
  21. data/lib/geo_combine/geometry_types.rb +2 -0
  22. data/lib/geo_combine/iso19139.rb +2 -1
  23. data/lib/geo_combine/ogp.rb +13 -11
  24. data/lib/geo_combine/railtie.rb +2 -0
  25. data/lib/geo_combine/subjects.rb +2 -0
  26. data/lib/geo_combine/version.rb +3 -1
  27. data/lib/geo_combine.rb +7 -3
  28. data/lib/tasks/geo_combine.rake +57 -26
  29. data/lib/xslt/fgdc2html.xsl +38 -9
  30. data/lib/xslt/iso2html.xsl +1107 -1070
  31. data/spec/features/fgdc2html_spec.rb +53 -1
  32. data/spec/features/iso2html_spec.rb +17 -2
  33. data/spec/fixtures/docs/princeton_fgdc.xml +374 -0
  34. data/spec/fixtures/docs/repos.json +3224 -0
  35. data/spec/fixtures/docs/simple_xml.xml +10 -0
  36. data/spec/fixtures/docs/simple_xslt.xsl +11 -0
  37. data/spec/fixtures/docs/stanford_iso.xml +652 -0
  38. data/spec/fixtures/docs/tufts_fgdc.xml +977 -0
  39. data/spec/fixtures/indexing/basic_geoblacklight.json +27 -0
  40. data/spec/fixtures/indexing/geoblacklight.json +33 -0
  41. data/spec/fixtures/indexing/layers.json +16119 -0
  42. data/spec/fixtures/indexing/test.txt +1 -0
  43. data/spec/fixtures/json_docs.rb +2 -0
  44. data/spec/fixtures/xml_docs.rb +9 -1659
  45. data/spec/helpers.rb +7 -7
  46. data/spec/lib/geo_combine/bounding_box_spec.rb +18 -0
  47. data/spec/lib/geo_combine/ckan_metadata_spec.rb +34 -11
  48. data/spec/lib/geo_combine/esri_open_data_spec.rb +23 -2
  49. data/spec/lib/geo_combine/fgdc_spec.rb +41 -10
  50. data/spec/lib/geo_combine/formatting_spec.rb +13 -5
  51. data/spec/lib/geo_combine/geo_blacklight_harvester_spec.rb +194 -0
  52. data/spec/lib/geo_combine/geoblacklight_spec.rb +41 -11
  53. data/spec/lib/geo_combine/iso19139_spec.rb +26 -14
  54. data/spec/lib/geo_combine/ogp_spec.rb +28 -8
  55. data/spec/lib/geo_combine_spec.rb +7 -4
  56. data/spec/lib/tasks/geo_combine_spec.rb +45 -0
  57. data/spec/spec_helper.rb +19 -84
  58. data/spec/support/fixtures.rb +9 -0
  59. metadata +103 -6
  60. data/.coveralls.yml +0 -1
  61. data/.travis.yml +0 -7
@@ -93,7 +93,7 @@
93
93
  <xsl:value-of select="." />
94
94
  </dd>
95
95
  </xsl:for-each>
96
- <xsl:for-each select="descrip/supplinf">
96
+ <xsl:for-each select="descript/supplinf">
97
97
  <dt>Supplemental Information</dt>
98
98
  <dd>
99
99
  <xsl:value-of select="." />
@@ -204,6 +204,22 @@
204
204
  </dd>
205
205
  </xsl:if>
206
206
  </xsl:for-each>
207
+ <dt>Temporal Keyword</dt>
208
+ <xsl:for-each select="keywords/temporal/tempkey">
209
+ <dd>
210
+ <xsl:value-of select="." />
211
+ </dd>
212
+ <xsl:if test="position()=last()">
213
+ <dd>
214
+ <dl>
215
+ <dt>Temporal Keyword Thesaurus</dt>
216
+ <dd>
217
+ <xsl:value-of select="ancestor-or-self::*/tempkt" />
218
+ </dd>
219
+ </dl>
220
+ </dd>
221
+ </xsl:if>
222
+ </xsl:for-each>
207
223
  <xsl:for-each select="accconst">
208
224
  <dt>Access Restrictions</dt>
209
225
  <dd>
@@ -234,6 +250,9 @@
234
250
  <dl>
235
251
  <xsl:for-each select="cntinfo/cntperp/cntper">
236
252
  <dt>Contact Person</dt>
253
+ <dd>
254
+ <xsl:value-of select="." />
255
+ </dd>
237
256
  </xsl:for-each>
238
257
  <xsl:for-each select="cntinfo/cntorgp/cntorg">
239
258
  <dt>Contact Organization</dt>
@@ -277,31 +296,31 @@
277
296
  <xsl:value-of select="." />
278
297
  </dd>
279
298
  </xsl:for-each>
280
- <xsl:for-each select="cntvoice">
299
+ <xsl:for-each select="cntinfo/cntvoice">
281
300
  <dt>Contact Telephone</dt>
282
301
  <dd>
283
302
  <xsl:value-of select="." />
284
303
  </dd>
285
304
  </xsl:for-each>
286
- <xsl:for-each select="cntfax">
305
+ <xsl:for-each select="cntinfo/cntfax">
287
306
  <dt>Contact Facsimile Telephone</dt>
288
307
  <dd>
289
308
  <xsl:value-of select="." />
290
309
  </dd>
291
310
  </xsl:for-each>
292
- <xsl:for-each select="cntemail">
311
+ <xsl:for-each select="cntinfo/cntemail">
293
312
  <dt>Contact Electronic Mail Address</dt>
294
313
  <dd>
295
314
  <xsl:value-of select="." />
296
315
  </dd>
297
316
  </xsl:for-each>
298
- <xsl:for-each select="hours">
317
+ <xsl:for-each select="cntinfo/hours">
299
318
  <dt>Hours of Service</dt>
300
319
  <dd>
301
320
  <xsl:value-of select="." />
302
321
  </dd>
303
322
  </xsl:for-each>
304
- <xsl:for-each select="cntinst">
323
+ <xsl:for-each select="cntfo/cntinst">
305
324
  <dt>Contact Instructions</dt>
306
325
  <dd>
307
326
  <xsl:value-of select="." />
@@ -475,6 +494,12 @@
475
494
  </dl>
476
495
  </dd>
477
496
  </xsl:for-each>
497
+ <xsl:for-each select="srccontr">
498
+ <dt>Contribution</dt>
499
+ <dd>
500
+ <xsl:value-of select="." />
501
+ </dd>
502
+ </xsl:for-each>
478
503
  </dl>
479
504
  <xsl:for-each select="procstep">
480
505
  <dt>Process Step</dt>
@@ -1186,6 +1211,12 @@
1186
1211
  <xsl:value-of select="attrdef" />
1187
1212
  <xsl:apply-templates select="attrdomv" />
1188
1213
  <dl>
1214
+ <xsl:for-each select="attrdefs">
1215
+ <dt>Definition Source</dt>
1216
+ <dd>
1217
+ <xsl:value-of select="." />
1218
+ </dd>
1219
+ </xsl:for-each>
1189
1220
  <xsl:for-each select="begdatea">
1190
1221
  <dt>Beginning Date of Attribute Values</dt>
1191
1222
  <dd>
@@ -1234,9 +1265,7 @@
1234
1265
  </xsl:template>
1235
1266
 
1236
1267
  <xsl:template match="attrdomv[edom]">
1237
- <br />
1238
- <button onclick="this.nextElementSibling.style.display = (this.nextElementSibling.style.display==='none') ? '' : 'none';">show/hide coded values</button>
1239
- <dl style="display:none">
1268
+ <dl>
1240
1269
  <xsl:for-each select="edom">
1241
1270
  <dt><xsl:value-of select="edomv" /></dt>
1242
1271
  <dd><xsl:value-of select="edomvd" /></dd>