adiwg-mdtranslator 2.18.4 → 2.19.0.pre.beta.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +14 -0
  3. data/Gemfile.lock +11 -9
  4. data/adiwg-mdtranslator.gemspec +3 -3
  5. data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +27 -11
  6. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_dataQuality.rb +149 -0
  7. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_fgdc.rb +2 -2
  8. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_conformanceResult.rb +1 -1
  9. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coverageResult.rb +8 -7
  10. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataQuality.rb +4 -4
  11. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataQualityReport.rb +8 -16
  12. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_evaluationMethod.rb +1 -1
  13. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_legalConstraint.rb +8 -8
  14. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_qualityMeasure.rb +34 -0
  15. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_qualityResultFile.rb +72 -0
  16. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_rangeElementDescription.rb +2 -2
  17. data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_contact.rb +13 -0
  18. data/lib/adiwg/mdtranslator/version.rb +1 -1
  19. data/lib/adiwg/mdtranslator/writers/fgdc/classes/{class_quality.rb → class_dataQuality.rb} +14 -10
  20. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_fgdc.rb +3 -3
  21. data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +5 -1
  22. data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQuality.rb +39 -18
  23. data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQualityReport.rb +385 -0
  24. data/lib/adiwg/mdtranslator/writers/html/sections/html_rangeElementDescription.rb +2 -2
  25. data/lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb +60 -0
  26. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_dataQualityReport.rb +213 -39
  27. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_qualityResultFile.rb +55 -0
  28. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_rangeElementDescription.rb +1 -1
  29. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_allocation.rb +1 -1
  30. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageResult.rb +30 -0
  31. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dataQuality.rb +3 -1
  32. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dataQualityReport.rb +12 -10
  33. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_descriptiveResult.rb +3 -3
  34. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_funding.rb +2 -2
  35. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_legalConstraint.rb +1 -1
  36. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb +1 -1
  37. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_qualityMeasure.rb +4 -3
  38. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_qualityResultFile.rb +23 -0
  39. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_standaloneQualityReport.rb +31 -0
  40. data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb +10 -0
  41. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_additionalDocumentation.rb +1 -1
  42. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb +1 -1
  43. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_allocation.rb +1 -1
  44. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_associatedResource.rb +2 -2
  45. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_attribute.rb +2 -2
  46. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_attributeGroup.rb +1 -1
  47. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_body.rb +12 -17
  48. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_citation.rb +5 -5
  49. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_classedData.rb +1 -1
  50. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_constraint.rb +5 -5
  51. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_contact.rb +37 -5
  52. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_coverageInfo.rb +3 -3
  53. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataDictionary.rb +5 -5
  54. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQuality.rb +31 -12
  55. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQualityReport.rb +385 -0
  56. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_distribution.rb +1 -1
  57. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_distributor.rb +3 -3
  58. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_domain.rb +3 -3
  59. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_domainItem.rb +1 -1
  60. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_entity.rb +5 -5
  61. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityAttribute.rb +3 -3
  62. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_extent.rb +3 -3
  63. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_feature.rb +5 -5
  64. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_featureCollection.rb +4 -4
  65. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_featureProperties.rb +1 -1
  66. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_format.rb +1 -1
  67. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_funding.rb +1 -1
  68. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geodeticParameters.rb +2 -2
  69. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geographicElement.rb +4 -4
  70. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geographicExtent.rb +4 -14
  71. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geologicAge.rb +1 -1
  72. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geometryCollection.rb +4 -4
  73. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geometryObject.rb +2 -2
  74. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_georectifiedRepresentation.rb +2 -2
  75. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_georeferenceableRepresentation.rb +3 -3
  76. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_graphic.rb +2 -2
  77. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_gridRepresentation.rb +2 -2
  78. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_identifier.rb +1 -1
  79. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_imageInfo.rb +1 -1
  80. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_keyword.rb +2 -2
  81. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_metadataInfo.rb +9 -9
  82. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_metadataRepository.rb +1 -1
  83. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_processStep.rb +1 -1
  84. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_processing.rb +3 -3
  85. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_rangeElementDescription.rb +2 -2
  86. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_resourceInfo.rb +17 -17
  87. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_responsibility.rb +1 -1
  88. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_resultFile.rb +60 -0
  89. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_scope.rb +12 -12
  90. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_source.rb +2 -2
  91. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_taxonomy.rb +1 -1
  92. metadata +23 -13
  93. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_quality.rb +0 -181
  94. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_bodyScript.js +0 -317
@@ -47,7 +47,7 @@ module ADIWG
47
47
  # associated resource - resource citation {citation}
48
48
  unless hResource[:resourceCitation].empty?
49
49
  @html.div do
50
- @html.div('Resource citation', {'class' => 'h5'})
50
+ @html.h5('Resource citation', {'class' => 'h5'})
51
51
  @html.div(:class => 'block') do
52
52
  citationClass.writeHtml(hResource[:resourceCitation])
53
53
  end
@@ -57,7 +57,7 @@ module ADIWG
57
57
  # associated resource - metadata citation
58
58
  unless hResource[:metadataCitation].empty?
59
59
  @html.div do
60
- @html.div('Metadata citation', {'class' => 'h5'})
60
+ @html.h5('Metadata citation', {'class' => 'h5'})
61
61
  @html.div(:class => 'block') do
62
62
  citationClass.writeHtml(hResource[:metadataCitation])
63
63
  end
@@ -48,7 +48,7 @@ module ADIWG
48
48
  # attribute - attribute identifiers [] {identifier}
49
49
  hAttribute[:attributeIdentifiers].each do |hIdentifier|
50
50
  @html.div do
51
- @html.div('Identifier', 'class' => 'h5')
51
+ @html.h5('Identifier', 'class' => 'h5')
52
52
  @html.div(:class => 'block') do
53
53
  identifierClass.writeHtml(hIdentifier)
54
54
  end
@@ -121,7 +121,7 @@ module ADIWG
121
121
  # attribute - range element description
122
122
  hAttribute[:rangeElementDescription].each do |red|
123
123
  @html.div do
124
- @html.div('Range Element Description', 'class' => 'h5')
124
+ @html.h5('Range Element Description', 'class' => 'h5')
125
125
  @html.div(:class => 'block') do
126
126
  rangeElementDescriptionClass.writeHtml(red)
127
127
  end
@@ -35,7 +35,7 @@ module ADIWG
35
35
  hGroup[:attributes].each do |hAttribute|
36
36
  @html.div do
37
37
  counter += 1
38
- @html.div('Attribute '+counter.to_s, {'class' => 'h5'})
38
+ @html.h5('Attribute '+counter.to_s, {'class' => 'h5'})
39
39
  @html.div(:class => 'block') do
40
40
  attributeClass.writeHtml(hAttribute)
41
41
  end
@@ -129,6 +129,7 @@ module ADIWG
129
129
  unless aContacts.empty?
130
130
  @html.div do
131
131
  @html.h2('Contacts', {'id' => 'body-contacts', 'class' => 'h2'})
132
+ @html.span('', {'style' => 'mso-bookmark:body-contacts'})
132
133
  @html.div(:class => 'block') do
133
134
  aContacts.each do |hContact|
134
135
  @html.div(:class => 'block') do
@@ -144,6 +145,7 @@ module ADIWG
144
145
  unless hMetaInfo.empty?
145
146
  @html.div do
146
147
  @html.h2('Metadata Information', {'id' => 'body-metadataInfo', 'class' => 'h2'})
148
+ @html.span('', {'style' => 'mso-bookmark:body-metadataInfo'})
147
149
  @html.div(:class => 'block') do
148
150
  @html.div(:class => 'block') do
149
151
  metaInfoClass.writeHtml(hMetaInfo)
@@ -157,7 +159,8 @@ module ADIWG
157
159
  unless hResourceInfo.empty?
158
160
  @html.div do
159
161
  @html.h2('Resource Information', {'id' => 'body-resourceInfo', 'class' => 'h2'})
160
- @html.div(:class => 'block') do
162
+ @html.span('', {'style' => 'mso-bookmark:body-resourceInfo'})
163
+ @html.div(:class => 'block') do
161
164
  resourceClass.writeHtml(hResourceInfo)
162
165
  end
163
166
  @html.hr
@@ -167,6 +170,7 @@ module ADIWG
167
170
  unless aDataQuality.nil? || aDataQuality.empty?
168
171
  @html.div do
169
172
  @html.h2('Data Quality', {'id' => 'body-dataQuality', 'class' => 'h2'})
173
+ @html.span('', {'style' => 'mso-bookmark:body-dataQuality'})
170
174
  aDataQuality.each do |hDataQuality|
171
175
  @html.div(:class => 'block') do
172
176
  dataQualityClass.writeHtml(hDataQuality)
@@ -179,6 +183,7 @@ module ADIWG
179
183
  unless aLineage.empty?
180
184
  @html.div do
181
185
  @html.h2('Resource Lineage', {'id' => 'body-lineage', 'class' => 'h2'})
186
+ @html.span('', {'style' => 'mso-bookmark:body-lineage'})
182
187
  @html.div(:class => 'block') do
183
188
  aLineage.each do |hLineage|
184
189
  @html.div do
@@ -197,6 +202,7 @@ module ADIWG
197
202
  unless aDistribution.empty?
198
203
  @html.div do
199
204
  @html.h2('Resource Distribution', {'id' => 'body-distribution', 'class' => 'h2'})
205
+ @html.span('', {'style' => 'mso-bookmark:body-distribution'})
200
206
  @html.div(:class => 'block') do
201
207
  aDistribution.each do |hDistribution|
202
208
  @html.div do
@@ -215,6 +221,7 @@ module ADIWG
215
221
  unless aAssociated.empty?
216
222
  @html.div do
217
223
  @html.h2('Associated Resources', {'id' => 'body-associatedResource', 'class' => 'h2'})
224
+ @html.span('', {'style' => 'mso-bookmark:body-associatedResource'})
218
225
  @html.div(:class => 'block') do
219
226
  aAssociated.each do |hAssociated|
220
227
  @html.div do
@@ -233,6 +240,7 @@ module ADIWG
233
240
  unless aAdditional.empty?
234
241
  @html.div do
235
242
  @html.h2('Additional Documentation', {'id' => 'body-additionalDocument', 'class' => 'h2'})
243
+ @html.span('', {'style' => 'mso-bookmark:body-additionalDocument'})
236
244
  @html.div(:class => 'block') do
237
245
  aAdditional.each do |hAdditional|
238
246
  @html.div do
@@ -251,6 +259,7 @@ module ADIWG
251
259
  unless aDictionaries.empty?
252
260
  @html.div do
253
261
  @html.h2('Data Dictionaries', {'id' => 'body-dataDictionary', 'class' => 'h2'})
262
+ @html.span('', {'style' => 'mso-bookmark:body-dataDictionary'})
254
263
  @html.div(:class => 'block') do
255
264
  aDictionaries.each do |hDictionary|
256
265
  @html.div do
@@ -268,6 +277,7 @@ module ADIWG
268
277
  unless aFunding.empty?
269
278
  @html.div do
270
279
  @html.h2('Funding', {'id' => 'body-funding', 'class' => 'h2'})
280
+ @html.span('', {'style' => 'mso-bookmark:body-funding'})
271
281
  @html.div(:class => 'block') do
272
282
  aFunding.each do |hFunding|
273
283
  @html.div do
@@ -285,6 +295,7 @@ module ADIWG
285
295
  unless aRepositories.empty?
286
296
  @html.div do
287
297
  @html.h2('Metadata Repositories', {'id' => 'body-repository', 'class' => 'h2'})
298
+ @html.span('', {'style' => 'mso-bookmark:body-repository'})
288
299
  @html.div(:class => 'block') do
289
300
  aRepositories.each do |hRepository|
290
301
  @html.div do
@@ -298,22 +309,6 @@ module ADIWG
298
309
  end
299
310
  end
300
311
 
301
- # load leaflet
302
- @html.link( :rel => 'stylesheet', :href => 'https://unpkg.com/leaflet@1.0.3/dist/leaflet.css')
303
- @html.script('', :src => 'https://unpkg.com/leaflet@1.0.3/dist/leaflet.js')
304
- @html.script('', :src => 'https://stamen-maps.a.ssl.fastly.net/js/tile.stamen.js')
305
-
306
- # add inline javascript
307
- # read javascript from file
308
- path = File.join(File.dirname(__FILE__), 'html_bodyScript.js')
309
- file = File.open(path, 'r')
310
- bodyJS = file.read
311
- file.close
312
-
313
- @html.script('type'=>'text/javascript') do
314
- @html << bodyJS
315
- end
316
-
317
312
  end # body
318
313
  end # writeHtml
319
314
  end # Html_Body
@@ -68,7 +68,7 @@ module ADIWG
68
68
  # citation - responsibilities [] {responsibility}
69
69
  hCitation[:responsibleParties].each do |hResponsibility|
70
70
  @html.div do
71
- @html.div(hResponsibility[:roleName], 'class' => 'h5')
71
+ @html.h5(hResponsibility[:roleName], 'class' => 'h5')
72
72
  @html.div(:class => 'block') do
73
73
  responsibilityClass.writeHtml(hResponsibility)
74
74
  end
@@ -78,7 +78,7 @@ module ADIWG
78
78
  # citation - identifier []
79
79
  hCitation[:identifiers].each do |hIdentifier|
80
80
  @html.div do
81
- @html.div('Identifier', 'class' => 'h5')
81
+ @html.h5('Identifier', 'class' => 'h5')
82
82
  @html.div(:class => 'block') do
83
83
  identifierClass.writeHtml(hIdentifier)
84
84
  end
@@ -88,7 +88,7 @@ module ADIWG
88
88
  # citation - series
89
89
  unless hCitation[:series].empty?
90
90
  @html.div do
91
- @html.div('Publication Series', {'class' => 'h5'})
91
+ @html.h5('Publication Series', {'class' => 'h5'})
92
92
  @html.div(:class => 'block') do
93
93
 
94
94
  hSeries = hCitation[:series]
@@ -121,7 +121,7 @@ module ADIWG
121
121
  # citation - online resource []
122
122
  hCitation[:onlineResources].each do |hOnline|
123
123
  @html.div do
124
- @html.div('Online Resource', {'class' => 'h5'})
124
+ @html.h5('Online Resource', {'class' => 'h5'})
125
125
  @html.div(:class => 'block') do
126
126
  onlineClass.writeHtml(hOnline)
127
127
  end
@@ -131,7 +131,7 @@ module ADIWG
131
131
  # citation - browse graphic []
132
132
  hCitation[:browseGraphics].each do |hGraphic|
133
133
  @html.div do
134
- @html.div('Graphic Overview', {'class' => 'h5'})
134
+ @html.h5('Graphic Overview', {'class' => 'h5'})
135
135
  @html.div(:class => 'block') do
136
136
  graphicClass.writeHtml(hGraphic)
137
137
  end
@@ -33,7 +33,7 @@ module ADIWG
33
33
  aClassItems = hClassD[:classedDataItems]
34
34
  aClassItems.each do |hClassItem|
35
35
  @html.div do
36
- @html.div(hClassItem[:className], {'class'=>'h5'})
36
+ @html.h5(hClassItem[:className], {'class'=>'h5'})
37
37
  @html.div(:class=>'block') do
38
38
  htmlClassItem.writeHtml(hClassItem)
39
39
  end
@@ -52,7 +52,7 @@ module ADIWG
52
52
  # constraint - scope {scope}
53
53
  unless hConstraint[:scope].empty?
54
54
  @html.div do
55
- @html.div('Scope', {'class' => 'h5'})
55
+ @html.h5('Scope', {'class' => 'h5'})
56
56
  @html.div(:class => 'block') do
57
57
  scopeClass.writeHtml(hConstraint[:scope])
58
58
  end
@@ -62,7 +62,7 @@ module ADIWG
62
62
  # constraint - graphic [] {graphic}
63
63
  hConstraint[:graphic].each do |hGraphic|
64
64
  @html.div do
65
- @html.div('Graphic', {'class' => 'h5'})
65
+ @html.h5('Graphic', {'class' => 'h5'})
66
66
  @html.div(:class => 'block') do
67
67
  graphicClass.writeHtml(hGraphic)
68
68
  end
@@ -72,7 +72,7 @@ module ADIWG
72
72
  # constraint - reference [] {citation}
73
73
  hConstraint[:reference].each do |hReference|
74
74
  @html.div do
75
- @html.div('Reference', {'class' => 'h5'})
75
+ @html.h5('Reference', {'class' => 'h5'})
76
76
  @html.div(:class => 'block') do
77
77
  citationClass.writeHtml(hReference)
78
78
  end
@@ -82,7 +82,7 @@ module ADIWG
82
82
  # constraint - releasability {releasability}
83
83
  unless hConstraint[:releasability].empty?
84
84
  @html.div do
85
- @html.div('Releasability', {'class' => 'h5'})
85
+ @html.h5('Releasability', {'class' => 'h5'})
86
86
  @html.div(:class => 'block') do
87
87
  releasabilityClass.writeHtml(hConstraint[:releasability])
88
88
  end
@@ -92,7 +92,7 @@ module ADIWG
92
92
  # constraint - responsibility [] {responsibility}
93
93
  hConstraint[:responsibleParty].each do |hResponsibility|
94
94
  @html.div do
95
- @html.div(hResponsibility[:roleName], {'class' => 'h5'})
95
+ @html.h5(hResponsibility[:roleName], {'class' => 'h5'})
96
96
  @html.div(:class => 'block') do
97
97
  responsibilityClass.writeHtml(hResponsibility)
98
98
  end
@@ -28,7 +28,7 @@ module ADIWG
28
28
  graphicClass = Html_Graphic.new(@html)
29
29
 
30
30
  @html.div do
31
- @html.div(hContact[:name], {'id' => 'CID_' + hContact[:contactId], 'class' => 'h3'})
31
+ @html.h3(hContact[:name], {'id' => 'CID_' + hContact[:contactId], 'class' => 'h3'})
32
32
  @html.div(:class => 'block') do
33
33
 
34
34
  # contact - contact ID
@@ -70,7 +70,7 @@ module ADIWG
70
70
  # contact - address
71
71
  hContact[:addresses].each do |hAddress|
72
72
  @html.div do
73
- @html.div('Address', {'class' => 'h5'})
73
+ @html.h5('Address', {'class' => 'h5'})
74
74
  @html.div(:class => 'block') do
75
75
 
76
76
  # address - delivery points
@@ -119,7 +119,7 @@ module ADIWG
119
119
  # contact - phones
120
120
  hContact[:phones].each do |hPhone|
121
121
  @html.div do
122
- @html.div('Phone', {'class' => 'h5'})
122
+ @html.h5('Phone', {'class' => 'h5'})
123
123
  @html.div(:class => 'block') do
124
124
 
125
125
  # phone - name
@@ -159,7 +159,7 @@ module ADIWG
159
159
  # contact - online resource []
160
160
  hContact[:onlineResources].each do |hOnline|
161
161
  @html.div do
162
- @html.div('Online Resource', {'class' => 'h5'})
162
+ @html.h5('Online Resource', {'class' => 'h5'})
163
163
  @html.div(:class => 'block') do
164
164
  onlineClass.writeHtml(hOnline)
165
165
  end
@@ -169,7 +169,7 @@ module ADIWG
169
169
  # contact - logos []
170
170
  hContact[:logos].each do |hLogo|
171
171
  @html.div do
172
- @html.div('Logo Graphic', {'class' => 'h5'})
172
+ @html.h5('Logo Graphic', {'class' => 'h5'})
173
173
  @html.div(:class => 'block') do
174
174
  graphicClass.writeHtml(hLogo)
175
175
  end
@@ -190,6 +190,38 @@ module ADIWG
190
190
  @html.br
191
191
  end
192
192
 
193
+ # contact - external identifiers []
194
+ if hContact.key?(:externalIdentifier) && !hContact[:externalIdentifier].empty?
195
+ hContact[:externalIdentifier].each do |identifier|
196
+ @html.div do
197
+ @html.h5("External Identifier", {'class' => 'h5'})
198
+ @html.div(:class => 'block') do
199
+ @html.em('Identifier: ')
200
+ @html.text!(identifier[:identifier])
201
+ @html.br
202
+
203
+ unless identifier[:namespace].nil?
204
+ @html.em('Namespace: ')
205
+ @html.text!(identifier[:namespace])
206
+ @html.br
207
+ end
208
+
209
+ unless identifier[:version].nil?
210
+ @html.em('Version: ')
211
+ @html.text!(identifier[:version])
212
+ @html.br
213
+ end
214
+
215
+ unless identifier[:description].nil?
216
+ @html.em('Description: ')
217
+ @html.text!(identifier[:description])
218
+ @html.br
219
+ end
220
+ end
221
+ end
222
+ end
223
+ end
224
+
193
225
  end
194
226
  end
195
227
 
@@ -45,7 +45,7 @@ module ADIWG
45
45
  # coverage - process level code
46
46
  unless hCoverage[:processingLevelCode].empty?
47
47
  @html.div do
48
- @html.div('Processing Level Code', {'class' => 'h5'})
48
+ @html.h5('Processing Level Code', {'class' => 'h5'})
49
49
  @html.div(:class => 'block') do
50
50
  identifierClass.writeHtml(hCoverage[:processingLevelCode])
51
51
  end
@@ -55,7 +55,7 @@ module ADIWG
55
55
  # coverage - attribute group [] {attributeGroup}
56
56
  hCoverage[:attributeGroups].each do |hAttGroup|
57
57
  @html.div do
58
- @html.div('Attribute Group', {'class' => 'h5'})
58
+ @html.h5('Attribute Group', {'class' => 'h5'})
59
59
  @html.div(:class => 'block') do
60
60
  attGroupClass.writeHtml(hAttGroup)
61
61
  end
@@ -65,7 +65,7 @@ module ADIWG
65
65
  # coverage - image description {imageInfo}
66
66
  unless hCoverage[:imageDescription].empty?
67
67
  @html.div do
68
- @html.div('Image Description', {'class' => 'h5'})
68
+ @html.h5('Image Description', {'class' => 'h5'})
69
69
  @html.div(:class => 'block') do
70
70
  imageClass.writeHtml(hCoverage[:imageDescription])
71
71
  end
@@ -51,7 +51,7 @@ module ADIWG
51
51
  # dictionary - domains [] {domain}
52
52
  unless hDictionary[:domains].empty?
53
53
  @html.div do
54
- @html.div('Domains', {'class' => 'h5'})
54
+ @html.h5('Domains', {'class' => 'h5'})
55
55
  @html.div(:class => 'block') do
56
56
  domainClass.writeHtml(hDictionary[:domains])
57
57
  end
@@ -61,7 +61,7 @@ module ADIWG
61
61
  # dictionary - entities [] {entity}
62
62
  unless hDictionary[:entities].empty?
63
63
  @html.div do
64
- @html.div('Entities', {'class' => 'h5'})
64
+ @html.h5('Entities', {'class' => 'h5'})
65
65
  @html.div(:class => 'block') do
66
66
  entityClass.writeHtml(hDictionary[:entities])
67
67
  end
@@ -71,7 +71,7 @@ module ADIWG
71
71
  # dictionary - citation {citation}
72
72
  unless hDictionary[:citation].empty?
73
73
  @html.div do
74
- @html.div('Citation', {'class' => 'h5'})
74
+ @html.h5('Citation', {'class' => 'h5'})
75
75
  @html.div(:class => 'block') do
76
76
  citationClass.writeHtml(hDictionary[:citation])
77
77
  end
@@ -81,7 +81,7 @@ module ADIWG
81
81
  # dictionary - locales {locale}
82
82
  hDictionary[:locales].each do |hLocale|
83
83
  @html.div do
84
- @html.div('Locale', {'class' => 'h5'})
84
+ @html.h5('Locale', {'class' => 'h5'})
85
85
  @html.div(:class => 'block') do
86
86
  localeClass.writeHtml(hLocale)
87
87
  end
@@ -91,7 +91,7 @@ module ADIWG
91
91
  # dictionary - responsible party {responsibility}
92
92
  unless hDictionary[:responsibleParty].empty?
93
93
  @html.div do
94
- @html.div(hDictionary[:responsibleParty][:roleName], {'class' => 'h5'})
94
+ @html.h5(hDictionary[:responsibleParty][:roleName], {'class' => 'h5'})
95
95
  @html.div(:class => 'block') do
96
96
  responsibilityClass.writeHtml(hDictionary[:responsibleParty])
97
97
  end
@@ -1,4 +1,6 @@
1
1
  require_relative 'html_citation'
2
+ require_relative 'html_scope'
3
+ require_relative 'html_dataQualityReport'
2
4
 
3
5
  module ADIWG
4
6
  module Mdtranslator
@@ -12,14 +14,13 @@ module ADIWG
12
14
  def writeHtml(hDataQuality)
13
15
  citationClass = Html_Citation.new(@html)
14
16
  scopeClass = Html_Scope.new(@html)
17
+ dataQualityReportClass = Html_DataQualityReport.new(@html)
15
18
 
16
- unless hDataQuality[:scope].nil? || hDataQuality[:scope].empty?
17
- @html.div(class: 'block') do
18
- @html.div do
19
- @html.div('Scope', {'class' => 'h5'})
20
- @html.div(class: 'block') do
21
- scopeClass.writeHtml(hDataQuality[:scope])
22
- end
19
+ unless hDataQuality[:scope].empty?
20
+ @html.div do
21
+ @html.h5('Scope', {'class' => 'h5'})
22
+ @html.div(:class => 'block') do
23
+ scopeClass.writeHtml(hDataQuality[:scope])
23
24
  end
24
25
  end
25
26
  end
@@ -30,11 +31,11 @@ module ADIWG
30
31
  hDataQuality[:standaloneQualityReport][:reportReference].nil? )
31
32
  report = hDataQuality[:standaloneQualityReport]
32
33
 
33
- @html.div(class: 'block') do
34
+ @html.div(:class => 'block') do
34
35
  @html.div do
35
- @html.div('Standalone Quality Report', {'class' => 'h5'})
36
+ @html.h5('Standalone Quality Report', {'class' => 'h5'})
36
37
  unless report[:abstract].nil?
37
- @html.div(class: 'block') do
38
+ @html.div(:class =>'block') do
38
39
  @html.em('Abstract:')
39
40
  @html.text!(report[:abstract])
40
41
  end
@@ -42,16 +43,34 @@ module ADIWG
42
43
 
43
44
  unless report[:reportReference].nil?
44
45
  @html.div do
45
- @html.div('Report Reference', {'class' => 'h5'})
46
- @html.div(class: 'block') do
46
+ @html.h5('Report Reference', {'class' => 'h5'})
47
+ @html.div(:class =>'block') do
47
48
  citationClass.writeHtml(report[:reportReference])
48
49
  end
49
50
  end
50
51
  end
52
+
51
53
  end
52
54
  end
55
+ end
53
56
 
57
+ # reports
58
+ unless hDataQuality[:report].empty?
59
+ @html.div(:class =>'block') do
60
+ @html.div do
61
+ @html.h4('Reports', {'class' => 'h4'})
62
+ hDataQuality[:report].each do |report|
63
+ @html.div(:class =>'block') do
64
+ @html.div do
65
+ @html.h5('Report', {'class' => 'h5'})
66
+ dataQualityReportClass.writeHtml(report)
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
54
72
  end
73
+
55
74
  end
56
75
  end
57
76
  end