adiwg-mdtranslator 2.14.2 → 2.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +20 -5
  4. data/Rakefile +2 -0
  5. data/adiwg-mdtranslator.gemspec +2 -1
  6. data/lib/adiwg/mdtranslator.rb +1 -0
  7. data/lib/adiwg/mdtranslator/internal/module_codelistFun.rb +26 -0
  8. data/lib/adiwg/mdtranslator/internal/module_coordinates.rb +3 -0
  9. data/lib/adiwg/mdtranslator/internal/module_dateTimeFun.rb +1 -1
  10. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_date.rb +0 -1
  11. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_dateTime.rb +0 -1
  12. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_keyword.rb +1 -1
  13. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_taxonSystem.rb +2 -4
  14. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_contact.rb +0 -1
  15. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_date.rb +0 -2
  16. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dateTime.rb +0 -2
  17. data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_provenance.rb +0 -1
  18. data/lib/adiwg/mdtranslator/version.rb +3 -2
  19. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_attribute.rb +0 -1
  20. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_citation.rb +0 -1
  21. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dateRange.rb +0 -1
  22. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dateSingle.rb +0 -1
  23. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_method.rb +1 -1
  24. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_methodKeywords.rb +1 -1
  25. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_process.rb +0 -1
  26. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_transferInfo.rb +0 -1
  27. data/lib/adiwg/mdtranslator/writers/html/sections/html_taxonomy.rb +1 -3
  28. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_additionalDocument.rb +48 -0
  29. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_address.rb +90 -0
  30. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_associatedResource.rb +84 -0
  31. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_attribute.rb +107 -0
  32. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_attributeGroup.rb +69 -0
  33. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_baseUnit.rb +38 -0
  34. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_boundingBox.rb +70 -0
  35. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_browseGraphic.rb +95 -0
  36. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_citation.rb +205 -0
  37. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_codelist.rb +50 -0
  38. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_constraint.rb +51 -0
  39. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_constraintCommon.rb +104 -0
  40. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_contact.rb +119 -0
  41. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_conventionalUnit.rb +64 -0
  42. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_coverageDescription.rb +84 -0
  43. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_dataIdentification.rb +347 -0
  44. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_date.rb +62 -0
  45. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_definitionUnit.rb +35 -0
  46. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb +42 -0
  47. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_dimension.rb +72 -0
  48. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_distribution.rb +62 -0
  49. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_distributor.rb +77 -0
  50. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_email.rb +44 -0
  51. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_extent.rb +85 -0
  52. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_feature.rb +71 -0
  53. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_featureCollection.rb +56 -0
  54. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_featureProperties.rb +64 -0
  55. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_format.rb +74 -0
  56. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_fraction.rb +46 -0
  57. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_gcoDateTime.rb +45 -0
  58. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_geographicElement.rb +77 -0
  59. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_geographicExtent.rb +96 -0
  60. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_geometricObjects.rb +60 -0
  61. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_geometryCollection.rb +97 -0
  62. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_georectified.rb +121 -0
  63. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_georeferenceable.rb +87 -0
  64. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_gmlIdentifier.rb +32 -0
  65. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_grid.rb +71 -0
  66. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_gridRepresentation.rb +36 -0
  67. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_identifier.rb +95 -0
  68. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_imageDescription.rb +175 -0
  69. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_individual.rb +85 -0
  70. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_keyword.rb +78 -0
  71. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_legalConstraints.rb +87 -0
  72. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_lineString.rb +76 -0
  73. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_lineage.rb +97 -0
  74. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_locale.rb +67 -0
  75. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_maintenance.rb +101 -0
  76. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_mdBand.rb +82 -0
  77. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_mdMetadata.rb +372 -0
  78. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_measure.rb +71 -0
  79. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_medium.rb +113 -0
  80. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_miBand.rb +90 -0
  81. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_multiLine.rb +84 -0
  82. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_multiPoint.rb +84 -0
  83. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_multiPolygon.rb +84 -0
  84. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_onlineResource.rb +91 -0
  85. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_orderProcess.rb +79 -0
  86. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_organization.rb +106 -0
  87. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_phone.rb +81 -0
  88. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_point.rb +77 -0
  89. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_polygon.rb +95 -0
  90. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processStep.rb +130 -0
  91. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_rangeDimension.rb +94 -0
  92. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_referenceSystem.rb +92 -0
  93. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_releasability.rb +71 -0
  94. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_resolution.rb +97 -0
  95. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_responsibility.rb +91 -0
  96. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_sampleDimension.rb +127 -0
  97. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_scope.rb +75 -0
  98. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_scopeDescription.rb +75 -0
  99. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_securityConstraints.rb +97 -0
  100. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_series.rb +63 -0
  101. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb +125 -0
  102. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_spatialRepresentation.rb +61 -0
  103. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_temporalExtent.rb +53 -0
  104. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_timeInstant.rb +80 -0
  105. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_timePeriod.rb +113 -0
  106. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_transferOptions.rb +107 -0
  107. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_unitsOfMeasure.rb +258 -0
  108. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_usage.rb +134 -0
  109. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_useConstraints.rb +41 -0
  110. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_vectorRepresentation.rb +61 -0
  111. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_verticalExtent.rb +70 -0
  112. data/lib/adiwg/mdtranslator/writers/iso19115_1/iso19115_1_writer.rb +105 -0
  113. data/lib/adiwg/mdtranslator/writers/iso19115_1/iso19115_1_writer_messages_eng.yml +132 -0
  114. data/lib/adiwg/mdtranslator/writers/iso19115_1/readme.md +12 -0
  115. data/lib/adiwg/mdtranslator/writers/iso19115_1/version.rb +15 -0
  116. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_citation.rb +3 -2
  117. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataIdentification.rb +42 -39
  118. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb +2 -2
  119. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_distributor.rb +3 -1
  120. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_extension.rb +12 -7
  121. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_miMetadata.rb +2 -3
  122. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb +1 -1
  123. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_resolution.rb +1 -1
  124. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_responsibleParty.rb +42 -35
  125. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_spatialRepresentation.rb +4 -10
  126. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb +1 -1
  127. data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer_messages_eng.yml +5 -0
  128. data/lib/adiwg/mdtranslator/writers/iso19115_2/readme.md +2 -2
  129. data/lib/adiwg/mdtranslator/writers/iso19115_2/version.rb +1 -1
  130. data/lib/adiwg/mdtranslator/writers/mdWriters.rb +7 -7
  131. data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_citation.rb +0 -1
  132. data/lib/adiwg/mdtranslator_cli.rb +2 -1
  133. metadata +93 -5
  134. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_gmlIdentifier.rb +0 -55
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f936bf8f803d1d897ab81cedb72b01cef62c2f04
4
- data.tar.gz: 0eb58340f8b1c05bb16b609ef7a52cf33bd9011e
3
+ metadata.gz: 4c28a9de2c4b82b2f0b46f4de13a87b8de286d98
4
+ data.tar.gz: af96ef12d442a941918a23842bd74aa027d0d1a2
5
5
  SHA512:
6
- metadata.gz: 78b572ef52d9a6ea5582aea779711e88d0d912fe8b41038aff7dc417b6f85fc1a5fd3b802366e36dd6c355926826595db530b9d005cf5c6b4b344d066e7a15e0
7
- data.tar.gz: b3d11275d81beeeeaa13dc63d72b2229ca9cf0f300a29f80b2d304cdf2acc63b589b979c916cc89fc87e47761568b80697079e46f4547088d90941241d4fc9ef
6
+ metadata.gz: f428c56a2f93748c0482746b31278bbacd995080416a6c28e3aa195c1ca16b30a02a73ee3a1a1b7e45037f8f4fa28ee0db3735dc630903af85a6cedf58253ad4
7
+ data.tar.gz: 1a8b0cc95da21914bab8eae81d2b9f55b962984cc583e76fc49472ca8c14b1b0d3d9b0e3d16ef9f1c3b27986eadd954edc78e341b25228eb7a73de85e1f4f7b9
data/.travis.yml CHANGED
@@ -3,9 +3,9 @@ sudo: false
3
3
  language: ruby
4
4
  before_install: 'gem install bundler'
5
5
  rvm:
6
- - "2.3"
7
6
  - "2.4"
8
7
  - "2.5"
8
+ - "2.6"
9
9
  - jruby-head
10
10
  - ruby-head
11
11
  matrix:
data/CHANGELOG.md CHANGED
@@ -1,7 +1,25 @@
1
1
  # Change Log
2
2
 
3
- ## [v2.14.0](https://github.com/adiwg/mdTranslator/tree/v2.14.0)
3
+ ## [v2.15.0](https://github.com/adiwg/mdTranslator/tree/v2.15.0)
4
4
 
5
+ [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.14.2...v2.15.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Add writer for ISO 19115-1 [\#207](https://github.com/adiwg/mdTranslator/issues/207)
10
+ - Add ISO 19115-3 \(1\) Support [\#209](https://github.com/adiwg/mdTranslator/pull/209) ([stansmith907](https://github.com/stansmith907))
11
+
12
+ ## [v2.14.2](https://github.com/adiwg/mdTranslator/tree/v2.14.2) (2018-11-02)
13
+ [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.14.1...v2.14.2)
14
+
15
+ ## [v2.14.1](https://github.com/adiwg/mdTranslator/tree/v2.14.1) (2018-11-01)
16
+ [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.14.0...v2.14.1)
17
+
18
+ **Merged pull requests:**
19
+
20
+ - Fix issue with empty verticalDatum objects [\#205](https://github.com/adiwg/mdTranslator/pull/205) ([stansmith907](https://github.com/stansmith907))
21
+
22
+ ## [v2.14.0](https://github.com/adiwg/mdTranslator/tree/v2.14.0) (2018-10-31)
5
23
  [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.13.3...v2.14.0)
6
24
 
7
25
  **Closed issues:**
@@ -106,6 +124,7 @@
106
124
 
107
125
  - Minor bug fixes [\#182](https://github.com/adiwg/mdTranslator/pull/182) ([stansmith907](https://github.com/stansmith907))
108
126
  - mdTranslator version 2.9.0 [\#181](https://github.com/adiwg/mdTranslator/pull/181) ([stansmith907](https://github.com/stansmith907))
127
+ - Remove repository name from harvest set tag in sbJson writer. [\#151](https://github.com/adiwg/mdTranslator/pull/151) ([stansmith907](https://github.com/stansmith907))
109
128
 
110
129
  ## [v2.9.1](https://github.com/adiwg/mdTranslator/tree/v2.9.1) (2018-02-03)
111
130
  [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.9.0...v2.9.1)
@@ -216,10 +235,6 @@
216
235
  ## [v2.3.4](https://github.com/adiwg/mdTranslator/tree/v2.3.4) (2017-10-13)
217
236
  [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.3.3...v2.3.4)
218
237
 
219
- **Merged pull requests:**
220
-
221
- - Remove repository name from harvest set tag in sbJson writer. [\#151](https://github.com/adiwg/mdTranslator/pull/151) ([stansmith907](https://github.com/stansmith907))
222
-
223
238
  ## [v2.3.3](https://github.com/adiwg/mdTranslator/tree/v2.3.3) (2017-10-11)
224
239
  [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.3.2...v2.3.3)
225
240
 
data/Rakefile CHANGED
@@ -11,6 +11,7 @@ Rake::TestTask.new do |t|
11
11
  'test/writers/fgdc/tc*.rb',
12
12
  'test/writers/html/tc*.rb',
13
13
  'test/writers/iso19110/tc*.rb',
14
+ 'test/writers/iso19115-1/tc*.rb',
14
15
  'test/writers/iso19115-2/tc*.rb',
15
16
  'test/writers/mdJson/tc*.rb',
16
17
  'test/writers/sbJson/tc*.rb',
@@ -28,6 +29,7 @@ task :default => :test
28
29
  # 'test/writers/fgdc/tc*.rb',
29
30
  # 'test/writers/html/tc*.rb',
30
31
  # 'test/writers/iso19110/tc*.rb',
32
+ # 'test/writers/iso19115-1/tc*.rb',
31
33
  # 'test/writers/iso19115-2/tc*.rb',
32
34
  # 'test/writers/mdJson/tc*.rb',
33
35
  # 'test/writers/sbJson/tc*.rb',
@@ -1,6 +1,7 @@
1
1
  # coding: utf-8
2
2
  # History
3
3
  # Stan Smith 2017-05-16 remove rgeo 0.5 support
4
+ # Stan Smith 2019-03-19 migrated to version 2 bundler
4
5
 
5
6
  lib = File.expand_path('../lib', __FILE__)
6
7
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
@@ -24,7 +25,7 @@ Gem::Specification.new do |spec|
24
25
 
25
26
  spec.required_ruby_version = '>= 2.3'
26
27
 
27
- spec.add_development_dependency "bundler", "~> 1"
28
+ spec.add_development_dependency "bundler", "~> 2"
28
29
  spec.add_development_dependency "rake", "~> 10"
29
30
  spec.add_development_dependency "minitest", "~> 5"
30
31
 
@@ -26,6 +26,7 @@
26
26
  # Stan Smith 2014-07-02 original script
27
27
 
28
28
  # required by readers and writers
29
+ require 'adiwg/mdtranslator/internal/module_dateTimeFun'
29
30
  require 'adiwg/mdtranslator/version'
30
31
  require 'adiwg/mdtranslator/readers/mdReaders'
31
32
  require 'adiwg/mdtranslator/writers/mdWriters'
@@ -0,0 +1,26 @@
1
+ # codelist methods
2
+ # for ADIwg readers and writers
3
+
4
+ # History:
5
+ # Stan Smith 2019-03-22 original script
6
+
7
+ require 'adiwg-mdcodes'
8
+
9
+ module CodelistFun
10
+
11
+ def self.validateItem(codeList, codeName)
12
+
13
+ # get requested codelist from the adiwg-mdcodes gem
14
+ mdCodelist = ADIWG::Mdcodes.getCodelistDetail(codeList)
15
+
16
+ aCodes = mdCodelist['codelist']
17
+
18
+ # search the codelist for a matching codeName
19
+ aCodes.each do |hCode|
20
+ return true if hCode['codeName'] == codeName
21
+ end
22
+ return false
23
+
24
+ end
25
+
26
+ end
@@ -76,6 +76,9 @@ module AdiwgCoordinates
76
76
  unpackGeometry(hGeo, aNorthings, aEastings)
77
77
  end
78
78
 
79
+ # return if no coordinates found in geographic object(s)
80
+ return {} if aNorthings.empty? || aEastings.empty?
81
+
79
82
  # find most north/south points
80
83
  north = aNorthings.max
81
84
  south = aNorthings.min
@@ -3,8 +3,8 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2018-02-20 added tests for valid date and time formats
6
- # Stan Smith 2013-09-26 original script
7
6
  # Stan Smith 2013-12-06 added support for fractional seconds
7
+ # Stan Smith 2013-09-26 original script
8
8
 
9
9
  require 'date'
10
10
 
@@ -6,7 +6,6 @@
6
6
 
7
7
  require 'date'
8
8
  require 'adiwg/mdtranslator/internal/internal_metadata_obj'
9
- require 'adiwg/mdtranslator/internal/module_dateTimeFun'
10
9
  require_relative 'module_fgdc'
11
10
  require_relative 'module_dateTime'
12
11
 
@@ -7,7 +7,6 @@
7
7
 
8
8
  require 'date'
9
9
  require 'adiwg/mdtranslator/internal/internal_metadata_obj'
10
- require 'adiwg/mdtranslator/internal/module_dateTimeFun'
11
10
  require_relative 'module_fgdc'
12
11
 
13
12
  module ADIWG
@@ -222,7 +222,7 @@ module ADIWG
222
222
  nodeName = xKeywords.xpath('.').first.name
223
223
  if nodeName == 'methodid'
224
224
  hKeyword = intMetadataClass.newKeyword
225
- hKeyword[:keywordType] = 'method'
225
+ hKeyword[:keywordType] = 'methodology'
226
226
 
227
227
  # theme bio.1.1 (methkt) - lineage method keyword thesaurus {citation}
228
228
  thesaurus = xKeywords.xpath('./methkt').text
@@ -2,6 +2,7 @@
2
2
  # unpack fgdc taxonomy system
3
3
 
4
4
  # History:
5
+ # Stan Smith 2019-05-17 fixed, changed idref output from identifier to citation
5
6
  # Stan Smith 2017-09-20 original script
6
7
 
7
8
  require 'nokogiri'
@@ -64,10 +65,7 @@ module ADIWG
64
65
  axTaxRef.each do |xTaxRef|
65
66
  hCitation = Citation.unpack(xTaxRef, hResponseObj)
66
67
  unless hCitation.nil?
67
- hIdentifier = intMetadataClass.newIdentifier
68
- hIdentifier[:identifier] = 'none'
69
- hIdentifier[:citation] = hCitation
70
- hTaxonomy[:idReferences] << hIdentifier
68
+ hTaxonomy[:idReferences] << hCitation
71
69
  end
72
70
  end
73
71
  end
@@ -105,7 +105,6 @@ module ADIWG
105
105
  end
106
106
  end
107
107
 
108
- # TODO need outContext
109
108
  # contact - address [address]
110
109
  if hContact.has_key?('address')
111
110
  aItems = hContact['address']
@@ -5,8 +5,6 @@
5
5
  # Stan Smith 2018-06-18 refactored error and warning messaging
6
6
  # Stan Smith 2016-10-12 original script
7
7
 
8
- require 'adiwg/mdtranslator/internal/module_dateTimeFun'
9
-
10
8
  module ADIWG
11
9
  module Mdtranslator
12
10
  module Readers
@@ -9,8 +9,6 @@
9
9
  # Stan Smith 2015-07-14 refactored to remove global namespace constants
10
10
  # Stan Smith 2013-12-11 original script
11
11
 
12
- require 'adiwg/mdtranslator/internal/module_dateTimeFun'
13
-
14
12
  module ADIWG
15
13
  module Mdtranslator
16
14
  module Readers
@@ -5,7 +5,6 @@
5
5
  # Stan Smith 2016-06-20 original script
6
6
 
7
7
  require 'adiwg/mdtranslator/internal/internal_metadata_obj'
8
- require 'adiwg/mdtranslator/internal/module_dateTimeFun'
9
8
 
10
9
  module ADIWG
11
10
  module Mdtranslator
@@ -1,7 +1,8 @@
1
1
  # adiwg mdTranslator
2
2
 
3
3
  # version 2 history
4
- # 2.14.2 2018-11-1 fix fgdc reader error messages
4
+ # 2.15.0 2019-05-15 added ISO 19115-3(1) writer
5
+ # 2.14.2 2018-11-02 changed keywordType from 'method' to 'methodology' for FGDC reader/writer
5
6
  # 2.14.1 2018-10-31 add fix for empty verticalDatum in fgdc and iso 19115_2 writers
6
7
  # 2.14.0 2018-10-27 refactor taxonomy for multiple taxonomic classifications
7
8
  # 2.14.0 2018-10-27 refactor taxonomy for identification reference as citation
@@ -103,7 +104,7 @@
103
104
  module ADIWG
104
105
  module Mdtranslator
105
106
  # current mdtranslator version
106
- VERSION = "2.14.2"
107
+ VERSION = "2.15.0"
107
108
  end
108
109
  end
109
110
 
@@ -5,7 +5,6 @@
5
5
  # Stan Smith 2018-02-26 refactored error and warning messaging
6
6
  # Stan Smith 2018-01-24 original script
7
7
 
8
- require 'adiwg/mdtranslator/internal/module_dateTimeFun'
9
8
  require_relative '../fgdc_writer'
10
9
  require_relative 'class_dataDomain'
11
10
 
@@ -5,7 +5,6 @@
5
5
  # Stan Smith 2018-02-26 refactored error and warning messaging
6
6
  # Stan Smith 2017-11-17 original script
7
7
 
8
- require 'adiwg/mdtranslator/internal/module_dateTimeFun'
9
8
  require_relative '../fgdc_writer'
10
9
  require_relative 'class_series'
11
10
  require_relative 'class_publisher'
@@ -6,7 +6,6 @@
6
6
  # Stan Smith 2018-01-19 convert ISO date formats to FGDC
7
7
  # Stan Smith 2017-11-23 original script
8
8
 
9
- require 'adiwg/mdtranslator/internal/module_dateTimeFun'
10
9
  require_relative '../fgdc_writer'
11
10
 
12
11
  module ADIWG
@@ -6,7 +6,6 @@
6
6
  # Stan Smith 2018-01-19 convert ISO date formats to FGDC
7
7
  # Stan Smith 2017-11-23 original script
8
8
 
9
- require 'adiwg/mdtranslator/internal/module_dateTimeFun'
10
9
  require_relative '../fgdc_writer'
11
10
 
12
11
  module ADIWG
@@ -34,7 +34,7 @@ module ADIWG
34
34
  haveMethod = true unless hLineage[:lineageCitation].empty?
35
35
  aKeywords = hIntObj[:metadata][:resourceInfo][:keywords]
36
36
  aKeywords.each do |hKeyword|
37
- if hKeyword[:keywordType] == 'method'
37
+ if %w(method methodology).include?(hKeyword[:keywordType])
38
38
  haveMethod = true
39
39
  end
40
40
  end
@@ -26,7 +26,7 @@ module ADIWG
26
26
  haveMethod = false
27
27
  aKeywords.each do |hKeySet|
28
28
  type = hKeySet[:keywordType]
29
- if type == 'method'
29
+ if type == 'method' || type == 'methodology'
30
30
  aKeywords = hKeySet[:keywords]
31
31
  hThesaurus = hKeySet[:thesaurus]
32
32
  thesaurusName = nil
@@ -5,7 +5,6 @@
5
5
  # Stan Smith 2018-03-19 refactored error and warning messaging
6
6
  # Stan Smith 2017-12-18 original script
7
7
 
8
- require 'adiwg/mdtranslator/internal/module_dateTimeFun'
9
8
  require_relative '../fgdc_writer'
10
9
  require_relative 'class_contact'
11
10
 
@@ -6,7 +6,6 @@
6
6
  # Stan Smith 2018-01-31 original script
7
7
 
8
8
  require_relative '../fgdc_writer'
9
- require 'adiwg/mdtranslator/internal/module_dateTimeFun'
10
9
 
11
10
  module ADIWG
12
11
  module Mdtranslator
@@ -8,7 +8,6 @@
8
8
  # Stan Smith 2015-03-25 original script
9
9
 
10
10
  require_relative 'html_citation'
11
- require_relative 'html_identifier'
12
11
  require_relative 'html_responsibility'
13
12
  require_relative 'html_taxonomyClass'
14
13
 
@@ -27,7 +26,6 @@ module ADIWG
27
26
 
28
27
  # classes used
29
28
  citationClass = Html_Citation.new(@html)
30
- identifierClass = Html_Identifier.new(@html)
31
29
  responsibilityClass = Html_Responsibility.new(@html)
32
30
  taxonomicClass = Html_TaxonomyClass.new(@html)
33
31
 
@@ -94,7 +92,7 @@ module ADIWG
94
92
  # taxonomy - identification references
95
93
  hTaxonomy[:idReferences].each do |hReference|
96
94
  @html.details do
97
- @html.summary('Non-Authoritative Reference', {'class' => 'h5'})
95
+ @html.summary('Non-Authoritative Identification Reference', {'class' => 'h5'})
98
96
  @html.section(:class => 'block') do
99
97
  citationClass.writeHtml(hReference)
100
98
  end
@@ -0,0 +1,48 @@
1
+ # ISO <<Class>> MD_AssociatedResource
2
+ # 19115-1 writer output in XML
3
+
4
+ # History:
5
+ # Stan Smith 2019-04-22 original script
6
+
7
+ require_relative 'class_citation'
8
+
9
+ module ADIWG
10
+ module Mdtranslator
11
+ module Writers
12
+ module Iso19115_1
13
+
14
+ class AdditionalDocument
15
+
16
+ def initialize(xml, hResponseObj)
17
+ @xml = xml
18
+ @hResponseObj = hResponseObj
19
+ @NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_1
20
+ end
21
+
22
+ def writeXML(hAdditionalDoc, inContext = nil)
23
+
24
+ # classes used
25
+ citationClass = CI_Citation.new(@xml, @hResponseObj)
26
+
27
+ outContext = 'additional document'
28
+ outContext = inContext + ' additional document' unless inContext.nil?
29
+
30
+ # additional document - resource type [] {MD_ScopeCode} - not used by ISO
31
+
32
+ # additional document - additional documentation [] {CI_Citation}
33
+ aDocs = hAdditionalDoc[:citation]
34
+ aDocs.each do |hCitation|
35
+ unless hCitation.empty?
36
+ @xml.tag!('mri:additionalDocumentation') do
37
+ citationClass.writeXML(hCitation, outContext)
38
+ end
39
+ end
40
+ end
41
+
42
+ end # writeXML
43
+ end # AdditionalDocument class
44
+
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,90 @@
1
+ # ISO <<Class>> CI_Address
2
+ # 19115-1 writer output in XML
3
+
4
+ # History:
5
+ # Stan Smith 2019-03-18 original script
6
+
7
+ module ADIWG
8
+ module Mdtranslator
9
+ module Writers
10
+ module Iso19115_1
11
+
12
+ class CI_Address
13
+
14
+ def initialize(xml, hResponseObj)
15
+ @xml = xml
16
+ @hResponseObj = hResponseObj
17
+ end
18
+
19
+ def writeXML(hAddress)
20
+
21
+ @xml.tag!('cit:CI_Address') do
22
+
23
+
24
+ unless hAddress.nil?
25
+
26
+ # address - address type (not used by ISO 19115-1)
27
+
28
+ # address - description (not used by ISO 19115-1)
29
+
30
+ # address - delivery points []
31
+ aDeliveryPoints = hAddress[:deliveryPoints]
32
+ aDeliveryPoints.each do |myPoint|
33
+ @xml.tag!('cit:deliveryPoint') do
34
+ @xml.tag!('gco:CharacterString', myPoint)
35
+ end
36
+ end
37
+ if aDeliveryPoints.empty? && @hResponseObj[:writerShowTags]
38
+ @xml.tag!('cit:deliveryPoint')
39
+ end
40
+
41
+ # address - city
42
+ unless hAddress[:city].nil?
43
+ @xml.tag!('cit:city') do
44
+ @xml.tag!('gco:CharacterString', hAddress[:city])
45
+ end
46
+ end
47
+ if hAddress[:city].nil? && @hResponseObj[:writerShowTags]
48
+ @xml.tag!('cit:city')
49
+ end
50
+
51
+ # address - administrative area
52
+ unless hAddress[:adminArea].nil?
53
+ @xml.tag!('cit:administrativeArea') do
54
+ @xml.tag!('gco:CharacterString', hAddress[:adminArea])
55
+ end
56
+ end
57
+ if hAddress[:adminArea].nil? && @hResponseObj[:writerShowTags]
58
+ @xml.tag!('cit:administrativeArea')
59
+ end
60
+
61
+ # address - postal code
62
+ unless hAddress[:postalCode].nil?
63
+ @xml.tag!('cit:postalCode') do
64
+ @xml.tag!('gco:CharacterString', hAddress[:postalCode])
65
+ end
66
+ end
67
+ if hAddress[:postalCode].nil? && @hResponseObj[:writerShowTags]
68
+ @xml.tag!('cit:postalCode')
69
+ end
70
+
71
+ # address - country
72
+ unless hAddress[:country].nil?
73
+ @xml.tag!('cit:country') do
74
+ @xml.tag!('gco:CharacterString', hAddress[:country])
75
+ end
76
+ end
77
+ if hAddress[:country].nil? && @hResponseObj[:writerShowTags]
78
+ @xml.tag!('cit:country')
79
+ end
80
+
81
+ end
82
+
83
+ end # CI_Address tag
84
+ end # writeXML
85
+ end # CI_Address class
86
+
87
+ end
88
+ end
89
+ end
90
+ end