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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) 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 +29 -13
  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/fgdc/modules/module_keyword.rb +10 -6
  9. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_lineage.rb +14 -11
  10. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_methodology.rb +26 -34
  11. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_process.rb +13 -1
  12. data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +2 -2
  13. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_conformanceResult.rb +1 -1
  14. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coverageResult.rb +8 -7
  15. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataQuality.rb +4 -4
  16. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataQualityReport.rb +8 -16
  17. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_evaluationMethod.rb +1 -1
  18. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_legalConstraint.rb +8 -8
  19. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_qualityMeasure.rb +34 -0
  20. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_qualityResultFile.rb +72 -0
  21. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_rangeElementDescription.rb +2 -2
  22. data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_contact.rb +13 -0
  23. data/lib/adiwg/mdtranslator/version.rb +1 -1
  24. data/lib/adiwg/mdtranslator/writers/fgdc/classes/{class_quality.rb → class_dataQuality.rb} +14 -10
  25. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_fgdc.rb +3 -3
  26. data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +5 -1
  27. data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQuality.rb +39 -18
  28. data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQualityReport.rb +385 -0
  29. data/lib/adiwg/mdtranslator/writers/html/sections/html_rangeElementDescription.rb +2 -2
  30. data/lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb +60 -0
  31. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_dataQualityReport.rb +213 -39
  32. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_mdMetadata.rb +1 -1
  33. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_organization.rb +1 -19
  34. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_qualityResultFile.rb +55 -0
  35. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_rangeElementDescription.rb +14 -13
  36. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_sampleDimension.rb +6 -6
  37. data/lib/adiwg/mdtranslator/writers/iso19115_3/iso19115_3_writer.rb +2 -0
  38. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_allocation.rb +1 -1
  39. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageResult.rb +30 -0
  40. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dataQuality.rb +3 -1
  41. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dataQualityReport.rb +12 -10
  42. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_descriptiveResult.rb +3 -3
  43. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_funding.rb +2 -2
  44. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_legalConstraint.rb +1 -1
  45. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb +1 -1
  46. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_qualityMeasure.rb +4 -3
  47. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_qualityResultFile.rb +23 -0
  48. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_standaloneQualityReport.rb +31 -0
  49. data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb +10 -0
  50. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_additionalDocumentation.rb +1 -1
  51. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb +1 -1
  52. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_allocation.rb +1 -1
  53. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_associatedResource.rb +2 -2
  54. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_attribute.rb +2 -2
  55. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_attributeGroup.rb +1 -1
  56. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_body.rb +15 -31
  57. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_citation.rb +5 -5
  58. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_classedData.rb +1 -1
  59. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_constraint.rb +5 -5
  60. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_contact.rb +37 -5
  61. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_coverageInfo.rb +3 -3
  62. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataDictionary.rb +5 -5
  63. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQuality.rb +31 -12
  64. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQualityReport.rb +385 -0
  65. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_distribution.rb +1 -1
  66. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_distributor.rb +3 -3
  67. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_domain.rb +3 -3
  68. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_domainItem.rb +1 -1
  69. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_entity.rb +5 -5
  70. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityAttribute.rb +3 -3
  71. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_extent.rb +3 -3
  72. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_feature.rb +5 -5
  73. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_featureCollection.rb +4 -4
  74. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_featureProperties.rb +1 -1
  75. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_format.rb +1 -1
  76. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_funding.rb +1 -1
  77. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geodeticParameters.rb +2 -2
  78. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geographicElement.rb +4 -4
  79. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geographicExtent.rb +4 -14
  80. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geologicAge.rb +1 -1
  81. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geometryCollection.rb +4 -4
  82. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geometryObject.rb +2 -2
  83. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_georectifiedRepresentation.rb +2 -2
  84. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_georeferenceableRepresentation.rb +3 -3
  85. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_graphic.rb +2 -2
  86. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_gridRepresentation.rb +2 -2
  87. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_identifier.rb +1 -1
  88. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_imageInfo.rb +1 -1
  89. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_keyword.rb +14 -16
  90. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_metadataInfo.rb +10 -9
  91. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_metadataRepository.rb +1 -1
  92. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_processStep.rb +1 -1
  93. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_processing.rb +3 -3
  94. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_rangeElementDescription.rb +2 -2
  95. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_resourceInfo.rb +17 -17
  96. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_responsibility.rb +1 -1
  97. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_resultFile.rb +60 -0
  98. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_scope.rb +12 -12
  99. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_source.rb +2 -2
  100. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_taxonomy.rb +1 -1
  101. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_timePeriod.rb +1 -3
  102. metadata +23 -13
  103. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_quality.rb +0 -181
  104. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_bodyScript.js +0 -317
@@ -0,0 +1,23 @@
1
+ require 'jbuilder'
2
+ require_relative 'mdJson_format'
3
+
4
+ module ADIWG
5
+ module Mdtranslator
6
+ module Writers
7
+ module MdJson
8
+
9
+ module QualityResultFile
10
+ def self.build(hQualityResultFile)
11
+ Jbuilder.new do |json|
12
+ json.fileName hQualityResultFile[:fileName]
13
+ json.fileDescription hQualityResultFile[:fileDescription]
14
+ json.fileType hQualityResultFile[:fileType]
15
+ json.fileFormat Format.build(hQualityResultFile[:fileFormat]) unless hQualityResultFile[:fileFormat].nil?
16
+ end
17
+ end
18
+ end
19
+
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,31 @@
1
+ # mdJson 2.0 writer - dataQuality
2
+
3
+ require 'jbuilder'
4
+ require_relative 'mdJson_citation'
5
+
6
+ module ADIWG
7
+ module Mdtranslator
8
+ module Writers
9
+ module MdJson
10
+
11
+ module StandaloneQualityReport
12
+
13
+ @Namespace = ADIWG::Mdtranslator::Writers::MdJson
14
+
15
+ def self.build(hStandaloneReport)
16
+ reportReference = hStandaloneReport[:reportReference]
17
+ Jbuilder.new do |json|
18
+ json.reportReference Citation.build(reportReference)
19
+ json.abstract hStandaloneReport[:abstract]
20
+ end
21
+
22
+ end
23
+
24
+ end
25
+
26
+ end
27
+ end
28
+ end
29
+ end
30
+
31
+
@@ -149,6 +149,16 @@ module ADIWG
149
149
  end
150
150
  end
151
151
  end
152
+
153
+ if hContact[:externalIdentifier] && type == 'person'
154
+ hContact[:externalIdentifier].each do |hExternalIdentifier|
155
+ if hExternalIdentifier[:namespace] == 'ORCID'
156
+ json.orcId hExternalIdentifier[:identifier]
157
+ break
158
+ end
159
+ end
160
+ end
161
+
152
162
  end
153
163
  end
154
164
 
@@ -33,7 +33,7 @@ module ADIWG
33
33
  # additional documentation - citation [] {citation}
34
34
  hAddDoc[:citation].each do |hCitation|
35
35
  @html.div do
36
- @html.div(hCitation[:title], {'class' => 'h5'})
36
+ @html.h5(hCitation[:title], {'class' => 'h5'})
37
37
  @html.div(:class => 'block') do
38
38
  citationClass.writeHtml(hCitation)
39
39
  end
@@ -32,7 +32,7 @@ module ADIWG
32
32
  # algorithm - citation {citation}
33
33
  unless hAlgorithm[:citation].empty?
34
34
  @html.div do
35
- @html.div('Algorithm citation', {'class' => 'h5'})
35
+ @html.h5('Algorithm citation', {'class' => 'h5'})
36
36
  @html.div(:class => 'block') do
37
37
  citationClass.writeHtml(hAlgorithm[:citation])
38
38
  end
@@ -80,7 +80,7 @@ module ADIWG
80
80
  # allocation - responsible parties [] {responsibleParty}
81
81
  hAllocation[:responsibleParties].each do |hResponsibility|
82
82
  @html.div do
83
- @html.div(hResponsibility[:roleName], 'class' => 'h5')
83
+ @html.h5(hResponsibility[:roleName], 'class' => 'h5')
84
84
  @html.div(:class => 'block') do
85
85
  responsibilityClass.writeHtml(hResponsibility)
86
86
  end
@@ -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
@@ -67,37 +67,25 @@ module ADIWG
67
67
  @html.div('id' => 'sideNav') do
68
68
 
69
69
  # add section buttons
70
- @html.a(' Top', {'href' => '#', 'class' => 'btn'})
71
70
  @html.a(' Contacts', {'href' => '#body-contacts', 'class' => 'btn navBtn', 'id' => 'contactButton'})
72
71
  @html.a(' Metadata', {'href' => '#body-metadataInfo', 'class' => 'btn navBtn', 'id' => 'metadataButton'})
73
72
  @html.a(' Resource', {'href' => '#body-resourceInfo', 'class' => 'btn navBtn', 'id' => 'resourceButton'})
74
73
  @html.a(' Lineage', {'href' => '#body-lineage', 'class' => 'btn navBtn', 'id' => 'lineageButton'})
75
74
  @html.a(' Distribution', {'href' => '#body-distribution', 'class' => 'btn navBtn', 'id' => 'distributionButton'})
75
+ @html.br
76
76
  @html.a(' Associated', {'href' => '#body-associatedResource', 'class' => 'btn navBtn', 'id' => 'associatedButton'})
77
77
  @html.a(' Additional', {'href' => '#body-additionalDocument', 'class' => 'btn navBtn', 'id' => 'additionalButton'})
78
78
  @html.a(' Dictionary', {'href' => '#body-dataDictionary', 'class' => 'btn navBtn', 'id' => 'dictionaryButton'})
79
79
  @html.a(' Funding', {'href' => '#body-funding', 'class' => 'btn navBtn', 'id' => 'fundingButton'})
80
80
  @html.a(' Repository', {'href' => '#body-repository', 'class' => 'btn navBtn', 'id' => 'repositoryButton'})
81
81
 
82
- # add open and close buttons
83
- @html.span(' Open', {'class' => 'btn icon-caret-down', 'id' => 'openAllButton'})
84
- @html.span(' Close', {'class' => 'btn icon-caret-right', 'id' => 'closeAllButton'})
85
-
86
82
  end
87
83
 
88
84
  # main header
89
85
  @html.h2('id' => 'mainHeader') do
90
86
  # added blank to span tag to force builder to create closing tag
91
- @html.span('', 'id' => 'logo')
92
- @html.span('Metadata Record')
93
- @html.span('HTML5', 'class' => 'version')
94
87
  end
95
88
 
96
- # report title
97
- # aShortVersion = version.split('.')
98
- # shortVersion = aShortVersion[0].to_s + '.' + aShortVersion[1].to_s
99
- @html.h1('mdTranslator ' + version + ' HTML Metadata Record', 'id' => 'mdtranslator-metadata-report')
100
-
101
89
  # resource citation title
102
90
  unless hResourceInfo.empty?
103
91
  unless hResourceInfo[:citation].empty?
@@ -110,7 +98,7 @@ module ADIWG
110
98
  # report date
111
99
  @html.div(:class => 'block') do
112
100
  @html.em('Report Generated:')
113
- @html.text!(Time.new.inspect)
101
+ @html.text!(Time.new.strftime('%Y-%m-%d %H:%M:%S'))
114
102
  end
115
103
 
116
104
  # metadata source
@@ -129,6 +117,7 @@ module ADIWG
129
117
  unless aContacts.empty?
130
118
  @html.div do
131
119
  @html.h2('Contacts', {'id' => 'body-contacts', 'class' => 'h2'})
120
+ @html.span('', {'style' => 'mso-bookmark:body-contacts'})
132
121
  @html.div(:class => 'block') do
133
122
  aContacts.each do |hContact|
134
123
  @html.div(:class => 'block') do
@@ -136,6 +125,7 @@ module ADIWG
136
125
  end
137
126
  end
138
127
  @html.hr
128
+ @html.br
139
129
  end
140
130
  end
141
131
  end
@@ -144,6 +134,7 @@ module ADIWG
144
134
  unless hMetaInfo.empty?
145
135
  @html.div do
146
136
  @html.h2('Metadata Information', {'id' => 'body-metadataInfo', 'class' => 'h2'})
137
+ @html.span('', {'style' => 'mso-bookmark:body-metadataInfo'})
147
138
  @html.div(:class => 'block') do
148
139
  @html.div(:class => 'block') do
149
140
  metaInfoClass.writeHtml(hMetaInfo)
@@ -157,7 +148,8 @@ module ADIWG
157
148
  unless hResourceInfo.empty?
158
149
  @html.div do
159
150
  @html.h2('Resource Information', {'id' => 'body-resourceInfo', 'class' => 'h2'})
160
- @html.div(:class => 'block') do
151
+ @html.span('', {'style' => 'mso-bookmark:body-resourceInfo'})
152
+ @html.div(:class => 'block') do
161
153
  resourceClass.writeHtml(hResourceInfo)
162
154
  end
163
155
  @html.hr
@@ -167,6 +159,7 @@ module ADIWG
167
159
  unless aDataQuality.nil? || aDataQuality.empty?
168
160
  @html.div do
169
161
  @html.h2('Data Quality', {'id' => 'body-dataQuality', 'class' => 'h2'})
162
+ @html.span('', {'style' => 'mso-bookmark:body-dataQuality'})
170
163
  aDataQuality.each do |hDataQuality|
171
164
  @html.div(:class => 'block') do
172
165
  dataQualityClass.writeHtml(hDataQuality)
@@ -179,6 +172,7 @@ module ADIWG
179
172
  unless aLineage.empty?
180
173
  @html.div do
181
174
  @html.h2('Resource Lineage', {'id' => 'body-lineage', 'class' => 'h2'})
175
+ @html.span('', {'style' => 'mso-bookmark:body-lineage'})
182
176
  @html.div(:class => 'block') do
183
177
  aLineage.each do |hLineage|
184
178
  @html.div do
@@ -197,6 +191,7 @@ module ADIWG
197
191
  unless aDistribution.empty?
198
192
  @html.div do
199
193
  @html.h2('Resource Distribution', {'id' => 'body-distribution', 'class' => 'h2'})
194
+ @html.span('', {'style' => 'mso-bookmark:body-distribution'})
200
195
  @html.div(:class => 'block') do
201
196
  aDistribution.each do |hDistribution|
202
197
  @html.div do
@@ -215,6 +210,7 @@ module ADIWG
215
210
  unless aAssociated.empty?
216
211
  @html.div do
217
212
  @html.h2('Associated Resources', {'id' => 'body-associatedResource', 'class' => 'h2'})
213
+ @html.span('', {'style' => 'mso-bookmark:body-associatedResource'})
218
214
  @html.div(:class => 'block') do
219
215
  aAssociated.each do |hAssociated|
220
216
  @html.div do
@@ -233,6 +229,7 @@ module ADIWG
233
229
  unless aAdditional.empty?
234
230
  @html.div do
235
231
  @html.h2('Additional Documentation', {'id' => 'body-additionalDocument', 'class' => 'h2'})
232
+ @html.span('', {'style' => 'mso-bookmark:body-additionalDocument'})
236
233
  @html.div(:class => 'block') do
237
234
  aAdditional.each do |hAdditional|
238
235
  @html.div do
@@ -251,6 +248,7 @@ module ADIWG
251
248
  unless aDictionaries.empty?
252
249
  @html.div do
253
250
  @html.h2('Data Dictionaries', {'id' => 'body-dataDictionary', 'class' => 'h2'})
251
+ @html.span('', {'style' => 'mso-bookmark:body-dataDictionary'})
254
252
  @html.div(:class => 'block') do
255
253
  aDictionaries.each do |hDictionary|
256
254
  @html.div do
@@ -268,6 +266,7 @@ module ADIWG
268
266
  unless aFunding.empty?
269
267
  @html.div do
270
268
  @html.h2('Funding', {'id' => 'body-funding', 'class' => 'h2'})
269
+ @html.span('', {'style' => 'mso-bookmark:body-funding'})
271
270
  @html.div(:class => 'block') do
272
271
  aFunding.each do |hFunding|
273
272
  @html.div do
@@ -285,6 +284,7 @@ module ADIWG
285
284
  unless aRepositories.empty?
286
285
  @html.div do
287
286
  @html.h2('Metadata Repositories', {'id' => 'body-repository', 'class' => 'h2'})
287
+ @html.span('', {'style' => 'mso-bookmark:body-repository'})
288
288
  @html.div(:class => 'block') do
289
289
  aRepositories.each do |hRepository|
290
290
  @html.div do
@@ -298,22 +298,6 @@ module ADIWG
298
298
  end
299
299
  end
300
300
 
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
301
  end # body
318
302
  end # writeHtml
319
303
  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', 'style' => 'font-style: italic'})
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', 'style' => 'font-style: italic'})
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', 'style' => 'font-style: italic'})
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', 'style' => 'font-style: italic'})
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', 'style' => 'font-style: italic'})
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